Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature/graphapi-update] Update Graph API types and code generator #133

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
204 changes: 172 additions & 32 deletions ownCloudSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAActivity.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// GAActivity.h
// Autogenerated / Managed by ocapigen
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
* For distribution utilizing Apple mechanisms please see https://owncloud.org/contribute/iOS-license-exception/
* You should have received a copy of this license along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.en.html>.
*
*/

// occgen: includes
#import <Foundation/Foundation.h>
#import "GAGraphObject.h"

// occgen: type start
NS_ASSUME_NONNULL_BEGIN
@interface GAActivity : NSObject <GAGraphObject, NSSecureCoding>

// occgen: type properties
@property(strong) NSString *identifier; //!< Activity ID.
@property(strong) NSDictionary *times;
@property(strong) NSDictionary *template;

// occgen: type protected {"locked":true}


// occgen: type end
@end
NS_ASSUME_NONNULL_END

82 changes: 82 additions & 0 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAActivity.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
//
// GAActivity.m
// Autogenerated / Managed by ocapigen
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
* For distribution utilizing Apple mechanisms please see https://owncloud.org/contribute/iOS-license-exception/
* You should have received a copy of this license along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.en.html>.
*
*/

// occgen: includes
#import "GAActivity.h"

// occgen: type start
@implementation GAActivity

// occgen: type serialization
+ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError
{
GAActivity *instance = [self new];

GA_MAP_REQ(identifier, "id", NSString, Nil);
GA_SET_REQ(times, NSDictionary, Nil);
GA_SET_REQ(template, NSDictionary, Nil);

return (instance);
}

// occgen: struct serialization
- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError
{
GA_ENC_INIT
GA_ENC_ADD(_identifier, "id", YES);
GA_ENC_ADD(_times, "times", YES);
GA_ENC_ADD(_template, "template", YES);
GA_ENC_RETURN
}

// occgen: type native deserialization
+ (BOOL)supportsSecureCoding
{
return (YES);
}

- (instancetype)initWithCoder:(NSCoder *)decoder
{
if ((self = [super init]) != nil)
{
_identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"];
_times = [decoder decodeObjectOfClass:NSDictionary.class forKey:@"times"];
_template = [decoder decodeObjectOfClass:NSDictionary.class forKey:@"template"];
}

return (self);
}

// occgen: type native serialization
- (void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeObject:_identifier forKey:@"identifier"];
[coder encodeObject:_times forKey:@"times"];
[coder encodeObject:_template forKey:@"template"];
}

// occgen: type debug description
- (NSString *)description
{
return ([NSString stringWithFormat:@"<%@: %p%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_times!=nil) ? [NSString stringWithFormat:@", times: %@", _times] : @""), ((_template!=nil) ? [NSString stringWithFormat:@", template: %@", _template] : @"")]);
}

// occgen: type protected {"locked":true}


// occgen: type end
@end

4 changes: 2 additions & 2 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// GAAppRole.h
// Autogenerated / Managed by ocapigen
// Copyright (C) 2022 ownCloud GmbH. All rights reserved.
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2022, ownCloud GmbH.
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
Expand Down
15 changes: 13 additions & 2 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.m
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// GAAppRole.m
// Autogenerated / Managed by ocapigen
// Copyright (C) 2022 ownCloud GmbH. All rights reserved.
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2022, ownCloud GmbH.
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
Expand Down Expand Up @@ -33,6 +33,17 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl
return (instance);
}

// occgen: struct serialization
- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError
{
GA_ENC_INIT
GA_ENC_ADD(_allowedMemberTypes, "allowedMemberTypes", NO);
GA_ENC_ADD(_desc, "description", NO);
GA_ENC_ADD(_displayName, "displayName", NO);
GA_ENC_ADD(_identifier, "id", YES);
GA_ENC_RETURN
}

// occgen: type native deserialization
+ (BOOL)supportsSecureCoding
{
Expand Down
4 changes: 2 additions & 2 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// GAAppRoleAssignment.h
// Autogenerated / Managed by ocapigen
// Copyright (C) 2022 ownCloud GmbH. All rights reserved.
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2022, ownCloud GmbH.
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
Expand Down
20 changes: 18 additions & 2 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.m
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// GAAppRoleAssignment.m
// Autogenerated / Managed by ocapigen
// Copyright (C) 2022 ownCloud GmbH. All rights reserved.
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2022, ownCloud GmbH.
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
Expand Down Expand Up @@ -38,6 +38,22 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl
return (instance);
}

// occgen: struct serialization
- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError
{
GA_ENC_INIT
GA_ENC_ADD(_identifier, "id", NO);
GA_ENC_ADD(_deletedDateTime, "deletedDateTime", NO);
GA_ENC_ADD(_appRoleId, "appRoleId", YES);
GA_ENC_ADD(_createdDateTime, "createdDateTime", NO);
GA_ENC_ADD(_principalDisplayName, "principalDisplayName", NO);
GA_ENC_ADD(_principalId, "principalId", YES);
GA_ENC_ADD(_principalType, "principalType", NO);
GA_ENC_ADD(_resourceDisplayName, "resourceDisplayName", NO);
GA_ENC_ADD(_resourceId, "resourceId", YES);
GA_ENC_RETURN
}

// occgen: type native deserialization
+ (BOOL)supportsSecureCoding
{
Expand Down
4 changes: 2 additions & 2 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// GAApplication.h
// Autogenerated / Managed by ocapigen
// Copyright (C) 2022 ownCloud GmbH. All rights reserved.
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2022, ownCloud GmbH.
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
Expand Down
14 changes: 12 additions & 2 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.m
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// GAApplication.m
// Autogenerated / Managed by ocapigen
// Copyright (C) 2022 ownCloud GmbH. All rights reserved.
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2022, ownCloud GmbH.
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
Expand Down Expand Up @@ -33,6 +33,16 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl
return (instance);
}

// occgen: struct serialization
- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError
{
GA_ENC_INIT
GA_ENC_ADD(_identifier, "id", YES);
GA_ENC_ADD(_appRoles, "appRoles", NO);
GA_ENC_ADD(_displayName, "displayName", NO);
GA_ENC_RETURN
}

// occgen: type native deserialization
+ (BOOL)supportsSecureCoding
{
Expand Down
49 changes: 49 additions & 0 deletions ownCloudSDK/GraphAPI/GeneratedTypes/GAAudio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// GAAudio.h
// Autogenerated / Managed by ocapigen
// Copyright (C) 2024 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2024, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
* For distribution utilizing Apple mechanisms please see https://owncloud.org/contribute/iOS-license-exception/
* You should have received a copy of this license along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.en.html>.
*
*/

// occgen: includes
#import <Foundation/Foundation.h>
#import "GAGraphObject.h"

// occgen: type start
NS_ASSUME_NONNULL_BEGIN
@interface GAAudio : NSObject <GAGraphObject, NSSecureCoding>

// occgen: type properties
@property(strong, nullable) NSString *album; //!< The title of the album for this audio file.
@property(strong, nullable) NSString *albumArtist; //!< The artist named on the album for the audio file.
@property(strong, nullable) NSString *artist; //!< The performing artist for the audio file.
@property(strong, nullable) NSNumber *bitrate; //!< [integer:int64] Bitrate expressed in kbps.
@property(strong, nullable) NSString *composers; //!< The name of the composer of the audio file.
@property(strong, nullable) NSString *copyright; //!< Copyright information for the audio file.
@property(strong, nullable) NSNumber *disc; //!< [integer:int16] The number of the disc this audio file came from.
@property(strong, nullable) NSNumber *discCount; //!< [integer:int16] The total number of discs in this album.
@property(strong, nullable) NSNumber *duration; //!< [integer:int64] Duration of the audio file, expressed in milliseconds
@property(strong, nullable) NSString *genre; //!< The genre of this audio file.
@property(strong, nullable) NSNumber *hasDrm; //!< [boolean] Indicates if the file is protected with digital rights management.
@property(strong, nullable) NSNumber *isVariableBitrate; //!< [boolean] Indicates if the file is encoded with a variable bitrate.
@property(strong, nullable) NSString *title; //!< The title of the audio file.
@property(strong, nullable) NSNumber *track; //!< [integer:int32] The number of the track on the original disc for this audio file.
@property(strong, nullable) NSNumber *trackCount; //!< [integer:int32] The total number of tracks on the original disc for this audio file.
@property(strong, nullable) NSNumber *year; //!< [integer:int32] The year the audio file was recorded.

// occgen: type protected {"locked":true}


// occgen: type end
@end
NS_ASSUME_NONNULL_END

Loading