diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAActivity.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAActivity.h new file mode 100644 index 00000000..3b7c1b92 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAActivity.h @@ -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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAActivity : NSObject + +// 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 + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAActivity.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAActivity.m new file mode 100644 index 00000000..dcf77a73 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAActivity.m @@ -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 . + * + */ + +// 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 + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.h index e6d92ac5..d1a6992b 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.h @@ -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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.m index 3a687c8e..df55ac8a 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRole.m @@ -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. * @@ -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 { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.h index 2754e121..8e0010b0 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.h @@ -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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.m index 0ce55711..f516778b 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAppRoleAssignment.m @@ -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. * @@ -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 { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.h index 520bfb78..10abcb95 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.h @@ -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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.m index 49fda736..3792c14a 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAApplication.m @@ -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. * @@ -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 { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAudio.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAudio.h new file mode 100644 index 00000000..1004fb06 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAudio.h @@ -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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAAudio : NSObject + +// 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 + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAAudio.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAudio.m new file mode 100644 index 00000000..5c7baecd --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAAudio.m @@ -0,0 +1,134 @@ +// +// GAAudio.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 . + * + */ + +// occgen: includes +#import "GAAudio.h" + +// occgen: type start +@implementation GAAudio + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAAudio *instance = [self new]; + + GA_SET(album, NSString, Nil); + GA_SET(albumArtist, NSString, Nil); + GA_SET(artist, NSString, Nil); + GA_SET(bitrate, NSNumber, Nil); + GA_SET(composers, NSString, Nil); + GA_SET(copyright, NSString, Nil); + GA_SET(disc, NSNumber, Nil); + GA_SET(discCount, NSNumber, Nil); + GA_SET(duration, NSNumber, Nil); + GA_SET(genre, NSString, Nil); + GA_SET(hasDrm, NSNumber, Nil); + GA_SET(isVariableBitrate, NSNumber, Nil); + GA_SET(title, NSString, Nil); + GA_SET(track, NSNumber, Nil); + GA_SET(trackCount, NSNumber, Nil); + GA_SET(year, NSNumber, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_album, "album", NO); + GA_ENC_ADD(_albumArtist, "albumArtist", NO); + GA_ENC_ADD(_artist, "artist", NO); + GA_ENC_ADD(_bitrate, "bitrate", NO); + GA_ENC_ADD(_composers, "composers", NO); + GA_ENC_ADD(_copyright, "copyright", NO); + GA_ENC_ADD(_disc, "disc", NO); + GA_ENC_ADD(_discCount, "discCount", NO); + GA_ENC_ADD(_duration, "duration", NO); + GA_ENC_ADD(_genre, "genre", NO); + GA_ENC_ADD(_hasDrm, "hasDrm", NO); + GA_ENC_ADD(_isVariableBitrate, "isVariableBitrate", NO); + GA_ENC_ADD(_title, "title", NO); + GA_ENC_ADD(_track, "track", NO); + GA_ENC_ADD(_trackCount, "trackCount", NO); + GA_ENC_ADD(_year, "year", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _album = [decoder decodeObjectOfClass:NSString.class forKey:@"album"]; + _albumArtist = [decoder decodeObjectOfClass:NSString.class forKey:@"albumArtist"]; + _artist = [decoder decodeObjectOfClass:NSString.class forKey:@"artist"]; + _bitrate = [decoder decodeObjectOfClass:NSNumber.class forKey:@"bitrate"]; + _composers = [decoder decodeObjectOfClass:NSString.class forKey:@"composers"]; + _copyright = [decoder decodeObjectOfClass:NSString.class forKey:@"copyright"]; + _disc = [decoder decodeObjectOfClass:NSNumber.class forKey:@"disc"]; + _discCount = [decoder decodeObjectOfClass:NSNumber.class forKey:@"discCount"]; + _duration = [decoder decodeObjectOfClass:NSNumber.class forKey:@"duration"]; + _genre = [decoder decodeObjectOfClass:NSString.class forKey:@"genre"]; + _hasDrm = [decoder decodeObjectOfClass:NSNumber.class forKey:@"hasDrm"]; + _isVariableBitrate = [decoder decodeObjectOfClass:NSNumber.class forKey:@"isVariableBitrate"]; + _title = [decoder decodeObjectOfClass:NSString.class forKey:@"title"]; + _track = [decoder decodeObjectOfClass:NSNumber.class forKey:@"track"]; + _trackCount = [decoder decodeObjectOfClass:NSNumber.class forKey:@"trackCount"]; + _year = [decoder decodeObjectOfClass:NSNumber.class forKey:@"year"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_album forKey:@"album"]; + [coder encodeObject:_albumArtist forKey:@"albumArtist"]; + [coder encodeObject:_artist forKey:@"artist"]; + [coder encodeObject:_bitrate forKey:@"bitrate"]; + [coder encodeObject:_composers forKey:@"composers"]; + [coder encodeObject:_copyright forKey:@"copyright"]; + [coder encodeObject:_disc forKey:@"disc"]; + [coder encodeObject:_discCount forKey:@"discCount"]; + [coder encodeObject:_duration forKey:@"duration"]; + [coder encodeObject:_genre forKey:@"genre"]; + [coder encodeObject:_hasDrm forKey:@"hasDrm"]; + [coder encodeObject:_isVariableBitrate forKey:@"isVariableBitrate"]; + [coder encodeObject:_title forKey:@"title"]; + [coder encodeObject:_track forKey:@"track"]; + [coder encodeObject:_trackCount forKey:@"trackCount"]; + [coder encodeObject:_year forKey:@"year"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_album!=nil) ? [NSString stringWithFormat:@", album: %@", _album] : @""), ((_albumArtist!=nil) ? [NSString stringWithFormat:@", albumArtist: %@", _albumArtist] : @""), ((_artist!=nil) ? [NSString stringWithFormat:@", artist: %@", _artist] : @""), ((_bitrate!=nil) ? [NSString stringWithFormat:@", bitrate: %@", _bitrate] : @""), ((_composers!=nil) ? [NSString stringWithFormat:@", composers: %@", _composers] : @""), ((_copyright!=nil) ? [NSString stringWithFormat:@", copyright: %@", _copyright] : @""), ((_disc!=nil) ? [NSString stringWithFormat:@", disc: %@", _disc] : @""), ((_discCount!=nil) ? [NSString stringWithFormat:@", discCount: %@", _discCount] : @""), ((_duration!=nil) ? [NSString stringWithFormat:@", duration: %@", _duration] : @""), ((_genre!=nil) ? [NSString stringWithFormat:@", genre: %@", _genre] : @""), ((_hasDrm!=nil) ? [NSString stringWithFormat:@", hasDrm: %@", _hasDrm] : @""), ((_isVariableBitrate!=nil) ? [NSString stringWithFormat:@", isVariableBitrate: %@", _isVariableBitrate] : @""), ((_title!=nil) ? [NSString stringWithFormat:@", title: %@", _title] : @""), ((_track!=nil) ? [NSString stringWithFormat:@", track: %@", _track] : @""), ((_trackCount!=nil) ? [NSString stringWithFormat:@", trackCount: %@", _trackCount] : @""), ((_year!=nil) ? [NSString stringWithFormat:@", year: %@", _year] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADeleted.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GADeleted.h index 095f7b15..cace1b74 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GADeleted.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADeleted.h @@ -1,11 +1,11 @@ // // GADeleted.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. * @@ -40,7 +40,3 @@ extern GADeletedState GADeletedStateTrashed; NS_ASSUME_NONNULL_END - - - - diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADeleted.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GADeleted.m index 5079ea7b..e20ce18b 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GADeleted.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADeleted.m @@ -1,11 +1,11 @@ // // GADeleted.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. * @@ -30,6 +30,14 @@ + (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(_state, "state", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -67,6 +75,3 @@ - (NSString *)description // occgen: static {"locked":true} GADeletedState GADeletedStateTrashed = @"trashed"; - - - diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADrive.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GADrive.h index 60caebf5..c045cbbe 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GADrive.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADrive.h @@ -1,11 +1,11 @@ // // GADrive.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. * @@ -32,20 +32,18 @@ NS_ASSUME_NONNULL_BEGIN @interface GADrive : NSObject // occgen: type properties { "customPropertyTypes" : { "driveType" : "OCDriveType", "eTag" : "OCFileETag", "driveAlias" : "OCDriveAlias" }} -@property(strong, nullable) NSString *identifier; //!< The unique idenfier for this drive. +@property(strong, nullable) NSString *identifier; //!< The unique identifier for this drive. @property(strong, nullable) GAIdentitySet *createdBy; //!< Identity of the user, device, or application which created the item. Read-only. @property(strong, nullable) NSDate *createdDateTime; //!< [string:date-time] Date and time of item creation. Read-only. | pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$ @property(strong, nullable) NSString *desc; //!< Provides a user-visible description of the item. Optional. @property(strong, nullable) OCFileETag eTag; //!< ETag for the item. Read-only. @property(strong, nullable) GAIdentitySet *lastModifiedBy; //!< Identity of the user, device, and application which last modified the item. Read-only. @property(strong, nullable) NSDate *lastModifiedDateTime; //!< [string:date-time] Date and time the item was last modified. Read-only. | pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$ -@property(strong, nullable) NSString *name; //!< The name of the item. Read-write. +@property(strong) NSString *name; //!< The name of the item. Read-write. @property(strong, nullable) GAItemReference *parentReference; //!< Parent information, if the item has a parent. Read-write. @property(strong, nullable) NSURL *webUrl; //!< URL that displays the resource in the browser. Read-only. -@property(strong, nullable) GAUser *createdByUser; //!< Identity of the user who created the item. Read-only. -@property(strong, nullable) GAUser *lastModifiedByUser; //!< Identity of the user who last modified the item. Read-only. @property(strong, nullable) OCDriveType driveType; //!< Describes the type of drive represented by this resource. Values are "personal" for users home spaces, "project", "virtual" or "share". Read-only. -@property(strong, nullable) OCDriveAlias driveAlias; //!< "The drive alias can be used in clients to make the urls user friendly. Example: 'personal/einstein'. This will be used to resolve to the correct driveID." +@property(strong, nullable) OCDriveAlias driveAlias; //!< The drive alias can be used in clients to make the urls user friendly. Example: 'personal/einstein'. This will be used to resolve to the correct driveID. @property(strong, nullable) GAIdentitySet *owner; @property(strong, nullable) GAQuota *quota; @property(strong, nullable) NSArray *items; //!< All items contained in the drive. Read-only. Nullable. @@ -55,6 +53,8 @@ NS_ASSUME_NONNULL_BEGIN // occgen: type protected {"locked":true} - (nullable GADriveItem *)specialDriveItemFor:(GASpecialFolderName)name; + + // occgen: type end @end NS_ASSUME_NONNULL_END diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADrive.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GADrive.m index ec607070..e1588f10 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GADrive.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADrive.m @@ -1,11 +1,11 @@ // // GADrive.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. * @@ -20,7 +20,6 @@ #import "GAIdentitySet.h" #import "GAItemReference.h" #import "GAQuota.h" -#import "GAUser.h" // occgen: more includes #import "GASpecialFolder.h" @@ -41,11 +40,9 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_SET(eTag, NSString, Nil); GA_SET(lastModifiedBy, GAIdentitySet, Nil); GA_SET(lastModifiedDateTime, NSDate, Nil); - GA_SET(name, NSString, Nil); + GA_SET_REQ(name, NSString, Nil); GA_SET(parentReference, GAItemReference, Nil); GA_SET(webUrl, NSURL, Nil); - GA_SET(createdByUser, GAUser, Nil); - GA_SET(lastModifiedByUser, GAUser, Nil); GA_SET(driveType, NSString, Nil); GA_SET(driveAlias, NSString, Nil); GA_SET(owner, GAIdentitySet, Nil); @@ -57,6 +54,30 @@ + (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(_createdBy, "createdBy", NO); + GA_ENC_ADD(_createdDateTime, "createdDateTime", NO); + GA_ENC_ADD(_desc, "description", NO); + GA_ENC_ADD(_eTag, "eTag", NO); + GA_ENC_ADD(_lastModifiedBy, "lastModifiedBy", NO); + GA_ENC_ADD(_lastModifiedDateTime, "lastModifiedDateTime", NO); + GA_ENC_ADD(_name, "name", YES); + GA_ENC_ADD(_parentReference, "parentReference", NO); + GA_ENC_ADD(_webUrl, "webUrl", NO); + GA_ENC_ADD(_driveType, "driveType", NO); + GA_ENC_ADD(_driveAlias, "driveAlias", NO); + GA_ENC_ADD(_owner, "owner", NO); + GA_ENC_ADD(_quota, "quota", NO); + GA_ENC_ADD(_items, "items", NO); + GA_ENC_ADD(_root, "root", NO); + GA_ENC_ADD(_special, "special", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -77,8 +98,6 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _name = [decoder decodeObjectOfClass:NSString.class forKey:@"name"]; _parentReference = [decoder decodeObjectOfClass:GAItemReference.class forKey:@"parentReference"]; _webUrl = [decoder decodeObjectOfClass:NSURL.class forKey:@"webUrl"]; - _createdByUser = [decoder decodeObjectOfClass:GAUser.class forKey:@"createdByUser"]; - _lastModifiedByUser = [decoder decodeObjectOfClass:GAUser.class forKey:@"lastModifiedByUser"]; _driveType = [decoder decodeObjectOfClass:NSString.class forKey:@"driveType"]; _driveAlias = [decoder decodeObjectOfClass:NSString.class forKey:@"driveAlias"]; _owner = [decoder decodeObjectOfClass:GAIdentitySet.class forKey:@"owner"]; @@ -104,8 +123,6 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_name forKey:@"name"]; [coder encodeObject:_parentReference forKey:@"parentReference"]; [coder encodeObject:_webUrl forKey:@"webUrl"]; - [coder encodeObject:_createdByUser forKey:@"createdByUser"]; - [coder encodeObject:_lastModifiedByUser forKey:@"lastModifiedByUser"]; [coder encodeObject:_driveType forKey:@"driveType"]; [coder encodeObject:_driveAlias forKey:@"driveAlias"]; [coder encodeObject:_owner forKey:@"owner"]; @@ -118,7 +135,7 @@ - (void)encodeWithCoder:(NSCoder *)coder // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_createdBy!=nil) ? [NSString stringWithFormat:@", createdBy: %@", _createdBy] : @""), ((_createdDateTime!=nil) ? [NSString stringWithFormat:@", createdDateTime: %@", _createdDateTime] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_eTag!=nil) ? [NSString stringWithFormat:@", eTag: %@", _eTag] : @""), ((_lastModifiedBy!=nil) ? [NSString stringWithFormat:@", lastModifiedBy: %@", _lastModifiedBy] : @""), ((_lastModifiedDateTime!=nil) ? [NSString stringWithFormat:@", lastModifiedDateTime: %@", _lastModifiedDateTime] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_parentReference!=nil) ? [NSString stringWithFormat:@", parentReference: %@", _parentReference] : @""), ((_webUrl!=nil) ? [NSString stringWithFormat:@", webUrl: %@", _webUrl] : @""), ((_createdByUser!=nil) ? [NSString stringWithFormat:@", createdByUser: %@", _createdByUser] : @""), ((_lastModifiedByUser!=nil) ? [NSString stringWithFormat:@", lastModifiedByUser: %@", _lastModifiedByUser] : @""), ((_driveType!=nil) ? [NSString stringWithFormat:@", driveType: %@", _driveType] : @""), ((_driveAlias!=nil) ? [NSString stringWithFormat:@", driveAlias: %@", _driveAlias] : @""), ((_owner!=nil) ? [NSString stringWithFormat:@", owner: %@", _owner] : @""), ((_quota!=nil) ? [NSString stringWithFormat:@", quota: %@", _quota] : @""), ((_items!=nil) ? [NSString stringWithFormat:@", items: %@", _items] : @""), ((_root!=nil) ? [NSString stringWithFormat:@", root: %@", _root] : @""), ((_special!=nil) ? [NSString stringWithFormat:@", special: %@", _special] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_createdBy!=nil) ? [NSString stringWithFormat:@", createdBy: %@", _createdBy] : @""), ((_createdDateTime!=nil) ? [NSString stringWithFormat:@", createdDateTime: %@", _createdDateTime] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_eTag!=nil) ? [NSString stringWithFormat:@", eTag: %@", _eTag] : @""), ((_lastModifiedBy!=nil) ? [NSString stringWithFormat:@", lastModifiedBy: %@", _lastModifiedBy] : @""), ((_lastModifiedDateTime!=nil) ? [NSString stringWithFormat:@", lastModifiedDateTime: %@", _lastModifiedDateTime] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_parentReference!=nil) ? [NSString stringWithFormat:@", parentReference: %@", _parentReference] : @""), ((_webUrl!=nil) ? [NSString stringWithFormat:@", webUrl: %@", _webUrl] : @""), ((_driveType!=nil) ? [NSString stringWithFormat:@", driveType: %@", _driveType] : @""), ((_driveAlias!=nil) ? [NSString stringWithFormat:@", driveAlias: %@", _driveAlias] : @""), ((_owner!=nil) ? [NSString stringWithFormat:@", owner: %@", _owner] : @""), ((_quota!=nil) ? [NSString stringWithFormat:@", quota: %@", _quota] : @""), ((_items!=nil) ? [NSString stringWithFormat:@", items: %@", _items] : @""), ((_root!=nil) ? [NSString stringWithFormat:@", root: %@", _root] : @""), ((_special!=nil) ? [NSString stringWithFormat:@", special: %@", _special] : @"")]); } // occgen: type protected {"locked":true} @@ -132,28 +149,3 @@ - (GADriveItem *)specialDriveItemFor:(GASpecialFolderName)name // occgen: type end {"locked":true} @end - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItem.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItem.h index 3f83c7fe..8df8f9fe 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItem.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItem.h @@ -1,11 +1,11 @@ // // GADriveItem.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. * @@ -20,20 +20,24 @@ #import "OCDrive.h" // occgen: forward declarations { "locked" : true } +@class GAAudio; @class GADeleted; @class GADriveItem; @class GAFileSystemInfo; @class GAFolder; +@class GAGeoCoordinates; @class GAIdentitySet; @class GAImage; @class GAItemReference; @class GAOpenGraphFile; @class GAPermission; +@class GAPhoto; +@class GARemoteItem; @class GARoot; @class GASpecialFolder; +@class GAThumbnailSet; @class GATrash; -@class GAUser; -@class GARemoteItem; +@class GAVideo; // occgen: type start NS_ASSUME_NONNULL_BEGIN @@ -50,8 +54,6 @@ NS_ASSUME_NONNULL_BEGIN @property(strong, nullable) NSString *name; //!< The name of the item. Read-write. @property(strong, nullable) GAItemReference *parentReference; //!< Parent information, if the item has a parent. Read-write. @property(strong, nullable) NSURL *webUrl; //!< URL that displays the resource in the browser. Read-only. -@property(strong, nullable) GAUser *createdByUser; //!< Identity of the user who created the item. Read-only. -@property(strong, nullable) GAUser *lastModifiedByUser; //!< Identity of the user who last modified the item. Read-only. @property(strong, nullable) NSString *content; //!< [string:base64url] The content stream, if the item represents a file. @property(strong, nullable) NSString *cTag; //!< An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note This property is not returned if the item is a folder. Read-only. @property(strong, nullable) GADeleted *deleted; @@ -59,6 +61,9 @@ NS_ASSUME_NONNULL_BEGIN @property(strong, nullable) GAFileSystemInfo *fileSystemInfo; @property(strong, nullable) GAFolder *folder; @property(strong, nullable) GAImage *image; +@property(strong, nullable) GAPhoto *photo; //!< Photo metadata, if the item is a photo. Read-only. +@property(strong, nullable) GAGeoCoordinates *location; //!< Location metadata, if the item has location data. Read-only. +@property(strong, nullable) NSArray *thumbnails; //!< Collection containing ThumbnailSet objects associated with the item. Read-only. Nullable. @property(strong, nullable) GARoot *root; @property(strong, nullable) GATrash *trash; @property(strong, nullable) GASpecialFolder *specialFolder; @@ -67,6 +72,10 @@ NS_ASSUME_NONNULL_BEGIN @property(strong, nullable) NSURL *webDavUrl; //!< WebDAV compatible URL for the item. Read-only. @property(strong, nullable) NSArray *children; //!< Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. @property(strong, nullable) NSArray *permissions; //!< The set of permissions for the item. Read-only. Nullable. +@property(strong, nullable) GAAudio *audio; //!< Audio metadata, if the item is an audio file. Read-only. +@property(strong, nullable) GAVideo *video; //!< Video metadata, if the item is a video. Read-only. +@property(strong, nullable) NSNumber *clientSynchronize; //!< [boolean] Indicates if the item is synchronized with the underlying storage provider. Read-only. +@property(strong, nullable) NSNumber *UIHidden; //!< [boolean] Properties or facets (see UI.Facet) annotated with this term will not be rendered if the annotation evaluates to true. Users can set this to hide permissions. // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItem.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItem.m index 02f797bf..a398d3c6 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItem.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItem.m @@ -1,11 +1,11 @@ // // GADriveItem.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. * @@ -16,20 +16,24 @@ // occgen: includes #import "GADriveItem.h" +#import "GAAudio.h" #import "GADeleted.h" #import "GADriveItem.h" #import "GAFileSystemInfo.h" #import "GAFolder.h" +#import "GAGeoCoordinates.h" #import "GAIdentitySet.h" #import "GAImage.h" #import "GAItemReference.h" #import "GAOpenGraphFile.h" #import "GAPermission.h" +#import "GAPhoto.h" #import "GARemoteItem.h" #import "GARoot.h" #import "GASpecialFolder.h" +#import "GAThumbnailSet.h" #import "GATrash.h" -#import "GAUser.h" +#import "GAVideo.h" // occgen: type start @implementation GADriveItem @@ -49,8 +53,6 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_SET(name, NSString, Nil); GA_SET(parentReference, GAItemReference, Nil); GA_SET(webUrl, NSURL, Nil); - GA_SET(createdByUser, GAUser, Nil); - GA_SET(lastModifiedByUser, GAUser, Nil); GA_SET(content, NSString, Nil); GA_SET(cTag, NSString, Nil); GA_SET(deleted, GADeleted, Nil); @@ -58,6 +60,9 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_SET(fileSystemInfo, GAFileSystemInfo, Nil); GA_SET(folder, GAFolder, Nil); GA_SET(image, GAImage, Nil); + GA_SET(photo, GAPhoto, Nil); + GA_SET(location, GAGeoCoordinates, Nil); + GA_SET(thumbnails, GAThumbnailSet, NSArray.class); GA_SET(root, GARoot, Nil); GA_SET(trash, GATrash, Nil); GA_SET(specialFolder, GASpecialFolder, Nil); @@ -66,10 +71,53 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_SET(webDavUrl, NSURL, Nil); GA_SET(children, GADriveItem, NSArray.class); GA_SET(permissions, GAPermission, NSArray.class); + GA_SET(audio, GAAudio, Nil); + GA_SET(video, GAVideo, Nil); + GA_MAP(clientSynchronize, "@client.synchronize", NSNumber, Nil); + GA_MAP(UIHidden, "@UI.Hidden", NSNumber, 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", NO); + GA_ENC_ADD(_createdBy, "createdBy", NO); + GA_ENC_ADD(_createdDateTime, "createdDateTime", NO); + GA_ENC_ADD(_desc, "description", NO); + GA_ENC_ADD(_eTag, "eTag", NO); + GA_ENC_ADD(_lastModifiedBy, "lastModifiedBy", NO); + GA_ENC_ADD(_lastModifiedDateTime, "lastModifiedDateTime", NO); + GA_ENC_ADD(_name, "name", NO); + GA_ENC_ADD(_parentReference, "parentReference", NO); + GA_ENC_ADD(_webUrl, "webUrl", NO); + GA_ENC_ADD(_content, "content", NO); + GA_ENC_ADD(_cTag, "cTag", NO); + GA_ENC_ADD(_deleted, "deleted", NO); + GA_ENC_ADD(_file, "file", NO); + GA_ENC_ADD(_fileSystemInfo, "fileSystemInfo", NO); + GA_ENC_ADD(_folder, "folder", NO); + GA_ENC_ADD(_image, "image", NO); + GA_ENC_ADD(_photo, "photo", NO); + GA_ENC_ADD(_location, "location", NO); + GA_ENC_ADD(_thumbnails, "thumbnails", NO); + GA_ENC_ADD(_root, "root", NO); + GA_ENC_ADD(_trash, "trash", NO); + GA_ENC_ADD(_specialFolder, "specialFolder", NO); + GA_ENC_ADD(_remoteItem, "remoteItem", NO); + GA_ENC_ADD(_size, "size", NO); + GA_ENC_ADD(_webDavUrl, "webDavUrl", NO); + GA_ENC_ADD(_children, "children", NO); + GA_ENC_ADD(_permissions, "permissions", NO); + GA_ENC_ADD(_audio, "audio", NO); + GA_ENC_ADD(_video, "video", NO); + GA_ENC_ADD(_clientSynchronize, "@client.synchronize", NO); + GA_ENC_ADD(_UIHidden, "@UI.Hidden", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -90,8 +138,6 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _name = [decoder decodeObjectOfClass:NSString.class forKey:@"name"]; _parentReference = [decoder decodeObjectOfClass:GAItemReference.class forKey:@"parentReference"]; _webUrl = [decoder decodeObjectOfClass:NSURL.class forKey:@"webUrl"]; - _createdByUser = [decoder decodeObjectOfClass:GAUser.class forKey:@"createdByUser"]; - _lastModifiedByUser = [decoder decodeObjectOfClass:GAUser.class forKey:@"lastModifiedByUser"]; _content = [decoder decodeObjectOfClass:NSString.class forKey:@"content"]; _cTag = [decoder decodeObjectOfClass:NSString.class forKey:@"cTag"]; _deleted = [decoder decodeObjectOfClass:GADeleted.class forKey:@"deleted"]; @@ -99,6 +145,9 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _fileSystemInfo = [decoder decodeObjectOfClass:GAFileSystemInfo.class forKey:@"fileSystemInfo"]; _folder = [decoder decodeObjectOfClass:GAFolder.class forKey:@"folder"]; _image = [decoder decodeObjectOfClass:GAImage.class forKey:@"image"]; + _photo = [decoder decodeObjectOfClass:GAPhoto.class forKey:@"photo"]; + _location = [decoder decodeObjectOfClass:GAGeoCoordinates.class forKey:@"location"]; + _thumbnails = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAThumbnailSet.class, NSArray.class, nil] forKey:@"thumbnails"]; _root = [decoder decodeObjectOfClass:GARoot.class forKey:@"root"]; _trash = [decoder decodeObjectOfClass:GATrash.class forKey:@"trash"]; _specialFolder = [decoder decodeObjectOfClass:GASpecialFolder.class forKey:@"specialFolder"]; @@ -107,6 +156,10 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _webDavUrl = [decoder decodeObjectOfClass:NSURL.class forKey:@"webDavUrl"]; _children = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GADriveItem.class, NSArray.class, nil] forKey:@"children"]; _permissions = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAPermission.class, NSArray.class, nil] forKey:@"permissions"]; + _audio = [decoder decodeObjectOfClass:GAAudio.class forKey:@"audio"]; + _video = [decoder decodeObjectOfClass:GAVideo.class forKey:@"video"]; + _clientSynchronize = [decoder decodeObjectOfClass:NSNumber.class forKey:@"clientSynchronize"]; + _UIHidden = [decoder decodeObjectOfClass:NSNumber.class forKey:@"UIHidden"]; } return (self); @@ -125,8 +178,6 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_name forKey:@"name"]; [coder encodeObject:_parentReference forKey:@"parentReference"]; [coder encodeObject:_webUrl forKey:@"webUrl"]; - [coder encodeObject:_createdByUser forKey:@"createdByUser"]; - [coder encodeObject:_lastModifiedByUser forKey:@"lastModifiedByUser"]; [coder encodeObject:_content forKey:@"content"]; [coder encodeObject:_cTag forKey:@"cTag"]; [coder encodeObject:_deleted forKey:@"deleted"]; @@ -134,6 +185,9 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_fileSystemInfo forKey:@"fileSystemInfo"]; [coder encodeObject:_folder forKey:@"folder"]; [coder encodeObject:_image forKey:@"image"]; + [coder encodeObject:_photo forKey:@"photo"]; + [coder encodeObject:_location forKey:@"location"]; + [coder encodeObject:_thumbnails forKey:@"thumbnails"]; [coder encodeObject:_root forKey:@"root"]; [coder encodeObject:_trash forKey:@"trash"]; [coder encodeObject:_specialFolder forKey:@"specialFolder"]; @@ -142,12 +196,16 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_webDavUrl forKey:@"webDavUrl"]; [coder encodeObject:_children forKey:@"children"]; [coder encodeObject:_permissions forKey:@"permissions"]; + [coder encodeObject:_audio forKey:@"audio"]; + [coder encodeObject:_video forKey:@"video"]; + [coder encodeObject:_clientSynchronize forKey:@"clientSynchronize"]; + [coder encodeObject:_UIHidden forKey:@"UIHidden"]; } // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_createdBy!=nil) ? [NSString stringWithFormat:@", createdBy: %@", _createdBy] : @""), ((_createdDateTime!=nil) ? [NSString stringWithFormat:@", createdDateTime: %@", _createdDateTime] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_eTag!=nil) ? [NSString stringWithFormat:@", eTag: %@", _eTag] : @""), ((_lastModifiedBy!=nil) ? [NSString stringWithFormat:@", lastModifiedBy: %@", _lastModifiedBy] : @""), ((_lastModifiedDateTime!=nil) ? [NSString stringWithFormat:@", lastModifiedDateTime: %@", _lastModifiedDateTime] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_parentReference!=nil) ? [NSString stringWithFormat:@", parentReference: %@", _parentReference] : @""), ((_webUrl!=nil) ? [NSString stringWithFormat:@", webUrl: %@", _webUrl] : @""), ((_createdByUser!=nil) ? [NSString stringWithFormat:@", createdByUser: %@", _createdByUser] : @""), ((_lastModifiedByUser!=nil) ? [NSString stringWithFormat:@", lastModifiedByUser: %@", _lastModifiedByUser] : @""), ((_content!=nil) ? [NSString stringWithFormat:@", content: %@", _content] : @""), ((_cTag!=nil) ? [NSString stringWithFormat:@", cTag: %@", _cTag] : @""), ((_deleted!=nil) ? [NSString stringWithFormat:@", deleted: %@", _deleted] : @""), ((_file!=nil) ? [NSString stringWithFormat:@", file: %@", _file] : @""), ((_fileSystemInfo!=nil) ? [NSString stringWithFormat:@", fileSystemInfo: %@", _fileSystemInfo] : @""), ((_folder!=nil) ? [NSString stringWithFormat:@", folder: %@", _folder] : @""), ((_image!=nil) ? [NSString stringWithFormat:@", image: %@", _image] : @""), ((_root!=nil) ? [NSString stringWithFormat:@", root: %@", _root] : @""), ((_trash!=nil) ? [NSString stringWithFormat:@", trash: %@", _trash] : @""), ((_specialFolder!=nil) ? [NSString stringWithFormat:@", specialFolder: %@", _specialFolder] : @""), ((_remoteItem!=nil) ? [NSString stringWithFormat:@", remoteItem: %@", _remoteItem] : @""), ((_size!=nil) ? [NSString stringWithFormat:@", size: %@", _size] : @""), ((_webDavUrl!=nil) ? [NSString stringWithFormat:@", webDavUrl: %@", _webDavUrl] : @""), ((_children!=nil) ? [NSString stringWithFormat:@", children: %@", _children] : @""), ((_permissions!=nil) ? [NSString stringWithFormat:@", permissions: %@", _permissions] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_createdBy!=nil) ? [NSString stringWithFormat:@", createdBy: %@", _createdBy] : @""), ((_createdDateTime!=nil) ? [NSString stringWithFormat:@", createdDateTime: %@", _createdDateTime] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_eTag!=nil) ? [NSString stringWithFormat:@", eTag: %@", _eTag] : @""), ((_lastModifiedBy!=nil) ? [NSString stringWithFormat:@", lastModifiedBy: %@", _lastModifiedBy] : @""), ((_lastModifiedDateTime!=nil) ? [NSString stringWithFormat:@", lastModifiedDateTime: %@", _lastModifiedDateTime] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_parentReference!=nil) ? [NSString stringWithFormat:@", parentReference: %@", _parentReference] : @""), ((_webUrl!=nil) ? [NSString stringWithFormat:@", webUrl: %@", _webUrl] : @""), ((_content!=nil) ? [NSString stringWithFormat:@", content: %@", _content] : @""), ((_cTag!=nil) ? [NSString stringWithFormat:@", cTag: %@", _cTag] : @""), ((_deleted!=nil) ? [NSString stringWithFormat:@", deleted: %@", _deleted] : @""), ((_file!=nil) ? [NSString stringWithFormat:@", file: %@", _file] : @""), ((_fileSystemInfo!=nil) ? [NSString stringWithFormat:@", fileSystemInfo: %@", _fileSystemInfo] : @""), ((_folder!=nil) ? [NSString stringWithFormat:@", folder: %@", _folder] : @""), ((_image!=nil) ? [NSString stringWithFormat:@", image: %@", _image] : @""), ((_photo!=nil) ? [NSString stringWithFormat:@", photo: %@", _photo] : @""), ((_location!=nil) ? [NSString stringWithFormat:@", location: %@", _location] : @""), ((_thumbnails!=nil) ? [NSString stringWithFormat:@", thumbnails: %@", _thumbnails] : @""), ((_root!=nil) ? [NSString stringWithFormat:@", root: %@", _root] : @""), ((_trash!=nil) ? [NSString stringWithFormat:@", trash: %@", _trash] : @""), ((_specialFolder!=nil) ? [NSString stringWithFormat:@", specialFolder: %@", _specialFolder] : @""), ((_remoteItem!=nil) ? [NSString stringWithFormat:@", remoteItem: %@", _remoteItem] : @""), ((_size!=nil) ? [NSString stringWithFormat:@", size: %@", _size] : @""), ((_webDavUrl!=nil) ? [NSString stringWithFormat:@", webDavUrl: %@", _webDavUrl] : @""), ((_children!=nil) ? [NSString stringWithFormat:@", children: %@", _children] : @""), ((_permissions!=nil) ? [NSString stringWithFormat:@", permissions: %@", _permissions] : @""), ((_audio!=nil) ? [NSString stringWithFormat:@", audio: %@", _audio] : @""), ((_video!=nil) ? [NSString stringWithFormat:@", video: %@", _video] : @""), ((_clientSynchronize!=nil) ? [NSString stringWithFormat:@", clientSynchronize: %@", _clientSynchronize] : @""), ((_UIHidden!=nil) ? [NSString stringWithFormat:@", UIHidden: %@", _UIHidden] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemCreateLink.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemCreateLink.h new file mode 100644 index 00000000..485cd6b2 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemCreateLink.h @@ -0,0 +1,39 @@ +// +// GADriveItemCreateLink.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" +#import "GASharingLinkType.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GADriveItemCreateLink : NSObject + +// occgen: type properties +@property(strong, nullable) GASharingLinkType type; +@property(strong, nullable) NSDate *expirationDateTime; //!< [string:date-time] Optional. A String with format of yyyy-MM-ddTHH:mm:ssZ of DateTime indicates the expiration time of the permission. +@property(strong, nullable) NSString *password; //!< Optional.The password of the sharing link that is set by the creator. +@property(strong, nullable) NSString *displayName; //!< Provides a user-visible display name of the link. Optional. Libregraph only. +@property(strong, nullable) NSNumber *libreGraphQuickLink; //!< [boolean] The quicklink property can be assigned to only one link per resource. A quicklink can be used in the clients to provide a one-click copy to clipboard action. Optional. Libregraph only. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemCreateLink.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemCreateLink.m new file mode 100644 index 00000000..68614204 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemCreateLink.m @@ -0,0 +1,90 @@ +// +// GADriveItemCreateLink.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 . + * + */ + +// occgen: includes +#import "GADriveItemCreateLink.h" + +// occgen: type start +@implementation GADriveItemCreateLink + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GADriveItemCreateLink *instance = [self new]; + + GA_SET(type, NSString, Nil); + GA_SET(expirationDateTime, NSDate, Nil); + GA_SET(password, NSString, Nil); + GA_SET(displayName, NSString, Nil); + GA_MAP(libreGraphQuickLink, "@libre.graph.quickLink", NSNumber, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_type, "type", NO); + GA_ENC_ADD(_expirationDateTime, "expirationDateTime", NO); + GA_ENC_ADD(_password, "password", NO); + GA_ENC_ADD(_displayName, "displayName", NO); + GA_ENC_ADD(_libreGraphQuickLink, "@libre.graph.quickLink", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _type = [decoder decodeObjectOfClass:NSString.class forKey:@"type"]; + _expirationDateTime = [decoder decodeObjectOfClass:NSDate.class forKey:@"expirationDateTime"]; + _password = [decoder decodeObjectOfClass:NSString.class forKey:@"password"]; + _displayName = [decoder decodeObjectOfClass:NSString.class forKey:@"displayName"]; + _libreGraphQuickLink = [decoder decodeObjectOfClass:NSNumber.class forKey:@"libreGraphQuickLink"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_type forKey:@"type"]; + [coder encodeObject:_expirationDateTime forKey:@"expirationDateTime"]; + [coder encodeObject:_password forKey:@"password"]; + [coder encodeObject:_displayName forKey:@"displayName"]; + [coder encodeObject:_libreGraphQuickLink forKey:@"libreGraphQuickLink"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_type!=nil) ? [NSString stringWithFormat:@", type: %@", _type] : @""), ((_expirationDateTime!=nil) ? [NSString stringWithFormat:@", expirationDateTime: %@", _expirationDateTime] : @""), ((_password!=nil) ? [NSString stringWithFormat:@", password: %@", _password] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_libreGraphQuickLink!=nil) ? [NSString stringWithFormat:@", libreGraphQuickLink: %@", _libreGraphQuickLink] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemInvite.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemInvite.h new file mode 100644 index 00000000..02f04b60 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemInvite.h @@ -0,0 +1,40 @@ +// +// GADriveItemInvite.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: forward declarations +@class GADriveRecipient; + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GADriveItemInvite : NSObject + +// occgen: type properties +@property(strong, nullable) NSArray *recipients; //!< A collection of recipients who will receive access and the sharing invitation. Currently, only internal users or groups are supported. +@property(strong, nullable) NSArray *roles; //!< Specifies the roles that are to be granted to the recipients of the sharing invitation. +@property(strong, nullable) NSArray *libreGraphPermissionsActions; //!< Specifies the actions that are to be granted to the recipients of the sharing invitation, in effect creating a custom role. +@property(strong, nullable) NSDate *expirationDateTime; //!< [string:date-time] Specifies the dateTime after which the permission expires. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemInvite.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemInvite.m new file mode 100644 index 00000000..3ed3cfd5 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveItemInvite.m @@ -0,0 +1,87 @@ +// +// GADriveItemInvite.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 . + * + */ + +// occgen: includes +#import "GADriveItemInvite.h" +#import "GADriveRecipient.h" + +// occgen: type start +@implementation GADriveItemInvite + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GADriveItemInvite *instance = [self new]; + + GA_SET(recipients, GADriveRecipient, NSArray.class); + GA_SET(roles, NSString, NSArray.class); + GA_MAP(libreGraphPermissionsActions, "@libre.graph.permissions.actions", NSString, NSArray.class); + GA_SET(expirationDateTime, NSDate, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_recipients, "recipients", NO); + GA_ENC_ADD(_roles, "roles", NO); + GA_ENC_ADD(_libreGraphPermissionsActions, "@libre.graph.permissions.actions", NO); + GA_ENC_ADD(_expirationDateTime, "expirationDateTime", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _recipients = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GADriveRecipient.class, NSArray.class, nil] forKey:@"recipients"]; + _roles = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"roles"]; + _libreGraphPermissionsActions = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"libreGraphPermissionsActions"]; + _expirationDateTime = [decoder decodeObjectOfClass:NSDate.class forKey:@"expirationDateTime"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_recipients forKey:@"recipients"]; + [coder encodeObject:_roles forKey:@"roles"]; + [coder encodeObject:_libreGraphPermissionsActions forKey:@"libreGraphPermissionsActions"]; + [coder encodeObject:_expirationDateTime forKey:@"expirationDateTime"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@>", NSStringFromClass(self.class), self, ((_recipients!=nil) ? [NSString stringWithFormat:@", recipients: %@", _recipients] : @""), ((_roles!=nil) ? [NSString stringWithFormat:@", roles: %@", _roles] : @""), ((_libreGraphPermissionsActions!=nil) ? [NSString stringWithFormat:@", libreGraphPermissionsActions: %@", _libreGraphPermissionsActions] : @""), ((_expirationDateTime!=nil) ? [NSString stringWithFormat:@", expirationDateTime: %@", _expirationDateTime] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveRecipient.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveRecipient.h new file mode 100644 index 00000000..9142026c --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveRecipient.h @@ -0,0 +1,35 @@ +// +// GADriveRecipient.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GADriveRecipient : NSObject + +// occgen: type properties +@property(strong, nullable) NSString *objectId; //!< The unique identifier for the recipient in the directory. +@property(strong, nullable) NSString *libreGraphRecipientType; //!< When the recipient is referenced by objectId this annotation is used to differentiate `user` and `group` recipients. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveRecipient.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveRecipient.m new file mode 100644 index 00000000..e48d7c82 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveRecipient.m @@ -0,0 +1,78 @@ +// +// GADriveRecipient.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 . + * + */ + +// occgen: includes +#import "GADriveRecipient.h" + +// occgen: type start +@implementation GADriveRecipient + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GADriveRecipient *instance = [self new]; + + GA_SET(objectId, NSString, Nil); + GA_MAP(libreGraphRecipientType, "@libre.graph.recipient.type", NSString, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_objectId, "objectId", NO); + GA_ENC_ADD(_libreGraphRecipientType, "@libre.graph.recipient.type", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _objectId = [decoder decodeObjectOfClass:NSString.class forKey:@"objectId"]; + _libreGraphRecipientType = [decoder decodeObjectOfClass:NSString.class forKey:@"libreGraphRecipientType"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_objectId forKey:@"objectId"]; + [coder encodeObject:_libreGraphRecipientType forKey:@"libreGraphRecipientType"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@>", NSStringFromClass(self.class), self, ((_objectId!=nil) ? [NSString stringWithFormat:@", objectId: %@", _objectId] : @""), ((_libreGraphRecipientType!=nil) ? [NSString stringWithFormat:@", libreGraphRecipientType: %@", _libreGraphRecipientType] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveUpdate.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveUpdate.h new file mode 100644 index 00000000..8ca3c1cf --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveUpdate.h @@ -0,0 +1,56 @@ +// +// GADriveUpdate.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: forward declarations +@class GADriveItem; +@class GAIdentitySet; +@class GAItemReference; +@class GAQuota; + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GADriveUpdate : NSObject + +// occgen: type properties +@property(strong, nullable) NSString *identifier; //!< The unique identifier for this drive. +@property(strong, nullable) GAIdentitySet *createdBy; //!< Identity of the user, device, or application which created the item. Read-only. +@property(strong, nullable) NSDate *createdDateTime; //!< [string:date-time] Date and time of item creation. Read-only. | pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$ +@property(strong, nullable) NSString *desc; //!< Provides a user-visible description of the item. Optional. +@property(strong, nullable) NSString *eTag; //!< ETag for the item. Read-only. +@property(strong, nullable) GAIdentitySet *lastModifiedBy; //!< Identity of the user, device, and application which last modified the item. Read-only. +@property(strong, nullable) NSDate *lastModifiedDateTime; //!< [string:date-time] Date and time the item was last modified. Read-only. | pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$ +@property(strong, nullable) NSString *name; //!< The name of the item. Read-write. +@property(strong, nullable) GAItemReference *parentReference; //!< Parent information, if the item has a parent. Read-write. +@property(strong, nullable) NSURL *webUrl; //!< URL that displays the resource in the browser. Read-only. +@property(strong, nullable) NSString *driveType; //!< Describes the type of drive represented by this resource. Values are "personal" for users home spaces, "project", "virtual" or "share". Read-only. +@property(strong, nullable) NSString *driveAlias; //!< The drive alias can be used in clients to make the urls user friendly. Example: 'personal/einstein'. This will be used to resolve to the correct driveID. +@property(strong, nullable) GAIdentitySet *owner; +@property(strong, nullable) GAQuota *quota; +@property(strong, nullable) NSArray *items; //!< All items contained in the drive. Read-only. Nullable. +@property(strong, nullable) GADriveItem *root; //!< Drive item describing the drive's root. Read-only. +@property(strong, nullable) NSArray *special; //!< A collection of special drive resources. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveUpdate.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveUpdate.m new file mode 100644 index 00000000..48f3f760 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GADriveUpdate.m @@ -0,0 +1,142 @@ +// +// GADriveUpdate.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 . + * + */ + +// occgen: includes +#import "GADriveUpdate.h" +#import "GADriveItem.h" +#import "GAIdentitySet.h" +#import "GAItemReference.h" +#import "GAQuota.h" + +// occgen: type start +@implementation GADriveUpdate + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GADriveUpdate *instance = [self new]; + + GA_MAP(identifier, "id", NSString, Nil); + GA_SET(createdBy, GAIdentitySet, Nil); + GA_SET(createdDateTime, NSDate, Nil); + GA_MAP(desc, "description", NSString, Nil); + GA_SET(eTag, NSString, Nil); + GA_SET(lastModifiedBy, GAIdentitySet, Nil); + GA_SET(lastModifiedDateTime, NSDate, Nil); + GA_SET(name, NSString, Nil); + GA_SET(parentReference, GAItemReference, Nil); + GA_SET(webUrl, NSURL, Nil); + GA_SET(driveType, NSString, Nil); + GA_SET(driveAlias, NSString, Nil); + GA_SET(owner, GAIdentitySet, Nil); + GA_SET(quota, GAQuota, Nil); + GA_SET(items, GADriveItem, NSArray.class); + GA_SET(root, GADriveItem, Nil); + GA_SET(special, GADriveItem, NSArray.class); + + 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(_createdBy, "createdBy", NO); + GA_ENC_ADD(_createdDateTime, "createdDateTime", NO); + GA_ENC_ADD(_desc, "description", NO); + GA_ENC_ADD(_eTag, "eTag", NO); + GA_ENC_ADD(_lastModifiedBy, "lastModifiedBy", NO); + GA_ENC_ADD(_lastModifiedDateTime, "lastModifiedDateTime", NO); + GA_ENC_ADD(_name, "name", NO); + GA_ENC_ADD(_parentReference, "parentReference", NO); + GA_ENC_ADD(_webUrl, "webUrl", NO); + GA_ENC_ADD(_driveType, "driveType", NO); + GA_ENC_ADD(_driveAlias, "driveAlias", NO); + GA_ENC_ADD(_owner, "owner", NO); + GA_ENC_ADD(_quota, "quota", NO); + GA_ENC_ADD(_items, "items", NO); + GA_ENC_ADD(_root, "root", NO); + GA_ENC_ADD(_special, "special", NO); + 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"]; + _createdBy = [decoder decodeObjectOfClass:GAIdentitySet.class forKey:@"createdBy"]; + _createdDateTime = [decoder decodeObjectOfClass:NSDate.class forKey:@"createdDateTime"]; + _desc = [decoder decodeObjectOfClass:NSString.class forKey:@"desc"]; + _eTag = [decoder decodeObjectOfClass:NSString.class forKey:@"eTag"]; + _lastModifiedBy = [decoder decodeObjectOfClass:GAIdentitySet.class forKey:@"lastModifiedBy"]; + _lastModifiedDateTime = [decoder decodeObjectOfClass:NSDate.class forKey:@"lastModifiedDateTime"]; + _name = [decoder decodeObjectOfClass:NSString.class forKey:@"name"]; + _parentReference = [decoder decodeObjectOfClass:GAItemReference.class forKey:@"parentReference"]; + _webUrl = [decoder decodeObjectOfClass:NSURL.class forKey:@"webUrl"]; + _driveType = [decoder decodeObjectOfClass:NSString.class forKey:@"driveType"]; + _driveAlias = [decoder decodeObjectOfClass:NSString.class forKey:@"driveAlias"]; + _owner = [decoder decodeObjectOfClass:GAIdentitySet.class forKey:@"owner"]; + _quota = [decoder decodeObjectOfClass:GAQuota.class forKey:@"quota"]; + _items = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GADriveItem.class, NSArray.class, nil] forKey:@"items"]; + _root = [decoder decodeObjectOfClass:GADriveItem.class forKey:@"root"]; + _special = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GADriveItem.class, NSArray.class, nil] forKey:@"special"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_identifier forKey:@"identifier"]; + [coder encodeObject:_createdBy forKey:@"createdBy"]; + [coder encodeObject:_createdDateTime forKey:@"createdDateTime"]; + [coder encodeObject:_desc forKey:@"desc"]; + [coder encodeObject:_eTag forKey:@"eTag"]; + [coder encodeObject:_lastModifiedBy forKey:@"lastModifiedBy"]; + [coder encodeObject:_lastModifiedDateTime forKey:@"lastModifiedDateTime"]; + [coder encodeObject:_name forKey:@"name"]; + [coder encodeObject:_parentReference forKey:@"parentReference"]; + [coder encodeObject:_webUrl forKey:@"webUrl"]; + [coder encodeObject:_driveType forKey:@"driveType"]; + [coder encodeObject:_driveAlias forKey:@"driveAlias"]; + [coder encodeObject:_owner forKey:@"owner"]; + [coder encodeObject:_quota forKey:@"quota"]; + [coder encodeObject:_items forKey:@"items"]; + [coder encodeObject:_root forKey:@"root"]; + [coder encodeObject:_special forKey:@"special"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_createdBy!=nil) ? [NSString stringWithFormat:@", createdBy: %@", _createdBy] : @""), ((_createdDateTime!=nil) ? [NSString stringWithFormat:@", createdDateTime: %@", _createdDateTime] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_eTag!=nil) ? [NSString stringWithFormat:@", eTag: %@", _eTag] : @""), ((_lastModifiedBy!=nil) ? [NSString stringWithFormat:@", lastModifiedBy: %@", _lastModifiedBy] : @""), ((_lastModifiedDateTime!=nil) ? [NSString stringWithFormat:@", lastModifiedDateTime: %@", _lastModifiedDateTime] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_parentReference!=nil) ? [NSString stringWithFormat:@", parentReference: %@", _parentReference] : @""), ((_webUrl!=nil) ? [NSString stringWithFormat:@", webUrl: %@", _webUrl] : @""), ((_driveType!=nil) ? [NSString stringWithFormat:@", driveType: %@", _driveType] : @""), ((_driveAlias!=nil) ? [NSString stringWithFormat:@", driveAlias: %@", _driveAlias] : @""), ((_owner!=nil) ? [NSString stringWithFormat:@", owner: %@", _owner] : @""), ((_quota!=nil) ? [NSString stringWithFormat:@", quota: %@", _quota] : @""), ((_items!=nil) ? [NSString stringWithFormat:@", items: %@", _items] : @""), ((_root!=nil) ? [NSString stringWithFormat:@", root: %@", _root] : @""), ((_special!=nil) ? [NSString stringWithFormat:@", special: %@", _special] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationClass.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationClass.h index cafd354a..08bace94 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationClass.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationClass.h @@ -1,11 +1,11 @@ // // GAEducationClass.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. * @@ -27,12 +27,10 @@ NS_ASSUME_NONNULL_BEGIN // occgen: type properties @property(strong, nullable) NSString *identifier; //!< Read-only. -@property(strong, nullable) NSString *desc; //!< An optional description for the group. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. -@property(strong) NSString *displayName; //!< The display name for the group. This property is required when a group is created and cannot be cleared during updates. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +@property(strong, nullable) NSString *desc; //!< An optional description for the group. Returned by default. +@property(strong) NSString *displayName; //!< The display name for the group. This property is required when a group is created and cannot be cleared during updates. Returned by default. Supports $search and $orderBy. @property(strong, nullable) NSArray *members; //!< Users and groups that are members of this group. HTTP Methods: GET (supported for all groups), Nullable. Supports $expand. -@property(strong, nullable) NSString *onPremisesDomainName; //!< Contains the on-premises domainFQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. -@property(strong, nullable) NSString *onPremisesSamAccountName; //!< Contains the on-premises SAM account name synchronized from the on-premises directory. Read-only. -@property(strong, nullable) NSArray *'members@odata.bind'; //!< A list of member references to the members to be added. Up to 20 members can be added with a single request +// @property(strong, nullable) NSArray *members@odata.bind; //!< A list of member references to the members to be added. Up to 20 members can be added with a single request @property(strong) NSString *classification; //!< Classification of the group, i.e. "class" or "course" @property(strong, nullable) NSString *externalId; //!< An external unique ID for the class diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationClass.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationClass.m index fbaaf45a..1bbaabec 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationClass.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationClass.m @@ -1,11 +1,11 @@ // // GAEducationClass.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. * @@ -30,15 +30,27 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_MAP(desc, "description", NSString, Nil); GA_SET_REQ(displayName, NSString, Nil); GA_SET(members, GAUser, NSArray.class); - GA_SET(onPremisesDomainName, NSString, Nil); - GA_SET(onPremisesSamAccountName, NSString, Nil); - GA_SET('members@odata.bind', NSString, NSArray.class); +// GA_SET(members@odata.bind, NSString, NSArray.class); GA_SET_REQ(classification, NSString, Nil); GA_SET(externalId, NSString, 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", NO); + GA_ENC_ADD(_desc, "description", NO); + GA_ENC_ADD(_displayName, "displayName", YES); + GA_ENC_ADD(_members, "members", NO); +// GA_ENC_ADD(_members@odata.bind, "members@odata.bind", NO); + GA_ENC_ADD(_classification, "classification", YES); + GA_ENC_ADD(_externalId, "externalId", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -53,9 +65,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _desc = [decoder decodeObjectOfClass:NSString.class forKey:@"desc"]; _displayName = [decoder decodeObjectOfClass:NSString.class forKey:@"displayName"]; _members = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAUser.class, NSArray.class, nil] forKey:@"members"]; - _onPremisesDomainName = [decoder decodeObjectOfClass:NSString.class forKey:@"onPremisesDomainName"]; - _onPremisesSamAccountName = [decoder decodeObjectOfClass:NSString.class forKey:@"onPremisesSamAccountName"]; - _'members@odata.bind' = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"'members@odata.bind'"]; +// _members@odata.bind = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"members@odata.bind"]; _classification = [decoder decodeObjectOfClass:NSString.class forKey:@"classification"]; _externalId = [decoder decodeObjectOfClass:NSString.class forKey:@"externalId"]; } @@ -70,9 +80,7 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_desc forKey:@"desc"]; [coder encodeObject:_displayName forKey:@"displayName"]; [coder encodeObject:_members forKey:@"members"]; - [coder encodeObject:_onPremisesDomainName forKey:@"onPremisesDomainName"]; - [coder encodeObject:_onPremisesSamAccountName forKey:@"onPremisesSamAccountName"]; - [coder encodeObject:_'members@odata.bind' forKey:@"'members@odata.bind'"]; +// [coder encodeObject:_members@odata.bind forKey:@"members@odata.bind"]; [coder encodeObject:_classification forKey:@"classification"]; [coder encodeObject:_externalId forKey:@"externalId"]; } @@ -80,7 +88,7 @@ - (void)encodeWithCoder:(NSCoder *)coder // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_members!=nil) ? [NSString stringWithFormat:@", members: %@", _members] : @""), ((_onPremisesDomainName!=nil) ? [NSString stringWithFormat:@", onPremisesDomainName: %@", _onPremisesDomainName] : @""), ((_onPremisesSamAccountName!=nil) ? [NSString stringWithFormat:@", onPremisesSamAccountName: %@", _onPremisesSamAccountName] : @""), ((_'members@odata.bind'!=nil) ? [NSString stringWithFormat:@", 'members@odata.bind': %@", _'members@odata.bind'] : @""), ((_classification!=nil) ? [NSString stringWithFormat:@", classification: %@", _classification] : @""), ((_externalId!=nil) ? [NSString stringWithFormat:@", externalId: %@", _externalId] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_members!=nil) ? [NSString stringWithFormat:@", members: %@", _members] : @""), ((_classification!=nil) ? [NSString stringWithFormat:@", classification: %@", _classification] : @""), ((_externalId!=nil) ? [NSString stringWithFormat:@", externalId: %@", _externalId] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationSchool.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationSchool.h index 0ac67e90..88e5de3e 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationSchool.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationSchool.h @@ -1,11 +1,11 @@ // // GAEducationSchool.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. * @@ -23,9 +23,10 @@ NS_ASSUME_NONNULL_BEGIN @interface GAEducationSchool : NSObject // occgen: type properties -@property(strong, nullable) NSString *identifier; //!< The unique idenfier for an entity. Read-only. +@property(strong, nullable) NSString *identifier; //!< The unique identifier for an entity. Read-only. @property(strong, nullable) NSString *displayName; //!< The organization name @property(strong, nullable) NSString *schoolNumber; //!< School number +@property(strong, nullable) NSDate *terminationDate; //!< [string:date-time] Date and time at which the service for this organization is scheduled to be terminated // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationSchool.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationSchool.m index bfc4a610..d1ae722f 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationSchool.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationSchool.m @@ -1,11 +1,11 @@ // // GAEducationSchool.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. * @@ -28,10 +28,22 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_MAP(identifier, "id", NSString, Nil); GA_SET(displayName, NSString, Nil); GA_SET(schoolNumber, NSString, Nil); + GA_SET(terminationDate, NSDate, 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", NO); + GA_ENC_ADD(_displayName, "displayName", NO); + GA_ENC_ADD(_schoolNumber, "schoolNumber", NO); + GA_ENC_ADD(_terminationDate, "terminationDate", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -45,6 +57,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"]; _displayName = [decoder decodeObjectOfClass:NSString.class forKey:@"displayName"]; _schoolNumber = [decoder decodeObjectOfClass:NSString.class forKey:@"schoolNumber"]; + _terminationDate = [decoder decodeObjectOfClass:NSDate.class forKey:@"terminationDate"]; } return (self); @@ -56,12 +69,13 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_identifier forKey:@"identifier"]; [coder encodeObject:_displayName forKey:@"displayName"]; [coder encodeObject:_schoolNumber forKey:@"schoolNumber"]; + [coder encodeObject:_terminationDate forKey:@"terminationDate"]; } // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_schoolNumber!=nil) ? [NSString stringWithFormat:@", schoolNumber: %@", _schoolNumber] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_schoolNumber!=nil) ? [NSString stringWithFormat:@", schoolNumber: %@", _schoolNumber] : @""), ((_terminationDate!=nil) ? [NSString stringWithFormat:@", terminationDate: %@", _terminationDate] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationUser.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationUser.h index 6438bbc8..6c05384c 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationUser.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationUser.h @@ -1,11 +1,11 @@ // // GAEducationUser.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. * @@ -31,17 +31,18 @@ NS_ASSUME_NONNULL_BEGIN // occgen: type properties @property(strong, nullable) NSString *identifier; //!< Read-only. @property(strong, nullable) NSNumber *accountEnabled; //!< [boolean] Set to "true" when the account is enabled. -@property(strong, nullable) NSString *displayName; //!< The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $filter and $orderby. +@property(strong, nullable) NSString *displayName; //!< The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $orderby. @property(strong, nullable) NSArray *drives; //!< A collection of drives available for this user. Read-only. @property(strong, nullable) GADrive *drive; //!< The personal drive of this user. Read-only. @property(strong, nullable) NSArray *identities; //!< Identities associated with this account. -@property(strong, nullable) NSString *mail; //!< The SMTP address for the user, for example, ''jeff@contoso.onowncloud.com''. Returned by default. Supports $filter and endsWith. +@property(strong, nullable) NSString *mail; //!< The SMTP address for the user, for example, ''jeff@contoso.onowncloud.com''. Returned by default. @property(strong, nullable) NSArray *memberOf; //!< Groups that this user is a member of. HTTP Methods: GET (supported for all groups). Read-only. Nullable. Supports $expand. @property(strong, nullable) NSString *onPremisesSamAccountName; //!< Contains the on-premises SAM account name synchronized from the on-premises directory. Read-only. @property(strong, nullable) GAPasswordProfile *passwordProfile; -@property(strong, nullable) NSString *surname; //!< The user's surname (family name or last name). Returned by default. Supports $filter. -@property(strong, nullable) NSString *givenName; //!< The user's givenName. Returned by default. Supports $filter. +@property(strong, nullable) NSString *surname; //!< The user's surname (family name or last name). Returned by default. +@property(strong, nullable) NSString *givenName; //!< The user's givenName. Returned by default. @property(strong, nullable) NSString *primaryRole; //!< The user`s default role. Such as "student" or "teacher" +@property(strong, nullable) NSString *userType; //!< The user`s type. This can be either "Member" for regular user, "Guest" for guest users or "Federated" for users imported from a federated instance. // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationUser.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationUser.m index f209060e..e8c8b2bd 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationUser.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAEducationUser.m @@ -1,11 +1,11 @@ // // GAEducationUser.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. * @@ -42,10 +42,32 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_SET(surname, NSString, Nil); GA_SET(givenName, NSString, Nil); GA_SET(primaryRole, NSString, Nil); + GA_SET(userType, NSString, 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", NO); + GA_ENC_ADD(_accountEnabled, "accountEnabled", NO); + GA_ENC_ADD(_displayName, "displayName", NO); + GA_ENC_ADD(_drives, "drives", NO); + GA_ENC_ADD(_drive, "drive", NO); + GA_ENC_ADD(_identities, "identities", NO); + GA_ENC_ADD(_mail, "mail", NO); + GA_ENC_ADD(_memberOf, "memberOf", NO); + GA_ENC_ADD(_onPremisesSamAccountName, "onPremisesSamAccountName", NO); + GA_ENC_ADD(_passwordProfile, "passwordProfile", NO); + GA_ENC_ADD(_surname, "surname", NO); + GA_ENC_ADD(_givenName, "givenName", NO); + GA_ENC_ADD(_primaryRole, "primaryRole", NO); + GA_ENC_ADD(_userType, "userType", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -69,6 +91,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _surname = [decoder decodeObjectOfClass:NSString.class forKey:@"surname"]; _givenName = [decoder decodeObjectOfClass:NSString.class forKey:@"givenName"]; _primaryRole = [decoder decodeObjectOfClass:NSString.class forKey:@"primaryRole"]; + _userType = [decoder decodeObjectOfClass:NSString.class forKey:@"userType"]; } return (self); @@ -90,12 +113,13 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_surname forKey:@"surname"]; [coder encodeObject:_givenName forKey:@"givenName"]; [coder encodeObject:_primaryRole forKey:@"primaryRole"]; + [coder encodeObject:_userType forKey:@"userType"]; } // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_accountEnabled!=nil) ? [NSString stringWithFormat:@", accountEnabled: %@", _accountEnabled] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_drives!=nil) ? [NSString stringWithFormat:@", drives: %@", _drives] : @""), ((_drive!=nil) ? [NSString stringWithFormat:@", drive: %@", _drive] : @""), ((_identities!=nil) ? [NSString stringWithFormat:@", identities: %@", _identities] : @""), ((_mail!=nil) ? [NSString stringWithFormat:@", mail: %@", _mail] : @""), ((_memberOf!=nil) ? [NSString stringWithFormat:@", memberOf: %@", _memberOf] : @""), ((_onPremisesSamAccountName!=nil) ? [NSString stringWithFormat:@", onPremisesSamAccountName: %@", _onPremisesSamAccountName] : @""), ((_passwordProfile!=nil) ? [NSString stringWithFormat:@", passwordProfile: %@", _passwordProfile] : @""), ((_surname!=nil) ? [NSString stringWithFormat:@", surname: %@", _surname] : @""), ((_givenName!=nil) ? [NSString stringWithFormat:@", givenName: %@", _givenName] : @""), ((_primaryRole!=nil) ? [NSString stringWithFormat:@", primaryRole: %@", _primaryRole] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_accountEnabled!=nil) ? [NSString stringWithFormat:@", accountEnabled: %@", _accountEnabled] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_drives!=nil) ? [NSString stringWithFormat:@", drives: %@", _drives] : @""), ((_drive!=nil) ? [NSString stringWithFormat:@", drive: %@", _drive] : @""), ((_identities!=nil) ? [NSString stringWithFormat:@", identities: %@", _identities] : @""), ((_mail!=nil) ? [NSString stringWithFormat:@", mail: %@", _mail] : @""), ((_memberOf!=nil) ? [NSString stringWithFormat:@", memberOf: %@", _memberOf] : @""), ((_onPremisesSamAccountName!=nil) ? [NSString stringWithFormat:@", onPremisesSamAccountName: %@", _onPremisesSamAccountName] : @""), ((_passwordProfile!=nil) ? [NSString stringWithFormat:@", passwordProfile: %@", _passwordProfile] : @""), ((_surname!=nil) ? [NSString stringWithFormat:@", surname: %@", _surname] : @""), ((_givenName!=nil) ? [NSString stringWithFormat:@", givenName: %@", _givenName] : @""), ((_primaryRole!=nil) ? [NSString stringWithFormat:@", primaryRole: %@", _primaryRole] : @""), ((_userType!=nil) ? [NSString stringWithFormat:@", userType: %@", _userType] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFileSystemInfo.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFileSystemInfo.h index 4ed5f3f4..35e0ba55 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFileSystemInfo.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFileSystemInfo.h @@ -1,11 +1,11 @@ // // GAFileSystemInfo.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFileSystemInfo.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFileSystemInfo.m index 5285a57f..e5d73401 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFileSystemInfo.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFileSystemInfo.m @@ -1,11 +1,11 @@ // // GAFileSystemInfo.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. * @@ -32,6 +32,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(_createdDateTime, "createdDateTime", NO); + GA_ENC_ADD(_lastAccessedDateTime, "lastAccessedDateTime", NO); + GA_ENC_ADD(_lastModifiedDateTime, "lastModifiedDateTime", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolder.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolder.h index a4bafdcd..1a9aac3d 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolder.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolder.h @@ -1,11 +1,11 @@ // // GAFolder.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolder.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolder.m index e5565571..b87b4c8a 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolder.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolder.m @@ -1,11 +1,11 @@ // // GAFolder.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. * @@ -32,6 +32,15 @@ + (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(_childCount, "childCount", NO); + GA_ENC_ADD(_view, "view", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolderView.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolderView.h index dfca463a..d30139bf 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolderView.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolderView.h @@ -1,11 +1,11 @@ // // GAFolderView.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolderView.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolderView.m index 00291d4b..dcd1bb11 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolderView.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAFolderView.m @@ -1,11 +1,11 @@ // // GAFolderView.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. * @@ -32,6 +32,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(_sortBy, "sortBy", NO); + GA_ENC_ADD(_sortOrder, "sortOrder", NO); + GA_ENC_ADD(_viewType, "viewType", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAGeoCoordinates.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAGeoCoordinates.h new file mode 100644 index 00000000..3ee2db71 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAGeoCoordinates.h @@ -0,0 +1,36 @@ +// +// GAGeoCoordinates.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAGeoCoordinates : NSObject + +// occgen: type properties +@property(strong, nullable) NSNumber *altitude; //!< [number:double] The altitude (height), in feet, above sea level for the item. Read-only. +@property(strong, nullable) NSNumber *latitude; //!< [number:double] The latitude, in decimal, for the item. Read-only. +@property(strong, nullable) NSNumber *longitude; //!< [number:double] The longitude, in decimal, for the item. Read-only. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAGeoCoordinates.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAGeoCoordinates.m new file mode 100644 index 00000000..b909427b --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAGeoCoordinates.m @@ -0,0 +1,82 @@ +// +// GAGeoCoordinates.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 . + * + */ + +// occgen: includes +#import "GAGeoCoordinates.h" + +// occgen: type start +@implementation GAGeoCoordinates + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAGeoCoordinates *instance = [self new]; + + GA_SET(altitude, NSNumber, Nil); + GA_SET(latitude, NSNumber, Nil); + GA_SET(longitude, NSNumber, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_altitude, "altitude", NO); + GA_ENC_ADD(_latitude, "latitude", NO); + GA_ENC_ADD(_longitude, "longitude", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _altitude = [decoder decodeObjectOfClass:NSNumber.class forKey:@"altitude"]; + _latitude = [decoder decodeObjectOfClass:NSNumber.class forKey:@"latitude"]; + _longitude = [decoder decodeObjectOfClass:NSNumber.class forKey:@"longitude"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_altitude forKey:@"altitude"]; + [coder encodeObject:_latitude forKey:@"latitude"]; + [coder encodeObject:_longitude forKey:@"longitude"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@>", NSStringFromClass(self.class), self, ((_altitude!=nil) ? [NSString stringWithFormat:@", altitude: %@", _altitude] : @""), ((_latitude!=nil) ? [NSString stringWithFormat:@", latitude: %@", _latitude] : @""), ((_longitude!=nil) ? [NSString stringWithFormat:@", longitude: %@", _longitude] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAGroup.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAGroup.h index af462af4..7ebad6c0 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAGroup.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAGroup.h @@ -1,11 +1,11 @@ // // GAGroup.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. * @@ -25,13 +25,13 @@ NS_ASSUME_NONNULL_BEGIN @interface GAGroup : NSObject -// occgen: type properties {"locked":true} +// occgen: type properties @property(strong, nullable) NSString *identifier; //!< Read-only. -@property(strong, nullable) NSString *desc; //!< An optional description for the group. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. -@property(strong, nullable) NSString *displayName; //!< The display name for the group. This property is required when a group is created and cannot be cleared during updates. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +@property(strong, nullable) NSString *desc; //!< An optional description for the group. Returned by default. +@property(strong, nullable) NSString *displayName; //!< The display name for the group. This property is required when a group is created and cannot be cleared during updates. Returned by default. Supports $search and $orderBy. +@property(strong, nullable) NSArray *groupTypes; //!< Specifies the group types. In MS Graph a group can have multiple types, so this is an array. In libreGraph the possible group types deviate from the MS Graph. The only group type that we currently support is "ReadOnly", which is set for groups that cannot be modified on the current instance. @property(strong, nullable) NSArray *members; //!< Users and groups that are members of this group. HTTP Methods: GET (supported for all groups), Nullable. Supports $expand. -@property(strong, nullable) NSString *onPremisesDomainName; //!< Contains the on-premises domainFQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. -@property(strong, nullable) NSString *onPremisesSamAccountName; //!< Contains the on-premises SAM account name synchronized from the on-premises directory. Read-only. +// @property(strong, nullable) NSArray *members@odata.bind; //!< A list of member references to the members to be added. Up to 20 members can be added with a single request // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAGroup.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAGroup.m index 377a516b..52162a8e 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAGroup.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAGroup.m @@ -1,11 +1,11 @@ // // GAGroup.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. * @@ -21,7 +21,7 @@ // occgen: type start @implementation GAGroup -// occgen: type serialization {"locked":true} +// occgen: type serialization + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError { GAGroup *instance = [self new]; @@ -29,14 +29,27 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_MAP(identifier, "id", NSString, Nil); GA_MAP(desc, "description", NSString, Nil); GA_SET(displayName, NSString, Nil); + GA_SET(groupTypes, NSString, NSArray.class); GA_SET(members, GAUser, NSArray.class); - GA_SET(onPremisesDomainName, NSString, Nil); - GA_SET(onPremisesSamAccountName, NSString, Nil); +// GA_SET(members@odata.bind, NSString, NSArray.class); return (instance); } -// occgen: type native deserialization {"locked":true} +// 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(_desc, "description", NO); + GA_ENC_ADD(_displayName, "displayName", NO); + GA_ENC_ADD(_groupTypes, "groupTypes", NO); + GA_ENC_ADD(_members, "members", NO); +// GA_ENC_ADD(_members@odata.bind, "members@odata.bind", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization + (BOOL)supportsSecureCoding { return (YES); @@ -49,29 +62,29 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"]; _desc = [decoder decodeObjectOfClass:NSString.class forKey:@"desc"]; _displayName = [decoder decodeObjectOfClass:NSString.class forKey:@"displayName"]; + _groupTypes = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"groupTypes"]; _members = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAUser.class, NSArray.class, nil] forKey:@"members"]; - _onPremisesDomainName = [decoder decodeObjectOfClass:NSString.class forKey:@"onPremisesDomainName"]; - _onPremisesSamAccountName = [decoder decodeObjectOfClass:NSString.class forKey:@"onPremisesSamAccountName"]; +// _members@odata.bind = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"members@odata.bind"]; } return (self); } -// occgen: type native serialization {"locked":true} +// occgen: type native serialization - (void)encodeWithCoder:(NSCoder *)coder { [coder encodeObject:_identifier forKey:@"identifier"]; [coder encodeObject:_desc forKey:@"desc"]; [coder encodeObject:_displayName forKey:@"displayName"]; + [coder encodeObject:_groupTypes forKey:@"groupTypes"]; [coder encodeObject:_members forKey:@"members"]; - [coder encodeObject:_onPremisesDomainName forKey:@"onPremisesDomainName"]; - [coder encodeObject:_onPremisesSamAccountName forKey:@"onPremisesSamAccountName"]; +// [coder encodeObject:_members@odata.bind forKey:@"members@odata.bind"]; } -// occgen: type debug description {"locked":true} +// occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_members!=nil) ? [NSString stringWithFormat:@", members: %@", _members] : @""), ((_onPremisesDomainName!=nil) ? [NSString stringWithFormat:@", onPremisesDomainName: %@", _onPremisesDomainName] : @""), ((_onPremisesSamAccountName!=nil) ? [NSString stringWithFormat:@", onPremisesSamAccountName: %@", _onPremisesSamAccountName] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_groupTypes!=nil) ? [NSString stringWithFormat:@", groupTypes: %@", _groupTypes] : @""), ((_members!=nil) ? [NSString stringWithFormat:@", members: %@", _members] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAHashes.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAHashes.h index b1fd23ed..090005e8 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAHashes.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAHashes.h @@ -1,11 +1,11 @@ // // GAHashes.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAHashes.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAHashes.m index e676fe34..c272c5e9 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAHashes.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAHashes.m @@ -1,11 +1,11 @@ // // GAHashes.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. * @@ -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(_crc32Hash, "crc32Hash", NO); + GA_ENC_ADD(_quickXorHash, "quickXorHash", NO); + GA_ENC_ADD(_sha1Hash, "sha1Hash", NO); + GA_ENC_ADD(_sha256Hash, "sha256Hash", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentity.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentity.h index 38911289..38dffb27 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentity.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentity.h @@ -1,11 +1,11 @@ // // GAIdentity.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. * @@ -23,8 +23,9 @@ NS_ASSUME_NONNULL_BEGIN @interface GAIdentity : NSObject // occgen: type properties -@property(strong, nullable) NSString *displayName; //!< The identity''s display name. Note that this may not always be available or up to date. For example, if a user changes their display name, the API may show the new value in a future response, but the items associated with the user won''t show up as having changed when using delta. +@property(strong) NSString *displayName; //!< The identity''s display name. Note that this may not always be available or up to date. For example, if a user changes their display name, the API may show the new value in a future response, but the items associated with the user won''t show up as having changed when using delta. @property(strong, nullable) NSString *identifier; //!< Unique identifier for the identity. +@property(strong, nullable) NSString *libreGraphUserType; //!< The type of the identity. This can be either "Member" for regular user, "Guest" for guest users or "Federated" for users imported from a federated instance. Can be used by clients to indicate the type of user. For more details, clients should look up and cache the user at the /users endpoint. // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentity.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentity.m index 71b7fec8..edad226c 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentity.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentity.m @@ -1,11 +1,11 @@ // // GAIdentity.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. * @@ -25,12 +25,23 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl { GAIdentity *instance = [self new]; - GA_SET(displayName, NSString, Nil); + GA_SET_REQ(displayName, NSString, Nil); GA_MAP(identifier, "id", NSString, Nil); + GA_MAP(libreGraphUserType, "@libre.graph.userType", NSString, Nil); return (instance); } +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_displayName, "displayName", YES); + GA_ENC_ADD(_identifier, "id", NO); + GA_ENC_ADD(_libreGraphUserType, "@libre.graph.userType", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -43,6 +54,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder { _displayName = [decoder decodeObjectOfClass:NSString.class forKey:@"displayName"]; _identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"]; + _libreGraphUserType = [decoder decodeObjectOfClass:NSString.class forKey:@"libreGraphUserType"]; } return (self); @@ -53,12 +65,13 @@ - (void)encodeWithCoder:(NSCoder *)coder { [coder encodeObject:_displayName forKey:@"displayName"]; [coder encodeObject:_identifier forKey:@"identifier"]; + [coder encodeObject:_libreGraphUserType forKey:@"libreGraphUserType"]; } // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@>", NSStringFromClass(self.class), self, ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@>", NSStringFromClass(self.class), self, ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_libreGraphUserType!=nil) ? [NSString stringWithFormat:@", libreGraphUserType: %@", _libreGraphUserType] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentitySet.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentitySet.h index 801fd957..12143d3e 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentitySet.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentitySet.h @@ -1,11 +1,11 @@ // // GAIdentitySet.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentitySet.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentitySet.m index faa48151..3af931d9 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentitySet.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAIdentitySet.m @@ -1,11 +1,11 @@ // // GAIdentitySet.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. * @@ -34,6 +34,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(_application, "application", NO); + GA_ENC_ADD(_device, "device", NO); + GA_ENC_ADD(_user, "user", NO); + GA_ENC_ADD(_group, "group", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAImage.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAImage.h index 06fb6aff..3c5184ea 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAImage.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAImage.h @@ -1,11 +1,11 @@ // // GAImage.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAImage.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAImage.m index dbcb88d1..413a0be4 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAImage.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAImage.m @@ -1,11 +1,11 @@ // // GAImage.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. * @@ -31,6 +31,15 @@ + (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(_height, "height", NO); + GA_ENC_ADD(_width, "width", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAItemReference.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAItemReference.h index 85a00dae..691be5c1 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAItemReference.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAItemReference.h @@ -1,11 +1,11 @@ // // GAItemReference.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. * @@ -28,7 +28,6 @@ NS_ASSUME_NONNULL_BEGIN @property(strong, nullable) NSString *identifier; //!< Unique identifier of the item in the drive. Read-only. @property(strong, nullable) NSString *name; //!< The name of the item being referenced. Read-only. @property(strong, nullable) NSString *path; //!< Path that can be used to navigate to the item. Read-only. -@property(strong, nullable) NSString *shareId; //!< A unique identifier for a shared resource that can be accessed via the [Shares][] API. // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAItemReference.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAItemReference.m index 2f0bf5b5..06db6d73 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAItemReference.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAItemReference.m @@ -1,11 +1,11 @@ // // GAItemReference.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. * @@ -30,11 +30,22 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_MAP(identifier, "id", NSString, Nil); GA_SET(name, NSString, Nil); GA_SET(path, NSString, Nil); - GA_SET(shareId, NSString, Nil); return (instance); } +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_driveId, "driveId", NO); + GA_ENC_ADD(_driveType, "driveType", NO); + GA_ENC_ADD(_identifier, "id", NO); + GA_ENC_ADD(_name, "name", NO); + GA_ENC_ADD(_path, "path", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -50,7 +61,6 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"]; _name = [decoder decodeObjectOfClass:NSString.class forKey:@"name"]; _path = [decoder decodeObjectOfClass:NSString.class forKey:@"path"]; - _shareId = [decoder decodeObjectOfClass:NSString.class forKey:@"shareId"]; } return (self); @@ -64,13 +74,12 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_identifier forKey:@"identifier"]; [coder encodeObject:_name forKey:@"name"]; [coder encodeObject:_path forKey:@"path"]; - [coder encodeObject:_shareId forKey:@"shareId"]; } // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_driveId!=nil) ? [NSString stringWithFormat:@", driveId: %@", _driveId] : @""), ((_driveType!=nil) ? [NSString stringWithFormat:@", driveType: %@", _driveType] : @""), ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_path!=nil) ? [NSString stringWithFormat:@", path: %@", _path] : @""), ((_shareId!=nil) ? [NSString stringWithFormat:@", shareId: %@", _shareId] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_driveId!=nil) ? [NSString stringWithFormat:@", driveId: %@", _driveId] : @""), ((_driveType!=nil) ? [NSString stringWithFormat:@", driveType: %@", _driveType] : @""), ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_path!=nil) ? [NSString stringWithFormat:@", path: %@", _path] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GALanguage.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GALanguage.h new file mode 100644 index 00000000..a780dfd3 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GALanguage.h @@ -0,0 +1,24 @@ +// +// GALanguage.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 . + * + */ + +// occgen: includes +#import + +// occgen: type start +typedef NSString* GALanguage; + +// occgen: type protected {"locked":true} + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataError.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataError.h index e5575f5c..9dbc4823 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataError.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataError.h @@ -1,11 +1,11 @@ // // GAODataError.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataError.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataError.m index 52d538cc..8c9d7099 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataError.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataError.m @@ -1,11 +1,11 @@ // // GAODataError.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. * @@ -34,6 +34,14 @@ + (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(_error, "error", YES); + GA_ENC_RETURN +} + // occgen: type protected {"locked":true} - (NSError *)nativeError { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorDetail.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorDetail.h index ba48633f..f4088ba8 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorDetail.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorDetail.h @@ -1,11 +1,11 @@ // // GAODataErrorDetail.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorDetail.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorDetail.m index 0b2bdc4b..ca19e563 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorDetail.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorDetail.m @@ -1,11 +1,11 @@ // // GAODataErrorDetail.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. * @@ -32,6 +32,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(_code, "code", YES); + GA_ENC_ADD(_message, "message", YES); + GA_ENC_ADD(_target, "target", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorMain.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorMain.h index d9e180fb..cf15885c 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorMain.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorMain.h @@ -1,11 +1,11 @@ // // GAODataErrorMain.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorMain.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorMain.m index 7e114185..ba26a9e5 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorMain.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAODataErrorMain.m @@ -1,11 +1,11 @@ // // GAODataErrorMain.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. * @@ -38,6 +38,18 @@ + (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(_code, "code", YES); + GA_ENC_ADD(_message, "message", YES); + GA_ENC_ADD(_target, "target", NO); + GA_ENC_ADD(_details, "details", NO); + GA_ENC_ADD(_innererror, "innererror", NO); + GA_ENC_RETURN +} + // occgen: type protected {"locked":true} - (NSError *)nativeError { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAObjectIdentity.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAObjectIdentity.h index 245f68b2..272768b6 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAObjectIdentity.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAObjectIdentity.h @@ -1,11 +1,11 @@ // // GAObjectIdentity.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAObjectIdentity.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAObjectIdentity.m index f6ba09de..469dd4bd 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAObjectIdentity.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAObjectIdentity.m @@ -1,11 +1,11 @@ // // GAObjectIdentity.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. * @@ -31,6 +31,15 @@ + (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(_issuer, "issuer", NO); + GA_ENC_ADD(_issuerAssignedId, "issuerAssignedId", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAOpenGraphFile.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAOpenGraphFile.h index 4e8d26f0..d00f1a56 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAOpenGraphFile.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAOpenGraphFile.h @@ -1,11 +1,11 @@ // // GAOpenGraphFile.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAOpenGraphFile.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAOpenGraphFile.m index 91597776..a03d174d 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAOpenGraphFile.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAOpenGraphFile.m @@ -1,11 +1,11 @@ // // GAOpenGraphFile.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. * @@ -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(_hashes, "hashes", NO); + GA_ENC_ADD(_mimeType, "mimeType", NO); + GA_ENC_ADD(_processingMetadata, "processingMetadata", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPasswordProfile.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPasswordProfile.h index 6edd4266..0b38bc34 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPasswordProfile.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPasswordProfile.h @@ -1,11 +1,11 @@ // // GAPasswordProfile.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPasswordProfile.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPasswordProfile.m index 6a49730e..58279d55 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPasswordProfile.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPasswordProfile.m @@ -1,11 +1,11 @@ // // GAPasswordProfile.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. * @@ -31,6 +31,15 @@ + (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(_forceChangePasswordNextSignIn, "forceChangePasswordNextSignIn", NO); + GA_ENC_ADD(_password, "password", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPermission.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPermission.h index 946e04d7..f3a560f7 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPermission.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPermission.h @@ -1,11 +1,11 @@ // // GAPermission.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. * @@ -20,14 +20,25 @@ // occgen: forward declarations @class GAIdentitySet; +@class GASharePointIdentitySet; +@class GASharingInvitation; +@class GASharingLink; // occgen: type start NS_ASSUME_NONNULL_BEGIN @interface GAPermission : NSObject // occgen: type properties -@property(strong, nullable) NSArray *grantedToIdentities; +@property(strong, nullable) NSString *identifier; //!< The unique identifier of the permission among all permissions on the item. Read-only. +@property(strong, nullable) NSNumber *hasPassword; //!< [boolean] | +@property(strong, nullable) NSDate *expirationDateTime; //!< [string:date-time] An optional expiration date which limits the permission in time. +@property(strong, nullable) NSDate *createdDateTime; //!< [string:date-time] An optional creation date. Libregraph only. +@property(strong, nullable) GASharePointIdentitySet *grantedToV2; //!< For user type permissions, the details of the users and applications for this permission. Only part of responses. Use the invitation property when creating shares. +@property(strong, nullable) GASharingLink *link; //!< Provides the link details of the current permission, if it is a link type permissions. @property(strong, nullable) NSArray *roles; +@property(strong, nullable) NSArray *grantedToIdentities; //!< For link type permissions, the details of the identity to whom permission was granted. This could be used to grant access to a an external user that can be identified by email, aka guest accounts. +@property(strong, nullable) NSArray *libreGraphPermissionsActions; //!< Use this to create a permission with custom actions. +@property(strong, nullable) GASharingInvitation *invitation; //!< | // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPermission.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPermission.m index 541657ff..c3e59efd 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPermission.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPermission.m @@ -1,11 +1,11 @@ // // GAPermission.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. * @@ -17,6 +17,9 @@ // occgen: includes #import "GAPermission.h" #import "GAIdentitySet.h" +#import "GASharePointIdentitySet.h" +#import "GASharingInvitation.h" +#import "GASharingLink.h" // occgen: type start @implementation GAPermission @@ -26,12 +29,37 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl { GAPermission *instance = [self new]; - GA_SET(grantedToIdentities, GAIdentitySet, NSArray.class); + GA_MAP(identifier, "id", NSString, Nil); + GA_SET(hasPassword, NSNumber, Nil); + GA_SET(expirationDateTime, NSDate, Nil); + GA_SET(createdDateTime, NSDate, Nil); + GA_SET(grantedToV2, GASharePointIdentitySet, Nil); + GA_SET(link, GASharingLink, Nil); GA_SET(roles, NSString, NSArray.class); + GA_SET(grantedToIdentities, GAIdentitySet, NSArray.class); + GA_MAP(libreGraphPermissionsActions, "@libre.graph.permissions.actions", NSString, NSArray.class); + GA_SET(invitation, GASharingInvitation, 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", NO); + GA_ENC_ADD(_hasPassword, "hasPassword", NO); + GA_ENC_ADD(_expirationDateTime, "expirationDateTime", NO); + GA_ENC_ADD(_createdDateTime, "createdDateTime", NO); + GA_ENC_ADD(_grantedToV2, "grantedToV2", NO); + GA_ENC_ADD(_link, "link", NO); + GA_ENC_ADD(_roles, "roles", NO); + GA_ENC_ADD(_grantedToIdentities, "grantedToIdentities", NO); + GA_ENC_ADD(_libreGraphPermissionsActions, "@libre.graph.permissions.actions", NO); + GA_ENC_ADD(_invitation, "invitation", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -42,8 +70,16 @@ - (instancetype)initWithCoder:(NSCoder *)decoder { if ((self = [super init]) != nil) { - _grantedToIdentities = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAIdentitySet.class, NSArray.class, nil] forKey:@"grantedToIdentities"]; + _identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"]; + _hasPassword = [decoder decodeObjectOfClass:NSNumber.class forKey:@"hasPassword"]; + _expirationDateTime = [decoder decodeObjectOfClass:NSDate.class forKey:@"expirationDateTime"]; + _createdDateTime = [decoder decodeObjectOfClass:NSDate.class forKey:@"createdDateTime"]; + _grantedToV2 = [decoder decodeObjectOfClass:GASharePointIdentitySet.class forKey:@"grantedToV2"]; + _link = [decoder decodeObjectOfClass:GASharingLink.class forKey:@"link"]; _roles = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"roles"]; + _grantedToIdentities = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAIdentitySet.class, NSArray.class, nil] forKey:@"grantedToIdentities"]; + _libreGraphPermissionsActions = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"libreGraphPermissionsActions"]; + _invitation = [decoder decodeObjectOfClass:GASharingInvitation.class forKey:@"invitation"]; } return (self); @@ -52,14 +88,22 @@ - (instancetype)initWithCoder:(NSCoder *)decoder // occgen: type native serialization - (void)encodeWithCoder:(NSCoder *)coder { - [coder encodeObject:_grantedToIdentities forKey:@"grantedToIdentities"]; + [coder encodeObject:_identifier forKey:@"identifier"]; + [coder encodeObject:_hasPassword forKey:@"hasPassword"]; + [coder encodeObject:_expirationDateTime forKey:@"expirationDateTime"]; + [coder encodeObject:_createdDateTime forKey:@"createdDateTime"]; + [coder encodeObject:_grantedToV2 forKey:@"grantedToV2"]; + [coder encodeObject:_link forKey:@"link"]; [coder encodeObject:_roles forKey:@"roles"]; + [coder encodeObject:_grantedToIdentities forKey:@"grantedToIdentities"]; + [coder encodeObject:_libreGraphPermissionsActions forKey:@"libreGraphPermissionsActions"]; + [coder encodeObject:_invitation forKey:@"invitation"]; } // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@>", NSStringFromClass(self.class), self, ((_grantedToIdentities!=nil) ? [NSString stringWithFormat:@", grantedToIdentities: %@", _grantedToIdentities] : @""), ((_roles!=nil) ? [NSString stringWithFormat:@", roles: %@", _roles] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_hasPassword!=nil) ? [NSString stringWithFormat:@", hasPassword: %@", _hasPassword] : @""), ((_expirationDateTime!=nil) ? [NSString stringWithFormat:@", expirationDateTime: %@", _expirationDateTime] : @""), ((_createdDateTime!=nil) ? [NSString stringWithFormat:@", createdDateTime: %@", _createdDateTime] : @""), ((_grantedToV2!=nil) ? [NSString stringWithFormat:@", grantedToV2: %@", _grantedToV2] : @""), ((_link!=nil) ? [NSString stringWithFormat:@", link: %@", _link] : @""), ((_roles!=nil) ? [NSString stringWithFormat:@", roles: %@", _roles] : @""), ((_grantedToIdentities!=nil) ? [NSString stringWithFormat:@", grantedToIdentities: %@", _grantedToIdentities] : @""), ((_libreGraphPermissionsActions!=nil) ? [NSString stringWithFormat:@", libreGraphPermissionsActions: %@", _libreGraphPermissionsActions] : @""), ((_invitation!=nil) ? [NSString stringWithFormat:@", invitation: %@", _invitation] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPhoto.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPhoto.h new file mode 100644 index 00000000..4f744113 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPhoto.h @@ -0,0 +1,42 @@ +// +// GAPhoto.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAPhoto : NSObject + +// occgen: type properties +@property(strong, nullable) NSString *cameraMake; //!< Camera manufacturer. Read-only. +@property(strong, nullable) NSString *cameraModel; //!< Camera model. Read-only. +@property(strong, nullable) NSNumber *exposureDenominator; //!< [number:double] The denominator for the exposure time fraction from the camera. Read-only. +@property(strong, nullable) NSNumber *exposureNumerator; //!< [number:double] The numerator for the exposure time fraction from the camera. Read-only. +@property(strong, nullable) NSNumber *fNumber; //!< [number:double] The F-stop value from the camera. Read-only. +@property(strong, nullable) NSNumber *focalLength; //!< [number:double] The focal length from the camera. Read-only. +@property(strong, nullable) NSNumber *iso; //!< [integer:int32] The ISO value from the camera. Read-only. +@property(strong, nullable) NSNumber *orientation; //!< [integer:int16] The orientation value from the camera. Read-only. +@property(strong, nullable) NSDate *takenDateTime; //!< [string:date-time] Represents the date and time the photo was taken. Read-only. | pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$ + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAPhoto.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPhoto.m new file mode 100644 index 00000000..4035d722 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAPhoto.m @@ -0,0 +1,106 @@ +// +// GAPhoto.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 . + * + */ + +// occgen: includes +#import "GAPhoto.h" + +// occgen: type start +@implementation GAPhoto + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAPhoto *instance = [self new]; + + GA_SET(cameraMake, NSString, Nil); + GA_SET(cameraModel, NSString, Nil); + GA_SET(exposureDenominator, NSNumber, Nil); + GA_SET(exposureNumerator, NSNumber, Nil); + GA_SET(fNumber, NSNumber, Nil); + GA_SET(focalLength, NSNumber, Nil); + GA_SET(iso, NSNumber, Nil); + GA_SET(orientation, NSNumber, Nil); + GA_SET(takenDateTime, NSDate, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_cameraMake, "cameraMake", NO); + GA_ENC_ADD(_cameraModel, "cameraModel", NO); + GA_ENC_ADD(_exposureDenominator, "exposureDenominator", NO); + GA_ENC_ADD(_exposureNumerator, "exposureNumerator", NO); + GA_ENC_ADD(_fNumber, "fNumber", NO); + GA_ENC_ADD(_focalLength, "focalLength", NO); + GA_ENC_ADD(_iso, "iso", NO); + GA_ENC_ADD(_orientation, "orientation", NO); + GA_ENC_ADD(_takenDateTime, "takenDateTime", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _cameraMake = [decoder decodeObjectOfClass:NSString.class forKey:@"cameraMake"]; + _cameraModel = [decoder decodeObjectOfClass:NSString.class forKey:@"cameraModel"]; + _exposureDenominator = [decoder decodeObjectOfClass:NSNumber.class forKey:@"exposureDenominator"]; + _exposureNumerator = [decoder decodeObjectOfClass:NSNumber.class forKey:@"exposureNumerator"]; + _fNumber = [decoder decodeObjectOfClass:NSNumber.class forKey:@"fNumber"]; + _focalLength = [decoder decodeObjectOfClass:NSNumber.class forKey:@"focalLength"]; + _iso = [decoder decodeObjectOfClass:NSNumber.class forKey:@"iso"]; + _orientation = [decoder decodeObjectOfClass:NSNumber.class forKey:@"orientation"]; + _takenDateTime = [decoder decodeObjectOfClass:NSDate.class forKey:@"takenDateTime"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_cameraMake forKey:@"cameraMake"]; + [coder encodeObject:_cameraModel forKey:@"cameraModel"]; + [coder encodeObject:_exposureDenominator forKey:@"exposureDenominator"]; + [coder encodeObject:_exposureNumerator forKey:@"exposureNumerator"]; + [coder encodeObject:_fNumber forKey:@"fNumber"]; + [coder encodeObject:_focalLength forKey:@"focalLength"]; + [coder encodeObject:_iso forKey:@"iso"]; + [coder encodeObject:_orientation forKey:@"orientation"]; + [coder encodeObject:_takenDateTime forKey:@"takenDateTime"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_cameraMake!=nil) ? [NSString stringWithFormat:@", cameraMake: %@", _cameraMake] : @""), ((_cameraModel!=nil) ? [NSString stringWithFormat:@", cameraModel: %@", _cameraModel] : @""), ((_exposureDenominator!=nil) ? [NSString stringWithFormat:@", exposureDenominator: %@", _exposureDenominator] : @""), ((_exposureNumerator!=nil) ? [NSString stringWithFormat:@", exposureNumerator: %@", _exposureNumerator] : @""), ((_fNumber!=nil) ? [NSString stringWithFormat:@", fNumber: %@", _fNumber] : @""), ((_focalLength!=nil) ? [NSString stringWithFormat:@", focalLength: %@", _focalLength] : @""), ((_iso!=nil) ? [NSString stringWithFormat:@", iso: %@", _iso] : @""), ((_orientation!=nil) ? [NSString stringWithFormat:@", orientation: %@", _orientation] : @""), ((_takenDateTime!=nil) ? [NSString stringWithFormat:@", takenDateTime: %@", _takenDateTime] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAQuota.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAQuota.h index 56cf96e4..081543d3 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAQuota.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAQuota.h @@ -1,11 +1,11 @@ // // GAQuota.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAQuota.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAQuota.m index 68ad6d82..c4d949cf 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAQuota.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAQuota.m @@ -1,11 +1,11 @@ // // GAQuota.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. * @@ -34,6 +34,18 @@ + (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(_deleted, "deleted", NO); + GA_ENC_ADD(_remaining, "remaining", NO); + GA_ENC_ADD(_state, "state", NO); + GA_ENC_ADD(_total, "total", NO); + GA_ENC_ADD(_used, "used", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GARemoteItem.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GARemoteItem.h index 4d890fb4..901df12c 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GARemoteItem.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GARemoteItem.h @@ -1,11 +1,11 @@ // // GARemoteItem.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. * @@ -26,7 +26,7 @@ typedef NSString * OCFileETag; @class GAImage; @class GAItemReference; @class GAOpenGraphFile; -@class GAShared; +@class GAPermission; @class GASpecialFolder; // occgen: type start @@ -39,6 +39,9 @@ NS_ASSUME_NONNULL_BEGIN @property(strong, nullable) GAOpenGraphFile *file; @property(strong, nullable) GAFileSystemInfo *fileSystemInfo; @property(strong, nullable) GAFolder *folder; +@property(strong, nullable) NSString *driveAlias; //!< The drive alias can be used in clients to make the urls user friendly. Example: 'personal/einstein'. This will be used to resolve to the correct driveID. +@property(strong, nullable) NSString *path; //!< The relative path of the item in relation to its drive root. +@property(strong, nullable) NSString *rootId; //!< Unique identifier for the drive root of this item. Read-only. @property(strong, nullable) NSString *identifier; //!< Unique identifier for the remote item in its drive. Read-only. @property(strong, nullable) GAImage *image; @property(strong, nullable) GAIdentitySet *lastModifiedBy; @@ -47,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN @property(strong, nullable) OCFileETag eTag; //!< ETag for the item. Read-only. @property(strong, nullable) NSString *cTag; //!< An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note This property is not returned if the item is a folder. Read-only. @property(strong, nullable) GAItemReference *parentReference; -@property(strong, nullable) GAShared *shared; +@property(strong, nullable) NSArray *permissions; //!< The set of permissions for the item. Read-only. Nullable. @property(strong, nullable) NSNumber *size; //!< [integer:int64] Size of the remote item. Read-only. @property(strong, nullable) GASpecialFolder *specialFolder; @property(strong, nullable) NSURL *webDavUrl; //!< DAV compatible URL for the item. diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GARemoteItem.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GARemoteItem.m index 628e1115..ce99c957 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GARemoteItem.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GARemoteItem.m @@ -1,11 +1,11 @@ // // GARemoteItem.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. * @@ -22,7 +22,7 @@ #import "GAImage.h" #import "GAItemReference.h" #import "GAOpenGraphFile.h" -#import "GAShared.h" +#import "GAPermission.h" #import "GASpecialFolder.h" // occgen: type start @@ -38,6 +38,9 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_SET(file, GAOpenGraphFile, Nil); GA_SET(fileSystemInfo, GAFileSystemInfo, Nil); GA_SET(folder, GAFolder, Nil); + GA_SET(driveAlias, NSString, Nil); + GA_SET(path, NSString, Nil); + GA_SET(rootId, NSString, Nil); GA_MAP(identifier, "id", NSString, Nil); GA_SET(image, GAImage, Nil); GA_SET(lastModifiedBy, GAIdentitySet, Nil); @@ -46,7 +49,7 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_SET(eTag, NSString, Nil); GA_SET(cTag, NSString, Nil); GA_SET(parentReference, GAItemReference, Nil); - GA_SET(shared, GAShared, Nil); + GA_SET(permissions, GAPermission, NSArray.class); GA_SET(size, NSNumber, Nil); GA_SET(specialFolder, GASpecialFolder, Nil); GA_SET(webDavUrl, NSURL, Nil); @@ -55,6 +58,34 @@ + (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(_createdBy, "createdBy", NO); + GA_ENC_ADD(_createdDateTime, "createdDateTime", NO); + GA_ENC_ADD(_file, "file", NO); + GA_ENC_ADD(_fileSystemInfo, "fileSystemInfo", NO); + GA_ENC_ADD(_folder, "folder", NO); + GA_ENC_ADD(_driveAlias, "driveAlias", NO); + GA_ENC_ADD(_path, "path", NO); + GA_ENC_ADD(_rootId, "rootId", NO); + GA_ENC_ADD(_identifier, "id", NO); + GA_ENC_ADD(_image, "image", NO); + GA_ENC_ADD(_lastModifiedBy, "lastModifiedBy", NO); + GA_ENC_ADD(_lastModifiedDateTime, "lastModifiedDateTime", NO); + GA_ENC_ADD(_name, "name", NO); + GA_ENC_ADD(_eTag, "eTag", NO); + GA_ENC_ADD(_cTag, "cTag", NO); + GA_ENC_ADD(_parentReference, "parentReference", NO); + GA_ENC_ADD(_permissions, "permissions", NO); + GA_ENC_ADD(_size, "size", NO); + GA_ENC_ADD(_specialFolder, "specialFolder", NO); + GA_ENC_ADD(_webDavUrl, "webDavUrl", NO); + GA_ENC_ADD(_webUrl, "webUrl", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -70,6 +101,9 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _file = [decoder decodeObjectOfClass:GAOpenGraphFile.class forKey:@"file"]; _fileSystemInfo = [decoder decodeObjectOfClass:GAFileSystemInfo.class forKey:@"fileSystemInfo"]; _folder = [decoder decodeObjectOfClass:GAFolder.class forKey:@"folder"]; + _driveAlias = [decoder decodeObjectOfClass:NSString.class forKey:@"driveAlias"]; + _path = [decoder decodeObjectOfClass:NSString.class forKey:@"path"]; + _rootId = [decoder decodeObjectOfClass:NSString.class forKey:@"rootId"]; _identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"]; _image = [decoder decodeObjectOfClass:GAImage.class forKey:@"image"]; _lastModifiedBy = [decoder decodeObjectOfClass:GAIdentitySet.class forKey:@"lastModifiedBy"]; @@ -78,7 +112,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _eTag = [decoder decodeObjectOfClass:NSString.class forKey:@"eTag"]; _cTag = [decoder decodeObjectOfClass:NSString.class forKey:@"cTag"]; _parentReference = [decoder decodeObjectOfClass:GAItemReference.class forKey:@"parentReference"]; - _shared = [decoder decodeObjectOfClass:GAShared.class forKey:@"shared"]; + _permissions = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAPermission.class, NSArray.class, nil] forKey:@"permissions"]; _size = [decoder decodeObjectOfClass:NSNumber.class forKey:@"size"]; _specialFolder = [decoder decodeObjectOfClass:GASpecialFolder.class forKey:@"specialFolder"]; _webDavUrl = [decoder decodeObjectOfClass:NSURL.class forKey:@"webDavUrl"]; @@ -96,6 +130,9 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_file forKey:@"file"]; [coder encodeObject:_fileSystemInfo forKey:@"fileSystemInfo"]; [coder encodeObject:_folder forKey:@"folder"]; + [coder encodeObject:_driveAlias forKey:@"driveAlias"]; + [coder encodeObject:_path forKey:@"path"]; + [coder encodeObject:_rootId forKey:@"rootId"]; [coder encodeObject:_identifier forKey:@"identifier"]; [coder encodeObject:_image forKey:@"image"]; [coder encodeObject:_lastModifiedBy forKey:@"lastModifiedBy"]; @@ -104,7 +141,7 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_eTag forKey:@"eTag"]; [coder encodeObject:_cTag forKey:@"cTag"]; [coder encodeObject:_parentReference forKey:@"parentReference"]; - [coder encodeObject:_shared forKey:@"shared"]; + [coder encodeObject:_permissions forKey:@"permissions"]; [coder encodeObject:_size forKey:@"size"]; [coder encodeObject:_specialFolder forKey:@"specialFolder"]; [coder encodeObject:_webDavUrl forKey:@"webDavUrl"]; @@ -114,7 +151,7 @@ - (void)encodeWithCoder:(NSCoder *)coder // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_createdBy!=nil) ? [NSString stringWithFormat:@", createdBy: %@", _createdBy] : @""), ((_createdDateTime!=nil) ? [NSString stringWithFormat:@", createdDateTime: %@", _createdDateTime] : @""), ((_file!=nil) ? [NSString stringWithFormat:@", file: %@", _file] : @""), ((_fileSystemInfo!=nil) ? [NSString stringWithFormat:@", fileSystemInfo: %@", _fileSystemInfo] : @""), ((_folder!=nil) ? [NSString stringWithFormat:@", folder: %@", _folder] : @""), ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_image!=nil) ? [NSString stringWithFormat:@", image: %@", _image] : @""), ((_lastModifiedBy!=nil) ? [NSString stringWithFormat:@", lastModifiedBy: %@", _lastModifiedBy] : @""), ((_lastModifiedDateTime!=nil) ? [NSString stringWithFormat:@", lastModifiedDateTime: %@", _lastModifiedDateTime] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_eTag!=nil) ? [NSString stringWithFormat:@", eTag: %@", _eTag] : @""), ((_cTag!=nil) ? [NSString stringWithFormat:@", cTag: %@", _cTag] : @""), ((_parentReference!=nil) ? [NSString stringWithFormat:@", parentReference: %@", _parentReference] : @""), ((_shared!=nil) ? [NSString stringWithFormat:@", shared: %@", _shared] : @""), ((_size!=nil) ? [NSString stringWithFormat:@", size: %@", _size] : @""), ((_specialFolder!=nil) ? [NSString stringWithFormat:@", specialFolder: %@", _specialFolder] : @""), ((_webDavUrl!=nil) ? [NSString stringWithFormat:@", webDavUrl: %@", _webDavUrl] : @""), ((_webUrl!=nil) ? [NSString stringWithFormat:@", webUrl: %@", _webUrl] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_createdBy!=nil) ? [NSString stringWithFormat:@", createdBy: %@", _createdBy] : @""), ((_createdDateTime!=nil) ? [NSString stringWithFormat:@", createdDateTime: %@", _createdDateTime] : @""), ((_file!=nil) ? [NSString stringWithFormat:@", file: %@", _file] : @""), ((_fileSystemInfo!=nil) ? [NSString stringWithFormat:@", fileSystemInfo: %@", _fileSystemInfo] : @""), ((_folder!=nil) ? [NSString stringWithFormat:@", folder: %@", _folder] : @""), ((_driveAlias!=nil) ? [NSString stringWithFormat:@", driveAlias: %@", _driveAlias] : @""), ((_path!=nil) ? [NSString stringWithFormat:@", path: %@", _path] : @""), ((_rootId!=nil) ? [NSString stringWithFormat:@", rootId: %@", _rootId] : @""), ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_image!=nil) ? [NSString stringWithFormat:@", image: %@", _image] : @""), ((_lastModifiedBy!=nil) ? [NSString stringWithFormat:@", lastModifiedBy: %@", _lastModifiedBy] : @""), ((_lastModifiedDateTime!=nil) ? [NSString stringWithFormat:@", lastModifiedDateTime: %@", _lastModifiedDateTime] : @""), ((_name!=nil) ? [NSString stringWithFormat:@", name: %@", _name] : @""), ((_eTag!=nil) ? [NSString stringWithFormat:@", eTag: %@", _eTag] : @""), ((_cTag!=nil) ? [NSString stringWithFormat:@", cTag: %@", _cTag] : @""), ((_parentReference!=nil) ? [NSString stringWithFormat:@", parentReference: %@", _parentReference] : @""), ((_permissions!=nil) ? [NSString stringWithFormat:@", permissions: %@", _permissions] : @""), ((_size!=nil) ? [NSString stringWithFormat:@", size: %@", _size] : @""), ((_specialFolder!=nil) ? [NSString stringWithFormat:@", specialFolder: %@", _specialFolder] : @""), ((_webDavUrl!=nil) ? [NSString stringWithFormat:@", webDavUrl: %@", _webDavUrl] : @""), ((_webUrl!=nil) ? [NSString stringWithFormat:@", webUrl: %@", _webUrl] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GARoot.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GARoot.h index f561ef15..c18fdbcc 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GARoot.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GARoot.h @@ -1,11 +1,11 @@ // // GARoot.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GARoot.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GARoot.m index 47a06d2c..fadc112d 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GARoot.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GARoot.m @@ -1,11 +1,11 @@ // // GARoot.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. * @@ -29,6 +29,13 @@ + (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_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharePointIdentitySet.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharePointIdentitySet.h new file mode 100644 index 00000000..d4cdd74f --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharePointIdentitySet.h @@ -0,0 +1,38 @@ +// +// GASharePointIdentitySet.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: forward declarations +@class GAIdentity; + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GASharePointIdentitySet : NSObject + +// occgen: type properties +@property(strong, nullable) GAIdentity *user; //!< Optional. The user associated with this action. +@property(strong, nullable) GAIdentity *group; //!< Optional. The group associated with this action. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharePointIdentitySet.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharePointIdentitySet.m new file mode 100644 index 00000000..d6f9da7b --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharePointIdentitySet.m @@ -0,0 +1,79 @@ +// +// GASharePointIdentitySet.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 . + * + */ + +// occgen: includes +#import "GASharePointIdentitySet.h" +#import "GAIdentity.h" + +// occgen: type start +@implementation GASharePointIdentitySet + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GASharePointIdentitySet *instance = [self new]; + + GA_SET(user, GAIdentity, Nil); + GA_SET(group, GAIdentity, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_user, "user", NO); + GA_ENC_ADD(_group, "group", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _user = [decoder decodeObjectOfClass:GAIdentity.class forKey:@"user"]; + _group = [decoder decodeObjectOfClass:GAIdentity.class forKey:@"group"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_user forKey:@"user"]; + [coder encodeObject:_group forKey:@"group"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@>", NSStringFromClass(self.class), self, ((_user!=nil) ? [NSString stringWithFormat:@", user: %@", _user] : @""), ((_group!=nil) ? [NSString stringWithFormat:@", group: %@", _group] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingInvitation.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingInvitation.h new file mode 100644 index 00000000..f3a3931f --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingInvitation.h @@ -0,0 +1,37 @@ +// +// GASharingInvitation.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: forward declarations +@class GAIdentitySet; + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GASharingInvitation : NSObject + +// occgen: type properties +@property(strong, nullable) GAIdentitySet *invitedBy; //!< Provides information about who sent the invitation that created this permission, if that information is available. Read-only. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingInvitation.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingInvitation.m new file mode 100644 index 00000000..feb71fc7 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingInvitation.m @@ -0,0 +1,75 @@ +// +// GASharingInvitation.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 . + * + */ + +// occgen: includes +#import "GASharingInvitation.h" +#import "GAIdentitySet.h" + +// occgen: type start +@implementation GASharingInvitation + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GASharingInvitation *instance = [self new]; + + GA_SET(invitedBy, GAIdentitySet, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_invitedBy, "invitedBy", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _invitedBy = [decoder decodeObjectOfClass:GAIdentitySet.class forKey:@"invitedBy"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_invitedBy forKey:@"invitedBy"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@>", NSStringFromClass(self.class), self, ((_invitedBy!=nil) ? [NSString stringWithFormat:@", invitedBy: %@", _invitedBy] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLink.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLink.h new file mode 100644 index 00000000..b6eb73b9 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLink.h @@ -0,0 +1,39 @@ +// +// GASharingLink.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" +#import "GASharingLinkType.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GASharingLink : NSObject + +// occgen: type properties +@property(strong, nullable) GASharingLinkType type; +@property(strong, nullable) NSNumber *preventsDownload; //!< [boolean] If `true` then the user can only use this link to view the item on the web, and cannot use it to download the contents of the item. +@property(strong, nullable) NSURL *webUrl; //!< A URL that opens the item in the browser on the website. +@property(strong, nullable) NSString *libreGraphDisplayName; //!< Provides a user-visible display name of the link. Optional. Libregraph only. +@property(strong, nullable) NSNumber *libreGraphQuickLink; //!< [boolean] The quicklink property can be assigned to only one link per resource. A quicklink can be used in the clients to provide a one-click copy to clipboard action. Optional. Libregraph only. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLink.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLink.m new file mode 100644 index 00000000..b5869c2e --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLink.m @@ -0,0 +1,90 @@ +// +// GASharingLink.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 . + * + */ + +// occgen: includes +#import "GASharingLink.h" + +// occgen: type start +@implementation GASharingLink + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GASharingLink *instance = [self new]; + + GA_SET(type, NSString, Nil); + GA_SET(preventsDownload, NSNumber, Nil); + GA_SET(webUrl, NSURL, Nil); + GA_MAP(libreGraphDisplayName, "@libre.graph.displayName", NSString, Nil); + GA_MAP(libreGraphQuickLink, "@libre.graph.quickLink", NSNumber, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_type, "type", NO); + GA_ENC_ADD(_preventsDownload, "preventsDownload", NO); + GA_ENC_ADD(_webUrl, "webUrl", NO); + GA_ENC_ADD(_libreGraphDisplayName, "@libre.graph.displayName", NO); + GA_ENC_ADD(_libreGraphQuickLink, "@libre.graph.quickLink", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _type = [decoder decodeObjectOfClass:NSString.class forKey:@"type"]; + _preventsDownload = [decoder decodeObjectOfClass:NSNumber.class forKey:@"preventsDownload"]; + _webUrl = [decoder decodeObjectOfClass:NSURL.class forKey:@"webUrl"]; + _libreGraphDisplayName = [decoder decodeObjectOfClass:NSString.class forKey:@"libreGraphDisplayName"]; + _libreGraphQuickLink = [decoder decodeObjectOfClass:NSNumber.class forKey:@"libreGraphQuickLink"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_type forKey:@"type"]; + [coder encodeObject:_preventsDownload forKey:@"preventsDownload"]; + [coder encodeObject:_webUrl forKey:@"webUrl"]; + [coder encodeObject:_libreGraphDisplayName forKey:@"libreGraphDisplayName"]; + [coder encodeObject:_libreGraphQuickLink forKey:@"libreGraphQuickLink"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_type!=nil) ? [NSString stringWithFormat:@", type: %@", _type] : @""), ((_preventsDownload!=nil) ? [NSString stringWithFormat:@", preventsDownload: %@", _preventsDownload] : @""), ((_webUrl!=nil) ? [NSString stringWithFormat:@", webUrl: %@", _webUrl] : @""), ((_libreGraphDisplayName!=nil) ? [NSString stringWithFormat:@", libreGraphDisplayName: %@", _libreGraphDisplayName] : @""), ((_libreGraphQuickLink!=nil) ? [NSString stringWithFormat:@", libreGraphQuickLink: %@", _libreGraphQuickLink] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkPassword.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkPassword.h new file mode 100644 index 00000000..19cec664 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkPassword.h @@ -0,0 +1,34 @@ +// +// GASharingLinkPassword.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GASharingLinkPassword : NSObject + +// occgen: type properties +@property(strong, nullable) NSString *password; //!< Password. It may require a password policy. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkPassword.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkPassword.m new file mode 100644 index 00000000..86a01231 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkPassword.m @@ -0,0 +1,74 @@ +// +// GASharingLinkPassword.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 . + * + */ + +// occgen: includes +#import "GASharingLinkPassword.h" + +// occgen: type start +@implementation GASharingLinkPassword + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GASharingLinkPassword *instance = [self new]; + + GA_SET(password, NSString, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_password, "password", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _password = [decoder decodeObjectOfClass:NSString.class forKey:@"password"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_password forKey:@"password"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@>", NSStringFromClass(self.class), self, ((_password!=nil) ? [NSString stringWithFormat:@", password: %@", _password] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkType.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkType.h new file mode 100644 index 00000000..21a57e31 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkType.h @@ -0,0 +1,31 @@ +// +// GASharingLinkType.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 . + * + */ + +// occgen: includes +#import + +// occgen: type start +typedef NSString* GASharingLinkType NS_TYPED_ENUM; + +extern GASharingLinkType GASharingLinkTypeInternal; +extern GASharingLinkType GASharingLinkTypeView; +extern GASharingLinkType GASharingLinkTypeUpload; +extern GASharingLinkType GASharingLinkTypeEdit; +extern GASharingLinkType GASharingLinkTypeCreateOnly; +extern GASharingLinkType GASharingLinkTypeBlocksDownload; + +// occgen: type protected {"locked":true} + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkType.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkType.m new file mode 100644 index 00000000..369657e8 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASharingLinkType.m @@ -0,0 +1,29 @@ +// +// GASharingLinkType.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 . + * + */ + +// occgen: includes +#import "GASharingLinkType.h" + +// occgen: type start +GASharingLinkType GASharingLinkTypeInternal = @"internal"; +GASharingLinkType GASharingLinkTypeView = @"view"; +GASharingLinkType GASharingLinkTypeUpload = @"upload"; +GASharingLinkType GASharingLinkTypeEdit = @"edit"; +GASharingLinkType GASharingLinkTypeCreateOnly = @"createOnly"; +GASharingLinkType GASharingLinkTypeBlocksDownload = @"blocksDownload"; + +// occgen: type protected {"locked":true} + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASignInActivity.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GASignInActivity.h new file mode 100644 index 00000000..8940b004 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASignInActivity.h @@ -0,0 +1,34 @@ +// +// GASignInActivity.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GASignInActivity : NSObject + +// occgen: type properties +@property(strong, nullable) NSDate *lastSuccessfulSignInDateTime; //!< [string:date-time] The date and time of the last successful sign-in for the user. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASignInActivity.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GASignInActivity.m new file mode 100644 index 00000000..9c63b701 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASignInActivity.m @@ -0,0 +1,74 @@ +// +// GASignInActivity.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 . + * + */ + +// occgen: includes +#import "GASignInActivity.h" + +// occgen: type start +@implementation GASignInActivity + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GASignInActivity *instance = [self new]; + + GA_SET(lastSuccessfulSignInDateTime, NSDate, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_lastSuccessfulSignInDateTime, "lastSuccessfulSignInDateTime", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _lastSuccessfulSignInDateTime = [decoder decodeObjectOfClass:NSDate.class forKey:@"lastSuccessfulSignInDateTime"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_lastSuccessfulSignInDateTime forKey:@"lastSuccessfulSignInDateTime"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@>", NSStringFromClass(self.class), self, ((_lastSuccessfulSignInDateTime!=nil) ? [NSString stringWithFormat:@", lastSuccessfulSignInDateTime: %@", _lastSuccessfulSignInDateTime] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASpecialFolder.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GASpecialFolder.h index 804d4548..82e28d6c 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GASpecialFolder.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASpecialFolder.h @@ -1,11 +1,11 @@ // // GASpecialFolder.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. * @@ -42,25 +42,3 @@ extern GASpecialFolderName GASpecialFolderNameImage; NS_ASSUME_NONNULL_END - - - - - - - - - - - - - - - - - - - - - - diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GASpecialFolder.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GASpecialFolder.m index d078656c..665f14d3 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GASpecialFolder.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GASpecialFolder.m @@ -1,11 +1,11 @@ // // GASpecialFolder.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. * @@ -30,6 +30,14 @@ + (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(_name, "name", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -67,24 +75,3 @@ - (NSString *)description GASpecialFolderName GASpecialFolderNameReadme = @"readme"; GASpecialFolderName GASpecialFolderNameImage = @"image"; - - - - - - - - - - - - - - - - - - - - - diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GATagAssignment.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GATagAssignment.h index 3ef136d1..02ce362c 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GATagAssignment.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GATagAssignment.h @@ -1,11 +1,11 @@ // // GATagAssignment.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GATagAssignment.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GATagAssignment.m index 407446b4..d836adf5 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GATagAssignment.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GATagAssignment.m @@ -1,11 +1,11 @@ // // GATagAssignment.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. * @@ -31,6 +31,15 @@ + (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(_resourceId, "resourceId", YES); + GA_ENC_ADD(_tags, "tags", YES); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GATagUnassignment.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GATagUnassignment.h index 888f59fb..c1e73c09 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GATagUnassignment.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GATagUnassignment.h @@ -1,11 +1,11 @@ // // GATagUnassignment.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GATagUnassignment.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GATagUnassignment.m index 9fe71cac..cb2e0296 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GATagUnassignment.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GATagUnassignment.m @@ -1,11 +1,11 @@ // // GATagUnassignment.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. * @@ -31,6 +31,15 @@ + (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(_resourceId, "resourceId", YES); + GA_ENC_ADD(_tags, "tags", YES); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnail.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnail.h new file mode 100644 index 00000000..19d116a9 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnail.h @@ -0,0 +1,38 @@ +// +// GAThumbnail.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAThumbnail : NSObject + +// occgen: type properties +@property(strong, nullable) NSString *content; //!< [string:base64url] The content stream for the thumbnail. +@property(strong, nullable) NSNumber *height; //!< [integer:int32] The height of the thumbnail, in pixels. +@property(strong, nullable) NSString *sourceItemId; //!< The unique identifier of the item that provided the thumbnail. This is only available when a folder thumbnail is requested. +@property(strong, nullable) NSString *url; //!< The URL used to fetch the thumbnail content. +@property(strong, nullable) NSNumber *width; //!< [integer:int32] The width of the thumbnail, in pixels. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnail.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnail.m new file mode 100644 index 00000000..a06c1838 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnail.m @@ -0,0 +1,90 @@ +// +// GAThumbnail.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 . + * + */ + +// occgen: includes +#import "GAThumbnail.h" + +// occgen: type start +@implementation GAThumbnail + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAThumbnail *instance = [self new]; + + GA_SET(content, NSString, Nil); + GA_SET(height, NSNumber, Nil); + GA_SET(sourceItemId, NSString, Nil); + GA_SET(url, NSString, Nil); + GA_SET(width, NSNumber, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_content, "content", NO); + GA_ENC_ADD(_height, "height", NO); + GA_ENC_ADD(_sourceItemId, "sourceItemId", NO); + GA_ENC_ADD(_url, "url", NO); + GA_ENC_ADD(_width, "width", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _content = [decoder decodeObjectOfClass:NSString.class forKey:@"content"]; + _height = [decoder decodeObjectOfClass:NSNumber.class forKey:@"height"]; + _sourceItemId = [decoder decodeObjectOfClass:NSString.class forKey:@"sourceItemId"]; + _url = [decoder decodeObjectOfClass:NSString.class forKey:@"url"]; + _width = [decoder decodeObjectOfClass:NSNumber.class forKey:@"width"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_content forKey:@"content"]; + [coder encodeObject:_height forKey:@"height"]; + [coder encodeObject:_sourceItemId forKey:@"sourceItemId"]; + [coder encodeObject:_url forKey:@"url"]; + [coder encodeObject:_width forKey:@"width"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_content!=nil) ? [NSString stringWithFormat:@", content: %@", _content] : @""), ((_height!=nil) ? [NSString stringWithFormat:@", height: %@", _height] : @""), ((_sourceItemId!=nil) ? [NSString stringWithFormat:@", sourceItemId: %@", _sourceItemId] : @""), ((_url!=nil) ? [NSString stringWithFormat:@", url: %@", _url] : @""), ((_width!=nil) ? [NSString stringWithFormat:@", width: %@", _width] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnailSet.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnailSet.h new file mode 100644 index 00000000..c399a484 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnailSet.h @@ -0,0 +1,41 @@ +// +// GAThumbnailSet.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: forward declarations +@class GAThumbnail; + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAThumbnailSet : NSObject + +// occgen: type properties +@property(strong, nullable) NSString *identifier; //!< The ID within the item. Read-only. +@property(strong, nullable) GAThumbnail *large; //!< A 1920x1920 scaled thumbnail. +@property(strong, nullable) GAThumbnail *medium; //!< A 176x176 scaled thumbnail. +@property(strong, nullable) GAThumbnail *small; //!< A 48x48 cropped thumbnail. +@property(strong, nullable) GAThumbnail *source; //!< A custom thumbnail image or the original image used to generate other thumbnails. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnailSet.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnailSet.m new file mode 100644 index 00000000..f3560e9d --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAThumbnailSet.m @@ -0,0 +1,91 @@ +// +// GAThumbnailSet.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 . + * + */ + +// occgen: includes +#import "GAThumbnailSet.h" +#import "GAThumbnail.h" + +// occgen: type start +@implementation GAThumbnailSet + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAThumbnailSet *instance = [self new]; + + GA_MAP(identifier, "id", NSString, Nil); + GA_SET(large, GAThumbnail, Nil); + GA_SET(medium, GAThumbnail, Nil); + GA_SET(small, GAThumbnail, Nil); + GA_SET(source, GAThumbnail, 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", NO); + GA_ENC_ADD(_large, "large", NO); + GA_ENC_ADD(_medium, "medium", NO); + GA_ENC_ADD(_small, "small", NO); + GA_ENC_ADD(_source, "source", NO); + 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"]; + _large = [decoder decodeObjectOfClass:GAThumbnail.class forKey:@"large"]; + _medium = [decoder decodeObjectOfClass:GAThumbnail.class forKey:@"medium"]; + _small = [decoder decodeObjectOfClass:GAThumbnail.class forKey:@"small"]; + _source = [decoder decodeObjectOfClass:GAThumbnail.class forKey:@"source"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_identifier forKey:@"identifier"]; + [coder encodeObject:_large forKey:@"large"]; + [coder encodeObject:_medium forKey:@"medium"]; + [coder encodeObject:_small forKey:@"small"]; + [coder encodeObject:_source forKey:@"source"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_large!=nil) ? [NSString stringWithFormat:@", large: %@", _large] : @""), ((_medium!=nil) ? [NSString stringWithFormat:@", medium: %@", _medium] : @""), ((_small!=nil) ? [NSString stringWithFormat:@", small: %@", _small] : @""), ((_source!=nil) ? [NSString stringWithFormat:@", source: %@", _source] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GATrash.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GATrash.h index 127d2d2c..ac9767df 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GATrash.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GATrash.h @@ -1,11 +1,11 @@ // // GATrash.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. * diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GATrash.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GATrash.m index 5261d15c..a911e52b 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GATrash.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GATrash.m @@ -1,11 +1,11 @@ // // GATrash.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. * @@ -32,6 +32,15 @@ + (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(_trashedBy, "trashedBy", NO); + GA_ENC_ADD(_trashedDateTime, "trashedDateTime", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRoleDefinition.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRoleDefinition.h new file mode 100644 index 00000000..c11e2e20 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRoleDefinition.h @@ -0,0 +1,41 @@ +// +// GAUnifiedRoleDefinition.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: forward declarations +@class GAUnifiedRolePermission; + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAUnifiedRoleDefinition : NSObject + +// occgen: type properties +@property(strong, nullable) NSString *desc; //!< The description for the unifiedRoleDefinition. +@property(strong, nullable) NSString *displayName; //!< The display name for the unifiedRoleDefinition. Required. Supports $filter (`eq`, `in`). +@property(strong, nullable) NSString *identifier; //!< The unique identifier for the role definition. Key, not nullable, Read-only. Inherited from entity. Supports $filter (`eq`, `in`). +@property(strong, nullable) NSArray *rolePermissions; //!< List of permissions included in the role. +@property(strong, nullable) NSNumber *libreGraphWeight; //!< [integer] | + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRoleDefinition.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRoleDefinition.m new file mode 100644 index 00000000..70acab78 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRoleDefinition.m @@ -0,0 +1,91 @@ +// +// GAUnifiedRoleDefinition.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 . + * + */ + +// occgen: includes +#import "GAUnifiedRoleDefinition.h" +#import "GAUnifiedRolePermission.h" + +// occgen: type start +@implementation GAUnifiedRoleDefinition + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAUnifiedRoleDefinition *instance = [self new]; + + GA_MAP(desc, "description", NSString, Nil); + GA_SET(displayName, NSString, Nil); + GA_MAP(identifier, "id", NSString, Nil); + GA_SET(rolePermissions, GAUnifiedRolePermission, NSArray.class); + GA_MAP(libreGraphWeight, "@libre.graph.weight", NSNumber, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_desc, "description", NO); + GA_ENC_ADD(_displayName, "displayName", NO); + GA_ENC_ADD(_identifier, "id", NO); + GA_ENC_ADD(_rolePermissions, "rolePermissions", NO); + GA_ENC_ADD(_libreGraphWeight, "@libre.graph.weight", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _desc = [decoder decodeObjectOfClass:NSString.class forKey:@"desc"]; + _displayName = [decoder decodeObjectOfClass:NSString.class forKey:@"displayName"]; + _identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"]; + _rolePermissions = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAUnifiedRolePermission.class, NSArray.class, nil] forKey:@"rolePermissions"]; + _libreGraphWeight = [decoder decodeObjectOfClass:NSNumber.class forKey:@"libreGraphWeight"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_desc forKey:@"desc"]; + [coder encodeObject:_displayName forKey:@"displayName"]; + [coder encodeObject:_identifier forKey:@"identifier"]; + [coder encodeObject:_rolePermissions forKey:@"rolePermissions"]; + [coder encodeObject:_libreGraphWeight forKey:@"libreGraphWeight"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_desc!=nil) ? [NSString stringWithFormat:@", desc: %@", _desc] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_rolePermissions!=nil) ? [NSString stringWithFormat:@", rolePermissions: %@", _rolePermissions] : @""), ((_libreGraphWeight!=nil) ? [NSString stringWithFormat:@", libreGraphWeight: %@", _libreGraphWeight] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRolePermission.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRolePermission.h new file mode 100644 index 00000000..73bf3a6a --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRolePermission.h @@ -0,0 +1,35 @@ +// +// GAUnifiedRolePermission.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAUnifiedRolePermission : NSObject + +// occgen: type properties +@property(strong, nullable) NSArray *allowedResourceActions; //!< | +@property(strong, nullable) NSString *condition; //!< | + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRolePermission.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRolePermission.m new file mode 100644 index 00000000..9bf72396 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUnifiedRolePermission.m @@ -0,0 +1,78 @@ +// +// GAUnifiedRolePermission.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 . + * + */ + +// occgen: includes +#import "GAUnifiedRolePermission.h" + +// occgen: type start +@implementation GAUnifiedRolePermission + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAUnifiedRolePermission *instance = [self new]; + + GA_SET(allowedResourceActions, NSString, NSArray.class); + GA_SET(condition, NSString, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_allowedResourceActions, "allowedResourceActions", NO); + GA_ENC_ADD(_condition, "condition", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _allowedResourceActions = [decoder decodeObjectOfClasses:[NSSet setWithObjects: NSString.class, NSArray.class, nil] forKey:@"allowedResourceActions"]; + _condition = [decoder decodeObjectOfClass:NSString.class forKey:@"condition"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_allowedResourceActions forKey:@"allowedResourceActions"]; + [coder encodeObject:_condition forKey:@"condition"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@>", NSStringFromClass(self.class), self, ((_allowedResourceActions!=nil) ? [NSString stringWithFormat:@", allowedResourceActions: %@", _allowedResourceActions] : @""), ((_condition!=nil) ? [NSString stringWithFormat:@", condition: %@", _condition] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUser.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUser.h index e34630dd..a72fdb2a 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUser.h +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUser.h @@ -1,11 +1,11 @@ // // GAUser.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. * @@ -17,12 +17,15 @@ // occgen: includes #import #import "GAGraphObject.h" +#import "GALanguage.h" // occgen: forward declarations +@class GAAppRoleAssignment; @class GADrive; @class GAGroup; @class GAObjectIdentity; @class GAPasswordProfile; +@class GASignInActivity; // occgen: type start NS_ASSUME_NONNULL_BEGIN @@ -31,16 +34,20 @@ NS_ASSUME_NONNULL_BEGIN // occgen: type properties @property(strong, nullable) NSString *identifier; //!< Read-only. @property(strong, nullable) NSNumber *accountEnabled; //!< [boolean] Set to "true" when the account is enabled. -@property(strong, nullable) NSString *displayName; //!< The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $filter and $orderby. +@property(strong, nullable) NSArray *appRoleAssignments; //!< The apps and app roles which this user has been assigned. +@property(strong) NSString *displayName; //!< The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $orderby. @property(strong, nullable) NSArray *drives; //!< A collection of drives available for this user. Read-only. @property(strong, nullable) GADrive *drive; //!< The personal drive of this user. Read-only. @property(strong, nullable) NSArray *identities; //!< Identities associated with this account. -@property(strong, nullable) NSString *mail; //!< The SMTP address for the user, for example, ''jeff@contoso.onowncloud.com''. Returned by default. Supports $filter and endsWith. +@property(strong, nullable) NSString *mail; //!< The SMTP address for the user, for example, ''jeff@contoso.onowncloud.com''. Returned by default. @property(strong, nullable) NSArray *memberOf; //!< Groups that this user is a member of. HTTP Methods: GET (supported for all groups). Read-only. Nullable. Supports $expand. -@property(strong, nullable) NSString *onPremisesSamAccountName; //!< Contains the on-premises SAM account name synchronized from the on-premises directory. Read-only. +@property(strong) NSString *onPremisesSamAccountName; //!< Contains the on-premises SAM account name synchronized from the on-premises directory. @property(strong, nullable) GAPasswordProfile *passwordProfile; -@property(strong, nullable) NSString *surname; //!< The user's surname (family name or last name). Returned by default. Supports $filter. -@property(strong, nullable) NSString *givenName; //!< The user's givenName. Returned by default. Supports $filter. +@property(strong, nullable) NSString *surname; //!< The user's surname (family name or last name). Returned by default. +@property(strong, nullable) NSString *givenName; //!< The user's givenName. Returned by default. +@property(strong, nullable) NSString *userType; //!< The user`s type. This can be either "Member" for regular user, "Guest" for guest users or "Federated" for users imported from a federated instance. +@property(strong, nullable) GALanguage preferredLanguage; +@property(strong, nullable) GASignInActivity *signInActivity; // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUser.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUser.m index 36278eb6..9c927f19 100644 --- a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUser.m +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUser.m @@ -1,11 +1,11 @@ // // GAUser.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. * @@ -16,10 +16,12 @@ // occgen: includes #import "GAUser.h" +#import "GAAppRoleAssignment.h" #import "GADrive.h" #import "GAGroup.h" #import "GAObjectIdentity.h" #import "GAPasswordProfile.h" +#import "GASignInActivity.h" // occgen: type start @implementation GAUser @@ -31,20 +33,47 @@ + (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullabl GA_MAP(identifier, "id", NSString, Nil); GA_SET(accountEnabled, NSNumber, Nil); - GA_SET(displayName, NSString, Nil); + GA_SET(appRoleAssignments, GAAppRoleAssignment, NSArray.class); + GA_SET_REQ(displayName, NSString, Nil); GA_SET(drives, GADrive, NSArray.class); GA_SET(drive, GADrive, Nil); GA_SET(identities, GAObjectIdentity, NSArray.class); GA_SET(mail, NSString, Nil); GA_SET(memberOf, GAGroup, NSArray.class); - GA_SET(onPremisesSamAccountName, NSString, Nil); + GA_SET_REQ(onPremisesSamAccountName, NSString, Nil); GA_SET(passwordProfile, GAPasswordProfile, Nil); GA_SET(surname, NSString, Nil); GA_SET(givenName, NSString, Nil); + GA_SET(userType, NSString, Nil); + GA_SET(preferredLanguage, NSString, Nil); + GA_SET(signInActivity, GASignInActivity, 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", NO); + GA_ENC_ADD(_accountEnabled, "accountEnabled", NO); + GA_ENC_ADD(_appRoleAssignments, "appRoleAssignments", NO); + GA_ENC_ADD(_displayName, "displayName", YES); + GA_ENC_ADD(_drives, "drives", NO); + GA_ENC_ADD(_drive, "drive", NO); + GA_ENC_ADD(_identities, "identities", NO); + GA_ENC_ADD(_mail, "mail", NO); + GA_ENC_ADD(_memberOf, "memberOf", NO); + GA_ENC_ADD(_onPremisesSamAccountName, "onPremisesSamAccountName", YES); + GA_ENC_ADD(_passwordProfile, "passwordProfile", NO); + GA_ENC_ADD(_surname, "surname", NO); + GA_ENC_ADD(_givenName, "givenName", NO); + GA_ENC_ADD(_userType, "userType", NO); + GA_ENC_ADD(_preferredLanguage, "preferredLanguage", NO); + GA_ENC_ADD(_signInActivity, "signInActivity", NO); + GA_ENC_RETURN +} + // occgen: type native deserialization + (BOOL)supportsSecureCoding { @@ -57,6 +86,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder { _identifier = [decoder decodeObjectOfClass:NSString.class forKey:@"identifier"]; _accountEnabled = [decoder decodeObjectOfClass:NSNumber.class forKey:@"accountEnabled"]; + _appRoleAssignments = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAAppRoleAssignment.class, NSArray.class, nil] forKey:@"appRoleAssignments"]; _displayName = [decoder decodeObjectOfClass:NSString.class forKey:@"displayName"]; _drives = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GADrive.class, NSArray.class, nil] forKey:@"drives"]; _drive = [decoder decodeObjectOfClass:GADrive.class forKey:@"drive"]; @@ -67,6 +97,9 @@ - (instancetype)initWithCoder:(NSCoder *)decoder _passwordProfile = [decoder decodeObjectOfClass:GAPasswordProfile.class forKey:@"passwordProfile"]; _surname = [decoder decodeObjectOfClass:NSString.class forKey:@"surname"]; _givenName = [decoder decodeObjectOfClass:NSString.class forKey:@"givenName"]; + _userType = [decoder decodeObjectOfClass:NSString.class forKey:@"userType"]; + _preferredLanguage = [decoder decodeObjectOfClass:NSString.class forKey:@"preferredLanguage"]; + _signInActivity = [decoder decodeObjectOfClass:GASignInActivity.class forKey:@"signInActivity"]; } return (self); @@ -77,6 +110,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { [coder encodeObject:_identifier forKey:@"identifier"]; [coder encodeObject:_accountEnabled forKey:@"accountEnabled"]; + [coder encodeObject:_appRoleAssignments forKey:@"appRoleAssignments"]; [coder encodeObject:_displayName forKey:@"displayName"]; [coder encodeObject:_drives forKey:@"drives"]; [coder encodeObject:_drive forKey:@"drive"]; @@ -87,12 +121,15 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:_passwordProfile forKey:@"passwordProfile"]; [coder encodeObject:_surname forKey:@"surname"]; [coder encodeObject:_givenName forKey:@"givenName"]; + [coder encodeObject:_userType forKey:@"userType"]; + [coder encodeObject:_preferredLanguage forKey:@"preferredLanguage"]; + [coder encodeObject:_signInActivity forKey:@"signInActivity"]; } // occgen: type debug description - (NSString *)description { - return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_accountEnabled!=nil) ? [NSString stringWithFormat:@", accountEnabled: %@", _accountEnabled] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_drives!=nil) ? [NSString stringWithFormat:@", drives: %@", _drives] : @""), ((_drive!=nil) ? [NSString stringWithFormat:@", drive: %@", _drive] : @""), ((_identities!=nil) ? [NSString stringWithFormat:@", identities: %@", _identities] : @""), ((_mail!=nil) ? [NSString stringWithFormat:@", mail: %@", _mail] : @""), ((_memberOf!=nil) ? [NSString stringWithFormat:@", memberOf: %@", _memberOf] : @""), ((_onPremisesSamAccountName!=nil) ? [NSString stringWithFormat:@", onPremisesSamAccountName: %@", _onPremisesSamAccountName] : @""), ((_passwordProfile!=nil) ? [NSString stringWithFormat:@", passwordProfile: %@", _passwordProfile] : @""), ((_surname!=nil) ? [NSString stringWithFormat:@", surname: %@", _surname] : @""), ((_givenName!=nil) ? [NSString stringWithFormat:@", givenName: %@", _givenName] : @"")]); + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_accountEnabled!=nil) ? [NSString stringWithFormat:@", accountEnabled: %@", _accountEnabled] : @""), ((_appRoleAssignments!=nil) ? [NSString stringWithFormat:@", appRoleAssignments: %@", _appRoleAssignments] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_drives!=nil) ? [NSString stringWithFormat:@", drives: %@", _drives] : @""), ((_drive!=nil) ? [NSString stringWithFormat:@", drive: %@", _drive] : @""), ((_identities!=nil) ? [NSString stringWithFormat:@", identities: %@", _identities] : @""), ((_mail!=nil) ? [NSString stringWithFormat:@", mail: %@", _mail] : @""), ((_memberOf!=nil) ? [NSString stringWithFormat:@", memberOf: %@", _memberOf] : @""), ((_onPremisesSamAccountName!=nil) ? [NSString stringWithFormat:@", onPremisesSamAccountName: %@", _onPremisesSamAccountName] : @""), ((_passwordProfile!=nil) ? [NSString stringWithFormat:@", passwordProfile: %@", _passwordProfile] : @""), ((_surname!=nil) ? [NSString stringWithFormat:@", surname: %@", _surname] : @""), ((_givenName!=nil) ? [NSString stringWithFormat:@", givenName: %@", _givenName] : @""), ((_userType!=nil) ? [NSString stringWithFormat:@", userType: %@", _userType] : @""), ((_preferredLanguage!=nil) ? [NSString stringWithFormat:@", preferredLanguage: %@", _preferredLanguage] : @""), ((_signInActivity!=nil) ? [NSString stringWithFormat:@", signInActivity: %@", _signInActivity] : @"")]); } // occgen: type protected {"locked":true} diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUserUpdate.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUserUpdate.h new file mode 100644 index 00000000..20b27a4f --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUserUpdate.h @@ -0,0 +1,58 @@ +// +// GAUserUpdate.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" +#import "GALanguage.h" + +// occgen: forward declarations +@class GAAppRoleAssignment; +@class GADrive; +@class GAGroup; +@class GAObjectIdentity; +@class GAPasswordProfile; +@class GASignInActivity; + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAUserUpdate : NSObject + +// occgen: type properties +@property(strong, nullable) NSString *identifier; //!< Read-only. +@property(strong, nullable) NSNumber *accountEnabled; //!< [boolean] Set to "true" when the account is enabled. +@property(strong, nullable) NSArray *appRoleAssignments; //!< The apps and app roles which this user has been assigned. +@property(strong, nullable) NSString *displayName; //!< The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $orderby. +@property(strong, nullable) NSArray *drives; //!< A collection of drives available for this user. Read-only. +@property(strong, nullable) GADrive *drive; //!< The personal drive of this user. Read-only. +@property(strong, nullable) NSArray *identities; //!< Identities associated with this account. +@property(strong, nullable) NSString *mail; //!< The SMTP address for the user, for example, ''jeff@contoso.onowncloud.com''. Returned by default. +@property(strong, nullable) NSArray *memberOf; //!< Groups that this user is a member of. HTTP Methods: GET (supported for all groups). Read-only. Nullable. Supports $expand. +@property(strong, nullable) NSString *onPremisesSamAccountName; //!< Contains the on-premises SAM account name synchronized from the on-premises directory. +@property(strong, nullable) GAPasswordProfile *passwordProfile; +@property(strong, nullable) NSString *surname; //!< The user's surname (family name or last name). Returned by default. +@property(strong, nullable) NSString *givenName; //!< The user's givenName. Returned by default. +@property(strong, nullable) NSString *userType; //!< The user`s type. This can be either "Member" for regular user, "Guest" for guest users or "Federated" for users imported from a federated instance. +@property(strong, nullable) GALanguage preferredLanguage; +@property(strong, nullable) GASignInActivity *signInActivity; + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAUserUpdate.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUserUpdate.m new file mode 100644 index 00000000..705d86d0 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAUserUpdate.m @@ -0,0 +1,140 @@ +// +// GAUserUpdate.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 . + * + */ + +// occgen: includes +#import "GAUserUpdate.h" +#import "GAAppRoleAssignment.h" +#import "GADrive.h" +#import "GAGroup.h" +#import "GAObjectIdentity.h" +#import "GAPasswordProfile.h" +#import "GASignInActivity.h" + +// occgen: type start +@implementation GAUserUpdate + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAUserUpdate *instance = [self new]; + + GA_MAP(identifier, "id", NSString, Nil); + GA_SET(accountEnabled, NSNumber, Nil); + GA_SET(appRoleAssignments, GAAppRoleAssignment, NSArray.class); + GA_SET(displayName, NSString, Nil); + GA_SET(drives, GADrive, NSArray.class); + GA_SET(drive, GADrive, Nil); + GA_SET(identities, GAObjectIdentity, NSArray.class); + GA_SET(mail, NSString, Nil); + GA_SET(memberOf, GAGroup, NSArray.class); + GA_SET(onPremisesSamAccountName, NSString, Nil); + GA_SET(passwordProfile, GAPasswordProfile, Nil); + GA_SET(surname, NSString, Nil); + GA_SET(givenName, NSString, Nil); + GA_SET(userType, NSString, Nil); + GA_SET(preferredLanguage, NSString, Nil); + GA_SET(signInActivity, GASignInActivity, 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", NO); + GA_ENC_ADD(_accountEnabled, "accountEnabled", NO); + GA_ENC_ADD(_appRoleAssignments, "appRoleAssignments", NO); + GA_ENC_ADD(_displayName, "displayName", NO); + GA_ENC_ADD(_drives, "drives", NO); + GA_ENC_ADD(_drive, "drive", NO); + GA_ENC_ADD(_identities, "identities", NO); + GA_ENC_ADD(_mail, "mail", NO); + GA_ENC_ADD(_memberOf, "memberOf", NO); + GA_ENC_ADD(_onPremisesSamAccountName, "onPremisesSamAccountName", NO); + GA_ENC_ADD(_passwordProfile, "passwordProfile", NO); + GA_ENC_ADD(_surname, "surname", NO); + GA_ENC_ADD(_givenName, "givenName", NO); + GA_ENC_ADD(_userType, "userType", NO); + GA_ENC_ADD(_preferredLanguage, "preferredLanguage", NO); + GA_ENC_ADD(_signInActivity, "signInActivity", NO); + 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"]; + _accountEnabled = [decoder decodeObjectOfClass:NSNumber.class forKey:@"accountEnabled"]; + _appRoleAssignments = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAAppRoleAssignment.class, NSArray.class, nil] forKey:@"appRoleAssignments"]; + _displayName = [decoder decodeObjectOfClass:NSString.class forKey:@"displayName"]; + _drives = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GADrive.class, NSArray.class, nil] forKey:@"drives"]; + _drive = [decoder decodeObjectOfClass:GADrive.class forKey:@"drive"]; + _identities = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAObjectIdentity.class, NSArray.class, nil] forKey:@"identities"]; + _mail = [decoder decodeObjectOfClass:NSString.class forKey:@"mail"]; + _memberOf = [decoder decodeObjectOfClasses:[NSSet setWithObjects: GAGroup.class, NSArray.class, nil] forKey:@"memberOf"]; + _onPremisesSamAccountName = [decoder decodeObjectOfClass:NSString.class forKey:@"onPremisesSamAccountName"]; + _passwordProfile = [decoder decodeObjectOfClass:GAPasswordProfile.class forKey:@"passwordProfile"]; + _surname = [decoder decodeObjectOfClass:NSString.class forKey:@"surname"]; + _givenName = [decoder decodeObjectOfClass:NSString.class forKey:@"givenName"]; + _userType = [decoder decodeObjectOfClass:NSString.class forKey:@"userType"]; + _preferredLanguage = [decoder decodeObjectOfClass:NSString.class forKey:@"preferredLanguage"]; + _signInActivity = [decoder decodeObjectOfClass:GASignInActivity.class forKey:@"signInActivity"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_identifier forKey:@"identifier"]; + [coder encodeObject:_accountEnabled forKey:@"accountEnabled"]; + [coder encodeObject:_appRoleAssignments forKey:@"appRoleAssignments"]; + [coder encodeObject:_displayName forKey:@"displayName"]; + [coder encodeObject:_drives forKey:@"drives"]; + [coder encodeObject:_drive forKey:@"drive"]; + [coder encodeObject:_identities forKey:@"identities"]; + [coder encodeObject:_mail forKey:@"mail"]; + [coder encodeObject:_memberOf forKey:@"memberOf"]; + [coder encodeObject:_onPremisesSamAccountName forKey:@"onPremisesSamAccountName"]; + [coder encodeObject:_passwordProfile forKey:@"passwordProfile"]; + [coder encodeObject:_surname forKey:@"surname"]; + [coder encodeObject:_givenName forKey:@"givenName"]; + [coder encodeObject:_userType forKey:@"userType"]; + [coder encodeObject:_preferredLanguage forKey:@"preferredLanguage"]; + [coder encodeObject:_signInActivity forKey:@"signInActivity"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_identifier!=nil) ? [NSString stringWithFormat:@", identifier: %@", _identifier] : @""), ((_accountEnabled!=nil) ? [NSString stringWithFormat:@", accountEnabled: %@", _accountEnabled] : @""), ((_appRoleAssignments!=nil) ? [NSString stringWithFormat:@", appRoleAssignments: %@", _appRoleAssignments] : @""), ((_displayName!=nil) ? [NSString stringWithFormat:@", displayName: %@", _displayName] : @""), ((_drives!=nil) ? [NSString stringWithFormat:@", drives: %@", _drives] : @""), ((_drive!=nil) ? [NSString stringWithFormat:@", drive: %@", _drive] : @""), ((_identities!=nil) ? [NSString stringWithFormat:@", identities: %@", _identities] : @""), ((_mail!=nil) ? [NSString stringWithFormat:@", mail: %@", _mail] : @""), ((_memberOf!=nil) ? [NSString stringWithFormat:@", memberOf: %@", _memberOf] : @""), ((_onPremisesSamAccountName!=nil) ? [NSString stringWithFormat:@", onPremisesSamAccountName: %@", _onPremisesSamAccountName] : @""), ((_passwordProfile!=nil) ? [NSString stringWithFormat:@", passwordProfile: %@", _passwordProfile] : @""), ((_surname!=nil) ? [NSString stringWithFormat:@", surname: %@", _surname] : @""), ((_givenName!=nil) ? [NSString stringWithFormat:@", givenName: %@", _givenName] : @""), ((_userType!=nil) ? [NSString stringWithFormat:@", userType: %@", _userType] : @""), ((_preferredLanguage!=nil) ? [NSString stringWithFormat:@", preferredLanguage: %@", _preferredLanguage] : @""), ((_signInActivity!=nil) ? [NSString stringWithFormat:@", signInActivity: %@", _signInActivity] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAVideo.h b/ownCloudSDK/GraphAPI/GeneratedTypes/GAVideo.h new file mode 100644 index 00000000..4e862c4a --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAVideo.h @@ -0,0 +1,43 @@ +// +// GAVideo.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 . + * + */ + +// occgen: includes +#import +#import "GAGraphObject.h" + +// occgen: type start +NS_ASSUME_NONNULL_BEGIN +@interface GAVideo : NSObject + +// occgen: type properties +@property(strong, nullable) NSNumber *audioBitsPerSample; //!< [integer:int32] Number of audio bits per sample. +@property(strong, nullable) NSNumber *audioChannels; //!< [integer:int32] Number of audio channels. +@property(strong, nullable) NSString *audioFormat; //!< Name of the audio format (AAC, MP3, etc.). +@property(strong, nullable) NSNumber *audioSamplesPerSecond; //!< [integer:int32] Number of audio samples per second. +@property(strong, nullable) NSNumber *bitrate; //!< [integer:int32] Bit rate of the video in bits per second. +@property(strong, nullable) NSNumber *duration; //!< [integer:int64] Duration of the file in milliseconds. +@property(strong, nullable) NSString *fourCC; //!< \"Four character code\" name of the video format. +@property(strong, nullable) NSNumber *frameRate; //!< [number:double] Frame rate of the video. +@property(strong, nullable) NSNumber *height; //!< [integer:int32] Height of the video, in pixels. +@property(strong, nullable) NSNumber *width; //!< [integer:int32] Width of the video, in pixels. + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +NS_ASSUME_NONNULL_END + diff --git a/ownCloudSDK/GraphAPI/GeneratedTypes/GAVideo.m b/ownCloudSDK/GraphAPI/GeneratedTypes/GAVideo.m new file mode 100644 index 00000000..cc2a3c97 --- /dev/null +++ b/ownCloudSDK/GraphAPI/GeneratedTypes/GAVideo.m @@ -0,0 +1,110 @@ +// +// GAVideo.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 . + * + */ + +// occgen: includes +#import "GAVideo.h" + +// occgen: type start +@implementation GAVideo + +// occgen: type serialization ++ (nullable instancetype)decodeGraphData:(GAGraphData)structure context:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GAVideo *instance = [self new]; + + GA_SET(audioBitsPerSample, NSNumber, Nil); + GA_SET(audioChannels, NSNumber, Nil); + GA_SET(audioFormat, NSString, Nil); + GA_SET(audioSamplesPerSecond, NSNumber, Nil); + GA_SET(bitrate, NSNumber, Nil); + GA_SET(duration, NSNumber, Nil); + GA_SET(fourCC, NSString, Nil); + GA_SET(frameRate, NSNumber, Nil); + GA_SET(height, NSNumber, Nil); + GA_SET(width, NSNumber, Nil); + + return (instance); +} + +// occgen: struct serialization +- (nullable GAGraphStruct)encodeToGraphStructWithContext:(nullable GAGraphContext *)context error:(NSError * _Nullable * _Nullable)outError +{ + GA_ENC_INIT + GA_ENC_ADD(_audioBitsPerSample, "audioBitsPerSample", NO); + GA_ENC_ADD(_audioChannels, "audioChannels", NO); + GA_ENC_ADD(_audioFormat, "audioFormat", NO); + GA_ENC_ADD(_audioSamplesPerSecond, "audioSamplesPerSecond", NO); + GA_ENC_ADD(_bitrate, "bitrate", NO); + GA_ENC_ADD(_duration, "duration", NO); + GA_ENC_ADD(_fourCC, "fourCC", NO); + GA_ENC_ADD(_frameRate, "frameRate", NO); + GA_ENC_ADD(_height, "height", NO); + GA_ENC_ADD(_width, "width", NO); + GA_ENC_RETURN +} + +// occgen: type native deserialization ++ (BOOL)supportsSecureCoding +{ + return (YES); +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super init]) != nil) + { + _audioBitsPerSample = [decoder decodeObjectOfClass:NSNumber.class forKey:@"audioBitsPerSample"]; + _audioChannels = [decoder decodeObjectOfClass:NSNumber.class forKey:@"audioChannels"]; + _audioFormat = [decoder decodeObjectOfClass:NSString.class forKey:@"audioFormat"]; + _audioSamplesPerSecond = [decoder decodeObjectOfClass:NSNumber.class forKey:@"audioSamplesPerSecond"]; + _bitrate = [decoder decodeObjectOfClass:NSNumber.class forKey:@"bitrate"]; + _duration = [decoder decodeObjectOfClass:NSNumber.class forKey:@"duration"]; + _fourCC = [decoder decodeObjectOfClass:NSString.class forKey:@"fourCC"]; + _frameRate = [decoder decodeObjectOfClass:NSNumber.class forKey:@"frameRate"]; + _height = [decoder decodeObjectOfClass:NSNumber.class forKey:@"height"]; + _width = [decoder decodeObjectOfClass:NSNumber.class forKey:@"width"]; + } + + return (self); +} + +// occgen: type native serialization +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:_audioBitsPerSample forKey:@"audioBitsPerSample"]; + [coder encodeObject:_audioChannels forKey:@"audioChannels"]; + [coder encodeObject:_audioFormat forKey:@"audioFormat"]; + [coder encodeObject:_audioSamplesPerSecond forKey:@"audioSamplesPerSecond"]; + [coder encodeObject:_bitrate forKey:@"bitrate"]; + [coder encodeObject:_duration forKey:@"duration"]; + [coder encodeObject:_fourCC forKey:@"fourCC"]; + [coder encodeObject:_frameRate forKey:@"frameRate"]; + [coder encodeObject:_height forKey:@"height"]; + [coder encodeObject:_width forKey:@"width"]; +} + +// occgen: type debug description +- (NSString *)description +{ + return ([NSString stringWithFormat:@"<%@: %p%@%@%@%@%@%@%@%@%@%@>", NSStringFromClass(self.class), self, ((_audioBitsPerSample!=nil) ? [NSString stringWithFormat:@", audioBitsPerSample: %@", _audioBitsPerSample] : @""), ((_audioChannels!=nil) ? [NSString stringWithFormat:@", audioChannels: %@", _audioChannels] : @""), ((_audioFormat!=nil) ? [NSString stringWithFormat:@", audioFormat: %@", _audioFormat] : @""), ((_audioSamplesPerSecond!=nil) ? [NSString stringWithFormat:@", audioSamplesPerSecond: %@", _audioSamplesPerSecond] : @""), ((_bitrate!=nil) ? [NSString stringWithFormat:@", bitrate: %@", _bitrate] : @""), ((_duration!=nil) ? [NSString stringWithFormat:@", duration: %@", _duration] : @""), ((_fourCC!=nil) ? [NSString stringWithFormat:@", fourCC: %@", _fourCC] : @""), ((_frameRate!=nil) ? [NSString stringWithFormat:@", frameRate: %@", _frameRate] : @""), ((_height!=nil) ? [NSString stringWithFormat:@", height: %@", _height] : @""), ((_width!=nil) ? [NSString stringWithFormat:@", width: %@", _width] : @"")]); +} + +// occgen: type protected {"locked":true} + + +// occgen: type end +@end +