Skip to content

Commit

Permalink
Pull stone and spec and regenerate routes
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlocke committed Apr 14, 2022
1 parent 56a73c4 commit 544c363
Show file tree
Hide file tree
Showing 31 changed files with 1,156 additions and 102 deletions.
6 changes: 6 additions & 0 deletions .jazzy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,9 @@
"DBTEAMLOGDropboxPasswordsExportedType",
"DBTEAMLOGDropboxPasswordsNewDeviceEnrolledDetails",
"DBTEAMLOGDropboxPasswordsNewDeviceEnrolledType",
"DBTEAMLOGDropboxPasswordsPolicy",
"DBTEAMLOGDropboxPasswordsPolicyChangedDetails",
"DBTEAMLOGDropboxPasswordsPolicyChangedType",
"DBTEAMLOGDurationLogInfo",
"DBTEAMLOGEmailIngestPolicy",
"DBTEAMLOGEmailIngestPolicyChangedDetails",
Expand Down Expand Up @@ -3047,6 +3050,9 @@
"DBTEAMLOGDropboxPasswordsExportedTypeSerializer",
"DBTEAMLOGDropboxPasswordsNewDeviceEnrolledDetailsSerializer",
"DBTEAMLOGDropboxPasswordsNewDeviceEnrolledTypeSerializer",
"DBTEAMLOGDropboxPasswordsPolicySerializer",
"DBTEAMLOGDropboxPasswordsPolicyChangedDetailsSerializer",
"DBTEAMLOGDropboxPasswordsPolicyChangedTypeSerializer",
"DBTEAMLOGDurationLogInfoSerializer",
"DBTEAMLOGEmailIngestPolicySerializer",
"DBTEAMLOGEmailIngestPolicyChangedDetailsSerializer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ typedef NS_CLOSED_ENUM(NSInteger, DBFILEPROPERTIESLookupErrorTag){
/// isn't a folder.
DBFILEPROPERTIESLookupErrorNotFolder,

/// The file cannot be transferred because the content is restricted. For
/// example, sometimes there are legal restrictions due to copyright claims.
/// The file cannot be transferred because the content is restricted. For
/// example, we might restrict a file due to legal requirements.
DBFILEPROPERTIESLookupErrorRestrictedContent,

/// (no description).
Expand Down Expand Up @@ -103,8 +103,8 @@ typedef NS_CLOSED_ENUM(NSInteger, DBFILEPROPERTIESLookupErrorTag){
/// Initializes union class with tag state of "restricted_content".
///
/// Description of the "restricted_content" tag state: The file cannot be
/// transferred because the content is restricted. For example, sometimes there
/// are legal restrictions due to copyright claims.
/// transferred because the content is restricted. For example, we might
/// restrict a file due to legal requirements.
///
/// @return An initialized instance.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4885,7 +4885,8 @@ @implementation DBFILESMetadata
- (instancetype)initWithName:(NSString *)name
pathLower:(NSString *)pathLower
pathDisplay:(NSString *)pathDisplay
parentSharedFolderId:(NSString *)parentSharedFolderId {
parentSharedFolderId:(NSString *)parentSharedFolderId
previewUrl:(NSString *)previewUrl {
[DBStoneValidators nonnullValidator:nil](name);
[DBStoneValidators
nullableValidator:[DBStoneValidators stringValidator:nil maxLength:nil pattern:@"[-_0-9a-zA-Z:]+"]](
Expand All @@ -4897,12 +4898,13 @@ - (instancetype)initWithName:(NSString *)name
_pathLower = pathLower;
_pathDisplay = pathDisplay;
_parentSharedFolderId = parentSharedFolderId;
_previewUrl = previewUrl;
}
return self;
}

- (instancetype)initWithName:(NSString *)name {
return [self initWithName:name pathLower:nil pathDisplay:nil parentSharedFolderId:nil];
return [self initWithName:name pathLower:nil pathDisplay:nil parentSharedFolderId:nil previewUrl:nil];
}

#pragma mark - Serialization methods
Expand Down Expand Up @@ -4945,6 +4947,9 @@ - (NSUInteger)hash {
if (self.parentSharedFolderId != nil) {
result = prime * result + [self.parentSharedFolderId hash];
}
if (self.previewUrl != nil) {
result = prime * result + [self.previewUrl hash];
}

return prime * result;
}
Expand Down Expand Up @@ -4983,6 +4988,11 @@ - (BOOL)isEqualToMetadata:(DBFILESMetadata *)aMetadata {
return NO;
}
}
if (self.previewUrl) {
if (![self.previewUrl isEqual:aMetadata.previewUrl]) {
return NO;
}
}
return YES;
}

Expand All @@ -5005,6 +5015,9 @@ @implementation DBFILESMetadataSerializer
if (valueObj.parentSharedFolderId) {
jsonDict[@"parent_shared_folder_id"] = valueObj.parentSharedFolderId;
}
if (valueObj.previewUrl) {
jsonDict[@"preview_url"] = valueObj.previewUrl;
}

if ([valueObj isKindOfClass:[DBFILESFileMetadata class]]) {
NSDictionary *subTypeFields = [DBFILESFileMetadataSerializer serialize:(DBFILESFileMetadata *)valueObj];
Expand Down Expand Up @@ -5062,21 +5075,25 @@ @implementation DBFILESDeletedMetadata
- (instancetype)initWithName:(NSString *)name
pathLower:(NSString *)pathLower
pathDisplay:(NSString *)pathDisplay
parentSharedFolderId:(NSString *)parentSharedFolderId {
parentSharedFolderId:(NSString *)parentSharedFolderId
previewUrl:(NSString *)previewUrl {
[DBStoneValidators nonnullValidator:nil](name);
[DBStoneValidators
nullableValidator:[DBStoneValidators stringValidator:nil maxLength:nil pattern:@"[-_0-9a-zA-Z:]+"]](
parentSharedFolderId);

self =
[super initWithName:name pathLower:pathLower pathDisplay:pathDisplay parentSharedFolderId:parentSharedFolderId];
self = [super initWithName:name
pathLower:pathLower
pathDisplay:pathDisplay
parentSharedFolderId:parentSharedFolderId
previewUrl:previewUrl];
if (self) {
}
return self;
}

- (instancetype)initWithName:(NSString *)name {
return [self initWithName:name pathLower:nil pathDisplay:nil parentSharedFolderId:nil];
return [self initWithName:name pathLower:nil pathDisplay:nil parentSharedFolderId:nil previewUrl:nil];
}

#pragma mark - Serialization methods
Expand Down Expand Up @@ -5119,6 +5136,9 @@ - (NSUInteger)hash {
if (self.parentSharedFolderId != nil) {
result = prime * result + [self.parentSharedFolderId hash];
}
if (self.previewUrl != nil) {
result = prime * result + [self.previewUrl hash];
}

return prime * result;
}
Expand Down Expand Up @@ -5157,6 +5177,11 @@ - (BOOL)isEqualToDeletedMetadata:(DBFILESDeletedMetadata *)aDeletedMetadata {
return NO;
}
}
if (self.previewUrl) {
if (![self.previewUrl isEqual:aDeletedMetadata.previewUrl]) {
return NO;
}
}
return YES;
}

Expand All @@ -5179,6 +5204,9 @@ @implementation DBFILESDeletedMetadataSerializer
if (valueObj.parentSharedFolderId) {
jsonDict[@"parent_shared_folder_id"] = valueObj.parentSharedFolderId;
}
if (valueObj.previewUrl) {
jsonDict[@"preview_url"] = valueObj.previewUrl;
}

return [jsonDict count] > 0 ? jsonDict : nil;
}
Expand All @@ -5188,11 +5216,13 @@ + (DBFILESDeletedMetadata *)deserialize:(NSDictionary<NSString *, id> *)valueDic
NSString *pathLower = valueDict[@"path_lower"] ?: nil;
NSString *pathDisplay = valueDict[@"path_display"] ?: nil;
NSString *parentSharedFolderId = valueDict[@"parent_shared_folder_id"] ?: nil;
NSString *previewUrl = valueDict[@"preview_url"] ?: nil;

return [[DBFILESDeletedMetadata alloc] initWithName:name
pathLower:pathLower
pathDisplay:pathDisplay
parentSharedFolderId:parentSharedFolderId];
parentSharedFolderId:parentSharedFolderId
previewUrl:previewUrl];
}

@end
Expand Down Expand Up @@ -7606,6 +7636,7 @@ - (instancetype)initWithName:(NSString *)name
pathLower:(NSString *)pathLower
pathDisplay:(NSString *)pathDisplay
parentSharedFolderId:(NSString *)parentSharedFolderId
previewUrl:(NSString *)previewUrl
mediaInfo:(DBFILESMediaInfo *)mediaInfo
symlinkInfo:(DBFILESSymlinkInfo *)symlinkInfo
sharingInfo:(DBFILESFileSharingInfo *)sharingInfo
Expand All @@ -7631,8 +7662,11 @@ - (instancetype)initWithName:(NSString *)name
[DBStoneValidators
nullableValidator:[DBStoneValidators stringValidator:@(64) maxLength:@(64) pattern:nil]](contentHash);

self =
[super initWithName:name pathLower:pathLower pathDisplay:pathDisplay parentSharedFolderId:parentSharedFolderId];
self = [super initWithName:name
pathLower:pathLower
pathDisplay:pathDisplay
parentSharedFolderId:parentSharedFolderId
previewUrl:previewUrl];
if (self) {
_id_ = id_;
_clientModified = clientModified;
Expand Down Expand Up @@ -7667,6 +7701,7 @@ - (instancetype)initWithName:(NSString *)name
pathLower:nil
pathDisplay:nil
parentSharedFolderId:nil
previewUrl:nil
mediaInfo:nil
symlinkInfo:nil
sharingInfo:nil
Expand Down Expand Up @@ -7723,6 +7758,9 @@ - (NSUInteger)hash {
if (self.parentSharedFolderId != nil) {
result = prime * result + [self.parentSharedFolderId hash];
}
if (self.previewUrl != nil) {
result = prime * result + [self.previewUrl hash];
}
if (self.mediaInfo != nil) {
result = prime * result + [self.mediaInfo hash];
}
Expand Down Expand Up @@ -7801,6 +7839,11 @@ - (BOOL)isEqualToFileMetadata:(DBFILESFileMetadata *)aFileMetadata {
return NO;
}
}
if (self.previewUrl) {
if (![self.previewUrl isEqual:aFileMetadata.previewUrl]) {
return NO;
}
}
if (self.mediaInfo) {
if (![self.mediaInfo isEqual:aFileMetadata.mediaInfo]) {
return NO;
Expand Down Expand Up @@ -7873,6 +7916,9 @@ @implementation DBFILESFileMetadataSerializer
if (valueObj.parentSharedFolderId) {
jsonDict[@"parent_shared_folder_id"] = valueObj.parentSharedFolderId;
}
if (valueObj.previewUrl) {
jsonDict[@"preview_url"] = valueObj.previewUrl;
}
if (valueObj.mediaInfo) {
jsonDict[@"media_info"] = [DBFILESMediaInfoSerializer serialize:valueObj.mediaInfo];
}
Expand Down Expand Up @@ -7918,6 +7964,7 @@ + (DBFILESFileMetadata *)deserialize:(NSDictionary<NSString *, id> *)valueDict {
NSString *pathLower = valueDict[@"path_lower"] ?: nil;
NSString *pathDisplay = valueDict[@"path_display"] ?: nil;
NSString *parentSharedFolderId = valueDict[@"parent_shared_folder_id"] ?: nil;
NSString *previewUrl = valueDict[@"preview_url"] ?: nil;
DBFILESMediaInfo *mediaInfo =
valueDict[@"media_info"] ? [DBFILESMediaInfoSerializer deserialize:valueDict[@"media_info"]] : nil;
DBFILESSymlinkInfo *symlinkInfo =
Expand Down Expand Up @@ -7948,6 +7995,7 @@ + (DBFILESFileMetadata *)deserialize:(NSDictionary<NSString *, id> *)valueDict {
pathLower:pathLower
pathDisplay:pathDisplay
parentSharedFolderId:parentSharedFolderId
previewUrl:previewUrl
mediaInfo:mediaInfo
symlinkInfo:symlinkInfo
sharingInfo:sharingInfo
Expand Down Expand Up @@ -8385,6 +8433,7 @@ - (instancetype)initWithName:(NSString *)name
pathLower:(NSString *)pathLower
pathDisplay:(NSString *)pathDisplay
parentSharedFolderId:(NSString *)parentSharedFolderId
previewUrl:(NSString *)previewUrl
sharedFolderId:(NSString *)sharedFolderId
sharingInfo:(DBFILESFolderSharingInfo *)sharingInfo
propertyGroups:(NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups {
Expand All @@ -8400,8 +8449,11 @@ - (instancetype)initWithName:(NSString *)name
maxItems:nil
itemValidator:[DBStoneValidators nonnullValidator:nil]]](propertyGroups);

self =
[super initWithName:name pathLower:pathLower pathDisplay:pathDisplay parentSharedFolderId:parentSharedFolderId];
self = [super initWithName:name
pathLower:pathLower
pathDisplay:pathDisplay
parentSharedFolderId:parentSharedFolderId
previewUrl:previewUrl];
if (self) {
_id_ = id_;
_sharedFolderId = sharedFolderId;
Expand All @@ -8417,6 +8469,7 @@ - (instancetype)initWithName:(NSString *)name id_:(NSString *)id_ {
pathLower:nil
pathDisplay:nil
parentSharedFolderId:nil
previewUrl:nil
sharedFolderId:nil
sharingInfo:nil
propertyGroups:nil];
Expand Down Expand Up @@ -8463,6 +8516,9 @@ - (NSUInteger)hash {
if (self.parentSharedFolderId != nil) {
result = prime * result + [self.parentSharedFolderId hash];
}
if (self.previewUrl != nil) {
result = prime * result + [self.previewUrl hash];
}
if (self.sharedFolderId != nil) {
result = prime * result + [self.sharedFolderId hash];
}
Expand Down Expand Up @@ -8513,6 +8569,11 @@ - (BOOL)isEqualToFolderMetadata:(DBFILESFolderMetadata *)aFolderMetadata {
return NO;
}
}
if (self.previewUrl) {
if (![self.previewUrl isEqual:aFolderMetadata.previewUrl]) {
return NO;
}
}
if (self.sharedFolderId) {
if (![self.sharedFolderId isEqual:aFolderMetadata.sharedFolderId]) {
return NO;
Expand Down Expand Up @@ -8551,6 +8612,9 @@ @implementation DBFILESFolderMetadataSerializer
if (valueObj.parentSharedFolderId) {
jsonDict[@"parent_shared_folder_id"] = valueObj.parentSharedFolderId;
}
if (valueObj.previewUrl) {
jsonDict[@"preview_url"] = valueObj.previewUrl;
}
if (valueObj.sharedFolderId) {
jsonDict[@"shared_folder_id"] = valueObj.sharedFolderId;
}
Expand All @@ -8574,6 +8638,7 @@ + (DBFILESFolderMetadata *)deserialize:(NSDictionary<NSString *, id> *)valueDict
NSString *pathLower = valueDict[@"path_lower"] ?: nil;
NSString *pathDisplay = valueDict[@"path_display"] ?: nil;
NSString *parentSharedFolderId = valueDict[@"parent_shared_folder_id"] ?: nil;
NSString *previewUrl = valueDict[@"preview_url"] ?: nil;
NSString *sharedFolderId = valueDict[@"shared_folder_id"] ?: nil;
DBFILESFolderSharingInfo *sharingInfo =
valueDict[@"sharing_info"] ? [DBFILESFolderSharingInfoSerializer deserialize:valueDict[@"sharing_info"]] : nil;
Expand All @@ -8590,6 +8655,7 @@ + (DBFILESFolderMetadata *)deserialize:(NSDictionary<NSString *, id> *)valueDict
pathLower:pathLower
pathDisplay:pathDisplay
parentSharedFolderId:parentSharedFolderId
previewUrl:previewUrl
sharedFolderId:sharedFolderId
sharingInfo:sharingInfo
propertyGroups:propertyGroups];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ NS_ASSUME_NONNULL_BEGIN
/// @param parentSharedFolderId Please use `parentSharedFolderId` in
/// `DBFILESFileSharingInfo` or `parentSharedFolderId` in
/// `DBFILESFolderSharingInfo` instead.
/// @param previewUrl The preview URL of the file.
///
/// @return An initialized instance.
///
- (instancetype)initWithName:(NSString *)name
pathLower:(nullable NSString *)pathLower
pathDisplay:(nullable NSString *)pathDisplay
parentSharedFolderId:(nullable NSString *)parentSharedFolderId;
parentSharedFolderId:(nullable NSString *)parentSharedFolderId
previewUrl:(nullable NSString *)previewUrl;

///
/// Convenience constructor (exposes only non-nullable instance variables with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param parentSharedFolderId Please use `parentSharedFolderId` in
/// `DBFILESFileSharingInfo` or `parentSharedFolderId` in
/// `DBFILESFolderSharingInfo` instead.
/// @param previewUrl The preview URL of the file.
/// @param mediaInfo Additional information if the file is a photo or video.
/// This field will not be set on entries returned by `listFolder`,
/// `listFolderContinue`, or `getThumbnailBatch`, starting December 2, 2019.
Expand Down Expand Up @@ -154,6 +155,7 @@ NS_ASSUME_NONNULL_BEGIN
pathLower:(nullable NSString *)pathLower
pathDisplay:(nullable NSString *)pathDisplay
parentSharedFolderId:(nullable NSString *)parentSharedFolderId
previewUrl:(nullable NSString *)previewUrl
mediaInfo:(nullable DBFILESMediaInfo *)mediaInfo
symlinkInfo:(nullable DBFILESSymlinkInfo *)symlinkInfo
sharingInfo:(nullable DBFILESFileSharingInfo *)sharingInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param parentSharedFolderId Please use `parentSharedFolderId` in
/// `DBFILESFileSharingInfo` or `parentSharedFolderId` in
/// `DBFILESFolderSharingInfo` instead.
/// @param previewUrl The preview URL of the file.
/// @param sharedFolderId Please use sharingInfo instead.
/// @param sharingInfo Set if the folder is contained in a shared folder or is a
/// shared folder mount point.
Expand All @@ -78,6 +79,7 @@ NS_ASSUME_NONNULL_BEGIN
pathLower:(nullable NSString *)pathLower
pathDisplay:(nullable NSString *)pathDisplay
parentSharedFolderId:(nullable NSString *)parentSharedFolderId
previewUrl:(nullable NSString *)previewUrl
sharedFolderId:(nullable NSString *)sharedFolderId
sharingInfo:(nullable DBFILESFolderSharingInfo *)sharingInfo
propertyGroups:(nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups;
Expand Down
Loading

0 comments on commit 544c363

Please sign in to comment.