diff --git a/Source/SwiftyDropbox/Shared/Generated/Files.swift b/Source/SwiftyDropbox/Shared/Generated/Files.swift index 4ef20dc5..1a516885 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Files.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Files.swift @@ -6969,6 +6969,10 @@ public class Files { case cantMoveIntoVault(Files.MoveIntoVaultError) /// Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error. case cantMoveIntoFamily(Files.MoveIntoFamilyError) + /// The destination team folder has reached its storage limit. + case teamFolderInsufficientQuota + /// The user's member folder has reached its storage limit. + case memberFolderInsufficientQuota /// An unspecified error. case other @@ -7045,6 +7049,14 @@ public class Files { var d = try ["cant_move_into_family": Files.MoveIntoFamilyErrorSerializer().serialize(arg)] d[".tag"] = .str("cant_move_into_family") return .dictionary(d) + case .teamFolderInsufficientQuota: + var d = [String: JSON]() + d[".tag"] = .str("team_folder_insufficient_quota") + return .dictionary(d) + case .memberFolderInsufficientQuota: + var d = [String: JSON]() + d[".tag"] = .str("member_folder_insufficient_quota") + return .dictionary(d) case .other: var d = [String: JSON]() d[".tag"] = .str("other") @@ -7090,6 +7102,10 @@ public class Files { case "cant_move_into_family": let v = try Files.MoveIntoFamilyErrorSerializer().deserialize(d["cant_move_into_family"] ?? .null) return RelocationError.cantMoveIntoFamily(v) + case "team_folder_insufficient_quota": + return RelocationError.teamFolderInsufficientQuota + case "member_folder_insufficient_quota": + return RelocationError.memberFolderInsufficientQuota case "other": return RelocationError.other default: @@ -7133,6 +7149,10 @@ public class Files { case cantMoveIntoVault(Files.MoveIntoVaultError) /// Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error. case cantMoveIntoFamily(Files.MoveIntoFamilyError) + /// The destination team folder has reached its storage limit. + case teamFolderInsufficientQuota + /// The user's member folder has reached its storage limit. + case memberFolderInsufficientQuota /// An unspecified error. case other /// There are too many write operations in user's Dropbox. Please retry this request. @@ -7211,6 +7231,14 @@ public class Files { var d = try ["cant_move_into_family": Files.MoveIntoFamilyErrorSerializer().serialize(arg)] d[".tag"] = .str("cant_move_into_family") return .dictionary(d) + case .teamFolderInsufficientQuota: + var d = [String: JSON]() + d[".tag"] = .str("team_folder_insufficient_quota") + return .dictionary(d) + case .memberFolderInsufficientQuota: + var d = [String: JSON]() + d[".tag"] = .str("member_folder_insufficient_quota") + return .dictionary(d) case .other: var d = [String: JSON]() d[".tag"] = .str("other") @@ -7260,6 +7288,10 @@ public class Files { case "cant_move_into_family": let v = try Files.MoveIntoFamilyErrorSerializer().deserialize(d["cant_move_into_family"] ?? .null) return RelocationBatchError.cantMoveIntoFamily(v) + case "team_folder_insufficient_quota": + return RelocationBatchError.teamFolderInsufficientQuota + case "member_folder_insufficient_quota": + return RelocationBatchError.memberFolderInsufficientQuota case "other": return RelocationBatchError.other case "too_many_write_operations": @@ -12390,6 +12422,10 @@ public class Files { case tooManyWriteOperations /// The user doesn't have permission to perform the action due to restrictions set by a team administrator case accessRestricted + /// The destination team folder has reached its storage limit. + case teamFolderInsufficientSpace + /// The user's member folder has reached its storage limit. + case memberFolderInsufficientSpace /// An unspecified error. case other @@ -12446,6 +12482,14 @@ public class Files { var d = [String: JSON]() d[".tag"] = .str("access_restricted") return .dictionary(d) + case .teamFolderInsufficientSpace: + var d = [String: JSON]() + d[".tag"] = .str("team_folder_insufficient_space") + return .dictionary(d) + case .memberFolderInsufficientSpace: + var d = [String: JSON]() + d[".tag"] = .str("member_folder_insufficient_space") + return .dictionary(d) case .other: var d = [String: JSON]() d[".tag"] = .str("other") @@ -12478,6 +12522,10 @@ public class Files { return WriteError.tooManyWriteOperations case "access_restricted": return WriteError.accessRestricted + case "team_folder_insufficient_space": + return WriteError.teamFolderInsufficientSpace + case "member_folder_insufficient_space": + return WriteError.memberFolderInsufficientSpace case "other": return WriteError.other default: diff --git a/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift index 9d089ceb..abdd8098 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift @@ -738,16 +738,15 @@ public class FilesRoutes: DropboxTransportClientOwning { /// maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to /// be generated. Multiple links may exist for a specific upload path at any given time. The POST request on /// the temporary upload link must have its Content-Type set to "application/octet-stream". Example temporary - /// upload link consumption request: curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND - /// --header "Content-Type: application/octet-stream" --data-binary @local_file.txt A successful temporary - /// upload link consumption request returns the content hash of the uploaded data in JSON format. Example - /// successful temporary upload link consumption response: {"content-hash": - /// "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary upload link consumption request returns - /// any of the following status codes: HTTP 400 Bad Request: Content-Type is not one of - /// application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The temporary upload link - /// does not exist or is currently unavailable, the upload failed, or another error happened. HTTP 410 Gone: The - /// temporary upload link is expired or consumed. Example unsuccessful temporary upload link consumption - /// response: Temporary upload link has been recently consumed. + /// upload link consumption request: curl -X POST --header "Content-Type: + /// application/octet-stream" --data-binary @local_file.txt A successful temporary upload link consumption + /// request returns the content hash of the uploaded data in JSON format. Example successful temporary upload + /// link consumption response: {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful + /// temporary upload link consumption request returns any of the following status codes: HTTP 400 Bad Request: + /// Content-Type is not one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: + /// The temporary upload link does not exist or is currently unavailable, the upload failed, or another error + /// happened. HTTP 410 Gone: The temporary upload link is expired or consumed. Example unsuccessful temporary + /// upload link consumption response: Temporary upload link has been recently consumed. /// /// - scope: files.content.write /// diff --git a/Source/SwiftyDropbox/Shared/Generated/Riviera.swift b/Source/SwiftyDropbox/Shared/Generated/Riviera.swift index 0a24301b..4605c545 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Riviera.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Riviera.swift @@ -1279,6 +1279,341 @@ public class Riviera { } } + /// Arguments for the asynchronous `get_ocr_async` route. Exactly one of `file_id`, `path`, or `url` must be + /// supplied via `file_id_or_url` to identify the image or PDF whose text should be extracted via OCR (optical + /// character recognition). + public class GetOcrArgs: CustomStringConvertible, JSONRepresentable { + /// Identifier of the file to run OCR on. Callers must set exactly one of the `FileIdOrUrl` variants. OCR is + /// supported for image files and PDFs, including scanned / non-text PDFs; see the route description for + /// the supported formats. Requests against unsupported formats return `unsupported_format_error`. NOTE: + /// for the `url` variant, only Dropbox shared links (www.dropbox.com) are supported. External + /// (non-Dropbox) URLs are not supported and return `unsupported_format_error`; import the file into + /// Dropbox and reference it by `file_id` or `path` instead. + public let fileIdOrUrl: Riviera.FileIdOrUrl? + public init(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) { + self.fileIdOrUrl = fileIdOrUrl + } + + func json() throws -> JSON { + try GetOcrArgsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try GetOcrArgsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for GetOcrArgs: \(error)" + } + } + } + + public class GetOcrArgsSerializer: JSONSerializer { + public init() {} + public func serialize(_ value: GetOcrArgs) throws -> JSON { + let output = [ + "file_id_or_url": try NullableSerializer(Riviera.FileIdOrUrlSerializer()).serialize(value.fileIdOrUrl), + ] + return .dictionary(output) + } + + public func deserialize(_ json: JSON) throws -> GetOcrArgs { + switch json { + case .dictionary(let dict): + let fileIdOrUrl = try NullableSerializer(Riviera.FileIdOrUrlSerializer()).deserialize(dict["file_id_or_url"] ?? .null) + return GetOcrArgs(fileIdOrUrl: fileIdOrUrl) + default: + throw JSONSerializerError.deserializeError(type: GetOcrArgs.self, json: json) + } + } + } + + /// Result type for EventBus async check - must end in "CheckResult" + public enum GetOcrAsyncCheckResult: CustomStringConvertible, JSONRepresentable { + /// An unspecified error. + case inProgress + /// An unspecified error. + case complete(Riviera.GetOcrResult) + /// An unspecified error. + case failed(Riviera.OcrExtractionApiV2Error) + /// An unspecified error. + case other + + func json() throws -> JSON { + try GetOcrAsyncCheckResultSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try GetOcrAsyncCheckResultSerializer().serialize(self)))" + } catch { + return "Failed to generate description for GetOcrAsyncCheckResult: \(error)" + } + } + } + + public class GetOcrAsyncCheckResultSerializer: JSONSerializer { + public init() {} + public func serialize(_ value: GetOcrAsyncCheckResult) throws -> JSON { + switch value { + case .inProgress: + var d = [String: JSON]() + d[".tag"] = .str("in_progress") + return .dictionary(d) + case .complete(let arg): + var d = try Serialization.getFields(Riviera.GetOcrResultSerializer().serialize(arg)) + d[".tag"] = .str("complete") + return .dictionary(d) + case .failed(let arg): + var d = try ["failed": Riviera.OcrExtractionApiV2ErrorSerializer().serialize(arg)] + d[".tag"] = .str("failed") + return .dictionary(d) + case .other: + var d = [String: JSON]() + d[".tag"] = .str("other") + return .dictionary(d) + } + } + + public func deserialize(_ json: JSON) throws -> GetOcrAsyncCheckResult { + switch json { + case .dictionary(let d): + let tag = try Serialization.getTag(d) + switch tag { + case "in_progress": + return GetOcrAsyncCheckResult.inProgress + case "complete": + let v = try Riviera.GetOcrResultSerializer().deserialize(json) + return GetOcrAsyncCheckResult.complete(v) + case "failed": + let v = try Riviera.OcrExtractionApiV2ErrorSerializer().deserialize(d["failed"] ?? .null) + return GetOcrAsyncCheckResult.failed(v) + case "other": + return GetOcrAsyncCheckResult.other + default: + return GetOcrAsyncCheckResult.other + } + default: + throw JSONSerializerError.deserializeError(type: GetOcrAsyncCheckResult.self, json: json) + } + } + } + + /// The GetOcrResult struct + public class GetOcrResult: CustomStringConvertible, JSONRepresentable { + /// The plain-text content extracted from the file via OCR. Words within a line are separated by a single space, + /// lines are newline-separated in reading order, and for multi-page PDFs pages are separated by a blank + /// line in page order. May be empty when no text is detected in the source. + public let text: String + /// The same content as hOCR: HTML that carries the position of every recognized word. Each page is a + /// `
` holding `

` elements with one `` per word, and each element carries + /// `data-x`, `data-y`, `data-width`, and `data-height` attributes in pixels relative to the upright + /// page (whose dimensions are on the `

`). Use this when you need word coordinates -- to + /// highlight matches over a page image, for example; use `text` when you just need the words. + public let hocr: String + public init(text: String = "", hocr: String = "") { + stringValidator()(text) + self.text = text + stringValidator()(hocr) + self.hocr = hocr + } + + func json() throws -> JSON { + try GetOcrResultSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try GetOcrResultSerializer().serialize(self)))" + } catch { + return "Failed to generate description for GetOcrResult: \(error)" + } + } + } + + public class GetOcrResultSerializer: JSONSerializer { + public init() {} + public func serialize(_ value: GetOcrResult) throws -> JSON { + let output = [ + "text": try Serialization._StringSerializer.serialize(value.text), + "hocr": try Serialization._StringSerializer.serialize(value.hocr), + ] + return .dictionary(output) + } + + public func deserialize(_ json: JSON) throws -> GetOcrResult { + switch json { + case .dictionary(let dict): + let text = try Serialization._StringSerializer.deserialize(dict["text"] ?? .str("")) + let hocr = try Serialization._StringSerializer.deserialize(dict["hocr"] ?? .str("")) + return GetOcrResult(text: text, hocr: hocr) + default: + throw JSONSerializerError.deserializeError(type: GetOcrResult.self, json: json) + } + } + } + + /// Arguments for the asynchronous `get_text_async` route. Exactly one of `file_id`, `path`, or `url` must be + /// supplied via `file_id_or_url` to identify the document whose plain-text content should be extracted. + public class GetTextArgs: CustomStringConvertible, JSONRepresentable { + /// Identifier of the document to extract text from. Callers must set exactly one of the `FileIdOrUrl` variants. + /// Text extraction is supported for common document formats (Word, PowerPoint, Excel, PDF, RTF, and + /// Dropbox document types); see the route description for the supported formats. Requests against + /// unsupported formats return `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox + /// shared links (www.dropbox.com) are supported. External (non-Dropbox) URLs are not supported and + /// return `unsupported_format_error`; import the file into Dropbox and reference it by `file_id` or + /// `path` instead. + public let fileIdOrUrl: Riviera.FileIdOrUrl? + public init(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) { + self.fileIdOrUrl = fileIdOrUrl + } + + func json() throws -> JSON { + try GetTextArgsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try GetTextArgsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for GetTextArgs: \(error)" + } + } + } + + public class GetTextArgsSerializer: JSONSerializer { + public init() {} + public func serialize(_ value: GetTextArgs) throws -> JSON { + let output = [ + "file_id_or_url": try NullableSerializer(Riviera.FileIdOrUrlSerializer()).serialize(value.fileIdOrUrl), + ] + return .dictionary(output) + } + + public func deserialize(_ json: JSON) throws -> GetTextArgs { + switch json { + case .dictionary(let dict): + let fileIdOrUrl = try NullableSerializer(Riviera.FileIdOrUrlSerializer()).deserialize(dict["file_id_or_url"] ?? .null) + return GetTextArgs(fileIdOrUrl: fileIdOrUrl) + default: + throw JSONSerializerError.deserializeError(type: GetTextArgs.self, json: json) + } + } + } + + /// Result type for EventBus async check - must end in "CheckResult" + public enum GetTextAsyncCheckResult: CustomStringConvertible, JSONRepresentable { + /// An unspecified error. + case inProgress + /// An unspecified error. + case complete(Riviera.GetTextResult) + /// An unspecified error. + case failed(Riviera.TextExtractionApiV2Error) + /// An unspecified error. + case other + + func json() throws -> JSON { + try GetTextAsyncCheckResultSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try GetTextAsyncCheckResultSerializer().serialize(self)))" + } catch { + return "Failed to generate description for GetTextAsyncCheckResult: \(error)" + } + } + } + + public class GetTextAsyncCheckResultSerializer: JSONSerializer { + public init() {} + public func serialize(_ value: GetTextAsyncCheckResult) throws -> JSON { + switch value { + case .inProgress: + var d = [String: JSON]() + d[".tag"] = .str("in_progress") + return .dictionary(d) + case .complete(let arg): + var d = try Serialization.getFields(Riviera.GetTextResultSerializer().serialize(arg)) + d[".tag"] = .str("complete") + return .dictionary(d) + case .failed(let arg): + var d = try ["failed": Riviera.TextExtractionApiV2ErrorSerializer().serialize(arg)] + d[".tag"] = .str("failed") + return .dictionary(d) + case .other: + var d = [String: JSON]() + d[".tag"] = .str("other") + return .dictionary(d) + } + } + + public func deserialize(_ json: JSON) throws -> GetTextAsyncCheckResult { + switch json { + case .dictionary(let d): + let tag = try Serialization.getTag(d) + switch tag { + case "in_progress": + return GetTextAsyncCheckResult.inProgress + case "complete": + let v = try Riviera.GetTextResultSerializer().deserialize(json) + return GetTextAsyncCheckResult.complete(v) + case "failed": + let v = try Riviera.TextExtractionApiV2ErrorSerializer().deserialize(d["failed"] ?? .null) + return GetTextAsyncCheckResult.failed(v) + case "other": + return GetTextAsyncCheckResult.other + default: + return GetTextAsyncCheckResult.other + } + default: + throw JSONSerializerError.deserializeError(type: GetTextAsyncCheckResult.self, json: json) + } + } + } + + /// The GetTextResult struct + public class GetTextResult: CustomStringConvertible, JSONRepresentable { + /// The plain-text content extracted from the document. For multi-page documents the text is concatenated in + /// document order. May be empty when no text is detected in the source. + public let text: String + public init(text: String = "") { + stringValidator()(text) + self.text = text + } + + func json() throws -> JSON { + try GetTextResultSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try GetTextResultSerializer().serialize(self)))" + } catch { + return "Failed to generate description for GetTextResult: \(error)" + } + } + } + + public class GetTextResultSerializer: JSONSerializer { + public init() {} + public func serialize(_ value: GetTextResult) throws -> JSON { + let output = [ + "text": try Serialization._StringSerializer.serialize(value.text), + ] + return .dictionary(output) + } + + public func deserialize(_ json: JSON) throws -> GetTextResult { + switch json { + case .dictionary(let dict): + let text = try Serialization._StringSerializer.deserialize(dict["text"] ?? .str("")) + return GetTextResult(text: text) + default: + throw JSONSerializerError.deserializeError(type: GetTextResult.self, json: json) + } + } + } + /// Arguments for the asynchronous `get_transcript_async` route. Exactly one of `file_id`, `path`, or `url` must be /// supplied via `file_id_or_url` to identify the audio or video asset to transcribe. public class GetTranscriptArgs: CustomStringConvertible, JSONRepresentable { @@ -1846,6 +2181,129 @@ public class Riviera { } } + /// Reason an OCR extraction job failed. Returned in the `failed` variant of `GetOcrAsyncCheckResult`. This is a + /// semantic error union: the HTTP status of the poll request itself is unaffected (a poll that surfaces a + /// failed job is still a normal successful poll response). Callers should branch on the variant. + public enum OcrExtractionApiV2Error: CustomStringConvertible, JSONRepresentable { + /// An unexpected, typically transient, server-side failure. The string is a human-readable message; retrying + /// with backoff may succeed. + case serverError(String) + /// The request could not be processed as supplied (a problem with the caller's input). The string is a + /// human-readable message; retrying the same request will not help. + case userError(String) + /// An unspecified error. + case unsupportedFormatError + /// An unspecified error. + case linkDownloadDisabledError + /// An unspecified error. + case sharedLinkPasswordProtected + /// An unspecified error. + case limitExceededError + /// An unspecified error. + case conversionFailureError + /// The referenced file does not exist or is not accessible. + case notFoundError + /// The target is a folder, not a file. + case isAFolderError + /// An unspecified error. + case other + + func json() throws -> JSON { + try OcrExtractionApiV2ErrorSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try OcrExtractionApiV2ErrorSerializer().serialize(self)))" + } catch { + return "Failed to generate description for OcrExtractionApiV2Error: \(error)" + } + } + } + + public class OcrExtractionApiV2ErrorSerializer: JSONSerializer { + public init() {} + public func serialize(_ value: OcrExtractionApiV2Error) throws -> JSON { + switch value { + case .serverError(let arg): + var d = try ["server_error": Serialization._StringSerializer.serialize(arg)] + d[".tag"] = .str("server_error") + return .dictionary(d) + case .userError(let arg): + var d = try ["user_error": Serialization._StringSerializer.serialize(arg)] + d[".tag"] = .str("user_error") + return .dictionary(d) + case .unsupportedFormatError: + var d = [String: JSON]() + d[".tag"] = .str("unsupported_format_error") + return .dictionary(d) + case .linkDownloadDisabledError: + var d = [String: JSON]() + d[".tag"] = .str("link_download_disabled_error") + return .dictionary(d) + case .sharedLinkPasswordProtected: + var d = [String: JSON]() + d[".tag"] = .str("shared_link_password_protected") + return .dictionary(d) + case .limitExceededError: + var d = [String: JSON]() + d[".tag"] = .str("limit_exceeded_error") + return .dictionary(d) + case .conversionFailureError: + var d = [String: JSON]() + d[".tag"] = .str("conversion_failure_error") + return .dictionary(d) + case .notFoundError: + var d = [String: JSON]() + d[".tag"] = .str("not_found_error") + return .dictionary(d) + case .isAFolderError: + var d = [String: JSON]() + d[".tag"] = .str("is_a_folder_error") + return .dictionary(d) + case .other: + var d = [String: JSON]() + d[".tag"] = .str("other") + return .dictionary(d) + } + } + + public func deserialize(_ json: JSON) throws -> OcrExtractionApiV2Error { + switch json { + case .dictionary(let d): + let tag = try Serialization.getTag(d) + switch tag { + case "server_error": + let v = try Serialization._StringSerializer.deserialize(d["server_error"] ?? .null) + return OcrExtractionApiV2Error.serverError(v) + case "user_error": + let v = try Serialization._StringSerializer.deserialize(d["user_error"] ?? .null) + return OcrExtractionApiV2Error.userError(v) + case "unsupported_format_error": + return OcrExtractionApiV2Error.unsupportedFormatError + case "link_download_disabled_error": + return OcrExtractionApiV2Error.linkDownloadDisabledError + case "shared_link_password_protected": + return OcrExtractionApiV2Error.sharedLinkPasswordProtected + case "limit_exceeded_error": + return OcrExtractionApiV2Error.limitExceededError + case "conversion_failure_error": + return OcrExtractionApiV2Error.conversionFailureError + case "not_found_error": + return OcrExtractionApiV2Error.notFoundError + case "is_a_folder_error": + return OcrExtractionApiV2Error.isAFolderError + case "other": + return OcrExtractionApiV2Error.other + default: + return OcrExtractionApiV2Error.other + } + default: + throw JSONSerializerError.deserializeError(type: OcrExtractionApiV2Error.self, json: json) + } + } + } + /// The kind of MS Office document that produced an `ApiOfficeMetadata` result. public enum OfficeFileType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. @@ -1923,6 +2381,129 @@ public class Riviera { } } + /// Reason a text extraction job failed. Returned in the `failed` variant of `GetTextAsyncCheckResult`. This is a + /// semantic error union: the HTTP status of the poll request itself is unaffected (a poll that surfaces a + /// failed job is still a normal successful poll response). Callers should branch on the variant. + public enum TextExtractionApiV2Error: CustomStringConvertible, JSONRepresentable { + /// An unexpected, typically transient, server-side failure. The string is a human-readable message; retrying + /// with backoff may succeed. + case serverError(String) + /// The request could not be processed as supplied (a problem with the caller's input). The string is a + /// human-readable message; retrying the same request will not help. + case userError(String) + /// An unspecified error. + case unsupportedFormatError + /// An unspecified error. + case linkDownloadDisabledError + /// An unspecified error. + case sharedLinkPasswordProtected + /// An unspecified error. + case limitExceededError + /// An unspecified error. + case conversionFailureError + /// The referenced file does not exist or is not accessible. + case notFoundError + /// The target is a folder, not a file. + case isAFolderError + /// An unspecified error. + case other + + func json() throws -> JSON { + try TextExtractionApiV2ErrorSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try TextExtractionApiV2ErrorSerializer().serialize(self)))" + } catch { + return "Failed to generate description for TextExtractionApiV2Error: \(error)" + } + } + } + + public class TextExtractionApiV2ErrorSerializer: JSONSerializer { + public init() {} + public func serialize(_ value: TextExtractionApiV2Error) throws -> JSON { + switch value { + case .serverError(let arg): + var d = try ["server_error": Serialization._StringSerializer.serialize(arg)] + d[".tag"] = .str("server_error") + return .dictionary(d) + case .userError(let arg): + var d = try ["user_error": Serialization._StringSerializer.serialize(arg)] + d[".tag"] = .str("user_error") + return .dictionary(d) + case .unsupportedFormatError: + var d = [String: JSON]() + d[".tag"] = .str("unsupported_format_error") + return .dictionary(d) + case .linkDownloadDisabledError: + var d = [String: JSON]() + d[".tag"] = .str("link_download_disabled_error") + return .dictionary(d) + case .sharedLinkPasswordProtected: + var d = [String: JSON]() + d[".tag"] = .str("shared_link_password_protected") + return .dictionary(d) + case .limitExceededError: + var d = [String: JSON]() + d[".tag"] = .str("limit_exceeded_error") + return .dictionary(d) + case .conversionFailureError: + var d = [String: JSON]() + d[".tag"] = .str("conversion_failure_error") + return .dictionary(d) + case .notFoundError: + var d = [String: JSON]() + d[".tag"] = .str("not_found_error") + return .dictionary(d) + case .isAFolderError: + var d = [String: JSON]() + d[".tag"] = .str("is_a_folder_error") + return .dictionary(d) + case .other: + var d = [String: JSON]() + d[".tag"] = .str("other") + return .dictionary(d) + } + } + + public func deserialize(_ json: JSON) throws -> TextExtractionApiV2Error { + switch json { + case .dictionary(let d): + let tag = try Serialization.getTag(d) + switch tag { + case "server_error": + let v = try Serialization._StringSerializer.deserialize(d["server_error"] ?? .null) + return TextExtractionApiV2Error.serverError(v) + case "user_error": + let v = try Serialization._StringSerializer.deserialize(d["user_error"] ?? .null) + return TextExtractionApiV2Error.userError(v) + case "unsupported_format_error": + return TextExtractionApiV2Error.unsupportedFormatError + case "link_download_disabled_error": + return TextExtractionApiV2Error.linkDownloadDisabledError + case "shared_link_password_protected": + return TextExtractionApiV2Error.sharedLinkPasswordProtected + case "limit_exceeded_error": + return TextExtractionApiV2Error.limitExceededError + case "conversion_failure_error": + return TextExtractionApiV2Error.conversionFailureError + case "not_found_error": + return TextExtractionApiV2Error.notFoundError + case "is_a_folder_error": + return TextExtractionApiV2Error.isAFolderError + case "other": + return TextExtractionApiV2Error.other + default: + return TextExtractionApiV2Error.other + } + default: + throw JSONSerializerError.deserializeError(type: TextExtractionApiV2Error.self, json: json) + } + } + } + /// The TimestampLevel union public enum TimestampLevel: CustomStringConvertible, JSONRepresentable { /// An unspecified error. @@ -2123,6 +2704,62 @@ public class Riviera { style: .rpc ) ) + static let getOcrAsync = Route( + name: "get_ocr_async", + version: 1, + namespace: "riviera", + deprecated: false, + argSerializer: Riviera.GetOcrArgsSerializer(), + responseSerializer: Async.LaunchResultBaseSerializer(), + errorSerializer: Serialization._VoidSerializer, + attributes: RouteAttributes( + auth: [.app, .user], + host: .api, + style: .rpc + ) + ) + static let getOcrAsyncCheck = Route( + name: "get_ocr_async/check", + version: 1, + namespace: "riviera", + deprecated: false, + argSerializer: Async.PollArgSerializer(), + responseSerializer: Riviera.GetOcrAsyncCheckResultSerializer(), + errorSerializer: Async.PollErrorSerializer(), + attributes: RouteAttributes( + auth: [.app, .user], + host: .api, + style: .rpc + ) + ) + static let getTextAsync = Route( + name: "get_text_async", + version: 1, + namespace: "riviera", + deprecated: false, + argSerializer: Riviera.GetTextArgsSerializer(), + responseSerializer: Async.LaunchResultBaseSerializer(), + errorSerializer: Serialization._VoidSerializer, + attributes: RouteAttributes( + auth: [.app, .user], + host: .api, + style: .rpc + ) + ) + static let getTextAsyncCheck = Route( + name: "get_text_async/check", + version: 1, + namespace: "riviera", + deprecated: false, + argSerializer: Async.PollArgSerializer(), + responseSerializer: Riviera.GetTextAsyncCheckResultSerializer(), + errorSerializer: Async.PollErrorSerializer(), + attributes: RouteAttributes( + auth: [.app, .user], + host: .api, + style: .rpc + ) + ) static let getTranscriptAsync = Route( name: "get_transcript_async", version: 1, diff --git a/Source/SwiftyDropbox/Shared/Generated/RivieraAppAuthRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/RivieraAppAuthRoutes.swift index 5f9a16bc..52f1c30f 100644 --- a/Source/SwiftyDropbox/Shared/Generated/RivieraAppAuthRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/RivieraAppAuthRoutes.swift @@ -99,6 +99,84 @@ public class RivieraAppAuthRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs) } + /// Asynchronous OCR (optical character recognition) text extraction for images and PDFs, including scanned / + /// non-text PDFs. Supported formats: - Image formats: .bmp, .gif, .heic, .jpeg, .jpg, .png, .tif, .tiff, .webp. + /// - PDF format: .pdf. Unsupported formats return an `unsupported_format_error`. For the `url` variant only + /// Dropbox shared links are supported; external URLs return `unsupported_format_error`. Text-based PDFs already + /// carry a text layer, so OCR is not run against them and the result is empty; use `get_text_async` to read the + /// embedded text layer of such a PDF. The result carries the extracted words as plain text, plus the same + /// content as hOCR with per-word coordinates. + /// + /// - scope: files.content.read + /// + /// - parameter fileIdOrUrl: Identifier of the file to run OCR on. Callers must set exactly one of the `FileIdOrUrl` + /// variants. OCR is supported for image files and PDFs, including scanned / non-text PDFs; see the route + /// description for the supported formats. Requests against unsupported formats return + /// `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared links (www.dropbox.com) are + /// supported. External (non-Dropbox) URLs are not supported and return `unsupported_format_error`; import the + /// file into Dropbox and reference it by `file_id` or `path` instead. + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @discardableResult public func getOcrAsync(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) -> RpcRequest { + let route = Riviera.getOcrAsync + let serverArgs = Riviera.GetOcrArgs(fileIdOrUrl: fileIdOrUrl) + return client.request(route, serverArgs: serverArgs) + } + + /// Returns the status or result of specified get_ocr_async task. + /// + /// - scope: files.content.read + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Riviera.GetOcrAsyncCheckResult` object on + /// success or a `Async.PollError` object on failure. + @discardableResult public func getOcrAsyncCheck(asyncJobId: String) -> RpcRequest { + let route = Riviera.getOcrAsyncCheck + let serverArgs = Async.PollArg(asyncJobId: asyncJobId) + return client.request(route, serverArgs: serverArgs) + } + + /// Asynchronous plain-text extraction from documents. Supported formats include: - Word processing: .doc, .docx, + /// .docm, .rtf. - Presentations: .ppt, .pptx, .pptm. - Spreadsheets: .xls, .xlsx, .xlsm. - PDF: .pdf. - Dropbox + /// document types: .paper, .papert, .binder, .gdoc, .gsheet, .gslides. - Plain text / subtitles: .txt, .vtt. + /// Unsupported formats return an `unsupported_format_error`. For the `url` variant only Dropbox shared links + /// are supported; external URLs return `unsupported_format_error`. + /// + /// - scope: files.content.read + /// + /// - parameter fileIdOrUrl: Identifier of the document to extract text from. Callers must set exactly one of the + /// `FileIdOrUrl` variants. Text extraction is supported for common document formats (Word, PowerPoint, Excel, + /// PDF, RTF, and Dropbox document types); see the route description for the supported formats. Requests against + /// unsupported formats return `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared + /// links (www.dropbox.com) are supported. External (non-Dropbox) URLs are not supported and return + /// `unsupported_format_error`; import the file into Dropbox and reference it by `file_id` or `path` instead. + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @discardableResult public func getTextAsync(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) -> RpcRequest { + let route = Riviera.getTextAsync + let serverArgs = Riviera.GetTextArgs(fileIdOrUrl: fileIdOrUrl) + return client.request(route, serverArgs: serverArgs) + } + + /// Returns the status or result of specified get_text_async task. + /// + /// - scope: files.content.read + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Riviera.GetTextAsyncCheckResult` object on + /// success or a `Async.PollError` object on failure. + @discardableResult public func getTextAsyncCheck(asyncJobId: String) -> RpcRequest { + let route = Riviera.getTextAsyncCheck + let serverArgs = Async.PollArg(asyncJobId: asyncJobId) + return client.request(route, serverArgs: serverArgs) + } + /// Asynchronous transcript generation for audio and video files. Supported audio formats: .aac, .aif, .aiff, .flac, /// .m4a, .m4r, .mp3, .oga, .ogg, .wav, .wma. Supported video formats: .3gp, .3gpp, .3gpp2, .asf, .avi, .dv, /// .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf, .oggtheora, .ogv, .rm, .ts, .vob, .webm, diff --git a/Source/SwiftyDropbox/Shared/Generated/RivieraRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/RivieraRoutes.swift index 086be160..a6005796 100644 --- a/Source/SwiftyDropbox/Shared/Generated/RivieraRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/RivieraRoutes.swift @@ -99,6 +99,84 @@ public class RivieraRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs) } + /// Asynchronous OCR (optical character recognition) text extraction for images and PDFs, including scanned / + /// non-text PDFs. Supported formats: - Image formats: .bmp, .gif, .heic, .jpeg, .jpg, .png, .tif, .tiff, .webp. + /// - PDF format: .pdf. Unsupported formats return an `unsupported_format_error`. For the `url` variant only + /// Dropbox shared links are supported; external URLs return `unsupported_format_error`. Text-based PDFs already + /// carry a text layer, so OCR is not run against them and the result is empty; use `get_text_async` to read the + /// embedded text layer of such a PDF. The result carries the extracted words as plain text, plus the same + /// content as hOCR with per-word coordinates. + /// + /// - scope: files.content.read + /// + /// - parameter fileIdOrUrl: Identifier of the file to run OCR on. Callers must set exactly one of the `FileIdOrUrl` + /// variants. OCR is supported for image files and PDFs, including scanned / non-text PDFs; see the route + /// description for the supported formats. Requests against unsupported formats return + /// `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared links (www.dropbox.com) are + /// supported. External (non-Dropbox) URLs are not supported and return `unsupported_format_error`; import the + /// file into Dropbox and reference it by `file_id` or `path` instead. + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @discardableResult public func getOcrAsync(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) -> RpcRequest { + let route = Riviera.getOcrAsync + let serverArgs = Riviera.GetOcrArgs(fileIdOrUrl: fileIdOrUrl) + return client.request(route, serverArgs: serverArgs) + } + + /// Returns the status or result of specified get_ocr_async task. + /// + /// - scope: files.content.read + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Riviera.GetOcrAsyncCheckResult` object on + /// success or a `Async.PollError` object on failure. + @discardableResult public func getOcrAsyncCheck(asyncJobId: String) -> RpcRequest { + let route = Riviera.getOcrAsyncCheck + let serverArgs = Async.PollArg(asyncJobId: asyncJobId) + return client.request(route, serverArgs: serverArgs) + } + + /// Asynchronous plain-text extraction from documents. Supported formats include: - Word processing: .doc, .docx, + /// .docm, .rtf. - Presentations: .ppt, .pptx, .pptm. - Spreadsheets: .xls, .xlsx, .xlsm. - PDF: .pdf. - Dropbox + /// document types: .paper, .papert, .binder, .gdoc, .gsheet, .gslides. - Plain text / subtitles: .txt, .vtt. + /// Unsupported formats return an `unsupported_format_error`. For the `url` variant only Dropbox shared links + /// are supported; external URLs return `unsupported_format_error`. + /// + /// - scope: files.content.read + /// + /// - parameter fileIdOrUrl: Identifier of the document to extract text from. Callers must set exactly one of the + /// `FileIdOrUrl` variants. Text extraction is supported for common document formats (Word, PowerPoint, Excel, + /// PDF, RTF, and Dropbox document types); see the route description for the supported formats. Requests against + /// unsupported formats return `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared + /// links (www.dropbox.com) are supported. External (non-Dropbox) URLs are not supported and return + /// `unsupported_format_error`; import the file into Dropbox and reference it by `file_id` or `path` instead. + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @discardableResult public func getTextAsync(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) -> RpcRequest { + let route = Riviera.getTextAsync + let serverArgs = Riviera.GetTextArgs(fileIdOrUrl: fileIdOrUrl) + return client.request(route, serverArgs: serverArgs) + } + + /// Returns the status or result of specified get_text_async task. + /// + /// - scope: files.content.read + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Riviera.GetTextAsyncCheckResult` object on + /// success or a `Async.PollError` object on failure. + @discardableResult public func getTextAsyncCheck(asyncJobId: String) -> RpcRequest { + let route = Riviera.getTextAsyncCheck + let serverArgs = Async.PollArg(asyncJobId: asyncJobId) + return client.request(route, serverArgs: serverArgs) + } + /// Asynchronous transcript generation for audio and video files. Supported audio formats: .aac, .aif, .aiff, .flac, /// .m4a, .m4r, .mp3, .oga, .ogg, .wav, .wma. Supported video formats: .3gp, .3gpp, .3gpp2, .asf, .avi, .dv, /// .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf, .oggtheora, .ogv, .rm, .ts, .vob, .webm, diff --git a/Source/SwiftyDropbox/Shared/Generated/TeamLog.swift b/Source/SwiftyDropbox/Shared/Generated/TeamLog.swift index 2b0000bf..18256ec4 100644 --- a/Source/SwiftyDropbox/Shared/Generated/TeamLog.swift +++ b/Source/SwiftyDropbox/Shared/Generated/TeamLog.swift @@ -16207,12 +16207,24 @@ public class TeamLog { /// An unspecified error. case protectActionRemoveCollaboratorDetails(TeamLog.ProtectActionRemoveCollaboratorDetails) /// An unspecified error. + case protectActionRemoveDomainsDetails(TeamLog.ProtectActionRemoveDomainsDetails) + /// An unspecified error. case protectActionRemoveLinkDetails(TeamLog.ProtectActionRemoveLinkDetails) /// An unspecified error. case protectActionStopSharingDetails(TeamLog.ProtectActionStopSharingDetails) /// An unspecified error. case protectInternalDomainsChangedDetails(TeamLog.ProtectInternalDomainsChangedDetails) /// An unspecified error. + case protectPolicyActivatedDetails(TeamLog.ProtectPolicyActivatedDetails) + /// An unspecified error. + case protectPolicyDeactivatedDetails(TeamLog.ProtectPolicyDeactivatedDetails) + /// An unspecified error. + case protectPolicyScheduledDetails(TeamLog.ProtectPolicyScheduledDetails) + /// An unspecified error. + case protectPolicyUpdatedDetails(TeamLog.ProtectPolicyUpdatedDetails) + /// An unspecified error. + case protectReportViewDetails(TeamLog.ProtectReportViewDetails) + /// An unspecified error. case classificationCreateReportDetails(TeamLog.ClassificationCreateReportDetails) /// An unspecified error. case classificationCreateReportFailDetails(TeamLog.ClassificationCreateReportFailDetails) @@ -16777,6 +16789,10 @@ public class TeamLog { /// An unspecified error. case teamExtensionsPolicyChangedDetails(TeamLog.TeamExtensionsPolicyChangedDetails) /// An unspecified error. + case teamExternalSharingControlsActivationStateChangedDetails(TeamLog.TeamExternalSharingControlsActivationStateChangedDetails) + /// An unspecified error. + case teamExternalSharingControlsRecipientListsChangedDetails(TeamLog.TeamExternalSharingControlsRecipientListsChangedDetails) + /// An unspecified error. case teamMemberStorageRequestPolicyChangedDetails(TeamLog.TeamMemberStorageRequestPolicyChangedDetails) /// An unspecified error. case teamSelectiveSyncPolicyChangedDetails(TeamLog.TeamSelectiveSyncPolicyChangedDetails) @@ -18043,6 +18059,10 @@ public class TeamLog { var d = try Serialization.getFields(TeamLog.ProtectActionRemoveCollaboratorDetailsSerializer().serialize(arg)) d[".tag"] = .str("protect_action_remove_collaborator_details") return .dictionary(d) + case .protectActionRemoveDomainsDetails(let arg): + var d = try Serialization.getFields(TeamLog.ProtectActionRemoveDomainsDetailsSerializer().serialize(arg)) + d[".tag"] = .str("protect_action_remove_domains_details") + return .dictionary(d) case .protectActionRemoveLinkDetails(let arg): var d = try Serialization.getFields(TeamLog.ProtectActionRemoveLinkDetailsSerializer().serialize(arg)) d[".tag"] = .str("protect_action_remove_link_details") @@ -18055,6 +18075,26 @@ public class TeamLog { var d = try Serialization.getFields(TeamLog.ProtectInternalDomainsChangedDetailsSerializer().serialize(arg)) d[".tag"] = .str("protect_internal_domains_changed_details") return .dictionary(d) + case .protectPolicyActivatedDetails(let arg): + var d = try Serialization.getFields(TeamLog.ProtectPolicyActivatedDetailsSerializer().serialize(arg)) + d[".tag"] = .str("protect_policy_activated_details") + return .dictionary(d) + case .protectPolicyDeactivatedDetails(let arg): + var d = try Serialization.getFields(TeamLog.ProtectPolicyDeactivatedDetailsSerializer().serialize(arg)) + d[".tag"] = .str("protect_policy_deactivated_details") + return .dictionary(d) + case .protectPolicyScheduledDetails(let arg): + var d = try Serialization.getFields(TeamLog.ProtectPolicyScheduledDetailsSerializer().serialize(arg)) + d[".tag"] = .str("protect_policy_scheduled_details") + return .dictionary(d) + case .protectPolicyUpdatedDetails(let arg): + var d = try Serialization.getFields(TeamLog.ProtectPolicyUpdatedDetailsSerializer().serialize(arg)) + d[".tag"] = .str("protect_policy_updated_details") + return .dictionary(d) + case .protectReportViewDetails(let arg): + var d = try Serialization.getFields(TeamLog.ProtectReportViewDetailsSerializer().serialize(arg)) + d[".tag"] = .str("protect_report_view_details") + return .dictionary(d) case .classificationCreateReportDetails(let arg): var d = try Serialization.getFields(TeamLog.ClassificationCreateReportDetailsSerializer().serialize(arg)) d[".tag"] = .str("classification_create_report_details") @@ -19183,6 +19223,14 @@ public class TeamLog { var d = try Serialization.getFields(TeamLog.TeamExtensionsPolicyChangedDetailsSerializer().serialize(arg)) d[".tag"] = .str("team_extensions_policy_changed_details") return .dictionary(d) + case .teamExternalSharingControlsActivationStateChangedDetails(let arg): + var d = try Serialization.getFields(TeamLog.TeamExternalSharingControlsActivationStateChangedDetailsSerializer().serialize(arg)) + d[".tag"] = .str("team_external_sharing_controls_activation_state_changed_details") + return .dictionary(d) + case .teamExternalSharingControlsRecipientListsChangedDetails(let arg): + var d = try Serialization.getFields(TeamLog.TeamExternalSharingControlsRecipientListsChangedDetailsSerializer().serialize(arg)) + d[".tag"] = .str("team_external_sharing_controls_recipient_lists_changed_details") + return .dictionary(d) case .teamMemberStorageRequestPolicyChangedDetails(let arg): var d = try Serialization.getFields(TeamLog.TeamMemberStorageRequestPolicyChangedDetailsSerializer().serialize(arg)) d[".tag"] = .str("team_member_storage_request_policy_changed_details") @@ -20280,6 +20328,9 @@ public class TeamLog { case "protect_action_remove_collaborator_details": let v = try TeamLog.ProtectActionRemoveCollaboratorDetailsSerializer().deserialize(json) return EventDetails.protectActionRemoveCollaboratorDetails(v) + case "protect_action_remove_domains_details": + let v = try TeamLog.ProtectActionRemoveDomainsDetailsSerializer().deserialize(json) + return EventDetails.protectActionRemoveDomainsDetails(v) case "protect_action_remove_link_details": let v = try TeamLog.ProtectActionRemoveLinkDetailsSerializer().deserialize(json) return EventDetails.protectActionRemoveLinkDetails(v) @@ -20289,6 +20340,21 @@ public class TeamLog { case "protect_internal_domains_changed_details": let v = try TeamLog.ProtectInternalDomainsChangedDetailsSerializer().deserialize(json) return EventDetails.protectInternalDomainsChangedDetails(v) + case "protect_policy_activated_details": + let v = try TeamLog.ProtectPolicyActivatedDetailsSerializer().deserialize(json) + return EventDetails.protectPolicyActivatedDetails(v) + case "protect_policy_deactivated_details": + let v = try TeamLog.ProtectPolicyDeactivatedDetailsSerializer().deserialize(json) + return EventDetails.protectPolicyDeactivatedDetails(v) + case "protect_policy_scheduled_details": + let v = try TeamLog.ProtectPolicyScheduledDetailsSerializer().deserialize(json) + return EventDetails.protectPolicyScheduledDetails(v) + case "protect_policy_updated_details": + let v = try TeamLog.ProtectPolicyUpdatedDetailsSerializer().deserialize(json) + return EventDetails.protectPolicyUpdatedDetails(v) + case "protect_report_view_details": + let v = try TeamLog.ProtectReportViewDetailsSerializer().deserialize(json) + return EventDetails.protectReportViewDetails(v) case "classification_create_report_details": let v = try TeamLog.ClassificationCreateReportDetailsSerializer().deserialize(json) return EventDetails.classificationCreateReportDetails(v) @@ -21135,6 +21201,12 @@ public class TeamLog { case "team_extensions_policy_changed_details": let v = try TeamLog.TeamExtensionsPolicyChangedDetailsSerializer().deserialize(json) return EventDetails.teamExtensionsPolicyChangedDetails(v) + case "team_external_sharing_controls_activation_state_changed_details": + let v = try TeamLog.TeamExternalSharingControlsActivationStateChangedDetailsSerializer().deserialize(json) + return EventDetails.teamExternalSharingControlsActivationStateChangedDetails(v) + case "team_external_sharing_controls_recipient_lists_changed_details": + let v = try TeamLog.TeamExternalSharingControlsRecipientListsChangedDetailsSerializer().deserialize(json) + return EventDetails.teamExternalSharingControlsRecipientListsChangedDetails(v) case "team_member_storage_request_policy_changed_details": let v = try TeamLog.TeamMemberStorageRequestPolicyChangedDetailsSerializer().deserialize(json) return EventDetails.teamMemberStorageRequestPolicyChangedDetails(v) @@ -21892,12 +21964,24 @@ public class TeamLog { case protectActionExport(TeamLog.ProtectActionExportType) /// (protect) Removed collaborators via Dropbox Protect case protectActionRemoveCollaborator(TeamLog.ProtectActionRemoveCollaboratorType) + /// (protect) Removed domains via Dropbox Protect + case protectActionRemoveDomains(TeamLog.ProtectActionRemoveDomainsType) /// (protect) Removed a link via Dropbox Protect case protectActionRemoveLink(TeamLog.ProtectActionRemoveLinkType) /// (protect) Stopped sharing content via Dropbox Protect case protectActionStopSharing(TeamLog.ProtectActionStopSharingType) /// (protect) Modified Protect internal domains list case protectInternalDomainsChanged(TeamLog.ProtectInternalDomainsChangedType) + /// (protect) Activated a Dropbox Protect policy + case protectPolicyActivated(TeamLog.ProtectPolicyActivatedType) + /// (protect) Deactivated a Dropbox Protect policy + case protectPolicyDeactivated(TeamLog.ProtectPolicyDeactivatedType) + /// (protect) Scheduled a Dropbox Protect policy + case protectPolicyScheduled(TeamLog.ProtectPolicyScheduledType) + /// (protect) Updated a Dropbox Protect policy + case protectPolicyUpdated(TeamLog.ProtectPolicyUpdatedType) + /// (protect) Viewed a Dropbox Protect report + case protectReportView(TeamLog.ProtectReportViewType) /// (reports) Created Classification report case classificationCreateReport(TeamLog.ClassificationCreateReportType) /// (reports) Couldn't create Classification report @@ -22468,6 +22552,10 @@ public class TeamLog { case teamBrandingPolicyChanged(TeamLog.TeamBrandingPolicyChangedType) /// (team_policies) Changed App Integrations setting for team case teamExtensionsPolicyChanged(TeamLog.TeamExtensionsPolicyChangedType) + /// (team_policies) Changed external sharing controls activation state + case teamExternalSharingControlsActivationStateChanged(TeamLog.TeamExternalSharingControlsActivationStateChangedType) + /// (team_policies) Changed approved or blocked entries for external sharing controls + case teamExternalSharingControlsRecipientListsChanged(TeamLog.TeamExternalSharingControlsRecipientListsChangedType) /// (team_policies) Changed team member storage request policy for team case teamMemberStorageRequestPolicyChanged(TeamLog.TeamMemberStorageRequestPolicyChangedType) /// (team_policies) Enabled/disabled Team Selective Sync for team @@ -23736,6 +23824,10 @@ public class TeamLog { var d = try Serialization.getFields(TeamLog.ProtectActionRemoveCollaboratorTypeSerializer().serialize(arg)) d[".tag"] = .str("protect_action_remove_collaborator") return .dictionary(d) + case .protectActionRemoveDomains(let arg): + var d = try Serialization.getFields(TeamLog.ProtectActionRemoveDomainsTypeSerializer().serialize(arg)) + d[".tag"] = .str("protect_action_remove_domains") + return .dictionary(d) case .protectActionRemoveLink(let arg): var d = try Serialization.getFields(TeamLog.ProtectActionRemoveLinkTypeSerializer().serialize(arg)) d[".tag"] = .str("protect_action_remove_link") @@ -23748,6 +23840,26 @@ public class TeamLog { var d = try Serialization.getFields(TeamLog.ProtectInternalDomainsChangedTypeSerializer().serialize(arg)) d[".tag"] = .str("protect_internal_domains_changed") return .dictionary(d) + case .protectPolicyActivated(let arg): + var d = try Serialization.getFields(TeamLog.ProtectPolicyActivatedTypeSerializer().serialize(arg)) + d[".tag"] = .str("protect_policy_activated") + return .dictionary(d) + case .protectPolicyDeactivated(let arg): + var d = try Serialization.getFields(TeamLog.ProtectPolicyDeactivatedTypeSerializer().serialize(arg)) + d[".tag"] = .str("protect_policy_deactivated") + return .dictionary(d) + case .protectPolicyScheduled(let arg): + var d = try Serialization.getFields(TeamLog.ProtectPolicyScheduledTypeSerializer().serialize(arg)) + d[".tag"] = .str("protect_policy_scheduled") + return .dictionary(d) + case .protectPolicyUpdated(let arg): + var d = try Serialization.getFields(TeamLog.ProtectPolicyUpdatedTypeSerializer().serialize(arg)) + d[".tag"] = .str("protect_policy_updated") + return .dictionary(d) + case .protectReportView(let arg): + var d = try Serialization.getFields(TeamLog.ProtectReportViewTypeSerializer().serialize(arg)) + d[".tag"] = .str("protect_report_view") + return .dictionary(d) case .classificationCreateReport(let arg): var d = try Serialization.getFields(TeamLog.ClassificationCreateReportTypeSerializer().serialize(arg)) d[".tag"] = .str("classification_create_report") @@ -24876,6 +24988,14 @@ public class TeamLog { var d = try Serialization.getFields(TeamLog.TeamExtensionsPolicyChangedTypeSerializer().serialize(arg)) d[".tag"] = .str("team_extensions_policy_changed") return .dictionary(d) + case .teamExternalSharingControlsActivationStateChanged(let arg): + var d = try Serialization.getFields(TeamLog.TeamExternalSharingControlsActivationStateChangedTypeSerializer().serialize(arg)) + d[".tag"] = .str("team_external_sharing_controls_activation_state_changed") + return .dictionary(d) + case .teamExternalSharingControlsRecipientListsChanged(let arg): + var d = try Serialization.getFields(TeamLog.TeamExternalSharingControlsRecipientListsChangedTypeSerializer().serialize(arg)) + d[".tag"] = .str("team_external_sharing_controls_recipient_lists_changed") + return .dictionary(d) case .teamMemberStorageRequestPolicyChanged(let arg): var d = try Serialization.getFields(TeamLog.TeamMemberStorageRequestPolicyChangedTypeSerializer().serialize(arg)) d[".tag"] = .str("team_member_storage_request_policy_changed") @@ -25969,6 +26089,9 @@ public class TeamLog { case "protect_action_remove_collaborator": let v = try TeamLog.ProtectActionRemoveCollaboratorTypeSerializer().deserialize(json) return EventType.protectActionRemoveCollaborator(v) + case "protect_action_remove_domains": + let v = try TeamLog.ProtectActionRemoveDomainsTypeSerializer().deserialize(json) + return EventType.protectActionRemoveDomains(v) case "protect_action_remove_link": let v = try TeamLog.ProtectActionRemoveLinkTypeSerializer().deserialize(json) return EventType.protectActionRemoveLink(v) @@ -25978,6 +26101,21 @@ public class TeamLog { case "protect_internal_domains_changed": let v = try TeamLog.ProtectInternalDomainsChangedTypeSerializer().deserialize(json) return EventType.protectInternalDomainsChanged(v) + case "protect_policy_activated": + let v = try TeamLog.ProtectPolicyActivatedTypeSerializer().deserialize(json) + return EventType.protectPolicyActivated(v) + case "protect_policy_deactivated": + let v = try TeamLog.ProtectPolicyDeactivatedTypeSerializer().deserialize(json) + return EventType.protectPolicyDeactivated(v) + case "protect_policy_scheduled": + let v = try TeamLog.ProtectPolicyScheduledTypeSerializer().deserialize(json) + return EventType.protectPolicyScheduled(v) + case "protect_policy_updated": + let v = try TeamLog.ProtectPolicyUpdatedTypeSerializer().deserialize(json) + return EventType.protectPolicyUpdated(v) + case "protect_report_view": + let v = try TeamLog.ProtectReportViewTypeSerializer().deserialize(json) + return EventType.protectReportView(v) case "classification_create_report": let v = try TeamLog.ClassificationCreateReportTypeSerializer().deserialize(json) return EventType.classificationCreateReport(v) @@ -26824,6 +26962,12 @@ public class TeamLog { case "team_extensions_policy_changed": let v = try TeamLog.TeamExtensionsPolicyChangedTypeSerializer().deserialize(json) return EventType.teamExtensionsPolicyChanged(v) + case "team_external_sharing_controls_activation_state_changed": + let v = try TeamLog.TeamExternalSharingControlsActivationStateChangedTypeSerializer().deserialize(json) + return EventType.teamExternalSharingControlsActivationStateChanged(v) + case "team_external_sharing_controls_recipient_lists_changed": + let v = try TeamLog.TeamExternalSharingControlsRecipientListsChangedTypeSerializer().deserialize(json) + return EventType.teamExternalSharingControlsRecipientListsChanged(v) case "team_member_storage_request_policy_changed": let v = try TeamLog.TeamMemberStorageRequestPolicyChangedTypeSerializer().deserialize(json) return EventType.teamMemberStorageRequestPolicyChanged(v) @@ -27578,12 +27722,24 @@ public class TeamLog { case protectActionExport /// (protect) Removed collaborators via Dropbox Protect case protectActionRemoveCollaborator + /// (protect) Removed domains via Dropbox Protect + case protectActionRemoveDomains /// (protect) Removed a link via Dropbox Protect case protectActionRemoveLink /// (protect) Stopped sharing content via Dropbox Protect case protectActionStopSharing /// (protect) Modified Protect internal domains list case protectInternalDomainsChanged + /// (protect) Activated a Dropbox Protect policy + case protectPolicyActivated + /// (protect) Deactivated a Dropbox Protect policy + case protectPolicyDeactivated + /// (protect) Scheduled a Dropbox Protect policy + case protectPolicyScheduled + /// (protect) Updated a Dropbox Protect policy + case protectPolicyUpdated + /// (protect) Viewed a Dropbox Protect report + case protectReportView /// (reports) Created Classification report case classificationCreateReport /// (reports) Couldn't create Classification report @@ -28154,6 +28310,10 @@ public class TeamLog { case teamBrandingPolicyChanged /// (team_policies) Changed App Integrations setting for team case teamExtensionsPolicyChanged + /// (team_policies) Changed external sharing controls activation state + case teamExternalSharingControlsActivationStateChanged + /// (team_policies) Changed approved or blocked entries for external sharing controls + case teamExternalSharingControlsRecipientListsChanged /// (team_policies) Changed team member storage request policy for team case teamMemberStorageRequestPolicyChanged /// (team_policies) Enabled/disabled Team Selective Sync for team @@ -29422,6 +29582,10 @@ public class TeamLog { var d = [String: JSON]() d[".tag"] = .str("protect_action_remove_collaborator") return .dictionary(d) + case .protectActionRemoveDomains: + var d = [String: JSON]() + d[".tag"] = .str("protect_action_remove_domains") + return .dictionary(d) case .protectActionRemoveLink: var d = [String: JSON]() d[".tag"] = .str("protect_action_remove_link") @@ -29434,6 +29598,26 @@ public class TeamLog { var d = [String: JSON]() d[".tag"] = .str("protect_internal_domains_changed") return .dictionary(d) + case .protectPolicyActivated: + var d = [String: JSON]() + d[".tag"] = .str("protect_policy_activated") + return .dictionary(d) + case .protectPolicyDeactivated: + var d = [String: JSON]() + d[".tag"] = .str("protect_policy_deactivated") + return .dictionary(d) + case .protectPolicyScheduled: + var d = [String: JSON]() + d[".tag"] = .str("protect_policy_scheduled") + return .dictionary(d) + case .protectPolicyUpdated: + var d = [String: JSON]() + d[".tag"] = .str("protect_policy_updated") + return .dictionary(d) + case .protectReportView: + var d = [String: JSON]() + d[".tag"] = .str("protect_report_view") + return .dictionary(d) case .classificationCreateReport: var d = [String: JSON]() d[".tag"] = .str("classification_create_report") @@ -30562,6 +30746,14 @@ public class TeamLog { var d = [String: JSON]() d[".tag"] = .str("team_extensions_policy_changed") return .dictionary(d) + case .teamExternalSharingControlsActivationStateChanged: + var d = [String: JSON]() + d[".tag"] = .str("team_external_sharing_controls_activation_state_changed") + return .dictionary(d) + case .teamExternalSharingControlsRecipientListsChanged: + var d = [String: JSON]() + d[".tag"] = .str("team_external_sharing_controls_recipient_lists_changed") + return .dictionary(d) case .teamMemberStorageRequestPolicyChanged: var d = [String: JSON]() d[".tag"] = .str("team_member_storage_request_policy_changed") @@ -31373,12 +31565,24 @@ public class TeamLog { return EventTypeArg.protectActionExport case "protect_action_remove_collaborator": return EventTypeArg.protectActionRemoveCollaborator + case "protect_action_remove_domains": + return EventTypeArg.protectActionRemoveDomains case "protect_action_remove_link": return EventTypeArg.protectActionRemoveLink case "protect_action_stop_sharing": return EventTypeArg.protectActionStopSharing case "protect_internal_domains_changed": return EventTypeArg.protectInternalDomainsChanged + case "protect_policy_activated": + return EventTypeArg.protectPolicyActivated + case "protect_policy_deactivated": + return EventTypeArg.protectPolicyDeactivated + case "protect_policy_scheduled": + return EventTypeArg.protectPolicyScheduled + case "protect_policy_updated": + return EventTypeArg.protectPolicyUpdated + case "protect_report_view": + return EventTypeArg.protectReportView case "classification_create_report": return EventTypeArg.classificationCreateReport case "classification_create_report_fail": @@ -31943,6 +32147,10 @@ public class TeamLog { return EventTypeArg.teamBrandingPolicyChanged case "team_extensions_policy_changed": return EventTypeArg.teamExtensionsPolicyChanged + case "team_external_sharing_controls_activation_state_changed": + return EventTypeArg.teamExternalSharingControlsActivationStateChanged + case "team_external_sharing_controls_recipient_lists_changed": + return EventTypeArg.teamExternalSharingControlsRecipientListsChanged case "team_member_storage_request_policy_changed": return EventTypeArg.teamMemberStorageRequestPolicyChanged case "team_selective_sync_policy_changed": @@ -32869,6 +33077,73 @@ public class TeamLog { } } + /// The ExternalSharingControlsActivationState union + public enum ExternalSharingControlsActivationState: CustomStringConvertible, JSONRepresentable { + /// An unspecified error. + case active + /// An unspecified error. + case disabled + /// An unspecified error. + case legacy + /// An unspecified error. + case other + + func json() throws -> JSON { + try ExternalSharingControlsActivationStateSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ExternalSharingControlsActivationStateSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ExternalSharingControlsActivationState: \(error)" + } + } + } + public class ExternalSharingControlsActivationStateSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ExternalSharingControlsActivationState) throws -> JSON { + switch value { + case .active: + var d = [String: JSON]() + d[".tag"] = .str("active") + return .dictionary(d) + case .disabled: + var d = [String: JSON]() + d[".tag"] = .str("disabled") + return .dictionary(d) + case .legacy: + var d = [String: JSON]() + d[".tag"] = .str("legacy") + return .dictionary(d) + case .other: + var d = [String: JSON]() + d[".tag"] = .str("other") + return .dictionary(d) + } + } + public func deserialize(_ json: JSON) throws -> ExternalSharingControlsActivationState { + switch json { + case .dictionary(let d): + let tag = try Serialization.getTag(d) + switch tag { + case "active": + return ExternalSharingControlsActivationState.active + case "disabled": + return ExternalSharingControlsActivationState.disabled + case "legacy": + return ExternalSharingControlsActivationState.legacy + case "other": + return ExternalSharingControlsActivationState.other + default: + return ExternalSharingControlsActivationState.other + } + default: + throw JSONSerializerError.deserializeError(type: ExternalSharingControlsActivationState.self, json: json) + } + } + } + /// Created External sharing report. public class ExternalSharingCreateReportDetails: CustomStringConvertible, JSONRepresentable { @@ -44214,8 +44489,12 @@ public class TeamLog { public class MediaHubProjectTeamAddDetails: CustomStringConvertible, JSONRepresentable { /// Replay project. public let project: TeamLog.MediaHubProjectLogInfo? - public init(project: TeamLog.MediaHubProjectLogInfo? = nil) { + /// The email address of the Replay project member targeted by the event. + public let invitee: String? + public init(project: TeamLog.MediaHubProjectLogInfo? = nil, invitee: String? = nil) { self.project = project + nullableValidator(stringValidator(maxLength: 255))(invitee) + self.invitee = invitee } func json() throws -> JSON { @@ -44235,6 +44514,7 @@ public class TeamLog { public func serialize(_ value: MediaHubProjectTeamAddDetails) throws -> JSON { let output = [ "project": try NullableSerializer(TeamLog.MediaHubProjectLogInfoSerializer()).serialize(value.project), + "invitee": try NullableSerializer(Serialization._StringSerializer).serialize(value.invitee), ] return .dictionary(output) } @@ -44242,7 +44522,8 @@ public class TeamLog { switch json { case .dictionary(let dict): let project = try NullableSerializer(TeamLog.MediaHubProjectLogInfoSerializer()).deserialize(dict["project"] ?? .null) - return MediaHubProjectTeamAddDetails(project: project) + let invitee = try NullableSerializer(Serialization._StringSerializer).deserialize(dict["invitee"] ?? .null) + return MediaHubProjectTeamAddDetails(project: project, invitee: invitee) default: throw JSONSerializerError.deserializeError(type: MediaHubProjectTeamAddDetails.self, json: json) } @@ -44293,8 +44574,12 @@ public class TeamLog { public class MediaHubProjectTeamDeleteDetails: CustomStringConvertible, JSONRepresentable { /// Replay project. public let project: TeamLog.MediaHubProjectLogInfo? - public init(project: TeamLog.MediaHubProjectLogInfo? = nil) { + /// The email address of the Replay project member targeted by the event. + public let invitee: String? + public init(project: TeamLog.MediaHubProjectLogInfo? = nil, invitee: String? = nil) { self.project = project + nullableValidator(stringValidator(maxLength: 255))(invitee) + self.invitee = invitee } func json() throws -> JSON { @@ -44314,6 +44599,7 @@ public class TeamLog { public func serialize(_ value: MediaHubProjectTeamDeleteDetails) throws -> JSON { let output = [ "project": try NullableSerializer(TeamLog.MediaHubProjectLogInfoSerializer()).serialize(value.project), + "invitee": try NullableSerializer(Serialization._StringSerializer).serialize(value.invitee), ] return .dictionary(output) } @@ -44321,7 +44607,8 @@ public class TeamLog { switch json { case .dictionary(let dict): let project = try NullableSerializer(TeamLog.MediaHubProjectLogInfoSerializer()).deserialize(dict["project"] ?? .null) - return MediaHubProjectTeamDeleteDetails(project: project) + let invitee = try NullableSerializer(Serialization._StringSerializer).deserialize(dict["invitee"] ?? .null) + return MediaHubProjectTeamDeleteDetails(project: project, invitee: invitee) default: throw JSONSerializerError.deserializeError(type: MediaHubProjectTeamDeleteDetails.self, json: json) } @@ -44376,10 +44663,14 @@ public class TeamLog { public let newRole: TeamLog.MediaHubProjectRole /// Replay project. public let project: TeamLog.MediaHubProjectLogInfo? - public init(previousRole: TeamLog.MediaHubProjectRole, newRole: TeamLog.MediaHubProjectRole, project: TeamLog.MediaHubProjectLogInfo? = nil) { + /// The email address of the Replay project member targeted by the event. + public let invitee: String? + public init(previousRole: TeamLog.MediaHubProjectRole, newRole: TeamLog.MediaHubProjectRole, project: TeamLog.MediaHubProjectLogInfo? = nil, invitee: String? = nil) { self.previousRole = previousRole self.newRole = newRole self.project = project + nullableValidator(stringValidator(maxLength: 255))(invitee) + self.invitee = invitee } func json() throws -> JSON { @@ -44401,6 +44692,7 @@ public class TeamLog { "previous_role": try TeamLog.MediaHubProjectRoleSerializer().serialize(value.previousRole), "new_role": try TeamLog.MediaHubProjectRoleSerializer().serialize(value.newRole), "project": try NullableSerializer(TeamLog.MediaHubProjectLogInfoSerializer()).serialize(value.project), + "invitee": try NullableSerializer(Serialization._StringSerializer).serialize(value.invitee), ] return .dictionary(output) } @@ -44410,7 +44702,8 @@ public class TeamLog { let previousRole = try TeamLog.MediaHubProjectRoleSerializer().deserialize(dict["previous_role"] ?? .null) let newRole = try TeamLog.MediaHubProjectRoleSerializer().deserialize(dict["new_role"] ?? .null) let project = try NullableSerializer(TeamLog.MediaHubProjectLogInfoSerializer()).deserialize(dict["project"] ?? .null) - return MediaHubProjectTeamRoleChangedDetails(previousRole: previousRole, newRole: newRole, project: project) + let invitee = try NullableSerializer(Serialization._StringSerializer).deserialize(dict["invitee"] ?? .null) + return MediaHubProjectTeamRoleChangedDetails(previousRole: previousRole, newRole: newRole, project: project, invitee: invitee) default: throw JSONSerializerError.deserializeError(type: MediaHubProjectTeamRoleChangedDetails.self, json: json) } @@ -44464,6 +44757,8 @@ public class TeamLog { /// An unspecified error. case public_ /// An unspecified error. + case publicLoggedInOnly + /// An unspecified error. case teamOnly /// An unspecified error. case other @@ -44492,6 +44787,10 @@ public class TeamLog { var d = [String: JSON]() d[".tag"] = .str("public") return .dictionary(d) + case .publicLoggedInOnly: + var d = [String: JSON]() + d[".tag"] = .str("public_logged_in_only") + return .dictionary(d) case .teamOnly: var d = [String: JSON]() d[".tag"] = .str("team_only") @@ -44511,6 +44810,8 @@ public class TeamLog { return MediaHubSharedLinkAudience.noOne case "public": return MediaHubSharedLinkAudience.public_ + case "public_logged_in_only": + return MediaHubSharedLinkAudience.publicLoggedInOnly case "team_only": return MediaHubSharedLinkAudience.teamOnly case "other": @@ -56813,6 +57114,86 @@ public class TeamLog { } } + /// Removed domains via Dropbox Protect. + public class ProtectActionRemoveDomainsDetails: CustomStringConvertible, JSONRepresentable { + /// Action ID. + public let actionId: String + public init(actionId: String) { + stringValidator()(actionId) + self.actionId = actionId + } + + func json() throws -> JSON { + try ProtectActionRemoveDomainsDetailsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectActionRemoveDomainsDetailsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectActionRemoveDomainsDetails: \(error)" + } + } + } + public class ProtectActionRemoveDomainsDetailsSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectActionRemoveDomainsDetails) throws -> JSON { + let output = [ + "action_id": try Serialization._StringSerializer.serialize(value.actionId), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectActionRemoveDomainsDetails { + switch json { + case .dictionary(let dict): + let actionId = try Serialization._StringSerializer.deserialize(dict["action_id"] ?? .null) + return ProtectActionRemoveDomainsDetails(actionId: actionId) + default: + throw JSONSerializerError.deserializeError(type: ProtectActionRemoveDomainsDetails.self, json: json) + } + } + } + + /// The ProtectActionRemoveDomainsType struct + public class ProtectActionRemoveDomainsType: CustomStringConvertible, JSONRepresentable { + /// (no description) + public let description_: String + public init(description_: String) { + stringValidator()(description_) + self.description_ = description_ + } + + func json() throws -> JSON { + try ProtectActionRemoveDomainsTypeSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectActionRemoveDomainsTypeSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectActionRemoveDomainsType: \(error)" + } + } + } + public class ProtectActionRemoveDomainsTypeSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectActionRemoveDomainsType) throws -> JSON { + let output = [ + "description": try Serialization._StringSerializer.serialize(value.description_), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectActionRemoveDomainsType { + switch json { + case .dictionary(let dict): + let description_ = try Serialization._StringSerializer.deserialize(dict["description"] ?? .null) + return ProtectActionRemoveDomainsType(description_: description_) + default: + throw JSONSerializerError.deserializeError(type: ProtectActionRemoveDomainsType.self, json: json) + } + } + } + /// Removed a link via Dropbox Protect. public class ProtectActionRemoveLinkDetails: CustomStringConvertible, JSONRepresentable { /// Action ID. @@ -57059,6 +57440,1056 @@ public class TeamLog { } } + /// Activated a Dropbox Protect policy. + public class ProtectPolicyActivatedDetails: CustomStringConvertible, JSONRepresentable { + /// Policy ID. + public let policyId: String + public init(policyId: String) { + stringValidator()(policyId) + self.policyId = policyId + } + + func json() throws -> JSON { + try ProtectPolicyActivatedDetailsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectPolicyActivatedDetailsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectPolicyActivatedDetails: \(error)" + } + } + } + public class ProtectPolicyActivatedDetailsSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectPolicyActivatedDetails) throws -> JSON { + let output = [ + "policy_id": try Serialization._StringSerializer.serialize(value.policyId), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectPolicyActivatedDetails { + switch json { + case .dictionary(let dict): + let policyId = try Serialization._StringSerializer.deserialize(dict["policy_id"] ?? .null) + return ProtectPolicyActivatedDetails(policyId: policyId) + default: + throw JSONSerializerError.deserializeError(type: ProtectPolicyActivatedDetails.self, json: json) + } + } + } + + /// The ProtectPolicyActivatedType struct + public class ProtectPolicyActivatedType: CustomStringConvertible, JSONRepresentable { + /// (no description) + public let description_: String + public init(description_: String) { + stringValidator()(description_) + self.description_ = description_ + } + + func json() throws -> JSON { + try ProtectPolicyActivatedTypeSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectPolicyActivatedTypeSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectPolicyActivatedType: \(error)" + } + } + } + public class ProtectPolicyActivatedTypeSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectPolicyActivatedType) throws -> JSON { + let output = [ + "description": try Serialization._StringSerializer.serialize(value.description_), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectPolicyActivatedType { + switch json { + case .dictionary(let dict): + let description_ = try Serialization._StringSerializer.deserialize(dict["description"] ?? .null) + return ProtectPolicyActivatedType(description_: description_) + default: + throw JSONSerializerError.deserializeError(type: ProtectPolicyActivatedType.self, json: json) + } + } + } + + /// Deactivated a Dropbox Protect policy. + public class ProtectPolicyDeactivatedDetails: CustomStringConvertible, JSONRepresentable { + /// Policy ID. + public let policyId: String + public init(policyId: String) { + stringValidator()(policyId) + self.policyId = policyId + } + + func json() throws -> JSON { + try ProtectPolicyDeactivatedDetailsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectPolicyDeactivatedDetailsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectPolicyDeactivatedDetails: \(error)" + } + } + } + public class ProtectPolicyDeactivatedDetailsSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectPolicyDeactivatedDetails) throws -> JSON { + let output = [ + "policy_id": try Serialization._StringSerializer.serialize(value.policyId), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectPolicyDeactivatedDetails { + switch json { + case .dictionary(let dict): + let policyId = try Serialization._StringSerializer.deserialize(dict["policy_id"] ?? .null) + return ProtectPolicyDeactivatedDetails(policyId: policyId) + default: + throw JSONSerializerError.deserializeError(type: ProtectPolicyDeactivatedDetails.self, json: json) + } + } + } + + /// The ProtectPolicyDeactivatedType struct + public class ProtectPolicyDeactivatedType: CustomStringConvertible, JSONRepresentable { + /// (no description) + public let description_: String + public init(description_: String) { + stringValidator()(description_) + self.description_ = description_ + } + + func json() throws -> JSON { + try ProtectPolicyDeactivatedTypeSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectPolicyDeactivatedTypeSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectPolicyDeactivatedType: \(error)" + } + } + } + public class ProtectPolicyDeactivatedTypeSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectPolicyDeactivatedType) throws -> JSON { + let output = [ + "description": try Serialization._StringSerializer.serialize(value.description_), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectPolicyDeactivatedType { + switch json { + case .dictionary(let dict): + let description_ = try Serialization._StringSerializer.deserialize(dict["description"] ?? .null) + return ProtectPolicyDeactivatedType(description_: description_) + default: + throw JSONSerializerError.deserializeError(type: ProtectPolicyDeactivatedType.self, json: json) + } + } + } + + /// Scheduled a Dropbox Protect policy. + public class ProtectPolicyScheduledDetails: CustomStringConvertible, JSONRepresentable { + /// Policy ID. + public let policyId: String + public init(policyId: String) { + stringValidator()(policyId) + self.policyId = policyId + } + + func json() throws -> JSON { + try ProtectPolicyScheduledDetailsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectPolicyScheduledDetailsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectPolicyScheduledDetails: \(error)" + } + } + } + public class ProtectPolicyScheduledDetailsSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectPolicyScheduledDetails) throws -> JSON { + let output = [ + "policy_id": try Serialization._StringSerializer.serialize(value.policyId), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectPolicyScheduledDetails { + switch json { + case .dictionary(let dict): + let policyId = try Serialization._StringSerializer.deserialize(dict["policy_id"] ?? .null) + return ProtectPolicyScheduledDetails(policyId: policyId) + default: + throw JSONSerializerError.deserializeError(type: ProtectPolicyScheduledDetails.self, json: json) + } + } + } + + /// The ProtectPolicyScheduledType struct + public class ProtectPolicyScheduledType: CustomStringConvertible, JSONRepresentable { + /// (no description) + public let description_: String + public init(description_: String) { + stringValidator()(description_) + self.description_ = description_ + } + + func json() throws -> JSON { + try ProtectPolicyScheduledTypeSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectPolicyScheduledTypeSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectPolicyScheduledType: \(error)" + } + } + } + public class ProtectPolicyScheduledTypeSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectPolicyScheduledType) throws -> JSON { + let output = [ + "description": try Serialization._StringSerializer.serialize(value.description_), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectPolicyScheduledType { + switch json { + case .dictionary(let dict): + let description_ = try Serialization._StringSerializer.deserialize(dict["description"] ?? .null) + return ProtectPolicyScheduledType(description_: description_) + default: + throw JSONSerializerError.deserializeError(type: ProtectPolicyScheduledType.self, json: json) + } + } + } + + /// Updated a Dropbox Protect policy. + public class ProtectPolicyUpdatedDetails: CustomStringConvertible, JSONRepresentable { + /// Policy ID. + public let policyId: String + public init(policyId: String) { + stringValidator()(policyId) + self.policyId = policyId + } + + func json() throws -> JSON { + try ProtectPolicyUpdatedDetailsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectPolicyUpdatedDetailsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectPolicyUpdatedDetails: \(error)" + } + } + } + public class ProtectPolicyUpdatedDetailsSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectPolicyUpdatedDetails) throws -> JSON { + let output = [ + "policy_id": try Serialization._StringSerializer.serialize(value.policyId), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectPolicyUpdatedDetails { + switch json { + case .dictionary(let dict): + let policyId = try Serialization._StringSerializer.deserialize(dict["policy_id"] ?? .null) + return ProtectPolicyUpdatedDetails(policyId: policyId) + default: + throw JSONSerializerError.deserializeError(type: ProtectPolicyUpdatedDetails.self, json: json) + } + } + } + + /// The ProtectPolicyUpdatedType struct + public class ProtectPolicyUpdatedType: CustomStringConvertible, JSONRepresentable { + /// (no description) + public let description_: String + public init(description_: String) { + stringValidator()(description_) + self.description_ = description_ + } + + func json() throws -> JSON { + try ProtectPolicyUpdatedTypeSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectPolicyUpdatedTypeSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectPolicyUpdatedType: \(error)" + } + } + } + public class ProtectPolicyUpdatedTypeSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectPolicyUpdatedType) throws -> JSON { + let output = [ + "description": try Serialization._StringSerializer.serialize(value.description_), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectPolicyUpdatedType { + switch json { + case .dictionary(let dict): + let description_ = try Serialization._StringSerializer.deserialize(dict["description"] ?? .null) + return ProtectPolicyUpdatedType(description_: description_) + default: + throw JSONSerializerError.deserializeError(type: ProtectPolicyUpdatedType.self, json: json) + } + } + } + + /// The category that a Dropbox Protect report belongs to + public enum ProtectReportCategory: CustomStringConvertible, JSONRepresentable { + /// An unspecified error. + case overview + /// An unspecified error. + case staleAccess + /// An unspecified error. + case other + + func json() throws -> JSON { + try ProtectReportCategorySerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectReportCategorySerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectReportCategory: \(error)" + } + } + } + public class ProtectReportCategorySerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectReportCategory) throws -> JSON { + switch value { + case .overview: + var d = [String: JSON]() + d[".tag"] = .str("overview") + return .dictionary(d) + case .staleAccess: + var d = [String: JSON]() + d[".tag"] = .str("stale_access") + return .dictionary(d) + case .other: + var d = [String: JSON]() + d[".tag"] = .str("other") + return .dictionary(d) + } + } + public func deserialize(_ json: JSON) throws -> ProtectReportCategory { + switch json { + case .dictionary(let d): + let tag = try Serialization.getTag(d) + switch tag { + case "overview": + return ProtectReportCategory.overview + case "stale_access": + return ProtectReportCategory.staleAccess + case "other": + return ProtectReportCategory.other + default: + return ProtectReportCategory.other + } + default: + throw JSONSerializerError.deserializeError(type: ProtectReportCategory.self, json: json) + } + } + } + + /// The metric that a Dropbox Protect report corresponds to + public enum ProtectReportMetric: CustomStringConvertible, JSONRepresentable { + /// An unspecified error. + case externalModifiedOver1Year + /// An unspecified error. + case externalModifiedOver1YearCompany + /// An unspecified error. + case externalModifiedOver1YearOutside + /// An unspecified error. + case externalModifiedOver1YearPersonal + /// An unspecified error. + case externalModifiedOver1YearPublic + /// An unspecified error. + case externalModifiedOver2Years + /// An unspecified error. + case externalModifiedOver2YearsCompany + /// An unspecified error. + case externalModifiedOver2YearsOutside + /// An unspecified error. + case externalModifiedOver2YearsPersonal + /// An unspecified error. + case externalModifiedOver2YearsPublic + /// An unspecified error. + case externalModifiedOver3Years + /// An unspecified error. + case externalModifiedOver3YearsCompany + /// An unspecified error. + case externalModifiedOver3YearsOutside + /// An unspecified error. + case externalModifiedOver3YearsPersonal + /// An unspecified error. + case externalModifiedOver3YearsPublic + /// An unspecified error. + case externalModifiedOver5Years + /// An unspecified error. + case externalModifiedOver5YearsCompany + /// An unspecified error. + case externalModifiedOver5YearsOutside + /// An unspecified error. + case externalModifiedOver5YearsPersonal + /// An unspecified error. + case externalModifiedOver5YearsPublic + /// An unspecified error. + case foldersCompany + /// An unspecified error. + case foldersInternal + /// An unspecified error. + case foldersOutside + /// An unspecified error. + case foldersPersonal + /// An unspecified error. + case foldersPublic + /// An unspecified error. + case internalModifiedOver1Year + /// An unspecified error. + case internalModifiedOver1YearCompany + /// An unspecified error. + case internalModifiedOver1YearOutside + /// An unspecified error. + case internalModifiedOver1YearPersonal + /// An unspecified error. + case internalModifiedOver1YearPublic + /// An unspecified error. + case internalModifiedOver2Years + /// An unspecified error. + case internalModifiedOver2YearsCompany + /// An unspecified error. + case internalModifiedOver2YearsOutside + /// An unspecified error. + case internalModifiedOver2YearsPersonal + /// An unspecified error. + case internalModifiedOver2YearsPublic + /// An unspecified error. + case internalModifiedOver3Years + /// An unspecified error. + case internalModifiedOver3YearsCompany + /// An unspecified error. + case internalModifiedOver3YearsOutside + /// An unspecified error. + case internalModifiedOver3YearsPersonal + /// An unspecified error. + case internalModifiedOver3YearsPublic + /// An unspecified error. + case internalModifiedOver5Years + /// An unspecified error. + case internalModifiedOver5YearsCompany + /// An unspecified error. + case internalModifiedOver5YearsOutside + /// An unspecified error. + case internalModifiedOver5YearsPersonal + /// An unspecified error. + case internalModifiedOver5YearsPublic + /// An unspecified error. + case itemsAll + /// An unspecified error. + case itemsCompanyAccess + /// An unspecified error. + case itemsInternallyOwned + /// An unspecified error. + case itemsModifiedOver1Year + /// An unspecified error. + case itemsModifiedOver3Years + /// An unspecified error. + case itemsOutsideAccess + /// An unspecified error. + case itemsPersonalAccess + /// An unspecified error. + case itemsPublicLinks + /// An unspecified error. + case otherFolders + /// An unspecified error. + case otherSharedDrives + /// An unspecified error. + case sharedDrivesInternal + /// An unspecified error. + case sharedDrivesOutside + /// An unspecified error. + case sharedDrivesPersonal + /// An unspecified error. + case other + + func json() throws -> JSON { + try ProtectReportMetricSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectReportMetricSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectReportMetric: \(error)" + } + } + } + public class ProtectReportMetricSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectReportMetric) throws -> JSON { + switch value { + case .externalModifiedOver1Year: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_1_year") + return .dictionary(d) + case .externalModifiedOver1YearCompany: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_1_year_company") + return .dictionary(d) + case .externalModifiedOver1YearOutside: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_1_year_outside") + return .dictionary(d) + case .externalModifiedOver1YearPersonal: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_1_year_personal") + return .dictionary(d) + case .externalModifiedOver1YearPublic: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_1_year_public") + return .dictionary(d) + case .externalModifiedOver2Years: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_2_years") + return .dictionary(d) + case .externalModifiedOver2YearsCompany: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_2_years_company") + return .dictionary(d) + case .externalModifiedOver2YearsOutside: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_2_years_outside") + return .dictionary(d) + case .externalModifiedOver2YearsPersonal: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_2_years_personal") + return .dictionary(d) + case .externalModifiedOver2YearsPublic: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_2_years_public") + return .dictionary(d) + case .externalModifiedOver3Years: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_3_years") + return .dictionary(d) + case .externalModifiedOver3YearsCompany: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_3_years_company") + return .dictionary(d) + case .externalModifiedOver3YearsOutside: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_3_years_outside") + return .dictionary(d) + case .externalModifiedOver3YearsPersonal: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_3_years_personal") + return .dictionary(d) + case .externalModifiedOver3YearsPublic: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_3_years_public") + return .dictionary(d) + case .externalModifiedOver5Years: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_5_years") + return .dictionary(d) + case .externalModifiedOver5YearsCompany: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_5_years_company") + return .dictionary(d) + case .externalModifiedOver5YearsOutside: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_5_years_outside") + return .dictionary(d) + case .externalModifiedOver5YearsPersonal: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_5_years_personal") + return .dictionary(d) + case .externalModifiedOver5YearsPublic: + var d = [String: JSON]() + d[".tag"] = .str("external_modified_over_5_years_public") + return .dictionary(d) + case .foldersCompany: + var d = [String: JSON]() + d[".tag"] = .str("folders_company") + return .dictionary(d) + case .foldersInternal: + var d = [String: JSON]() + d[".tag"] = .str("folders_internal") + return .dictionary(d) + case .foldersOutside: + var d = [String: JSON]() + d[".tag"] = .str("folders_outside") + return .dictionary(d) + case .foldersPersonal: + var d = [String: JSON]() + d[".tag"] = .str("folders_personal") + return .dictionary(d) + case .foldersPublic: + var d = [String: JSON]() + d[".tag"] = .str("folders_public") + return .dictionary(d) + case .internalModifiedOver1Year: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_1_year") + return .dictionary(d) + case .internalModifiedOver1YearCompany: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_1_year_company") + return .dictionary(d) + case .internalModifiedOver1YearOutside: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_1_year_outside") + return .dictionary(d) + case .internalModifiedOver1YearPersonal: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_1_year_personal") + return .dictionary(d) + case .internalModifiedOver1YearPublic: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_1_year_public") + return .dictionary(d) + case .internalModifiedOver2Years: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_2_years") + return .dictionary(d) + case .internalModifiedOver2YearsCompany: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_2_years_company") + return .dictionary(d) + case .internalModifiedOver2YearsOutside: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_2_years_outside") + return .dictionary(d) + case .internalModifiedOver2YearsPersonal: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_2_years_personal") + return .dictionary(d) + case .internalModifiedOver2YearsPublic: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_2_years_public") + return .dictionary(d) + case .internalModifiedOver3Years: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_3_years") + return .dictionary(d) + case .internalModifiedOver3YearsCompany: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_3_years_company") + return .dictionary(d) + case .internalModifiedOver3YearsOutside: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_3_years_outside") + return .dictionary(d) + case .internalModifiedOver3YearsPersonal: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_3_years_personal") + return .dictionary(d) + case .internalModifiedOver3YearsPublic: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_3_years_public") + return .dictionary(d) + case .internalModifiedOver5Years: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_5_years") + return .dictionary(d) + case .internalModifiedOver5YearsCompany: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_5_years_company") + return .dictionary(d) + case .internalModifiedOver5YearsOutside: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_5_years_outside") + return .dictionary(d) + case .internalModifiedOver5YearsPersonal: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_5_years_personal") + return .dictionary(d) + case .internalModifiedOver5YearsPublic: + var d = [String: JSON]() + d[".tag"] = .str("internal_modified_over_5_years_public") + return .dictionary(d) + case .itemsAll: + var d = [String: JSON]() + d[".tag"] = .str("items_all") + return .dictionary(d) + case .itemsCompanyAccess: + var d = [String: JSON]() + d[".tag"] = .str("items_company_access") + return .dictionary(d) + case .itemsInternallyOwned: + var d = [String: JSON]() + d[".tag"] = .str("items_internally_owned") + return .dictionary(d) + case .itemsModifiedOver1Year: + var d = [String: JSON]() + d[".tag"] = .str("items_modified_over_1_year") + return .dictionary(d) + case .itemsModifiedOver3Years: + var d = [String: JSON]() + d[".tag"] = .str("items_modified_over_3_years") + return .dictionary(d) + case .itemsOutsideAccess: + var d = [String: JSON]() + d[".tag"] = .str("items_outside_access") + return .dictionary(d) + case .itemsPersonalAccess: + var d = [String: JSON]() + d[".tag"] = .str("items_personal_access") + return .dictionary(d) + case .itemsPublicLinks: + var d = [String: JSON]() + d[".tag"] = .str("items_public_links") + return .dictionary(d) + case .otherFolders: + var d = [String: JSON]() + d[".tag"] = .str("other_folders") + return .dictionary(d) + case .otherSharedDrives: + var d = [String: JSON]() + d[".tag"] = .str("other_shared_drives") + return .dictionary(d) + case .sharedDrivesInternal: + var d = [String: JSON]() + d[".tag"] = .str("shared_drives_internal") + return .dictionary(d) + case .sharedDrivesOutside: + var d = [String: JSON]() + d[".tag"] = .str("shared_drives_outside") + return .dictionary(d) + case .sharedDrivesPersonal: + var d = [String: JSON]() + d[".tag"] = .str("shared_drives_personal") + return .dictionary(d) + case .other: + var d = [String: JSON]() + d[".tag"] = .str("other") + return .dictionary(d) + } + } + public func deserialize(_ json: JSON) throws -> ProtectReportMetric { + switch json { + case .dictionary(let d): + let tag = try Serialization.getTag(d) + switch tag { + case "external_modified_over_1_year": + return ProtectReportMetric.externalModifiedOver1Year + case "external_modified_over_1_year_company": + return ProtectReportMetric.externalModifiedOver1YearCompany + case "external_modified_over_1_year_outside": + return ProtectReportMetric.externalModifiedOver1YearOutside + case "external_modified_over_1_year_personal": + return ProtectReportMetric.externalModifiedOver1YearPersonal + case "external_modified_over_1_year_public": + return ProtectReportMetric.externalModifiedOver1YearPublic + case "external_modified_over_2_years": + return ProtectReportMetric.externalModifiedOver2Years + case "external_modified_over_2_years_company": + return ProtectReportMetric.externalModifiedOver2YearsCompany + case "external_modified_over_2_years_outside": + return ProtectReportMetric.externalModifiedOver2YearsOutside + case "external_modified_over_2_years_personal": + return ProtectReportMetric.externalModifiedOver2YearsPersonal + case "external_modified_over_2_years_public": + return ProtectReportMetric.externalModifiedOver2YearsPublic + case "external_modified_over_3_years": + return ProtectReportMetric.externalModifiedOver3Years + case "external_modified_over_3_years_company": + return ProtectReportMetric.externalModifiedOver3YearsCompany + case "external_modified_over_3_years_outside": + return ProtectReportMetric.externalModifiedOver3YearsOutside + case "external_modified_over_3_years_personal": + return ProtectReportMetric.externalModifiedOver3YearsPersonal + case "external_modified_over_3_years_public": + return ProtectReportMetric.externalModifiedOver3YearsPublic + case "external_modified_over_5_years": + return ProtectReportMetric.externalModifiedOver5Years + case "external_modified_over_5_years_company": + return ProtectReportMetric.externalModifiedOver5YearsCompany + case "external_modified_over_5_years_outside": + return ProtectReportMetric.externalModifiedOver5YearsOutside + case "external_modified_over_5_years_personal": + return ProtectReportMetric.externalModifiedOver5YearsPersonal + case "external_modified_over_5_years_public": + return ProtectReportMetric.externalModifiedOver5YearsPublic + case "folders_company": + return ProtectReportMetric.foldersCompany + case "folders_internal": + return ProtectReportMetric.foldersInternal + case "folders_outside": + return ProtectReportMetric.foldersOutside + case "folders_personal": + return ProtectReportMetric.foldersPersonal + case "folders_public": + return ProtectReportMetric.foldersPublic + case "internal_modified_over_1_year": + return ProtectReportMetric.internalModifiedOver1Year + case "internal_modified_over_1_year_company": + return ProtectReportMetric.internalModifiedOver1YearCompany + case "internal_modified_over_1_year_outside": + return ProtectReportMetric.internalModifiedOver1YearOutside + case "internal_modified_over_1_year_personal": + return ProtectReportMetric.internalModifiedOver1YearPersonal + case "internal_modified_over_1_year_public": + return ProtectReportMetric.internalModifiedOver1YearPublic + case "internal_modified_over_2_years": + return ProtectReportMetric.internalModifiedOver2Years + case "internal_modified_over_2_years_company": + return ProtectReportMetric.internalModifiedOver2YearsCompany + case "internal_modified_over_2_years_outside": + return ProtectReportMetric.internalModifiedOver2YearsOutside + case "internal_modified_over_2_years_personal": + return ProtectReportMetric.internalModifiedOver2YearsPersonal + case "internal_modified_over_2_years_public": + return ProtectReportMetric.internalModifiedOver2YearsPublic + case "internal_modified_over_3_years": + return ProtectReportMetric.internalModifiedOver3Years + case "internal_modified_over_3_years_company": + return ProtectReportMetric.internalModifiedOver3YearsCompany + case "internal_modified_over_3_years_outside": + return ProtectReportMetric.internalModifiedOver3YearsOutside + case "internal_modified_over_3_years_personal": + return ProtectReportMetric.internalModifiedOver3YearsPersonal + case "internal_modified_over_3_years_public": + return ProtectReportMetric.internalModifiedOver3YearsPublic + case "internal_modified_over_5_years": + return ProtectReportMetric.internalModifiedOver5Years + case "internal_modified_over_5_years_company": + return ProtectReportMetric.internalModifiedOver5YearsCompany + case "internal_modified_over_5_years_outside": + return ProtectReportMetric.internalModifiedOver5YearsOutside + case "internal_modified_over_5_years_personal": + return ProtectReportMetric.internalModifiedOver5YearsPersonal + case "internal_modified_over_5_years_public": + return ProtectReportMetric.internalModifiedOver5YearsPublic + case "items_all": + return ProtectReportMetric.itemsAll + case "items_company_access": + return ProtectReportMetric.itemsCompanyAccess + case "items_internally_owned": + return ProtectReportMetric.itemsInternallyOwned + case "items_modified_over_1_year": + return ProtectReportMetric.itemsModifiedOver1Year + case "items_modified_over_3_years": + return ProtectReportMetric.itemsModifiedOver3Years + case "items_outside_access": + return ProtectReportMetric.itemsOutsideAccess + case "items_personal_access": + return ProtectReportMetric.itemsPersonalAccess + case "items_public_links": + return ProtectReportMetric.itemsPublicLinks + case "other_folders": + return ProtectReportMetric.otherFolders + case "other_shared_drives": + return ProtectReportMetric.otherSharedDrives + case "shared_drives_internal": + return ProtectReportMetric.sharedDrivesInternal + case "shared_drives_outside": + return ProtectReportMetric.sharedDrivesOutside + case "shared_drives_personal": + return ProtectReportMetric.sharedDrivesPersonal + case "other": + return ProtectReportMetric.other + default: + return ProtectReportMetric.other + } + default: + throw JSONSerializerError.deserializeError(type: ProtectReportMetric.self, json: json) + } + } + } + + /// The section that a Dropbox Protect report belongs to + public enum ProtectReportSection: CustomStringConvertible, JSONRepresentable { + /// An unspecified error. + case items + /// An unspecified error. + case overviewOther + /// An unspecified error. + case ownedExternally + /// An unspecified error. + case ownedInternally + /// An unspecified error. + case other + + func json() throws -> JSON { + try ProtectReportSectionSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectReportSectionSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectReportSection: \(error)" + } + } + } + public class ProtectReportSectionSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectReportSection) throws -> JSON { + switch value { + case .items: + var d = [String: JSON]() + d[".tag"] = .str("items") + return .dictionary(d) + case .overviewOther: + var d = [String: JSON]() + d[".tag"] = .str("overview_other") + return .dictionary(d) + case .ownedExternally: + var d = [String: JSON]() + d[".tag"] = .str("owned_externally") + return .dictionary(d) + case .ownedInternally: + var d = [String: JSON]() + d[".tag"] = .str("owned_internally") + return .dictionary(d) + case .other: + var d = [String: JSON]() + d[".tag"] = .str("other") + return .dictionary(d) + } + } + public func deserialize(_ json: JSON) throws -> ProtectReportSection { + switch json { + case .dictionary(let d): + let tag = try Serialization.getTag(d) + switch tag { + case "items": + return ProtectReportSection.items + case "overview_other": + return ProtectReportSection.overviewOther + case "owned_externally": + return ProtectReportSection.ownedExternally + case "owned_internally": + return ProtectReportSection.ownedInternally + case "other": + return ProtectReportSection.other + default: + return ProtectReportSection.other + } + default: + throw JSONSerializerError.deserializeError(type: ProtectReportSection.self, json: json) + } + } + } + + /// Viewed a Dropbox Protect report. + public class ProtectReportViewDetails: CustomStringConvertible, JSONRepresentable { + /// The category of the report that was viewed. + public let reportCategory: TeamLog.ProtectReportCategory + /// The section of the report that was viewed. + public let reportSection: TeamLog.ProtectReportSection? + /// The metric of the report that was viewed. + public let reportMetric: TeamLog.ProtectReportMetric? + public init(reportCategory: TeamLog.ProtectReportCategory, reportSection: TeamLog.ProtectReportSection? = nil, reportMetric: TeamLog.ProtectReportMetric? = nil) { + self.reportCategory = reportCategory + self.reportSection = reportSection + self.reportMetric = reportMetric + } + + func json() throws -> JSON { + try ProtectReportViewDetailsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectReportViewDetailsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectReportViewDetails: \(error)" + } + } + } + public class ProtectReportViewDetailsSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectReportViewDetails) throws -> JSON { + let output = [ + "report_category": try TeamLog.ProtectReportCategorySerializer().serialize(value.reportCategory), + "report_section": try NullableSerializer(TeamLog.ProtectReportSectionSerializer()).serialize(value.reportSection), + "report_metric": try NullableSerializer(TeamLog.ProtectReportMetricSerializer()).serialize(value.reportMetric), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectReportViewDetails { + switch json { + case .dictionary(let dict): + let reportCategory = try TeamLog.ProtectReportCategorySerializer().deserialize(dict["report_category"] ?? .null) + let reportSection = try NullableSerializer(TeamLog.ProtectReportSectionSerializer()).deserialize(dict["report_section"] ?? .null) + let reportMetric = try NullableSerializer(TeamLog.ProtectReportMetricSerializer()).deserialize(dict["report_metric"] ?? .null) + return ProtectReportViewDetails(reportCategory: reportCategory, reportSection: reportSection, reportMetric: reportMetric) + default: + throw JSONSerializerError.deserializeError(type: ProtectReportViewDetails.self, json: json) + } + } + } + + /// The ProtectReportViewType struct + public class ProtectReportViewType: CustomStringConvertible, JSONRepresentable { + /// (no description) + public let description_: String + public init(description_: String) { + stringValidator()(description_) + self.description_ = description_ + } + + func json() throws -> JSON { + try ProtectReportViewTypeSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try ProtectReportViewTypeSerializer().serialize(self)))" + } catch { + return "Failed to generate description for ProtectReportViewType: \(error)" + } + } + } + public class ProtectReportViewTypeSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: ProtectReportViewType) throws -> JSON { + let output = [ + "description": try Serialization._StringSerializer.serialize(value.description_), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> ProtectReportViewType { + switch json { + case .dictionary(let dict): + let description_ = try Serialization._StringSerializer.deserialize(dict["description"] ?? .null) + return ProtectReportViewType(description_: description_) + default: + throw JSONSerializerError.deserializeError(type: ProtectReportViewType.self, json: json) + } + } + } + /// Quick action type. public enum QuickActionType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. @@ -74459,6 +75890,188 @@ public class TeamLog { } } + /// Changed external sharing controls activation state. + public class TeamExternalSharingControlsActivationStateChangedDetails: CustomStringConvertible, JSONRepresentable { + /// Previous external sharing controls activation state. + public let previousActivationState: TeamLog.ExternalSharingControlsActivationState + /// New external sharing controls activation state. + public let newActivationState: TeamLog.ExternalSharingControlsActivationState + public init(previousActivationState: TeamLog.ExternalSharingControlsActivationState, newActivationState: TeamLog.ExternalSharingControlsActivationState) { + self.previousActivationState = previousActivationState + self.newActivationState = newActivationState + } + + func json() throws -> JSON { + try TeamExternalSharingControlsActivationStateChangedDetailsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try TeamExternalSharingControlsActivationStateChangedDetailsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for TeamExternalSharingControlsActivationStateChangedDetails: \(error)" + } + } + } + public class TeamExternalSharingControlsActivationStateChangedDetailsSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: TeamExternalSharingControlsActivationStateChangedDetails) throws -> JSON { + let output = [ + "previous_activation_state": try TeamLog.ExternalSharingControlsActivationStateSerializer().serialize(value.previousActivationState), + "new_activation_state": try TeamLog.ExternalSharingControlsActivationStateSerializer().serialize(value.newActivationState), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> TeamExternalSharingControlsActivationStateChangedDetails { + switch json { + case .dictionary(let dict): + let previousActivationState = try TeamLog.ExternalSharingControlsActivationStateSerializer().deserialize(dict["previous_activation_state"] ?? .null) + let newActivationState = try TeamLog.ExternalSharingControlsActivationStateSerializer().deserialize(dict["new_activation_state"] ?? .null) + return TeamExternalSharingControlsActivationStateChangedDetails(previousActivationState: previousActivationState, newActivationState: newActivationState) + default: + throw JSONSerializerError.deserializeError(type: TeamExternalSharingControlsActivationStateChangedDetails.self, json: json) + } + } + } + + /// The TeamExternalSharingControlsActivationStateChangedType struct + public class TeamExternalSharingControlsActivationStateChangedType: CustomStringConvertible, JSONRepresentable { + /// (no description) + public let description_: String + public init(description_: String) { + stringValidator()(description_) + self.description_ = description_ + } + + func json() throws -> JSON { + try TeamExternalSharingControlsActivationStateChangedTypeSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try TeamExternalSharingControlsActivationStateChangedTypeSerializer().serialize(self)))" + } catch { + return "Failed to generate description for TeamExternalSharingControlsActivationStateChangedType: \(error)" + } + } + } + public class TeamExternalSharingControlsActivationStateChangedTypeSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: TeamExternalSharingControlsActivationStateChangedType) throws -> JSON { + let output = [ + "description": try Serialization._StringSerializer.serialize(value.description_), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> TeamExternalSharingControlsActivationStateChangedType { + switch json { + case .dictionary(let dict): + let description_ = try Serialization._StringSerializer.deserialize(dict["description"] ?? .null) + return TeamExternalSharingControlsActivationStateChangedType(description_: description_) + default: + throw JSONSerializerError.deserializeError(type: TeamExternalSharingControlsActivationStateChangedType.self, json: json) + } + } + } + + /// Changed approved or blocked entries for external sharing controls. + public class TeamExternalSharingControlsRecipientListsChangedDetails: CustomStringConvertible, JSONRepresentable { + /// Added approved external sharing recipient entries. + public let addedApprovedEntries: Array? + /// Removed approved external sharing recipient entries. + public let removedApprovedEntries: Array? + /// Added blocked external sharing recipient entries. + public let addedBlockedEntries: Array? + /// Removed blocked external sharing recipient entries. + public let removedBlockedEntries: Array? + public init(addedApprovedEntries: Array? = nil, removedApprovedEntries: Array? = nil, addedBlockedEntries: Array? = nil, removedBlockedEntries: Array? = nil) { + nullableValidator(arrayValidator(minItems: 1, itemValidator: stringValidator()))(addedApprovedEntries) + self.addedApprovedEntries = addedApprovedEntries + nullableValidator(arrayValidator(minItems: 1, itemValidator: stringValidator()))(removedApprovedEntries) + self.removedApprovedEntries = removedApprovedEntries + nullableValidator(arrayValidator(minItems: 1, itemValidator: stringValidator()))(addedBlockedEntries) + self.addedBlockedEntries = addedBlockedEntries + nullableValidator(arrayValidator(minItems: 1, itemValidator: stringValidator()))(removedBlockedEntries) + self.removedBlockedEntries = removedBlockedEntries + } + + func json() throws -> JSON { + try TeamExternalSharingControlsRecipientListsChangedDetailsSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try TeamExternalSharingControlsRecipientListsChangedDetailsSerializer().serialize(self)))" + } catch { + return "Failed to generate description for TeamExternalSharingControlsRecipientListsChangedDetails: \(error)" + } + } + } + public class TeamExternalSharingControlsRecipientListsChangedDetailsSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: TeamExternalSharingControlsRecipientListsChangedDetails) throws -> JSON { + let output = [ + "added_approved_entries": try NullableSerializer(ArraySerializer(Serialization._StringSerializer)).serialize(value.addedApprovedEntries), + "removed_approved_entries": try NullableSerializer(ArraySerializer(Serialization._StringSerializer)).serialize(value.removedApprovedEntries), + "added_blocked_entries": try NullableSerializer(ArraySerializer(Serialization._StringSerializer)).serialize(value.addedBlockedEntries), + "removed_blocked_entries": try NullableSerializer(ArraySerializer(Serialization._StringSerializer)).serialize(value.removedBlockedEntries), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> TeamExternalSharingControlsRecipientListsChangedDetails { + switch json { + case .dictionary(let dict): + let addedApprovedEntries = try NullableSerializer(ArraySerializer(Serialization._StringSerializer)).deserialize(dict["added_approved_entries"] ?? .null) + let removedApprovedEntries = try NullableSerializer(ArraySerializer(Serialization._StringSerializer)).deserialize(dict["removed_approved_entries"] ?? .null) + let addedBlockedEntries = try NullableSerializer(ArraySerializer(Serialization._StringSerializer)).deserialize(dict["added_blocked_entries"] ?? .null) + let removedBlockedEntries = try NullableSerializer(ArraySerializer(Serialization._StringSerializer)).deserialize(dict["removed_blocked_entries"] ?? .null) + return TeamExternalSharingControlsRecipientListsChangedDetails(addedApprovedEntries: addedApprovedEntries, removedApprovedEntries: removedApprovedEntries, addedBlockedEntries: addedBlockedEntries, removedBlockedEntries: removedBlockedEntries) + default: + throw JSONSerializerError.deserializeError(type: TeamExternalSharingControlsRecipientListsChangedDetails.self, json: json) + } + } + } + + /// The TeamExternalSharingControlsRecipientListsChangedType struct + public class TeamExternalSharingControlsRecipientListsChangedType: CustomStringConvertible, JSONRepresentable { + /// (no description) + public let description_: String + public init(description_: String) { + stringValidator()(description_) + self.description_ = description_ + } + + func json() throws -> JSON { + try TeamExternalSharingControlsRecipientListsChangedTypeSerializer().serialize(self) + } + + public var description: String { + do { + return "\(SerializeUtil.prepareJSONForSerialization(try TeamExternalSharingControlsRecipientListsChangedTypeSerializer().serialize(self)))" + } catch { + return "Failed to generate description for TeamExternalSharingControlsRecipientListsChangedType: \(error)" + } + } + } + public class TeamExternalSharingControlsRecipientListsChangedTypeSerializer: JSONSerializer { + public init() { } + public func serialize(_ value: TeamExternalSharingControlsRecipientListsChangedType) throws -> JSON { + let output = [ + "description": try Serialization._StringSerializer.serialize(value.description_), + ] + return .dictionary(output) + } + public func deserialize(_ json: JSON) throws -> TeamExternalSharingControlsRecipientListsChangedType { + switch json { + case .dictionary(let dict): + let description_ = try Serialization._StringSerializer.deserialize(dict["description"] ?? .null) + return TeamExternalSharingControlsRecipientListsChangedType(description_: description_) + default: + throw JSONSerializerError.deserializeError(type: TeamExternalSharingControlsRecipientListsChangedType.self, json: json) + } + } + } + /// Changed archival status of team folder. public class TeamFolderChangeStatusDetails: CustomStringConvertible, JSONRepresentable { /// New team folder status. diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXFiles.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXFiles.swift index ea8741a6..c12cfb7c 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXFiles.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXFiles.swift @@ -6110,6 +6110,10 @@ public class DBXFilesRelocationError: NSObject { case .cantMoveIntoFamily(let swiftArg): let arg = DBXFilesMoveIntoFamilyError(swift: swiftArg) return DBXFilesRelocationErrorCantMoveIntoFamily(arg) + case .teamFolderInsufficientQuota: + return DBXFilesRelocationErrorTeamFolderInsufficientQuota() + case .memberFolderInsufficientQuota: + return DBXFilesRelocationErrorMemberFolderInsufficientQuota() case .other: return DBXFilesRelocationErrorOther() } @@ -6188,6 +6192,16 @@ public class DBXFilesRelocationError: NSObject { self as? DBXFilesRelocationErrorCantMoveIntoFamily } + @objc + public var asTeamFolderInsufficientQuota: DBXFilesRelocationErrorTeamFolderInsufficientQuota? { + self as? DBXFilesRelocationErrorTeamFolderInsufficientQuota + } + + @objc + public var asMemberFolderInsufficientQuota: DBXFilesRelocationErrorMemberFolderInsufficientQuota? { + self as? DBXFilesRelocationErrorMemberFolderInsufficientQuota + } + @objc public var asOther: DBXFilesRelocationErrorOther? { self as? DBXFilesRelocationErrorOther @@ -6356,6 +6370,26 @@ public class DBXFilesRelocationErrorCantMoveIntoFamily: DBXFilesRelocationError } } +/// The destination team folder has reached its storage limit. +@objc +public class DBXFilesRelocationErrorTeamFolderInsufficientQuota: DBXFilesRelocationError { + @objc + public init() { + let swift = Files.RelocationError.teamFolderInsufficientQuota + super.init(swift: swift) + } +} + +/// The user's member folder has reached its storage limit. +@objc +public class DBXFilesRelocationErrorMemberFolderInsufficientQuota: DBXFilesRelocationError { + @objc + public init() { + let swift = Files.RelocationError.memberFolderInsufficientQuota + super.init(swift: swift) + } +} + /// An unspecified error. @objc public class DBXFilesRelocationErrorOther: DBXFilesRelocationError { @@ -6410,6 +6444,10 @@ public class DBXFilesRelocationBatchError: NSObject { case .cantMoveIntoFamily(let swiftArg): let arg = DBXFilesMoveIntoFamilyError(swift: swiftArg) return DBXFilesRelocationBatchErrorCantMoveIntoFamily(arg) + case .teamFolderInsufficientQuota: + return DBXFilesRelocationBatchErrorTeamFolderInsufficientQuota() + case .memberFolderInsufficientQuota: + return DBXFilesRelocationBatchErrorMemberFolderInsufficientQuota() case .other: return DBXFilesRelocationBatchErrorOther() case .tooManyWriteOperations: @@ -6490,6 +6528,16 @@ public class DBXFilesRelocationBatchError: NSObject { self as? DBXFilesRelocationBatchErrorCantMoveIntoFamily } + @objc + public var asTeamFolderInsufficientQuota: DBXFilesRelocationBatchErrorTeamFolderInsufficientQuota? { + self as? DBXFilesRelocationBatchErrorTeamFolderInsufficientQuota + } + + @objc + public var asMemberFolderInsufficientQuota: DBXFilesRelocationBatchErrorMemberFolderInsufficientQuota? { + self as? DBXFilesRelocationBatchErrorMemberFolderInsufficientQuota + } + @objc public var asOther: DBXFilesRelocationBatchErrorOther? { self as? DBXFilesRelocationBatchErrorOther @@ -6663,6 +6711,26 @@ public class DBXFilesRelocationBatchErrorCantMoveIntoFamily: DBXFilesRelocationB } } +/// The destination team folder has reached its storage limit. +@objc +public class DBXFilesRelocationBatchErrorTeamFolderInsufficientQuota: DBXFilesRelocationBatchError { + @objc + public init() { + let swift = Files.RelocationBatchError.teamFolderInsufficientQuota + super.init(swift: swift) + } +} + +/// The user's member folder has reached its storage limit. +@objc +public class DBXFilesRelocationBatchErrorMemberFolderInsufficientQuota: DBXFilesRelocationBatchError { + @objc + public init() { + let swift = Files.RelocationBatchError.memberFolderInsufficientQuota + super.init(swift: swift) + } +} + /// An unspecified error. @objc public class DBXFilesRelocationBatchErrorOther: DBXFilesRelocationBatchError { @@ -11840,6 +11908,10 @@ public class DBXFilesWriteError: NSObject { return DBXFilesWriteErrorTooManyWriteOperations() case .accessRestricted: return DBXFilesWriteErrorAccessRestricted() + case .teamFolderInsufficientSpace: + return DBXFilesWriteErrorTeamFolderInsufficientSpace() + case .memberFolderInsufficientSpace: + return DBXFilesWriteErrorMemberFolderInsufficientSpace() case .other: return DBXFilesWriteErrorOther() } @@ -11893,6 +11965,16 @@ public class DBXFilesWriteError: NSObject { self as? DBXFilesWriteErrorAccessRestricted } + @objc + public var asTeamFolderInsufficientSpace: DBXFilesWriteErrorTeamFolderInsufficientSpace? { + self as? DBXFilesWriteErrorTeamFolderInsufficientSpace + } + + @objc + public var asMemberFolderInsufficientSpace: DBXFilesWriteErrorMemberFolderInsufficientSpace? { + self as? DBXFilesWriteErrorMemberFolderInsufficientSpace + } + @objc public var asOther: DBXFilesWriteErrorOther? { self as? DBXFilesWriteErrorOther @@ -11999,6 +12081,26 @@ public class DBXFilesWriteErrorAccessRestricted: DBXFilesWriteError { } } +/// The destination team folder has reached its storage limit. +@objc +public class DBXFilesWriteErrorTeamFolderInsufficientSpace: DBXFilesWriteError { + @objc + public init() { + let swift = Files.WriteError.teamFolderInsufficientSpace + super.init(swift: swift) + } +} + +/// The user's member folder has reached its storage limit. +@objc +public class DBXFilesWriteErrorMemberFolderInsufficientSpace: DBXFilesWriteError { + @objc + public init() { + let swift = Files.WriteError.memberFolderInsufficientSpace + super.init(swift: swift) + } +} + /// An unspecified error. @objc public class DBXFilesWriteErrorOther: DBXFilesWriteError { diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXFilesRoutes.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXFilesRoutes.swift index 9228107c..ed6f8d51 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXFilesRoutes.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXFilesRoutes.swift @@ -596,16 +596,15 @@ public class DBXFilesRoutes: NSObject { /// maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to /// be generated. Multiple links may exist for a specific upload path at any given time. The POST request on /// the temporary upload link must have its Content-Type set to "application/octet-stream". Example temporary - /// upload link consumption request: curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND - /// --header "Content-Type: application/octet-stream" --data-binary @local_file.txt A successful temporary - /// upload link consumption request returns the content hash of the uploaded data in JSON format. Example - /// successful temporary upload link consumption response: {"content-hash": - /// "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary upload link consumption request returns - /// any of the following status codes: HTTP 400 Bad Request: Content-Type is not one of - /// application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The temporary upload link - /// does not exist or is currently unavailable, the upload failed, or another error happened. HTTP 410 Gone: The - /// temporary upload link is expired or consumed. Example unsuccessful temporary upload link consumption - /// response: Temporary upload link has been recently consumed. + /// upload link consumption request: curl -X POST --header "Content-Type: + /// application/octet-stream" --data-binary @local_file.txt A successful temporary upload link consumption + /// request returns the content hash of the uploaded data in JSON format. Example successful temporary upload + /// link consumption response: {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful + /// temporary upload link consumption request returns any of the following status codes: HTTP 400 Bad Request: + /// Content-Type is not one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: + /// The temporary upload link does not exist or is currently unavailable, the upload failed, or another error + /// happened. HTTP 410 Gone: The temporary upload link is expired or consumed. Example unsuccessful temporary + /// upload link consumption response: Temporary upload link has been recently consumed. /// /// - scope: files.content.write /// @@ -631,16 +630,15 @@ public class DBXFilesRoutes: NSObject { /// maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to /// be generated. Multiple links may exist for a specific upload path at any given time. The POST request on /// the temporary upload link must have its Content-Type set to "application/octet-stream". Example temporary - /// upload link consumption request: curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND - /// --header "Content-Type: application/octet-stream" --data-binary @local_file.txt A successful temporary - /// upload link consumption request returns the content hash of the uploaded data in JSON format. Example - /// successful temporary upload link consumption response: {"content-hash": - /// "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary upload link consumption request returns - /// any of the following status codes: HTTP 400 Bad Request: Content-Type is not one of - /// application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The temporary upload link - /// does not exist or is currently unavailable, the upload failed, or another error happened. HTTP 410 Gone: The - /// temporary upload link is expired or consumed. Example unsuccessful temporary upload link consumption - /// response: Temporary upload link has been recently consumed. + /// upload link consumption request: curl -X POST --header "Content-Type: + /// application/octet-stream" --data-binary @local_file.txt A successful temporary upload link consumption + /// request returns the content hash of the uploaded data in JSON format. Example successful temporary upload + /// link consumption response: {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful + /// temporary upload link consumption request returns any of the following status codes: HTTP 400 Bad Request: + /// Content-Type is not one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: + /// The temporary upload link does not exist or is currently unavailable, the upload failed, or another error + /// happened. HTTP 410 Gone: The temporary upload link is expired or consumed. Example unsuccessful temporary + /// upload link consumption response: Temporary upload link has been recently consumed. /// /// - scope: files.content.write /// diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXRiviera.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXRiviera.swift index ec275b1f..f7e1b79c 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXRiviera.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXRiviera.swift @@ -1067,6 +1067,314 @@ public class DBXRivieraGetMetadataResult: NSObject { public override var description: String { swift.description } } +/// Arguments for the asynchronous `get_ocr_async` route. Exactly one of `file_id`, `path`, or `url` must be +/// supplied via `file_id_or_url` to identify the image or PDF whose text should be extracted via OCR (optical +/// character recognition). +@objc +public class DBXRivieraGetOcrArgs: NSObject { + /// Identifier of the file to run OCR on. Callers must set exactly one of the `FileIdOrUrl` variants. OCR is + /// supported for image files and PDFs, including scanned / non-text PDFs; see the route description for the + /// supported formats. Requests against unsupported formats return `unsupported_format_error`. NOTE: for the + /// `url` variant, only Dropbox shared links (www.dropbox.com) are supported. External (non-Dropbox) URLs + /// are not supported and return `unsupported_format_error`; import the file into Dropbox and reference it + /// by `file_id` or `path` instead. + @objc + public var fileIdOrUrl: DBXRivieraFileIdOrUrl? { guard let swift = swift.fileIdOrUrl else { return nil } + return DBXRivieraFileIdOrUrl(swift: swift) + } + + @objc + public init(fileIdOrUrl: DBXRivieraFileIdOrUrl?) { + self.swift = Riviera.GetOcrArgs(fileIdOrUrl: fileIdOrUrl?.swift) + } + + let swift: Riviera.GetOcrArgs + + public init(swift: Riviera.GetOcrArgs) { + self.swift = swift + } + + @objc + public override var description: String { swift.description } +} + +/// Result type for EventBus async check - must end in "CheckResult" +@objc +public class DBXRivieraGetOcrAsyncCheckResult: NSObject { + let swift: Riviera.GetOcrAsyncCheckResult + + public init(swift: Riviera.GetOcrAsyncCheckResult) { + self.swift = swift + } + + public static func factory(swift: Riviera.GetOcrAsyncCheckResult) -> DBXRivieraGetOcrAsyncCheckResult { + switch swift { + case .inProgress: + return DBXRivieraGetOcrAsyncCheckResultInProgress() + case .complete(let swiftArg): + let arg = DBXRivieraGetOcrResult(swift: swiftArg) + return DBXRivieraGetOcrAsyncCheckResultComplete(arg) + case .failed(let swiftArg): + let arg = DBXRivieraOcrExtractionApiV2Error(swift: swiftArg) + return DBXRivieraGetOcrAsyncCheckResultFailed(arg) + case .other: + return DBXRivieraGetOcrAsyncCheckResultOther() + } + } + + @objc + public override var description: String { swift.description } + + @objc + public var asInProgress: DBXRivieraGetOcrAsyncCheckResultInProgress? { + self as? DBXRivieraGetOcrAsyncCheckResultInProgress + } + + @objc + public var asComplete: DBXRivieraGetOcrAsyncCheckResultComplete? { + self as? DBXRivieraGetOcrAsyncCheckResultComplete + } + + @objc + public var asFailed: DBXRivieraGetOcrAsyncCheckResultFailed? { + self as? DBXRivieraGetOcrAsyncCheckResultFailed + } + + @objc + public var asOther: DBXRivieraGetOcrAsyncCheckResultOther? { + self as? DBXRivieraGetOcrAsyncCheckResultOther + } +} + +/// An unspecified error. +@objc +public class DBXRivieraGetOcrAsyncCheckResultInProgress: DBXRivieraGetOcrAsyncCheckResult { + @objc + public init() { + let swift = Riviera.GetOcrAsyncCheckResult.inProgress + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraGetOcrAsyncCheckResultComplete: DBXRivieraGetOcrAsyncCheckResult { + @objc + public var complete: DBXRivieraGetOcrResult + + @objc + public init(_ arg: DBXRivieraGetOcrResult) { + self.complete = arg + let swift = Riviera.GetOcrAsyncCheckResult.complete(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraGetOcrAsyncCheckResultFailed: DBXRivieraGetOcrAsyncCheckResult { + @objc + public var failed: DBXRivieraOcrExtractionApiV2Error + + @objc + public init(_ arg: DBXRivieraOcrExtractionApiV2Error) { + self.failed = arg + let swift = Riviera.GetOcrAsyncCheckResult.failed(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraGetOcrAsyncCheckResultOther: DBXRivieraGetOcrAsyncCheckResult { + @objc + public init() { + let swift = Riviera.GetOcrAsyncCheckResult.other + super.init(swift: swift) + } +} + +/// Objective-C compatible GetOcrResult struct +@objc +public class DBXRivieraGetOcrResult: NSObject { + /// The plain-text content extracted from the file via OCR. Words within a line are separated by a single space, + /// lines are newline-separated in reading order, and for multi-page PDFs pages are separated by a blank + /// line in page order. May be empty when no text is detected in the source. + @objc + public var text: String { swift.text } + /// The same content as hOCR: HTML that carries the position of every recognized word. Each page is a + /// `
` holding `

` elements with one `` per word, and each element carries + /// `data-x`, `data-y`, `data-width`, and `data-height` attributes in pixels relative to the upright page + /// (whose dimensions are on the `

`). Use this when you need word coordinates -- to highlight + /// matches over a page image, for example; use `text` when you just need the words. + @objc + public var hocr: String { swift.hocr } + + @objc + public init(text: String, hocr: String) { + self.swift = Riviera.GetOcrResult(text: text, hocr: hocr) + } + + let swift: Riviera.GetOcrResult + + public init(swift: Riviera.GetOcrResult) { + self.swift = swift + } + + @objc + public override var description: String { swift.description } +} + +/// Arguments for the asynchronous `get_text_async` route. Exactly one of `file_id`, `path`, or `url` must be +/// supplied via `file_id_or_url` to identify the document whose plain-text content should be extracted. +@objc +public class DBXRivieraGetTextArgs: NSObject { + /// Identifier of the document to extract text from. Callers must set exactly one of the `FileIdOrUrl` variants. + /// Text extraction is supported for common document formats (Word, PowerPoint, Excel, PDF, RTF, and Dropbox + /// document types); see the route description for the supported formats. Requests against unsupported + /// formats return `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared links + /// (www.dropbox.com) are supported. External (non-Dropbox) URLs are not supported and return + /// `unsupported_format_error`; import the file into Dropbox and reference it by `file_id` or `path` + /// instead. + @objc + public var fileIdOrUrl: DBXRivieraFileIdOrUrl? { guard let swift = swift.fileIdOrUrl else { return nil } + return DBXRivieraFileIdOrUrl(swift: swift) + } + + @objc + public init(fileIdOrUrl: DBXRivieraFileIdOrUrl?) { + self.swift = Riviera.GetTextArgs(fileIdOrUrl: fileIdOrUrl?.swift) + } + + let swift: Riviera.GetTextArgs + + public init(swift: Riviera.GetTextArgs) { + self.swift = swift + } + + @objc + public override var description: String { swift.description } +} + +/// Result type for EventBus async check - must end in "CheckResult" +@objc +public class DBXRivieraGetTextAsyncCheckResult: NSObject { + let swift: Riviera.GetTextAsyncCheckResult + + public init(swift: Riviera.GetTextAsyncCheckResult) { + self.swift = swift + } + + public static func factory(swift: Riviera.GetTextAsyncCheckResult) -> DBXRivieraGetTextAsyncCheckResult { + switch swift { + case .inProgress: + return DBXRivieraGetTextAsyncCheckResultInProgress() + case .complete(let swiftArg): + let arg = DBXRivieraGetTextResult(swift: swiftArg) + return DBXRivieraGetTextAsyncCheckResultComplete(arg) + case .failed(let swiftArg): + let arg = DBXRivieraTextExtractionApiV2Error(swift: swiftArg) + return DBXRivieraGetTextAsyncCheckResultFailed(arg) + case .other: + return DBXRivieraGetTextAsyncCheckResultOther() + } + } + + @objc + public override var description: String { swift.description } + + @objc + public var asInProgress: DBXRivieraGetTextAsyncCheckResultInProgress? { + self as? DBXRivieraGetTextAsyncCheckResultInProgress + } + + @objc + public var asComplete: DBXRivieraGetTextAsyncCheckResultComplete? { + self as? DBXRivieraGetTextAsyncCheckResultComplete + } + + @objc + public var asFailed: DBXRivieraGetTextAsyncCheckResultFailed? { + self as? DBXRivieraGetTextAsyncCheckResultFailed + } + + @objc + public var asOther: DBXRivieraGetTextAsyncCheckResultOther? { + self as? DBXRivieraGetTextAsyncCheckResultOther + } +} + +/// An unspecified error. +@objc +public class DBXRivieraGetTextAsyncCheckResultInProgress: DBXRivieraGetTextAsyncCheckResult { + @objc + public init() { + let swift = Riviera.GetTextAsyncCheckResult.inProgress + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraGetTextAsyncCheckResultComplete: DBXRivieraGetTextAsyncCheckResult { + @objc + public var complete: DBXRivieraGetTextResult + + @objc + public init(_ arg: DBXRivieraGetTextResult) { + self.complete = arg + let swift = Riviera.GetTextAsyncCheckResult.complete(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraGetTextAsyncCheckResultFailed: DBXRivieraGetTextAsyncCheckResult { + @objc + public var failed: DBXRivieraTextExtractionApiV2Error + + @objc + public init(_ arg: DBXRivieraTextExtractionApiV2Error) { + self.failed = arg + let swift = Riviera.GetTextAsyncCheckResult.failed(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraGetTextAsyncCheckResultOther: DBXRivieraGetTextAsyncCheckResult { + @objc + public init() { + let swift = Riviera.GetTextAsyncCheckResult.other + super.init(swift: swift) + } +} + +/// Objective-C compatible GetTextResult struct +@objc +public class DBXRivieraGetTextResult: NSObject { + /// The plain-text content extracted from the document. For multi-page documents the text is concatenated in + /// document order. May be empty when no text is detected in the source. + @objc + public var text: String { swift.text } + + @objc + public init(text: String) { + self.swift = Riviera.GetTextResult(text: text) + } + + let swift: Riviera.GetTextResult + + public init(swift: Riviera.GetTextResult) { + self.swift = swift + } + + @objc + public override var description: String { swift.description } +} + /// Arguments for the asynchronous `get_transcript_async` route. Exactly one of `file_id`, `path`, or `url` must be /// supplied via `file_id_or_url` to identify the audio or video asset to transcribe. @objc @@ -1782,6 +2090,208 @@ public class DBXRivieraMetadataTypeOther: DBXRivieraMetadataType { } } +/// Reason an OCR extraction job failed. Returned in the `failed` variant of `GetOcrAsyncCheckResult`. This is a +/// semantic error union: the HTTP status of the poll request itself is unaffected (a poll that surfaces a failed +/// job is still a normal successful poll response). Callers should branch on the variant. +@objc +public class DBXRivieraOcrExtractionApiV2Error: NSObject { + let swift: Riviera.OcrExtractionApiV2Error + + public init(swift: Riviera.OcrExtractionApiV2Error) { + self.swift = swift + } + + public static func factory(swift: Riviera.OcrExtractionApiV2Error) -> DBXRivieraOcrExtractionApiV2Error { + switch swift { + case .serverError(let swiftArg): + let arg = swiftArg + return DBXRivieraOcrExtractionApiV2ErrorServerError(arg) + case .userError(let swiftArg): + let arg = swiftArg + return DBXRivieraOcrExtractionApiV2ErrorUserError(arg) + case .unsupportedFormatError: + return DBXRivieraOcrExtractionApiV2ErrorUnsupportedFormatError() + case .linkDownloadDisabledError: + return DBXRivieraOcrExtractionApiV2ErrorLinkDownloadDisabledError() + case .sharedLinkPasswordProtected: + return DBXRivieraOcrExtractionApiV2ErrorSharedLinkPasswordProtected() + case .limitExceededError: + return DBXRivieraOcrExtractionApiV2ErrorLimitExceededError() + case .conversionFailureError: + return DBXRivieraOcrExtractionApiV2ErrorConversionFailureError() + case .notFoundError: + return DBXRivieraOcrExtractionApiV2ErrorNotFoundError() + case .isAFolderError: + return DBXRivieraOcrExtractionApiV2ErrorIsAFolderError() + case .other: + return DBXRivieraOcrExtractionApiV2ErrorOther() + } + } + + @objc + public override var description: String { swift.description } + + @objc + public var asServerError: DBXRivieraOcrExtractionApiV2ErrorServerError? { + self as? DBXRivieraOcrExtractionApiV2ErrorServerError + } + + @objc + public var asUserError: DBXRivieraOcrExtractionApiV2ErrorUserError? { + self as? DBXRivieraOcrExtractionApiV2ErrorUserError + } + + @objc + public var asUnsupportedFormatError: DBXRivieraOcrExtractionApiV2ErrorUnsupportedFormatError? { + self as? DBXRivieraOcrExtractionApiV2ErrorUnsupportedFormatError + } + + @objc + public var asLinkDownloadDisabledError: DBXRivieraOcrExtractionApiV2ErrorLinkDownloadDisabledError? { + self as? DBXRivieraOcrExtractionApiV2ErrorLinkDownloadDisabledError + } + + @objc + public var asSharedLinkPasswordProtected: DBXRivieraOcrExtractionApiV2ErrorSharedLinkPasswordProtected? { + self as? DBXRivieraOcrExtractionApiV2ErrorSharedLinkPasswordProtected + } + + @objc + public var asLimitExceededError: DBXRivieraOcrExtractionApiV2ErrorLimitExceededError? { + self as? DBXRivieraOcrExtractionApiV2ErrorLimitExceededError + } + + @objc + public var asConversionFailureError: DBXRivieraOcrExtractionApiV2ErrorConversionFailureError? { + self as? DBXRivieraOcrExtractionApiV2ErrorConversionFailureError + } + + @objc + public var asNotFoundError: DBXRivieraOcrExtractionApiV2ErrorNotFoundError? { + self as? DBXRivieraOcrExtractionApiV2ErrorNotFoundError + } + + @objc + public var asIsAFolderError: DBXRivieraOcrExtractionApiV2ErrorIsAFolderError? { + self as? DBXRivieraOcrExtractionApiV2ErrorIsAFolderError + } + + @objc + public var asOther: DBXRivieraOcrExtractionApiV2ErrorOther? { + self as? DBXRivieraOcrExtractionApiV2ErrorOther + } +} + +/// An unexpected, typically transient, server-side failure. The string is a human-readable message; retrying +/// with backoff may succeed. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorServerError: DBXRivieraOcrExtractionApiV2Error { + @objc + public var serverError: String + + @objc + public init(_ arg: String) { + self.serverError = arg + let swift = Riviera.OcrExtractionApiV2Error.serverError(arg) + super.init(swift: swift) + } +} + +/// The request could not be processed as supplied (a problem with the caller's input). The string is a +/// human-readable message; retrying the same request will not help. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorUserError: DBXRivieraOcrExtractionApiV2Error { + @objc + public var userError: String + + @objc + public init(_ arg: String) { + self.userError = arg + let swift = Riviera.OcrExtractionApiV2Error.userError(arg) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorUnsupportedFormatError: DBXRivieraOcrExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.OcrExtractionApiV2Error.unsupportedFormatError + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorLinkDownloadDisabledError: DBXRivieraOcrExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.OcrExtractionApiV2Error.linkDownloadDisabledError + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorSharedLinkPasswordProtected: DBXRivieraOcrExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.OcrExtractionApiV2Error.sharedLinkPasswordProtected + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorLimitExceededError: DBXRivieraOcrExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.OcrExtractionApiV2Error.limitExceededError + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorConversionFailureError: DBXRivieraOcrExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.OcrExtractionApiV2Error.conversionFailureError + super.init(swift: swift) + } +} + +/// The referenced file does not exist or is not accessible. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorNotFoundError: DBXRivieraOcrExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.OcrExtractionApiV2Error.notFoundError + super.init(swift: swift) + } +} + +/// The target is a folder, not a file. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorIsAFolderError: DBXRivieraOcrExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.OcrExtractionApiV2Error.isAFolderError + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraOcrExtractionApiV2ErrorOther: DBXRivieraOcrExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.OcrExtractionApiV2Error.other + super.init(swift: swift) + } +} + /// The kind of MS Office document that produced an `ApiOfficeMetadata` result. @objc public class DBXRivieraOfficeFileType: NSObject { @@ -1885,6 +2395,208 @@ public class DBXRivieraOfficeFileTypeOther: DBXRivieraOfficeFileType { } } +/// Reason a text extraction job failed. Returned in the `failed` variant of `GetTextAsyncCheckResult`. This is a +/// semantic error union: the HTTP status of the poll request itself is unaffected (a poll that surfaces a failed +/// job is still a normal successful poll response). Callers should branch on the variant. +@objc +public class DBXRivieraTextExtractionApiV2Error: NSObject { + let swift: Riviera.TextExtractionApiV2Error + + public init(swift: Riviera.TextExtractionApiV2Error) { + self.swift = swift + } + + public static func factory(swift: Riviera.TextExtractionApiV2Error) -> DBXRivieraTextExtractionApiV2Error { + switch swift { + case .serverError(let swiftArg): + let arg = swiftArg + return DBXRivieraTextExtractionApiV2ErrorServerError(arg) + case .userError(let swiftArg): + let arg = swiftArg + return DBXRivieraTextExtractionApiV2ErrorUserError(arg) + case .unsupportedFormatError: + return DBXRivieraTextExtractionApiV2ErrorUnsupportedFormatError() + case .linkDownloadDisabledError: + return DBXRivieraTextExtractionApiV2ErrorLinkDownloadDisabledError() + case .sharedLinkPasswordProtected: + return DBXRivieraTextExtractionApiV2ErrorSharedLinkPasswordProtected() + case .limitExceededError: + return DBXRivieraTextExtractionApiV2ErrorLimitExceededError() + case .conversionFailureError: + return DBXRivieraTextExtractionApiV2ErrorConversionFailureError() + case .notFoundError: + return DBXRivieraTextExtractionApiV2ErrorNotFoundError() + case .isAFolderError: + return DBXRivieraTextExtractionApiV2ErrorIsAFolderError() + case .other: + return DBXRivieraTextExtractionApiV2ErrorOther() + } + } + + @objc + public override var description: String { swift.description } + + @objc + public var asServerError: DBXRivieraTextExtractionApiV2ErrorServerError? { + self as? DBXRivieraTextExtractionApiV2ErrorServerError + } + + @objc + public var asUserError: DBXRivieraTextExtractionApiV2ErrorUserError? { + self as? DBXRivieraTextExtractionApiV2ErrorUserError + } + + @objc + public var asUnsupportedFormatError: DBXRivieraTextExtractionApiV2ErrorUnsupportedFormatError? { + self as? DBXRivieraTextExtractionApiV2ErrorUnsupportedFormatError + } + + @objc + public var asLinkDownloadDisabledError: DBXRivieraTextExtractionApiV2ErrorLinkDownloadDisabledError? { + self as? DBXRivieraTextExtractionApiV2ErrorLinkDownloadDisabledError + } + + @objc + public var asSharedLinkPasswordProtected: DBXRivieraTextExtractionApiV2ErrorSharedLinkPasswordProtected? { + self as? DBXRivieraTextExtractionApiV2ErrorSharedLinkPasswordProtected + } + + @objc + public var asLimitExceededError: DBXRivieraTextExtractionApiV2ErrorLimitExceededError? { + self as? DBXRivieraTextExtractionApiV2ErrorLimitExceededError + } + + @objc + public var asConversionFailureError: DBXRivieraTextExtractionApiV2ErrorConversionFailureError? { + self as? DBXRivieraTextExtractionApiV2ErrorConversionFailureError + } + + @objc + public var asNotFoundError: DBXRivieraTextExtractionApiV2ErrorNotFoundError? { + self as? DBXRivieraTextExtractionApiV2ErrorNotFoundError + } + + @objc + public var asIsAFolderError: DBXRivieraTextExtractionApiV2ErrorIsAFolderError? { + self as? DBXRivieraTextExtractionApiV2ErrorIsAFolderError + } + + @objc + public var asOther: DBXRivieraTextExtractionApiV2ErrorOther? { + self as? DBXRivieraTextExtractionApiV2ErrorOther + } +} + +/// An unexpected, typically transient, server-side failure. The string is a human-readable message; retrying +/// with backoff may succeed. +@objc +public class DBXRivieraTextExtractionApiV2ErrorServerError: DBXRivieraTextExtractionApiV2Error { + @objc + public var serverError: String + + @objc + public init(_ arg: String) { + self.serverError = arg + let swift = Riviera.TextExtractionApiV2Error.serverError(arg) + super.init(swift: swift) + } +} + +/// The request could not be processed as supplied (a problem with the caller's input). The string is a +/// human-readable message; retrying the same request will not help. +@objc +public class DBXRivieraTextExtractionApiV2ErrorUserError: DBXRivieraTextExtractionApiV2Error { + @objc + public var userError: String + + @objc + public init(_ arg: String) { + self.userError = arg + let swift = Riviera.TextExtractionApiV2Error.userError(arg) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraTextExtractionApiV2ErrorUnsupportedFormatError: DBXRivieraTextExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.TextExtractionApiV2Error.unsupportedFormatError + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraTextExtractionApiV2ErrorLinkDownloadDisabledError: DBXRivieraTextExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.TextExtractionApiV2Error.linkDownloadDisabledError + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraTextExtractionApiV2ErrorSharedLinkPasswordProtected: DBXRivieraTextExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.TextExtractionApiV2Error.sharedLinkPasswordProtected + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraTextExtractionApiV2ErrorLimitExceededError: DBXRivieraTextExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.TextExtractionApiV2Error.limitExceededError + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraTextExtractionApiV2ErrorConversionFailureError: DBXRivieraTextExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.TextExtractionApiV2Error.conversionFailureError + super.init(swift: swift) + } +} + +/// The referenced file does not exist or is not accessible. +@objc +public class DBXRivieraTextExtractionApiV2ErrorNotFoundError: DBXRivieraTextExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.TextExtractionApiV2Error.notFoundError + super.init(swift: swift) + } +} + +/// The target is a folder, not a file. +@objc +public class DBXRivieraTextExtractionApiV2ErrorIsAFolderError: DBXRivieraTextExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.TextExtractionApiV2Error.isAFolderError + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXRivieraTextExtractionApiV2ErrorOther: DBXRivieraTextExtractionApiV2Error { + @objc + public init() { + let swift = Riviera.TextExtractionApiV2Error.other + super.init(swift: swift) + } +} + /// Objective-C compatible TimestampLevel union @objc public class DBXRivieraTimestampLevel: NSObject { diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXRivieraAppAuthRoutes.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXRivieraAppAuthRoutes.swift index d2c78481..f87ac9fb 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXRivieraAppAuthRoutes.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXRivieraAppAuthRoutes.swift @@ -128,6 +128,118 @@ public class DBXRivieraAppAuthRoutes: NSObject { return DBXRivieraGetMetadataAsyncCheckRpcRequest(swift: swift) } + /// Asynchronous OCR (optical character recognition) text extraction for images and PDFs, including scanned / + /// non-text PDFs. Supported formats: - Image formats: .bmp, .gif, .heic, .jpeg, .jpg, .png, .tif, .tiff, .webp. + /// - PDF format: .pdf. Unsupported formats return an `unsupported_format_error`. For the `url` variant only + /// Dropbox shared links are supported; external URLs return `unsupported_format_error`. Text-based PDFs already + /// carry a text layer, so OCR is not run against them and the result is empty; use `get_text_async` to read the + /// embedded text layer of such a PDF. The result carries the extracted words as plain text, plus the same + /// content as hOCR with per-word coordinates. + /// + /// - scope: files.content.read + /// + /// - parameter fileIdOrUrl: Identifier of the file to run OCR on. Callers must set exactly one of the `FileIdOrUrl` + /// variants. OCR is supported for image files and PDFs, including scanned / non-text PDFs; see the route + /// description for the supported formats. Requests against unsupported formats return + /// `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared links (www.dropbox.com) are + /// supported. External (non-Dropbox) URLs are not supported and return `unsupported_format_error`; import the + /// file into Dropbox and reference it by `file_id` or `path` instead. + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @objc + @discardableResult public func getOcrAsync(fileIdOrUrl: DBXRivieraFileIdOrUrl?) -> DBXRivieraGetOcrAsyncRpcRequest { + let swift = swift.getOcrAsync(fileIdOrUrl: fileIdOrUrl?.swift) + return DBXRivieraGetOcrAsyncRpcRequest(swift: swift) + } + + /// Asynchronous OCR (optical character recognition) text extraction for images and PDFs, including scanned / + /// non-text PDFs. Supported formats: - Image formats: .bmp, .gif, .heic, .jpeg, .jpg, .png, .tif, .tiff, .webp. + /// - PDF format: .pdf. Unsupported formats return an `unsupported_format_error`. For the `url` variant only + /// Dropbox shared links are supported; external URLs return `unsupported_format_error`. Text-based PDFs already + /// carry a text layer, so OCR is not run against them and the result is empty; use `get_text_async` to read the + /// embedded text layer of such a PDF. The result carries the extracted words as plain text, plus the same + /// content as hOCR with per-word coordinates. + /// + /// - scope: files.content.read + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @objc + @discardableResult public func getOcrAsync() -> DBXRivieraGetOcrAsyncRpcRequest { + let swift = swift.getOcrAsync() + return DBXRivieraGetOcrAsyncRpcRequest(swift: swift) + } + + /// Returns the status or result of specified get_ocr_async task. + /// + /// - scope: files.content.read + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Riviera.GetOcrAsyncCheckResult` object on + /// success or a `Async.PollError` object on failure. + @objc + @discardableResult public func getOcrAsyncCheck(asyncJobId: String) -> DBXRivieraGetOcrAsyncCheckRpcRequest { + let swift = swift.getOcrAsyncCheck(asyncJobId: asyncJobId) + return DBXRivieraGetOcrAsyncCheckRpcRequest(swift: swift) + } + + /// Asynchronous plain-text extraction from documents. Supported formats include: - Word processing: .doc, .docx, + /// .docm, .rtf. - Presentations: .ppt, .pptx, .pptm. - Spreadsheets: .xls, .xlsx, .xlsm. - PDF: .pdf. - Dropbox + /// document types: .paper, .papert, .binder, .gdoc, .gsheet, .gslides. - Plain text / subtitles: .txt, .vtt. + /// Unsupported formats return an `unsupported_format_error`. For the `url` variant only Dropbox shared links + /// are supported; external URLs return `unsupported_format_error`. + /// + /// - scope: files.content.read + /// + /// - parameter fileIdOrUrl: Identifier of the document to extract text from. Callers must set exactly one of the + /// `FileIdOrUrl` variants. Text extraction is supported for common document formats (Word, PowerPoint, Excel, + /// PDF, RTF, and Dropbox document types); see the route description for the supported formats. Requests against + /// unsupported formats return `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared + /// links (www.dropbox.com) are supported. External (non-Dropbox) URLs are not supported and return + /// `unsupported_format_error`; import the file into Dropbox and reference it by `file_id` or `path` instead. + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @objc + @discardableResult public func getTextAsync(fileIdOrUrl: DBXRivieraFileIdOrUrl?) -> DBXRivieraGetTextAsyncRpcRequest { + let swift = swift.getTextAsync(fileIdOrUrl: fileIdOrUrl?.swift) + return DBXRivieraGetTextAsyncRpcRequest(swift: swift) + } + + /// Asynchronous plain-text extraction from documents. Supported formats include: - Word processing: .doc, .docx, + /// .docm, .rtf. - Presentations: .ppt, .pptx, .pptm. - Spreadsheets: .xls, .xlsx, .xlsm. - PDF: .pdf. - Dropbox + /// document types: .paper, .papert, .binder, .gdoc, .gsheet, .gslides. - Plain text / subtitles: .txt, .vtt. + /// Unsupported formats return an `unsupported_format_error`. For the `url` variant only Dropbox shared links + /// are supported; external URLs return `unsupported_format_error`. + /// + /// - scope: files.content.read + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @objc + @discardableResult public func getTextAsync() -> DBXRivieraGetTextAsyncRpcRequest { + let swift = swift.getTextAsync() + return DBXRivieraGetTextAsyncRpcRequest(swift: swift) + } + + /// Returns the status or result of specified get_text_async task. + /// + /// - scope: files.content.read + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Riviera.GetTextAsyncCheckResult` object on + /// success or a `Async.PollError` object on failure. + @objc + @discardableResult public func getTextAsyncCheck(asyncJobId: String) -> DBXRivieraGetTextAsyncCheckRpcRequest { + let swift = swift.getTextAsyncCheck(asyncJobId: asyncJobId) + return DBXRivieraGetTextAsyncCheckRpcRequest(swift: swift) + } + /// Asynchronous transcript generation for audio and video files. Supported audio formats: .aac, .aif, .aiff, .flac, /// .m4a, .m4r, .mp3, .oga, .ogg, .wav, .wma. Supported video formats: .3gp, .3gpp, .3gpp2, .asf, .avi, .dv, /// .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf, .oggtheora, .ogv, .rm, .ts, .vob, .webm, diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXRivieraRoutes.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXRivieraRoutes.swift index 93a5c9d7..ec86e28e 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXRivieraRoutes.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXRivieraRoutes.swift @@ -128,6 +128,118 @@ public class DBXRivieraRoutes: NSObject { return DBXRivieraGetMetadataAsyncCheckRpcRequest(swift: swift) } + /// Asynchronous OCR (optical character recognition) text extraction for images and PDFs, including scanned / + /// non-text PDFs. Supported formats: - Image formats: .bmp, .gif, .heic, .jpeg, .jpg, .png, .tif, .tiff, .webp. + /// - PDF format: .pdf. Unsupported formats return an `unsupported_format_error`. For the `url` variant only + /// Dropbox shared links are supported; external URLs return `unsupported_format_error`. Text-based PDFs already + /// carry a text layer, so OCR is not run against them and the result is empty; use `get_text_async` to read the + /// embedded text layer of such a PDF. The result carries the extracted words as plain text, plus the same + /// content as hOCR with per-word coordinates. + /// + /// - scope: files.content.read + /// + /// - parameter fileIdOrUrl: Identifier of the file to run OCR on. Callers must set exactly one of the `FileIdOrUrl` + /// variants. OCR is supported for image files and PDFs, including scanned / non-text PDFs; see the route + /// description for the supported formats. Requests against unsupported formats return + /// `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared links (www.dropbox.com) are + /// supported. External (non-Dropbox) URLs are not supported and return `unsupported_format_error`; import the + /// file into Dropbox and reference it by `file_id` or `path` instead. + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @objc + @discardableResult public func getOcrAsync(fileIdOrUrl: DBXRivieraFileIdOrUrl?) -> DBXRivieraGetOcrAsyncRpcRequest { + let swift = swift.getOcrAsync(fileIdOrUrl: fileIdOrUrl?.swift) + return DBXRivieraGetOcrAsyncRpcRequest(swift: swift) + } + + /// Asynchronous OCR (optical character recognition) text extraction for images and PDFs, including scanned / + /// non-text PDFs. Supported formats: - Image formats: .bmp, .gif, .heic, .jpeg, .jpg, .png, .tif, .tiff, .webp. + /// - PDF format: .pdf. Unsupported formats return an `unsupported_format_error`. For the `url` variant only + /// Dropbox shared links are supported; external URLs return `unsupported_format_error`. Text-based PDFs already + /// carry a text layer, so OCR is not run against them and the result is empty; use `get_text_async` to read the + /// embedded text layer of such a PDF. The result carries the extracted words as plain text, plus the same + /// content as hOCR with per-word coordinates. + /// + /// - scope: files.content.read + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @objc + @discardableResult public func getOcrAsync() -> DBXRivieraGetOcrAsyncRpcRequest { + let swift = swift.getOcrAsync() + return DBXRivieraGetOcrAsyncRpcRequest(swift: swift) + } + + /// Returns the status or result of specified get_ocr_async task. + /// + /// - scope: files.content.read + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Riviera.GetOcrAsyncCheckResult` object on + /// success or a `Async.PollError` object on failure. + @objc + @discardableResult public func getOcrAsyncCheck(asyncJobId: String) -> DBXRivieraGetOcrAsyncCheckRpcRequest { + let swift = swift.getOcrAsyncCheck(asyncJobId: asyncJobId) + return DBXRivieraGetOcrAsyncCheckRpcRequest(swift: swift) + } + + /// Asynchronous plain-text extraction from documents. Supported formats include: - Word processing: .doc, .docx, + /// .docm, .rtf. - Presentations: .ppt, .pptx, .pptm. - Spreadsheets: .xls, .xlsx, .xlsm. - PDF: .pdf. - Dropbox + /// document types: .paper, .papert, .binder, .gdoc, .gsheet, .gslides. - Plain text / subtitles: .txt, .vtt. + /// Unsupported formats return an `unsupported_format_error`. For the `url` variant only Dropbox shared links + /// are supported; external URLs return `unsupported_format_error`. + /// + /// - scope: files.content.read + /// + /// - parameter fileIdOrUrl: Identifier of the document to extract text from. Callers must set exactly one of the + /// `FileIdOrUrl` variants. Text extraction is supported for common document formats (Word, PowerPoint, Excel, + /// PDF, RTF, and Dropbox document types); see the route description for the supported formats. Requests against + /// unsupported formats return `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared + /// links (www.dropbox.com) are supported. External (non-Dropbox) URLs are not supported and return + /// `unsupported_format_error`; import the file into Dropbox and reference it by `file_id` or `path` instead. + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @objc + @discardableResult public func getTextAsync(fileIdOrUrl: DBXRivieraFileIdOrUrl?) -> DBXRivieraGetTextAsyncRpcRequest { + let swift = swift.getTextAsync(fileIdOrUrl: fileIdOrUrl?.swift) + return DBXRivieraGetTextAsyncRpcRequest(swift: swift) + } + + /// Asynchronous plain-text extraction from documents. Supported formats include: - Word processing: .doc, .docx, + /// .docm, .rtf. - Presentations: .ppt, .pptx, .pptm. - Spreadsheets: .xls, .xlsx, .xlsm. - PDF: .pdf. - Dropbox + /// document types: .paper, .papert, .binder, .gdoc, .gsheet, .gslides. - Plain text / subtitles: .txt, .vtt. + /// Unsupported formats return an `unsupported_format_error`. For the `url` variant only Dropbox shared links + /// are supported; external URLs return `unsupported_format_error`. + /// + /// - scope: files.content.read + /// + /// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success + /// or a `Void` object on failure. + @objc + @discardableResult public func getTextAsync() -> DBXRivieraGetTextAsyncRpcRequest { + let swift = swift.getTextAsync() + return DBXRivieraGetTextAsyncRpcRequest(swift: swift) + } + + /// Returns the status or result of specified get_text_async task. + /// + /// - scope: files.content.read + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Riviera.GetTextAsyncCheckResult` object on + /// success or a `Async.PollError` object on failure. + @objc + @discardableResult public func getTextAsyncCheck(asyncJobId: String) -> DBXRivieraGetTextAsyncCheckRpcRequest { + let swift = swift.getTextAsyncCheck(asyncJobId: asyncJobId) + return DBXRivieraGetTextAsyncCheckRpcRequest(swift: swift) + } + /// Asynchronous transcript generation for audio and video files. Supported audio formats: .aac, .aif, .aiff, .flac, /// .m4a, .m4r, .mp3, .oga, .ogg, .wav, .wma. Supported video formats: .3gp, .3gpp, .3gpp2, .asf, .avi, .dv, /// .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf, .oggtheora, .ogv, .rm, .ts, .vob, .webm, @@ -446,6 +558,252 @@ public class DBXRivieraGetMetadataAsyncCheckRpcRequest: NSObject, DBXRequest { } } +@objc +public class DBXRivieraGetOcrAsyncRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest + + init(swift: RpcRequest) { + self.swift = swift + } + + @objc + @discardableResult public func response( + completionHandler: @escaping (DBXAsyncLaunchResultBase?, DBXCallError?) -> Void + ) -> Self { + response(queue: nil, completionHandler: completionHandler) + } + + @objc + @discardableResult public func response( + queue: DispatchQueue?, + completionHandler: @escaping (DBXAsyncLaunchResultBase?, DBXCallError?) -> Void + ) -> Self { + swift.response(queue: queue) { result, error in + var objc: DBXAsyncLaunchResultBase? = nil + if let swift = result { + objc = DBXAsyncLaunchResultBase.factory(swift: swift) + } + completionHandler(objc, error?.objc) + } + return self + } + + @objc + public var clientPersistedString: String? { swift.clientPersistedString } + + @available(iOS 13.0, macOS 10.13, *) + @objc + public var earliestBeginDate: Date? { swift.earliestBeginDate } + + @objc + public func persistingString(string: String?) -> Self { + swift.persistingString(string: string) + return self + } + + @available(iOS 13.0, macOS 10.13, *) + @objc + public func settingEarliestBeginDate(date: Date?) -> Self { + swift.settingEarliestBeginDate(date: date) + return self + } + + @objc + public func cancel() { + swift.cancel() + } +} + +@objc +public class DBXRivieraGetOcrAsyncCheckRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest + + init(swift: RpcRequest) { + self.swift = swift + } + + @objc + @discardableResult public func response( + completionHandler: @escaping (DBXRivieraGetOcrAsyncCheckResult?, DBXAsyncPollError?, DBXCallError?) -> Void + ) -> Self { + response(queue: nil, completionHandler: completionHandler) + } + + @objc + @discardableResult public func response( + queue: DispatchQueue?, + completionHandler: @escaping (DBXRivieraGetOcrAsyncCheckResult?, DBXAsyncPollError?, DBXCallError?) -> Void + ) -> Self { + swift.response(queue: queue) { result, error in + var routeError: DBXAsyncPollError? + var callError: DBXCallError? + switch error { + case .routeError(let box, _, _, _): + routeError = DBXAsyncPollError(swift: box.unboxed) + callError = nil + default: + routeError = nil + callError = error?.objc + } + + var objc: DBXRivieraGetOcrAsyncCheckResult? = nil + if let swift = result { + objc = DBXRivieraGetOcrAsyncCheckResult.factory(swift: swift) + } + completionHandler(objc, routeError, callError) + } + return self + } + + @objc + public var clientPersistedString: String? { swift.clientPersistedString } + + @available(iOS 13.0, macOS 10.13, *) + @objc + public var earliestBeginDate: Date? { swift.earliestBeginDate } + + @objc + public func persistingString(string: String?) -> Self { + swift.persistingString(string: string) + return self + } + + @available(iOS 13.0, macOS 10.13, *) + @objc + public func settingEarliestBeginDate(date: Date?) -> Self { + swift.settingEarliestBeginDate(date: date) + return self + } + + @objc + public func cancel() { + swift.cancel() + } +} + +@objc +public class DBXRivieraGetTextAsyncRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest + + init(swift: RpcRequest) { + self.swift = swift + } + + @objc + @discardableResult public func response( + completionHandler: @escaping (DBXAsyncLaunchResultBase?, DBXCallError?) -> Void + ) -> Self { + response(queue: nil, completionHandler: completionHandler) + } + + @objc + @discardableResult public func response( + queue: DispatchQueue?, + completionHandler: @escaping (DBXAsyncLaunchResultBase?, DBXCallError?) -> Void + ) -> Self { + swift.response(queue: queue) { result, error in + var objc: DBXAsyncLaunchResultBase? = nil + if let swift = result { + objc = DBXAsyncLaunchResultBase.factory(swift: swift) + } + completionHandler(objc, error?.objc) + } + return self + } + + @objc + public var clientPersistedString: String? { swift.clientPersistedString } + + @available(iOS 13.0, macOS 10.13, *) + @objc + public var earliestBeginDate: Date? { swift.earliestBeginDate } + + @objc + public func persistingString(string: String?) -> Self { + swift.persistingString(string: string) + return self + } + + @available(iOS 13.0, macOS 10.13, *) + @objc + public func settingEarliestBeginDate(date: Date?) -> Self { + swift.settingEarliestBeginDate(date: date) + return self + } + + @objc + public func cancel() { + swift.cancel() + } +} + +@objc +public class DBXRivieraGetTextAsyncCheckRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest + + init(swift: RpcRequest) { + self.swift = swift + } + + @objc + @discardableResult public func response( + completionHandler: @escaping (DBXRivieraGetTextAsyncCheckResult?, DBXAsyncPollError?, DBXCallError?) -> Void + ) -> Self { + response(queue: nil, completionHandler: completionHandler) + } + + @objc + @discardableResult public func response( + queue: DispatchQueue?, + completionHandler: @escaping (DBXRivieraGetTextAsyncCheckResult?, DBXAsyncPollError?, DBXCallError?) -> Void + ) -> Self { + swift.response(queue: queue) { result, error in + var routeError: DBXAsyncPollError? + var callError: DBXCallError? + switch error { + case .routeError(let box, _, _, _): + routeError = DBXAsyncPollError(swift: box.unboxed) + callError = nil + default: + routeError = nil + callError = error?.objc + } + + var objc: DBXRivieraGetTextAsyncCheckResult? = nil + if let swift = result { + objc = DBXRivieraGetTextAsyncCheckResult.factory(swift: swift) + } + completionHandler(objc, routeError, callError) + } + return self + } + + @objc + public var clientPersistedString: String? { swift.clientPersistedString } + + @available(iOS 13.0, macOS 10.13, *) + @objc + public var earliestBeginDate: Date? { swift.earliestBeginDate } + + @objc + public func persistingString(string: String?) -> Self { + swift.persistingString(string: string) + return self + } + + @available(iOS 13.0, macOS 10.13, *) + @objc + public func settingEarliestBeginDate(date: Date?) -> Self { + swift.settingEarliestBeginDate(date: date) + return self + } + + @objc + public func cancel() { + swift.cancel() + } +} + @objc public class DBXRivieraGetTranscriptAsyncRpcRequest: NSObject, DBXRequest { var swift: RpcRequest diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXTeamLog.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXTeamLog.swift index ad1423c7..493a3be3 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXTeamLog.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXTeamLog.swift @@ -12582,6 +12582,9 @@ public class DBXTeamLogEventDetails: NSObject { case .protectActionRemoveCollaboratorDetails(let swiftArg): let arg = DBXTeamLogProtectActionRemoveCollaboratorDetails(swift: swiftArg) return DBXTeamLogEventDetailsProtectActionRemoveCollaboratorDetails(arg) + case .protectActionRemoveDomainsDetails(let swiftArg): + let arg = DBXTeamLogProtectActionRemoveDomainsDetails(swift: swiftArg) + return DBXTeamLogEventDetailsProtectActionRemoveDomainsDetails(arg) case .protectActionRemoveLinkDetails(let swiftArg): let arg = DBXTeamLogProtectActionRemoveLinkDetails(swift: swiftArg) return DBXTeamLogEventDetailsProtectActionRemoveLinkDetails(arg) @@ -12591,6 +12594,21 @@ public class DBXTeamLogEventDetails: NSObject { case .protectInternalDomainsChangedDetails(let swiftArg): let arg = DBXTeamLogProtectInternalDomainsChangedDetails(swift: swiftArg) return DBXTeamLogEventDetailsProtectInternalDomainsChangedDetails(arg) + case .protectPolicyActivatedDetails(let swiftArg): + let arg = DBXTeamLogProtectPolicyActivatedDetails(swift: swiftArg) + return DBXTeamLogEventDetailsProtectPolicyActivatedDetails(arg) + case .protectPolicyDeactivatedDetails(let swiftArg): + let arg = DBXTeamLogProtectPolicyDeactivatedDetails(swift: swiftArg) + return DBXTeamLogEventDetailsProtectPolicyDeactivatedDetails(arg) + case .protectPolicyScheduledDetails(let swiftArg): + let arg = DBXTeamLogProtectPolicyScheduledDetails(swift: swiftArg) + return DBXTeamLogEventDetailsProtectPolicyScheduledDetails(arg) + case .protectPolicyUpdatedDetails(let swiftArg): + let arg = DBXTeamLogProtectPolicyUpdatedDetails(swift: swiftArg) + return DBXTeamLogEventDetailsProtectPolicyUpdatedDetails(arg) + case .protectReportViewDetails(let swiftArg): + let arg = DBXTeamLogProtectReportViewDetails(swift: swiftArg) + return DBXTeamLogEventDetailsProtectReportViewDetails(arg) case .classificationCreateReportDetails(let swiftArg): let arg = DBXTeamLogClassificationCreateReportDetails(swift: swiftArg) return DBXTeamLogEventDetailsClassificationCreateReportDetails(arg) @@ -13437,6 +13455,12 @@ public class DBXTeamLogEventDetails: NSObject { case .teamExtensionsPolicyChangedDetails(let swiftArg): let arg = DBXTeamLogTeamExtensionsPolicyChangedDetails(swift: swiftArg) return DBXTeamLogEventDetailsTeamExtensionsPolicyChangedDetails(arg) + case .teamExternalSharingControlsActivationStateChangedDetails(let swiftArg): + let arg = DBXTeamLogTeamExternalSharingControlsActivationStateChangedDetails(swift: swiftArg) + return DBXTeamLogEventDetailsTeamExternalSharingControlsActivationStateChangedDetails(arg) + case .teamExternalSharingControlsRecipientListsChangedDetails(let swiftArg): + let arg = DBXTeamLogTeamExternalSharingControlsRecipientListsChangedDetails(swift: swiftArg) + return DBXTeamLogEventDetailsTeamExternalSharingControlsRecipientListsChangedDetails(arg) case .teamMemberStorageRequestPolicyChangedDetails(let swiftArg): let arg = DBXTeamLogTeamMemberStorageRequestPolicyChangedDetails(swift: swiftArg) return DBXTeamLogEventDetailsTeamMemberStorageRequestPolicyChangedDetails(arg) @@ -15035,6 +15059,11 @@ public class DBXTeamLogEventDetails: NSObject { return self as? DBXTeamLogEventDetailsProtectActionRemoveCollaboratorDetails } + @objc + public var asProtectActionRemoveDomainsDetails: DBXTeamLogEventDetailsProtectActionRemoveDomainsDetails? { + return self as? DBXTeamLogEventDetailsProtectActionRemoveDomainsDetails + } + @objc public var asProtectActionRemoveLinkDetails: DBXTeamLogEventDetailsProtectActionRemoveLinkDetails? { return self as? DBXTeamLogEventDetailsProtectActionRemoveLinkDetails @@ -15050,6 +15079,31 @@ public class DBXTeamLogEventDetails: NSObject { return self as? DBXTeamLogEventDetailsProtectInternalDomainsChangedDetails } + @objc + public var asProtectPolicyActivatedDetails: DBXTeamLogEventDetailsProtectPolicyActivatedDetails? { + return self as? DBXTeamLogEventDetailsProtectPolicyActivatedDetails + } + + @objc + public var asProtectPolicyDeactivatedDetails: DBXTeamLogEventDetailsProtectPolicyDeactivatedDetails? { + return self as? DBXTeamLogEventDetailsProtectPolicyDeactivatedDetails + } + + @objc + public var asProtectPolicyScheduledDetails: DBXTeamLogEventDetailsProtectPolicyScheduledDetails? { + return self as? DBXTeamLogEventDetailsProtectPolicyScheduledDetails + } + + @objc + public var asProtectPolicyUpdatedDetails: DBXTeamLogEventDetailsProtectPolicyUpdatedDetails? { + return self as? DBXTeamLogEventDetailsProtectPolicyUpdatedDetails + } + + @objc + public var asProtectReportViewDetails: DBXTeamLogEventDetailsProtectReportViewDetails? { + return self as? DBXTeamLogEventDetailsProtectReportViewDetails + } + @objc public var asClassificationCreateReportDetails: DBXTeamLogEventDetailsClassificationCreateReportDetails? { return self as? DBXTeamLogEventDetailsClassificationCreateReportDetails @@ -16460,6 +16514,16 @@ public class DBXTeamLogEventDetails: NSObject { return self as? DBXTeamLogEventDetailsTeamExtensionsPolicyChangedDetails } + @objc + public var asTeamExternalSharingControlsActivationStateChangedDetails: DBXTeamLogEventDetailsTeamExternalSharingControlsActivationStateChangedDetails? { + return self as? DBXTeamLogEventDetailsTeamExternalSharingControlsActivationStateChangedDetails + } + + @objc + public var asTeamExternalSharingControlsRecipientListsChangedDetails: DBXTeamLogEventDetailsTeamExternalSharingControlsRecipientListsChangedDetails? { + return self as? DBXTeamLogEventDetailsTeamExternalSharingControlsRecipientListsChangedDetails + } + @objc public var asTeamMemberStorageRequestPolicyChangedDetails: DBXTeamLogEventDetailsTeamMemberStorageRequestPolicyChangedDetails? { return self as? DBXTeamLogEventDetailsTeamMemberStorageRequestPolicyChangedDetails @@ -20714,6 +20778,20 @@ public class DBXTeamLogEventDetailsProtectActionRemoveCollaboratorDetails: DBXTe } } +/// An unspecified error. +@objc +public class DBXTeamLogEventDetailsProtectActionRemoveDomainsDetails: DBXTeamLogEventDetails { + @objc + public var protectActionRemoveDomainsDetails: DBXTeamLogProtectActionRemoveDomainsDetails + + @objc + public init(_ arg: DBXTeamLogProtectActionRemoveDomainsDetails) { + protectActionRemoveDomainsDetails = arg + let swift = TeamLog.EventDetails.protectActionRemoveDomainsDetails(arg.swift) + super.init(swift: swift) + } +} + /// An unspecified error. @objc public class DBXTeamLogEventDetailsProtectActionRemoveLinkDetails: DBXTeamLogEventDetails { @@ -20756,6 +20834,76 @@ public class DBXTeamLogEventDetailsProtectInternalDomainsChangedDetails: DBXTeam } } +/// An unspecified error. +@objc +public class DBXTeamLogEventDetailsProtectPolicyActivatedDetails: DBXTeamLogEventDetails { + @objc + public var protectPolicyActivatedDetails: DBXTeamLogProtectPolicyActivatedDetails + + @objc + public init(_ arg: DBXTeamLogProtectPolicyActivatedDetails) { + protectPolicyActivatedDetails = arg + let swift = TeamLog.EventDetails.protectPolicyActivatedDetails(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogEventDetailsProtectPolicyDeactivatedDetails: DBXTeamLogEventDetails { + @objc + public var protectPolicyDeactivatedDetails: DBXTeamLogProtectPolicyDeactivatedDetails + + @objc + public init(_ arg: DBXTeamLogProtectPolicyDeactivatedDetails) { + protectPolicyDeactivatedDetails = arg + let swift = TeamLog.EventDetails.protectPolicyDeactivatedDetails(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogEventDetailsProtectPolicyScheduledDetails: DBXTeamLogEventDetails { + @objc + public var protectPolicyScheduledDetails: DBXTeamLogProtectPolicyScheduledDetails + + @objc + public init(_ arg: DBXTeamLogProtectPolicyScheduledDetails) { + protectPolicyScheduledDetails = arg + let swift = TeamLog.EventDetails.protectPolicyScheduledDetails(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogEventDetailsProtectPolicyUpdatedDetails: DBXTeamLogEventDetails { + @objc + public var protectPolicyUpdatedDetails: DBXTeamLogProtectPolicyUpdatedDetails + + @objc + public init(_ arg: DBXTeamLogProtectPolicyUpdatedDetails) { + protectPolicyUpdatedDetails = arg + let swift = TeamLog.EventDetails.protectPolicyUpdatedDetails(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogEventDetailsProtectReportViewDetails: DBXTeamLogEventDetails { + @objc + public var protectReportViewDetails: DBXTeamLogProtectReportViewDetails + + @objc + public init(_ arg: DBXTeamLogProtectReportViewDetails) { + protectReportViewDetails = arg + let swift = TeamLog.EventDetails.protectReportViewDetails(arg.swift) + super.init(swift: swift) + } +} + /// An unspecified error. @objc public class DBXTeamLogEventDetailsClassificationCreateReportDetails: DBXTeamLogEventDetails { @@ -24704,6 +24852,34 @@ public class DBXTeamLogEventDetailsTeamExtensionsPolicyChangedDetails: DBXTeamLo } } +/// An unspecified error. +@objc +public class DBXTeamLogEventDetailsTeamExternalSharingControlsActivationStateChangedDetails: DBXTeamLogEventDetails { + @objc + public var teamExternalSharingControlsActivationStateChangedDetails: DBXTeamLogTeamExternalSharingControlsActivationStateChangedDetails + + @objc + public init(_ arg: DBXTeamLogTeamExternalSharingControlsActivationStateChangedDetails) { + teamExternalSharingControlsActivationStateChangedDetails = arg + let swift = TeamLog.EventDetails.teamExternalSharingControlsActivationStateChangedDetails(arg.swift) + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogEventDetailsTeamExternalSharingControlsRecipientListsChangedDetails: DBXTeamLogEventDetails { + @objc + public var teamExternalSharingControlsRecipientListsChangedDetails: DBXTeamLogTeamExternalSharingControlsRecipientListsChangedDetails + + @objc + public init(_ arg: DBXTeamLogTeamExternalSharingControlsRecipientListsChangedDetails) { + teamExternalSharingControlsRecipientListsChangedDetails = arg + let swift = TeamLog.EventDetails.teamExternalSharingControlsRecipientListsChangedDetails(arg.swift) + super.init(swift: swift) + } +} + /// An unspecified error. @objc public class DBXTeamLogEventDetailsTeamMemberStorageRequestPolicyChangedDetails: DBXTeamLogEventDetails { @@ -26411,6 +26587,9 @@ public class DBXTeamLogEventType: NSObject { case .protectActionRemoveCollaborator(let swiftArg): let arg = DBXTeamLogProtectActionRemoveCollaboratorType(swift: swiftArg) return DBXTeamLogEventTypeProtectActionRemoveCollaborator(arg) + case .protectActionRemoveDomains(let swiftArg): + let arg = DBXTeamLogProtectActionRemoveDomainsType(swift: swiftArg) + return DBXTeamLogEventTypeProtectActionRemoveDomains(arg) case .protectActionRemoveLink(let swiftArg): let arg = DBXTeamLogProtectActionRemoveLinkType(swift: swiftArg) return DBXTeamLogEventTypeProtectActionRemoveLink(arg) @@ -26420,6 +26599,21 @@ public class DBXTeamLogEventType: NSObject { case .protectInternalDomainsChanged(let swiftArg): let arg = DBXTeamLogProtectInternalDomainsChangedType(swift: swiftArg) return DBXTeamLogEventTypeProtectInternalDomainsChanged(arg) + case .protectPolicyActivated(let swiftArg): + let arg = DBXTeamLogProtectPolicyActivatedType(swift: swiftArg) + return DBXTeamLogEventTypeProtectPolicyActivated(arg) + case .protectPolicyDeactivated(let swiftArg): + let arg = DBXTeamLogProtectPolicyDeactivatedType(swift: swiftArg) + return DBXTeamLogEventTypeProtectPolicyDeactivated(arg) + case .protectPolicyScheduled(let swiftArg): + let arg = DBXTeamLogProtectPolicyScheduledType(swift: swiftArg) + return DBXTeamLogEventTypeProtectPolicyScheduled(arg) + case .protectPolicyUpdated(let swiftArg): + let arg = DBXTeamLogProtectPolicyUpdatedType(swift: swiftArg) + return DBXTeamLogEventTypeProtectPolicyUpdated(arg) + case .protectReportView(let swiftArg): + let arg = DBXTeamLogProtectReportViewType(swift: swiftArg) + return DBXTeamLogEventTypeProtectReportView(arg) case .classificationCreateReport(let swiftArg): let arg = DBXTeamLogClassificationCreateReportType(swift: swiftArg) return DBXTeamLogEventTypeClassificationCreateReport(arg) @@ -27266,6 +27460,12 @@ public class DBXTeamLogEventType: NSObject { case .teamExtensionsPolicyChanged(let swiftArg): let arg = DBXTeamLogTeamExtensionsPolicyChangedType(swift: swiftArg) return DBXTeamLogEventTypeTeamExtensionsPolicyChanged(arg) + case .teamExternalSharingControlsActivationStateChanged(let swiftArg): + let arg = DBXTeamLogTeamExternalSharingControlsActivationStateChangedType(swift: swiftArg) + return DBXTeamLogEventTypeTeamExternalSharingControlsActivationStateChanged(arg) + case .teamExternalSharingControlsRecipientListsChanged(let swiftArg): + let arg = DBXTeamLogTeamExternalSharingControlsRecipientListsChangedType(swift: swiftArg) + return DBXTeamLogEventTypeTeamExternalSharingControlsRecipientListsChanged(arg) case .teamMemberStorageRequestPolicyChanged(let swiftArg): let arg = DBXTeamLogTeamMemberStorageRequestPolicyChangedType(swift: swiftArg) return DBXTeamLogEventTypeTeamMemberStorageRequestPolicyChanged(arg) @@ -28861,6 +29061,11 @@ public class DBXTeamLogEventType: NSObject { return self as? DBXTeamLogEventTypeProtectActionRemoveCollaborator } + @objc + public var asProtectActionRemoveDomains: DBXTeamLogEventTypeProtectActionRemoveDomains? { + return self as? DBXTeamLogEventTypeProtectActionRemoveDomains + } + @objc public var asProtectActionRemoveLink: DBXTeamLogEventTypeProtectActionRemoveLink? { return self as? DBXTeamLogEventTypeProtectActionRemoveLink @@ -28876,6 +29081,31 @@ public class DBXTeamLogEventType: NSObject { return self as? DBXTeamLogEventTypeProtectInternalDomainsChanged } + @objc + public var asProtectPolicyActivated: DBXTeamLogEventTypeProtectPolicyActivated? { + return self as? DBXTeamLogEventTypeProtectPolicyActivated + } + + @objc + public var asProtectPolicyDeactivated: DBXTeamLogEventTypeProtectPolicyDeactivated? { + return self as? DBXTeamLogEventTypeProtectPolicyDeactivated + } + + @objc + public var asProtectPolicyScheduled: DBXTeamLogEventTypeProtectPolicyScheduled? { + return self as? DBXTeamLogEventTypeProtectPolicyScheduled + } + + @objc + public var asProtectPolicyUpdated: DBXTeamLogEventTypeProtectPolicyUpdated? { + return self as? DBXTeamLogEventTypeProtectPolicyUpdated + } + + @objc + public var asProtectReportView: DBXTeamLogEventTypeProtectReportView? { + return self as? DBXTeamLogEventTypeProtectReportView + } + @objc public var asClassificationCreateReport: DBXTeamLogEventTypeClassificationCreateReport? { return self as? DBXTeamLogEventTypeClassificationCreateReport @@ -30286,6 +30516,16 @@ public class DBXTeamLogEventType: NSObject { return self as? DBXTeamLogEventTypeTeamExtensionsPolicyChanged } + @objc + public var asTeamExternalSharingControlsActivationStateChanged: DBXTeamLogEventTypeTeamExternalSharingControlsActivationStateChanged? { + return self as? DBXTeamLogEventTypeTeamExternalSharingControlsActivationStateChanged + } + + @objc + public var asTeamExternalSharingControlsRecipientListsChanged: DBXTeamLogEventTypeTeamExternalSharingControlsRecipientListsChanged? { + return self as? DBXTeamLogEventTypeTeamExternalSharingControlsRecipientListsChanged + } + @objc public var asTeamMemberStorageRequestPolicyChanged: DBXTeamLogEventTypeTeamMemberStorageRequestPolicyChanged? { return self as? DBXTeamLogEventTypeTeamMemberStorageRequestPolicyChanged @@ -34535,6 +34775,20 @@ public class DBXTeamLogEventTypeProtectActionRemoveCollaborator: DBXTeamLogEvent } } +/// (protect) Removed domains via Dropbox Protect +@objc +public class DBXTeamLogEventTypeProtectActionRemoveDomains: DBXTeamLogEventType { + @objc + public var protectActionRemoveDomains: DBXTeamLogProtectActionRemoveDomainsType + + @objc + public init(_ arg: DBXTeamLogProtectActionRemoveDomainsType) { + protectActionRemoveDomains = arg + let swift = TeamLog.EventType.protectActionRemoveDomains(arg.swift) + super.init(swift: swift) + } +} + /// (protect) Removed a link via Dropbox Protect @objc public class DBXTeamLogEventTypeProtectActionRemoveLink: DBXTeamLogEventType { @@ -34577,6 +34831,76 @@ public class DBXTeamLogEventTypeProtectInternalDomainsChanged: DBXTeamLogEventTy } } +/// (protect) Activated a Dropbox Protect policy +@objc +public class DBXTeamLogEventTypeProtectPolicyActivated: DBXTeamLogEventType { + @objc + public var protectPolicyActivated: DBXTeamLogProtectPolicyActivatedType + + @objc + public init(_ arg: DBXTeamLogProtectPolicyActivatedType) { + protectPolicyActivated = arg + let swift = TeamLog.EventType.protectPolicyActivated(arg.swift) + super.init(swift: swift) + } +} + +/// (protect) Deactivated a Dropbox Protect policy +@objc +public class DBXTeamLogEventTypeProtectPolicyDeactivated: DBXTeamLogEventType { + @objc + public var protectPolicyDeactivated: DBXTeamLogProtectPolicyDeactivatedType + + @objc + public init(_ arg: DBXTeamLogProtectPolicyDeactivatedType) { + protectPolicyDeactivated = arg + let swift = TeamLog.EventType.protectPolicyDeactivated(arg.swift) + super.init(swift: swift) + } +} + +/// (protect) Scheduled a Dropbox Protect policy +@objc +public class DBXTeamLogEventTypeProtectPolicyScheduled: DBXTeamLogEventType { + @objc + public var protectPolicyScheduled: DBXTeamLogProtectPolicyScheduledType + + @objc + public init(_ arg: DBXTeamLogProtectPolicyScheduledType) { + protectPolicyScheduled = arg + let swift = TeamLog.EventType.protectPolicyScheduled(arg.swift) + super.init(swift: swift) + } +} + +/// (protect) Updated a Dropbox Protect policy +@objc +public class DBXTeamLogEventTypeProtectPolicyUpdated: DBXTeamLogEventType { + @objc + public var protectPolicyUpdated: DBXTeamLogProtectPolicyUpdatedType + + @objc + public init(_ arg: DBXTeamLogProtectPolicyUpdatedType) { + protectPolicyUpdated = arg + let swift = TeamLog.EventType.protectPolicyUpdated(arg.swift) + super.init(swift: swift) + } +} + +/// (protect) Viewed a Dropbox Protect report +@objc +public class DBXTeamLogEventTypeProtectReportView: DBXTeamLogEventType { + @objc + public var protectReportView: DBXTeamLogProtectReportViewType + + @objc + public init(_ arg: DBXTeamLogProtectReportViewType) { + protectReportView = arg + let swift = TeamLog.EventType.protectReportView(arg.swift) + super.init(swift: swift) + } +} + /// (reports) Created Classification report @objc public class DBXTeamLogEventTypeClassificationCreateReport: DBXTeamLogEventType { @@ -38531,6 +38855,34 @@ public class DBXTeamLogEventTypeTeamExtensionsPolicyChanged: DBXTeamLogEventType } } +/// (team_policies) Changed external sharing controls activation state +@objc +public class DBXTeamLogEventTypeTeamExternalSharingControlsActivationStateChanged: DBXTeamLogEventType { + @objc + public var teamExternalSharingControlsActivationStateChanged: DBXTeamLogTeamExternalSharingControlsActivationStateChangedType + + @objc + public init(_ arg: DBXTeamLogTeamExternalSharingControlsActivationStateChangedType) { + teamExternalSharingControlsActivationStateChanged = arg + let swift = TeamLog.EventType.teamExternalSharingControlsActivationStateChanged(arg.swift) + super.init(swift: swift) + } +} + +/// (team_policies) Changed approved or blocked entries for external sharing controls +@objc +public class DBXTeamLogEventTypeTeamExternalSharingControlsRecipientListsChanged: DBXTeamLogEventType { + @objc + public var teamExternalSharingControlsRecipientListsChanged: DBXTeamLogTeamExternalSharingControlsRecipientListsChangedType + + @objc + public init(_ arg: DBXTeamLogTeamExternalSharingControlsRecipientListsChangedType) { + teamExternalSharingControlsRecipientListsChanged = arg + let swift = TeamLog.EventType.teamExternalSharingControlsRecipientListsChanged(arg.swift) + super.init(swift: swift) + } +} + /// (team_policies) Changed team member storage request policy for team @objc public class DBXTeamLogEventTypeTeamMemberStorageRequestPolicyChanged: DBXTeamLogEventType { @@ -39945,12 +40297,24 @@ public class DBXTeamLogEventTypeArg: NSObject { return DBXTeamLogEventTypeArgProtectActionExport() case .protectActionRemoveCollaborator: return DBXTeamLogEventTypeArgProtectActionRemoveCollaborator() + case .protectActionRemoveDomains: + return DBXTeamLogEventTypeArgProtectActionRemoveDomains() case .protectActionRemoveLink: return DBXTeamLogEventTypeArgProtectActionRemoveLink() case .protectActionStopSharing: return DBXTeamLogEventTypeArgProtectActionStopSharing() case .protectInternalDomainsChanged: return DBXTeamLogEventTypeArgProtectInternalDomainsChanged() + case .protectPolicyActivated: + return DBXTeamLogEventTypeArgProtectPolicyActivated() + case .protectPolicyDeactivated: + return DBXTeamLogEventTypeArgProtectPolicyDeactivated() + case .protectPolicyScheduled: + return DBXTeamLogEventTypeArgProtectPolicyScheduled() + case .protectPolicyUpdated: + return DBXTeamLogEventTypeArgProtectPolicyUpdated() + case .protectReportView: + return DBXTeamLogEventTypeArgProtectReportView() case .classificationCreateReport: return DBXTeamLogEventTypeArgClassificationCreateReport() case .classificationCreateReportFail: @@ -40515,6 +40879,10 @@ public class DBXTeamLogEventTypeArg: NSObject { return DBXTeamLogEventTypeArgTeamBrandingPolicyChanged() case .teamExtensionsPolicyChanged: return DBXTeamLogEventTypeArgTeamExtensionsPolicyChanged() + case .teamExternalSharingControlsActivationStateChanged: + return DBXTeamLogEventTypeArgTeamExternalSharingControlsActivationStateChanged() + case .teamExternalSharingControlsRecipientListsChanged: + return DBXTeamLogEventTypeArgTeamExternalSharingControlsRecipientListsChanged() case .teamMemberStorageRequestPolicyChanged: return DBXTeamLogEventTypeArgTeamMemberStorageRequestPolicyChanged() case .teamSelectiveSyncPolicyChanged: @@ -42051,6 +42419,11 @@ public class DBXTeamLogEventTypeArg: NSObject { return self as? DBXTeamLogEventTypeArgProtectActionRemoveCollaborator } + @objc + public var asProtectActionRemoveDomains: DBXTeamLogEventTypeArgProtectActionRemoveDomains? { + return self as? DBXTeamLogEventTypeArgProtectActionRemoveDomains + } + @objc public var asProtectActionRemoveLink: DBXTeamLogEventTypeArgProtectActionRemoveLink? { return self as? DBXTeamLogEventTypeArgProtectActionRemoveLink @@ -42066,6 +42439,31 @@ public class DBXTeamLogEventTypeArg: NSObject { return self as? DBXTeamLogEventTypeArgProtectInternalDomainsChanged } + @objc + public var asProtectPolicyActivated: DBXTeamLogEventTypeArgProtectPolicyActivated? { + return self as? DBXTeamLogEventTypeArgProtectPolicyActivated + } + + @objc + public var asProtectPolicyDeactivated: DBXTeamLogEventTypeArgProtectPolicyDeactivated? { + return self as? DBXTeamLogEventTypeArgProtectPolicyDeactivated + } + + @objc + public var asProtectPolicyScheduled: DBXTeamLogEventTypeArgProtectPolicyScheduled? { + return self as? DBXTeamLogEventTypeArgProtectPolicyScheduled + } + + @objc + public var asProtectPolicyUpdated: DBXTeamLogEventTypeArgProtectPolicyUpdated? { + return self as? DBXTeamLogEventTypeArgProtectPolicyUpdated + } + + @objc + public var asProtectReportView: DBXTeamLogEventTypeArgProtectReportView? { + return self as? DBXTeamLogEventTypeArgProtectReportView + } + @objc public var asClassificationCreateReport: DBXTeamLogEventTypeArgClassificationCreateReport? { return self as? DBXTeamLogEventTypeArgClassificationCreateReport @@ -43476,6 +43874,16 @@ public class DBXTeamLogEventTypeArg: NSObject { return self as? DBXTeamLogEventTypeArgTeamExtensionsPolicyChanged } + @objc + public var asTeamExternalSharingControlsActivationStateChanged: DBXTeamLogEventTypeArgTeamExternalSharingControlsActivationStateChanged? { + return self as? DBXTeamLogEventTypeArgTeamExternalSharingControlsActivationStateChanged + } + + @objc + public var asTeamExternalSharingControlsRecipientListsChanged: DBXTeamLogEventTypeArgTeamExternalSharingControlsRecipientListsChanged? { + return self as? DBXTeamLogEventTypeArgTeamExternalSharingControlsRecipientListsChanged + } + @objc public var asTeamMemberStorageRequestPolicyChanged: DBXTeamLogEventTypeArgTeamMemberStorageRequestPolicyChanged? { return self as? DBXTeamLogEventTypeArgTeamMemberStorageRequestPolicyChanged @@ -46597,6 +47005,16 @@ public class DBXTeamLogEventTypeArgProtectActionRemoveCollaborator: DBXTeamLogEv } } +/// (protect) Removed domains via Dropbox Protect +@objc +public class DBXTeamLogEventTypeArgProtectActionRemoveDomains: DBXTeamLogEventTypeArg { + @objc + public init() { + let swift = TeamLog.EventTypeArg.protectActionRemoveDomains + super.init(swift: swift) + } +} + /// (protect) Removed a link via Dropbox Protect @objc public class DBXTeamLogEventTypeArgProtectActionRemoveLink: DBXTeamLogEventTypeArg { @@ -46627,6 +47045,56 @@ public class DBXTeamLogEventTypeArgProtectInternalDomainsChanged: DBXTeamLogEven } } +/// (protect) Activated a Dropbox Protect policy +@objc +public class DBXTeamLogEventTypeArgProtectPolicyActivated: DBXTeamLogEventTypeArg { + @objc + public init() { + let swift = TeamLog.EventTypeArg.protectPolicyActivated + super.init(swift: swift) + } +} + +/// (protect) Deactivated a Dropbox Protect policy +@objc +public class DBXTeamLogEventTypeArgProtectPolicyDeactivated: DBXTeamLogEventTypeArg { + @objc + public init() { + let swift = TeamLog.EventTypeArg.protectPolicyDeactivated + super.init(swift: swift) + } +} + +/// (protect) Scheduled a Dropbox Protect policy +@objc +public class DBXTeamLogEventTypeArgProtectPolicyScheduled: DBXTeamLogEventTypeArg { + @objc + public init() { + let swift = TeamLog.EventTypeArg.protectPolicyScheduled + super.init(swift: swift) + } +} + +/// (protect) Updated a Dropbox Protect policy +@objc +public class DBXTeamLogEventTypeArgProtectPolicyUpdated: DBXTeamLogEventTypeArg { + @objc + public init() { + let swift = TeamLog.EventTypeArg.protectPolicyUpdated + super.init(swift: swift) + } +} + +/// (protect) Viewed a Dropbox Protect report +@objc +public class DBXTeamLogEventTypeArgProtectReportView: DBXTeamLogEventTypeArg { + @objc + public init() { + let swift = TeamLog.EventTypeArg.protectReportView + super.init(swift: swift) + } +} + /// (reports) Created Classification report @objc public class DBXTeamLogEventTypeArgClassificationCreateReport: DBXTeamLogEventTypeArg { @@ -49453,6 +49921,26 @@ public class DBXTeamLogEventTypeArgTeamExtensionsPolicyChanged: DBXTeamLogEventT } } +/// (team_policies) Changed external sharing controls activation state +@objc +public class DBXTeamLogEventTypeArgTeamExternalSharingControlsActivationStateChanged: DBXTeamLogEventTypeArg { + @objc + public init() { + let swift = TeamLog.EventTypeArg.teamExternalSharingControlsActivationStateChanged + super.init(swift: swift) + } +} + +/// (team_policies) Changed approved or blocked entries for external sharing controls +@objc +public class DBXTeamLogEventTypeArgTeamExternalSharingControlsRecipientListsChanged: DBXTeamLogEventTypeArg { + @objc + public init() { + let swift = TeamLog.EventTypeArg.teamExternalSharingControlsRecipientListsChanged + super.init(swift: swift) + } +} + /// (team_policies) Changed team member storage request policy for team @objc public class DBXTeamLogEventTypeArgTeamMemberStorageRequestPolicyChanged: DBXTeamLogEventTypeArg { @@ -50754,6 +51242,92 @@ public class DBXTeamLogExternalDriveBackupStatusChangedType: NSObject { public override var description: String { swift.description } } +/// Objective-C compatible ExternalSharingControlsActivationState union +@objc +public class DBXTeamLogExternalSharingControlsActivationState: NSObject { + let swift: TeamLog.ExternalSharingControlsActivationState + + public init(swift: TeamLog.ExternalSharingControlsActivationState) { + self.swift = swift + } + + public static func factory(swift: TeamLog.ExternalSharingControlsActivationState) -> DBXTeamLogExternalSharingControlsActivationState { + switch swift { + case .active: + return DBXTeamLogExternalSharingControlsActivationStateActive() + case .disabled: + return DBXTeamLogExternalSharingControlsActivationStateDisabled() + case .legacy: + return DBXTeamLogExternalSharingControlsActivationStateLegacy() + case .other: + return DBXTeamLogExternalSharingControlsActivationStateOther() + } + } + + @objc + public override var description: String { swift.description } + + @objc + public var asActive: DBXTeamLogExternalSharingControlsActivationStateActive? { + return self as? DBXTeamLogExternalSharingControlsActivationStateActive + } + + @objc + public var asDisabled: DBXTeamLogExternalSharingControlsActivationStateDisabled? { + return self as? DBXTeamLogExternalSharingControlsActivationStateDisabled + } + + @objc + public var asLegacy: DBXTeamLogExternalSharingControlsActivationStateLegacy? { + return self as? DBXTeamLogExternalSharingControlsActivationStateLegacy + } + + @objc + public var asOther: DBXTeamLogExternalSharingControlsActivationStateOther? { + return self as? DBXTeamLogExternalSharingControlsActivationStateOther + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogExternalSharingControlsActivationStateActive: DBXTeamLogExternalSharingControlsActivationState { + @objc + public init() { + let swift = TeamLog.ExternalSharingControlsActivationState.active + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogExternalSharingControlsActivationStateDisabled: DBXTeamLogExternalSharingControlsActivationState { + @objc + public init() { + let swift = TeamLog.ExternalSharingControlsActivationState.disabled + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogExternalSharingControlsActivationStateLegacy: DBXTeamLogExternalSharingControlsActivationState { + @objc + public init() { + let swift = TeamLog.ExternalSharingControlsActivationState.legacy + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogExternalSharingControlsActivationStateOther: DBXTeamLogExternalSharingControlsActivationState { + @objc + public init() { + let swift = TeamLog.ExternalSharingControlsActivationState.other + super.init(swift: swift) + } +} + /// Created External sharing report. @objc public class DBXTeamLogExternalSharingCreateReportDetails: NSObject { @@ -58564,10 +59138,13 @@ public class DBXTeamLogMediaHubProjectTeamAddDetails: NSObject { /// Replay project. @objc public var project: DBXTeamLogMediaHubProjectLogInfo? { guard let swift = swift.project else { return nil }; return DBXTeamLogMediaHubProjectLogInfo(swift: swift) } + /// The email address of the Replay project member targeted by the event. + @objc + public var invitee: String? { swift.invitee } @objc - public init(project: DBXTeamLogMediaHubProjectLogInfo?) { - self.swift = TeamLog.MediaHubProjectTeamAddDetails(project: project?.swift) + public init(project: DBXTeamLogMediaHubProjectLogInfo?, invitee: String?) { + self.swift = TeamLog.MediaHubProjectTeamAddDetails(project: project?.swift, invitee: invitee) } let swift: TeamLog.MediaHubProjectTeamAddDetails @@ -58610,10 +59187,13 @@ public class DBXTeamLogMediaHubProjectTeamDeleteDetails: NSObject { /// Replay project. @objc public var project: DBXTeamLogMediaHubProjectLogInfo? { guard let swift = swift.project else { return nil }; return DBXTeamLogMediaHubProjectLogInfo(swift: swift) } + /// The email address of the Replay project member targeted by the event. + @objc + public var invitee: String? { swift.invitee } @objc - public init(project: DBXTeamLogMediaHubProjectLogInfo?) { - self.swift = TeamLog.MediaHubProjectTeamDeleteDetails(project: project?.swift) + public init(project: DBXTeamLogMediaHubProjectLogInfo?, invitee: String?) { + self.swift = TeamLog.MediaHubProjectTeamDeleteDetails(project: project?.swift, invitee: invitee) } let swift: TeamLog.MediaHubProjectTeamDeleteDetails @@ -58662,10 +59242,13 @@ public class DBXTeamLogMediaHubProjectTeamRoleChangedDetails: NSObject { /// Replay project. @objc public var project: DBXTeamLogMediaHubProjectLogInfo? { guard let swift = swift.project else { return nil }; return DBXTeamLogMediaHubProjectLogInfo(swift: swift) } + /// The email address of the Replay project member targeted by the event. + @objc + public var invitee: String? { swift.invitee } @objc - public init(previousRole: DBXTeamLogMediaHubProjectRole, newRole: DBXTeamLogMediaHubProjectRole, project: DBXTeamLogMediaHubProjectLogInfo?) { - self.swift = TeamLog.MediaHubProjectTeamRoleChangedDetails(previousRole: previousRole.swift, newRole: newRole.swift, project: project?.swift) + public init(previousRole: DBXTeamLogMediaHubProjectRole, newRole: DBXTeamLogMediaHubProjectRole, project: DBXTeamLogMediaHubProjectLogInfo?, invitee: String?) { + self.swift = TeamLog.MediaHubProjectTeamRoleChangedDetails(previousRole: previousRole.swift, newRole: newRole.swift, project: project?.swift, invitee: invitee) } let swift: TeamLog.MediaHubProjectTeamRoleChangedDetails @@ -58717,6 +59300,8 @@ public class DBXTeamLogMediaHubSharedLinkAudience: NSObject { return DBXTeamLogMediaHubSharedLinkAudienceNoOne() case .public_: return DBXTeamLogMediaHubSharedLinkAudiencePublic_() + case .publicLoggedInOnly: + return DBXTeamLogMediaHubSharedLinkAudiencePublicLoggedInOnly() case .teamOnly: return DBXTeamLogMediaHubSharedLinkAudienceTeamOnly() case .other: @@ -58737,6 +59322,11 @@ public class DBXTeamLogMediaHubSharedLinkAudience: NSObject { return self as? DBXTeamLogMediaHubSharedLinkAudiencePublic_ } + @objc + public var asPublicLoggedInOnly: DBXTeamLogMediaHubSharedLinkAudiencePublicLoggedInOnly? { + return self as? DBXTeamLogMediaHubSharedLinkAudiencePublicLoggedInOnly + } + @objc public var asTeamOnly: DBXTeamLogMediaHubSharedLinkAudienceTeamOnly? { return self as? DBXTeamLogMediaHubSharedLinkAudienceTeamOnly @@ -58768,6 +59358,16 @@ public class DBXTeamLogMediaHubSharedLinkAudiencePublic_: DBXTeamLogMediaHubShar } } +/// An unspecified error. +@objc +public class DBXTeamLogMediaHubSharedLinkAudiencePublicLoggedInOnly: DBXTeamLogMediaHubSharedLinkAudience { + @objc + public init() { + let swift = TeamLog.MediaHubSharedLinkAudience.publicLoggedInOnly + super.init(swift: swift) + } +} + /// An unspecified error. @objc public class DBXTeamLogMediaHubSharedLinkAudienceTeamOnly: DBXTeamLogMediaHubSharedLinkAudience { @@ -66843,6 +67443,52 @@ public class DBXTeamLogProtectActionRemoveCollaboratorType: NSObject { public override var description: String { swift.description } } +/// Removed domains via Dropbox Protect. +@objc +public class DBXTeamLogProtectActionRemoveDomainsDetails: NSObject { + /// Action ID. + @objc + public var actionId: String { swift.actionId } + + @objc + public init(actionId: String) { + self.swift = TeamLog.ProtectActionRemoveDomainsDetails(actionId: actionId) + } + + let swift: TeamLog.ProtectActionRemoveDomainsDetails + + public init(swift: TeamLog.ProtectActionRemoveDomainsDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible ProtectActionRemoveDomainsType struct +@objc +public class DBXTeamLogProtectActionRemoveDomainsType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.ProtectActionRemoveDomainsType(description_: description_) + } + + let swift: TeamLog.ProtectActionRemoveDomainsType + + public init(swift: TeamLog.ProtectActionRemoveDomainsType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + /// Removed a link via Dropbox Protect. @objc public class DBXTeamLogProtectActionRemoveLinkDetails: NSObject { @@ -66984,150 +67630,67 @@ public class DBXTeamLogProtectInternalDomainsChangedType: NSObject { public override var description: String { swift.description } } -/// Quick action type. +/// Activated a Dropbox Protect policy. @objc -public class DBXTeamLogQuickActionType: NSObject { - let swift: TeamLog.QuickActionType - - public init(swift: TeamLog.QuickActionType) { - self.swift = swift - } - - public static func factory(swift: TeamLog.QuickActionType) -> DBXTeamLogQuickActionType { - switch swift { - case .deleteSharedLink: - return DBXTeamLogQuickActionTypeDeleteSharedLink() - case .resetPassword: - return DBXTeamLogQuickActionTypeResetPassword() - case .restoreFileOrFolder: - return DBXTeamLogQuickActionTypeRestoreFileOrFolder() - case .unlinkApp: - return DBXTeamLogQuickActionTypeUnlinkApp() - case .unlinkDevice: - return DBXTeamLogQuickActionTypeUnlinkDevice() - case .unlinkSession: - return DBXTeamLogQuickActionTypeUnlinkSession() - case .other: - return DBXTeamLogQuickActionTypeOther() - } - } - - @objc - public override var description: String { swift.description } - - @objc - public var asDeleteSharedLink: DBXTeamLogQuickActionTypeDeleteSharedLink? { - return self as? DBXTeamLogQuickActionTypeDeleteSharedLink - } - +public class DBXTeamLogProtectPolicyActivatedDetails: NSObject { + /// Policy ID. @objc - public var asResetPassword: DBXTeamLogQuickActionTypeResetPassword? { - return self as? DBXTeamLogQuickActionTypeResetPassword - } + public var policyId: String { swift.policyId } @objc - public var asRestoreFileOrFolder: DBXTeamLogQuickActionTypeRestoreFileOrFolder? { - return self as? DBXTeamLogQuickActionTypeRestoreFileOrFolder + public init(policyId: String) { + self.swift = TeamLog.ProtectPolicyActivatedDetails(policyId: policyId) } - @objc - public var asUnlinkApp: DBXTeamLogQuickActionTypeUnlinkApp? { - return self as? DBXTeamLogQuickActionTypeUnlinkApp - } + let swift: TeamLog.ProtectPolicyActivatedDetails - @objc - public var asUnlinkDevice: DBXTeamLogQuickActionTypeUnlinkDevice? { - return self as? DBXTeamLogQuickActionTypeUnlinkDevice + public init(swift: TeamLog.ProtectPolicyActivatedDetails) { + self.swift = swift } - @objc - public var asUnlinkSession: DBXTeamLogQuickActionTypeUnlinkSession? { - return self as? DBXTeamLogQuickActionTypeUnlinkSession - } @objc - public var asOther: DBXTeamLogQuickActionTypeOther? { - return self as? DBXTeamLogQuickActionTypeOther - } + public override var description: String { swift.description } } -/// An unspecified error. +/// Objective-C compatible ProtectPolicyActivatedType struct @objc -public class DBXTeamLogQuickActionTypeDeleteSharedLink: DBXTeamLogQuickActionType { +public class DBXTeamLogProtectPolicyActivatedType: NSObject { + /// (no description) @objc - public init() { - let swift = TeamLog.QuickActionType.deleteSharedLink - super.init(swift: swift) - } -} + public var description_: String { swift.description_ } -/// An unspecified error. -@objc -public class DBXTeamLogQuickActionTypeResetPassword: DBXTeamLogQuickActionType { @objc - public init() { - let swift = TeamLog.QuickActionType.resetPassword - super.init(swift: swift) + public init(description_: String) { + self.swift = TeamLog.ProtectPolicyActivatedType(description_: description_) } -} -/// An unspecified error. -@objc -public class DBXTeamLogQuickActionTypeRestoreFileOrFolder: DBXTeamLogQuickActionType { - @objc - public init() { - let swift = TeamLog.QuickActionType.restoreFileOrFolder - super.init(swift: swift) - } -} + let swift: TeamLog.ProtectPolicyActivatedType -/// An unspecified error. -@objc -public class DBXTeamLogQuickActionTypeUnlinkApp: DBXTeamLogQuickActionType { - @objc - public init() { - let swift = TeamLog.QuickActionType.unlinkApp - super.init(swift: swift) + public init(swift: TeamLog.ProtectPolicyActivatedType) { + self.swift = swift } -} -/// An unspecified error. -@objc -public class DBXTeamLogQuickActionTypeUnlinkDevice: DBXTeamLogQuickActionType { + @objc - public init() { - let swift = TeamLog.QuickActionType.unlinkDevice - super.init(swift: swift) - } + public override var description: String { swift.description } } -/// An unspecified error. +/// Deactivated a Dropbox Protect policy. @objc -public class DBXTeamLogQuickActionTypeUnlinkSession: DBXTeamLogQuickActionType { +public class DBXTeamLogProtectPolicyDeactivatedDetails: NSObject { + /// Policy ID. @objc - public init() { - let swift = TeamLog.QuickActionType.unlinkSession - super.init(swift: swift) - } -} + public var policyId: String { swift.policyId } -/// An unspecified error. -@objc -public class DBXTeamLogQuickActionTypeOther: DBXTeamLogQuickActionType { @objc - public init() { - let swift = TeamLog.QuickActionType.other - super.init(swift: swift) + public init(policyId: String) { + self.swift = TeamLog.ProtectPolicyDeactivatedDetails(policyId: policyId) } -} - -/// Created ransomware report. -@objc -public class DBXTeamLogRansomwareAlertCreateReportDetails: NSObject { - let swift: TeamLog.RansomwareAlertCreateReportDetails + let swift: TeamLog.ProtectPolicyDeactivatedDetails - public init(swift: TeamLog.RansomwareAlertCreateReportDetails) { + public init(swift: TeamLog.ProtectPolicyDeactivatedDetails) { self.swift = swift } @@ -67136,21 +67699,21 @@ public class DBXTeamLogRansomwareAlertCreateReportDetails: NSObject { public override var description: String { swift.description } } -/// Couldn't generate ransomware report. +/// Objective-C compatible ProtectPolicyDeactivatedType struct @objc -public class DBXTeamLogRansomwareAlertCreateReportFailedDetails: NSObject { - /// Failure reason. +public class DBXTeamLogProtectPolicyDeactivatedType: NSObject { + /// (no description) @objc - public var failureReason: DBXTeamTeamReportFailureReason { DBXTeamTeamReportFailureReason(swift: swift.failureReason) } + public var description_: String { swift.description_ } @objc - public init(failureReason: DBXTeamTeamReportFailureReason) { - self.swift = TeamLog.RansomwareAlertCreateReportFailedDetails(failureReason: failureReason.swift) + public init(description_: String) { + self.swift = TeamLog.ProtectPolicyDeactivatedType(description_: description_) } - let swift: TeamLog.RansomwareAlertCreateReportFailedDetails + let swift: TeamLog.ProtectPolicyDeactivatedType - public init(swift: TeamLog.RansomwareAlertCreateReportFailedDetails) { + public init(swift: TeamLog.ProtectPolicyDeactivatedType) { self.swift = swift } @@ -67159,21 +67722,21 @@ public class DBXTeamLogRansomwareAlertCreateReportFailedDetails: NSObject { public override var description: String { swift.description } } -/// Objective-C compatible RansomwareAlertCreateReportFailedType struct +/// Scheduled a Dropbox Protect policy. @objc -public class DBXTeamLogRansomwareAlertCreateReportFailedType: NSObject { - /// (no description) +public class DBXTeamLogProtectPolicyScheduledDetails: NSObject { + /// Policy ID. @objc - public var description_: String { swift.description_ } + public var policyId: String { swift.policyId } @objc - public init(description_: String) { - self.swift = TeamLog.RansomwareAlertCreateReportFailedType(description_: description_) + public init(policyId: String) { + self.swift = TeamLog.ProtectPolicyScheduledDetails(policyId: policyId) } - let swift: TeamLog.RansomwareAlertCreateReportFailedType + let swift: TeamLog.ProtectPolicyScheduledDetails - public init(swift: TeamLog.RansomwareAlertCreateReportFailedType) { + public init(swift: TeamLog.ProtectPolicyScheduledDetails) { self.swift = swift } @@ -67182,21 +67745,21 @@ public class DBXTeamLogRansomwareAlertCreateReportFailedType: NSObject { public override var description: String { swift.description } } -/// Objective-C compatible RansomwareAlertCreateReportType struct +/// Objective-C compatible ProtectPolicyScheduledType struct @objc -public class DBXTeamLogRansomwareAlertCreateReportType: NSObject { +public class DBXTeamLogProtectPolicyScheduledType: NSObject { /// (no description) @objc public var description_: String { swift.description_ } @objc public init(description_: String) { - self.swift = TeamLog.RansomwareAlertCreateReportType(description_: description_) + self.swift = TeamLog.ProtectPolicyScheduledType(description_: description_) } - let swift: TeamLog.RansomwareAlertCreateReportType + let swift: TeamLog.ProtectPolicyScheduledType - public init(swift: TeamLog.RansomwareAlertCreateReportType) { + public init(swift: TeamLog.ProtectPolicyScheduledType) { self.swift = swift } @@ -67205,27 +67768,21 @@ public class DBXTeamLogRansomwareAlertCreateReportType: NSObject { public override var description: String { swift.description } } -/// Completed ransomware restore process. +/// Updated a Dropbox Protect policy. @objc -public class DBXTeamLogRansomwareRestoreProcessCompletedDetails: NSObject { - /// The status of the restore process. - @objc - public var status: String { swift.status } - /// Restored files count. - @objc - public var restoredFilesCount: NSNumber { swift.restoredFilesCount as NSNumber } - /// Restored files failed count. +public class DBXTeamLogProtectPolicyUpdatedDetails: NSObject { + /// Policy ID. @objc - public var restoredFilesFailedCount: NSNumber { swift.restoredFilesFailedCount as NSNumber } + public var policyId: String { swift.policyId } @objc - public init(status: String, restoredFilesCount: NSNumber, restoredFilesFailedCount: NSNumber) { - self.swift = TeamLog.RansomwareRestoreProcessCompletedDetails(status: status, restoredFilesCount: restoredFilesCount.int64Value, restoredFilesFailedCount: restoredFilesFailedCount.int64Value) + public init(policyId: String) { + self.swift = TeamLog.ProtectPolicyUpdatedDetails(policyId: policyId) } - let swift: TeamLog.RansomwareRestoreProcessCompletedDetails + let swift: TeamLog.ProtectPolicyUpdatedDetails - public init(swift: TeamLog.RansomwareRestoreProcessCompletedDetails) { + public init(swift: TeamLog.ProtectPolicyUpdatedDetails) { self.swift = swift } @@ -67234,21 +67791,21 @@ public class DBXTeamLogRansomwareRestoreProcessCompletedDetails: NSObject { public override var description: String { swift.description } } -/// Objective-C compatible RansomwareRestoreProcessCompletedType struct +/// Objective-C compatible ProtectPolicyUpdatedType struct @objc -public class DBXTeamLogRansomwareRestoreProcessCompletedType: NSObject { +public class DBXTeamLogProtectPolicyUpdatedType: NSObject { /// (no description) @objc public var description_: String { swift.description_ } @objc public init(description_: String) { - self.swift = TeamLog.RansomwareRestoreProcessCompletedType(description_: description_) + self.swift = TeamLog.ProtectPolicyUpdatedType(description_: description_) } - let swift: TeamLog.RansomwareRestoreProcessCompletedType + let swift: TeamLog.ProtectPolicyUpdatedType - public init(swift: TeamLog.RansomwareRestoreProcessCompletedType) { + public init(swift: TeamLog.ProtectPolicyUpdatedType) { self.swift = swift } @@ -67257,273 +67814,1791 @@ public class DBXTeamLogRansomwareRestoreProcessCompletedType: NSObject { public override var description: String { swift.description } } -/// Started ransomware restore process. +/// The category that a Dropbox Protect report belongs to @objc -public class DBXTeamLogRansomwareRestoreProcessStartedDetails: NSObject { - /// Ransomware filename extension. +public class DBXTeamLogProtectReportCategory: NSObject { + let swift: TeamLog.ProtectReportCategory + + public init(swift: TeamLog.ProtectReportCategory) { + self.swift = swift + } + + public static func factory(swift: TeamLog.ProtectReportCategory) -> DBXTeamLogProtectReportCategory { + switch swift { + case .overview: + return DBXTeamLogProtectReportCategoryOverview() + case .staleAccess: + return DBXTeamLogProtectReportCategoryStaleAccess() + case .other: + return DBXTeamLogProtectReportCategoryOther() + } + } + @objc - public var extension_: String { swift.extension_ } + public override var description: String { swift.description } @objc - public init(extension_: String) { - self.swift = TeamLog.RansomwareRestoreProcessStartedDetails(extension_: extension_) + public var asOverview: DBXTeamLogProtectReportCategoryOverview? { + return self as? DBXTeamLogProtectReportCategoryOverview } - let swift: TeamLog.RansomwareRestoreProcessStartedDetails - - public init(swift: TeamLog.RansomwareRestoreProcessStartedDetails) { - self.swift = swift + @objc + public var asStaleAccess: DBXTeamLogProtectReportCategoryStaleAccess? { + return self as? DBXTeamLogProtectReportCategoryStaleAccess } + @objc + public var asOther: DBXTeamLogProtectReportCategoryOther? { + return self as? DBXTeamLogProtectReportCategoryOther + } +} +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportCategoryOverview: DBXTeamLogProtectReportCategory { @objc - public override var description: String { swift.description } + public init() { + let swift = TeamLog.ProtectReportCategory.overview + super.init(swift: swift) + } } -/// Objective-C compatible RansomwareRestoreProcessStartedType struct +/// An unspecified error. @objc -public class DBXTeamLogRansomwareRestoreProcessStartedType: NSObject { - /// (no description) +public class DBXTeamLogProtectReportCategoryStaleAccess: DBXTeamLogProtectReportCategory { @objc - public var description_: String { swift.description_ } + public init() { + let swift = TeamLog.ProtectReportCategory.staleAccess + super.init(swift: swift) + } +} +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportCategoryOther: DBXTeamLogProtectReportCategory { @objc - public init(description_: String) { - self.swift = TeamLog.RansomwareRestoreProcessStartedType(description_: description_) + public init() { + let swift = TeamLog.ProtectReportCategory.other + super.init(swift: swift) } +} - let swift: TeamLog.RansomwareRestoreProcessStartedType +/// The metric that a Dropbox Protect report corresponds to +@objc +public class DBXTeamLogProtectReportMetric: NSObject { + let swift: TeamLog.ProtectReportMetric - public init(swift: TeamLog.RansomwareRestoreProcessStartedType) { + public init(swift: TeamLog.ProtectReportMetric) { self.swift = swift } + public static func factory(swift: TeamLog.ProtectReportMetric) -> DBXTeamLogProtectReportMetric { + switch swift { + case .externalModifiedOver1Year: + return DBXTeamLogProtectReportMetricExternalModifiedOver1Year() + case .externalModifiedOver1YearCompany: + return DBXTeamLogProtectReportMetricExternalModifiedOver1YearCompany() + case .externalModifiedOver1YearOutside: + return DBXTeamLogProtectReportMetricExternalModifiedOver1YearOutside() + case .externalModifiedOver1YearPersonal: + return DBXTeamLogProtectReportMetricExternalModifiedOver1YearPersonal() + case .externalModifiedOver1YearPublic: + return DBXTeamLogProtectReportMetricExternalModifiedOver1YearPublic() + case .externalModifiedOver2Years: + return DBXTeamLogProtectReportMetricExternalModifiedOver2Years() + case .externalModifiedOver2YearsCompany: + return DBXTeamLogProtectReportMetricExternalModifiedOver2YearsCompany() + case .externalModifiedOver2YearsOutside: + return DBXTeamLogProtectReportMetricExternalModifiedOver2YearsOutside() + case .externalModifiedOver2YearsPersonal: + return DBXTeamLogProtectReportMetricExternalModifiedOver2YearsPersonal() + case .externalModifiedOver2YearsPublic: + return DBXTeamLogProtectReportMetricExternalModifiedOver2YearsPublic() + case .externalModifiedOver3Years: + return DBXTeamLogProtectReportMetricExternalModifiedOver3Years() + case .externalModifiedOver3YearsCompany: + return DBXTeamLogProtectReportMetricExternalModifiedOver3YearsCompany() + case .externalModifiedOver3YearsOutside: + return DBXTeamLogProtectReportMetricExternalModifiedOver3YearsOutside() + case .externalModifiedOver3YearsPersonal: + return DBXTeamLogProtectReportMetricExternalModifiedOver3YearsPersonal() + case .externalModifiedOver3YearsPublic: + return DBXTeamLogProtectReportMetricExternalModifiedOver3YearsPublic() + case .externalModifiedOver5Years: + return DBXTeamLogProtectReportMetricExternalModifiedOver5Years() + case .externalModifiedOver5YearsCompany: + return DBXTeamLogProtectReportMetricExternalModifiedOver5YearsCompany() + case .externalModifiedOver5YearsOutside: + return DBXTeamLogProtectReportMetricExternalModifiedOver5YearsOutside() + case .externalModifiedOver5YearsPersonal: + return DBXTeamLogProtectReportMetricExternalModifiedOver5YearsPersonal() + case .externalModifiedOver5YearsPublic: + return DBXTeamLogProtectReportMetricExternalModifiedOver5YearsPublic() + case .foldersCompany: + return DBXTeamLogProtectReportMetricFoldersCompany() + case .foldersInternal: + return DBXTeamLogProtectReportMetricFoldersInternal() + case .foldersOutside: + return DBXTeamLogProtectReportMetricFoldersOutside() + case .foldersPersonal: + return DBXTeamLogProtectReportMetricFoldersPersonal() + case .foldersPublic: + return DBXTeamLogProtectReportMetricFoldersPublic() + case .internalModifiedOver1Year: + return DBXTeamLogProtectReportMetricInternalModifiedOver1Year() + case .internalModifiedOver1YearCompany: + return DBXTeamLogProtectReportMetricInternalModifiedOver1YearCompany() + case .internalModifiedOver1YearOutside: + return DBXTeamLogProtectReportMetricInternalModifiedOver1YearOutside() + case .internalModifiedOver1YearPersonal: + return DBXTeamLogProtectReportMetricInternalModifiedOver1YearPersonal() + case .internalModifiedOver1YearPublic: + return DBXTeamLogProtectReportMetricInternalModifiedOver1YearPublic() + case .internalModifiedOver2Years: + return DBXTeamLogProtectReportMetricInternalModifiedOver2Years() + case .internalModifiedOver2YearsCompany: + return DBXTeamLogProtectReportMetricInternalModifiedOver2YearsCompany() + case .internalModifiedOver2YearsOutside: + return DBXTeamLogProtectReportMetricInternalModifiedOver2YearsOutside() + case .internalModifiedOver2YearsPersonal: + return DBXTeamLogProtectReportMetricInternalModifiedOver2YearsPersonal() + case .internalModifiedOver2YearsPublic: + return DBXTeamLogProtectReportMetricInternalModifiedOver2YearsPublic() + case .internalModifiedOver3Years: + return DBXTeamLogProtectReportMetricInternalModifiedOver3Years() + case .internalModifiedOver3YearsCompany: + return DBXTeamLogProtectReportMetricInternalModifiedOver3YearsCompany() + case .internalModifiedOver3YearsOutside: + return DBXTeamLogProtectReportMetricInternalModifiedOver3YearsOutside() + case .internalModifiedOver3YearsPersonal: + return DBXTeamLogProtectReportMetricInternalModifiedOver3YearsPersonal() + case .internalModifiedOver3YearsPublic: + return DBXTeamLogProtectReportMetricInternalModifiedOver3YearsPublic() + case .internalModifiedOver5Years: + return DBXTeamLogProtectReportMetricInternalModifiedOver5Years() + case .internalModifiedOver5YearsCompany: + return DBXTeamLogProtectReportMetricInternalModifiedOver5YearsCompany() + case .internalModifiedOver5YearsOutside: + return DBXTeamLogProtectReportMetricInternalModifiedOver5YearsOutside() + case .internalModifiedOver5YearsPersonal: + return DBXTeamLogProtectReportMetricInternalModifiedOver5YearsPersonal() + case .internalModifiedOver5YearsPublic: + return DBXTeamLogProtectReportMetricInternalModifiedOver5YearsPublic() + case .itemsAll: + return DBXTeamLogProtectReportMetricItemsAll() + case .itemsCompanyAccess: + return DBXTeamLogProtectReportMetricItemsCompanyAccess() + case .itemsInternallyOwned: + return DBXTeamLogProtectReportMetricItemsInternallyOwned() + case .itemsModifiedOver1Year: + return DBXTeamLogProtectReportMetricItemsModifiedOver1Year() + case .itemsModifiedOver3Years: + return DBXTeamLogProtectReportMetricItemsModifiedOver3Years() + case .itemsOutsideAccess: + return DBXTeamLogProtectReportMetricItemsOutsideAccess() + case .itemsPersonalAccess: + return DBXTeamLogProtectReportMetricItemsPersonalAccess() + case .itemsPublicLinks: + return DBXTeamLogProtectReportMetricItemsPublicLinks() + case .otherFolders: + return DBXTeamLogProtectReportMetricOtherFolders() + case .otherSharedDrives: + return DBXTeamLogProtectReportMetricOtherSharedDrives() + case .sharedDrivesInternal: + return DBXTeamLogProtectReportMetricSharedDrivesInternal() + case .sharedDrivesOutside: + return DBXTeamLogProtectReportMetricSharedDrivesOutside() + case .sharedDrivesPersonal: + return DBXTeamLogProtectReportMetricSharedDrivesPersonal() + case .other: + return DBXTeamLogProtectReportMetricOther() + } + } @objc public override var description: String { swift.description } -} -/// Recipients Configuration -@objc -public class DBXTeamLogRecipientsConfiguration: NSObject { - /// Recipients setting type. - @objc - public var recipientSettingType: DBXTeamLogAlertRecipientsSettingType? { guard let swift = swift.recipientSettingType else { return nil }; return DBXTeamLogAlertRecipientsSettingType(swift: swift) } - /// A list of user emails to notify. - @objc - public var emails: Array? { swift.emails } - /// A list of groups to notify. @objc - public var groups: Array? { swift.groups } + public var asExternalModifiedOver1Year: DBXTeamLogProtectReportMetricExternalModifiedOver1Year? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver1Year + } @objc - public init(recipientSettingType: DBXTeamLogAlertRecipientsSettingType?, emails: Array?, groups: Array?) { - self.swift = TeamLog.RecipientsConfiguration(recipientSettingType: recipientSettingType?.swift, emails: emails, groups: groups) + public var asExternalModifiedOver1YearCompany: DBXTeamLogProtectReportMetricExternalModifiedOver1YearCompany? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver1YearCompany } - let swift: TeamLog.RecipientsConfiguration - - public init(swift: TeamLog.RecipientsConfiguration) { - self.swift = swift + @objc + public var asExternalModifiedOver1YearOutside: DBXTeamLogProtectReportMetricExternalModifiedOver1YearOutside? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver1YearOutside } + @objc + public var asExternalModifiedOver1YearPersonal: DBXTeamLogProtectReportMetricExternalModifiedOver1YearPersonal? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver1YearPersonal + } @objc - public override var description: String { swift.description } -} + public var asExternalModifiedOver1YearPublic: DBXTeamLogProtectReportMetricExternalModifiedOver1YearPublic? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver1YearPublic + } -/// Provides the indices of the source asset and the destination asset for a relocate action. -@objc -public class DBXTeamLogRelocateAssetReferencesLogInfo: NSObject { - /// Source asset position in the Assets list. @objc - public var srcAssetIndex: NSNumber { swift.srcAssetIndex as NSNumber } - /// Destination asset position in the Assets list. + public var asExternalModifiedOver2Years: DBXTeamLogProtectReportMetricExternalModifiedOver2Years? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver2Years + } + @objc - public var destAssetIndex: NSNumber { swift.destAssetIndex as NSNumber } + public var asExternalModifiedOver2YearsCompany: DBXTeamLogProtectReportMetricExternalModifiedOver2YearsCompany? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver2YearsCompany + } @objc - public init(srcAssetIndex: NSNumber, destAssetIndex: NSNumber) { - self.swift = TeamLog.RelocateAssetReferencesLogInfo(srcAssetIndex: srcAssetIndex.uint64Value, destAssetIndex: destAssetIndex.uint64Value) + public var asExternalModifiedOver2YearsOutside: DBXTeamLogProtectReportMetricExternalModifiedOver2YearsOutside? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver2YearsOutside } - let swift: TeamLog.RelocateAssetReferencesLogInfo + @objc + public var asExternalModifiedOver2YearsPersonal: DBXTeamLogProtectReportMetricExternalModifiedOver2YearsPersonal? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver2YearsPersonal + } - public init(swift: TeamLog.RelocateAssetReferencesLogInfo) { - self.swift = swift + @objc + public var asExternalModifiedOver2YearsPublic: DBXTeamLogProtectReportMetricExternalModifiedOver2YearsPublic? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver2YearsPublic } + @objc + public var asExternalModifiedOver3Years: DBXTeamLogProtectReportMetricExternalModifiedOver3Years? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver3Years + } @objc - public override var description: String { swift.description } -} + public var asExternalModifiedOver3YearsCompany: DBXTeamLogProtectReportMetricExternalModifiedOver3YearsCompany? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver3YearsCompany + } -/// Policy for deciding who can be added to Replay content -@objc -public class DBXTeamLogReplayAddingPeoplePolicy: NSObject { - let swift: TeamLog.ReplayAddingPeoplePolicy + @objc + public var asExternalModifiedOver3YearsOutside: DBXTeamLogProtectReportMetricExternalModifiedOver3YearsOutside? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver3YearsOutside + } - public init(swift: TeamLog.ReplayAddingPeoplePolicy) { - self.swift = swift + @objc + public var asExternalModifiedOver3YearsPersonal: DBXTeamLogProtectReportMetricExternalModifiedOver3YearsPersonal? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver3YearsPersonal } - public static func factory(swift: TeamLog.ReplayAddingPeoplePolicy) -> DBXTeamLogReplayAddingPeoplePolicy { - switch swift { - case .anyone: - return DBXTeamLogReplayAddingPeoplePolicyAnyone() - case .teamAndAllowlist: - return DBXTeamLogReplayAddingPeoplePolicyTeamAndAllowlist() - case .teamOnly: - return DBXTeamLogReplayAddingPeoplePolicyTeamOnly() - case .other: - return DBXTeamLogReplayAddingPeoplePolicyOther() - } + @objc + public var asExternalModifiedOver3YearsPublic: DBXTeamLogProtectReportMetricExternalModifiedOver3YearsPublic? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver3YearsPublic } @objc - public override var description: String { swift.description } + public var asExternalModifiedOver5Years: DBXTeamLogProtectReportMetricExternalModifiedOver5Years? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver5Years + } @objc - public var asAnyone: DBXTeamLogReplayAddingPeoplePolicyAnyone? { - return self as? DBXTeamLogReplayAddingPeoplePolicyAnyone + public var asExternalModifiedOver5YearsCompany: DBXTeamLogProtectReportMetricExternalModifiedOver5YearsCompany? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver5YearsCompany } @objc - public var asTeamAndAllowlist: DBXTeamLogReplayAddingPeoplePolicyTeamAndAllowlist? { - return self as? DBXTeamLogReplayAddingPeoplePolicyTeamAndAllowlist + public var asExternalModifiedOver5YearsOutside: DBXTeamLogProtectReportMetricExternalModifiedOver5YearsOutside? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver5YearsOutside } @objc - public var asTeamOnly: DBXTeamLogReplayAddingPeoplePolicyTeamOnly? { - return self as? DBXTeamLogReplayAddingPeoplePolicyTeamOnly + public var asExternalModifiedOver5YearsPersonal: DBXTeamLogProtectReportMetricExternalModifiedOver5YearsPersonal? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver5YearsPersonal } @objc - public var asOther: DBXTeamLogReplayAddingPeoplePolicyOther? { - return self as? DBXTeamLogReplayAddingPeoplePolicyOther + public var asExternalModifiedOver5YearsPublic: DBXTeamLogProtectReportMetricExternalModifiedOver5YearsPublic? { + return self as? DBXTeamLogProtectReportMetricExternalModifiedOver5YearsPublic } -} -/// An unspecified error. -@objc -public class DBXTeamLogReplayAddingPeoplePolicyAnyone: DBXTeamLogReplayAddingPeoplePolicy { @objc - public init() { - let swift = TeamLog.ReplayAddingPeoplePolicy.anyone - super.init(swift: swift) + public var asFoldersCompany: DBXTeamLogProtectReportMetricFoldersCompany? { + return self as? DBXTeamLogProtectReportMetricFoldersCompany } -} -/// An unspecified error. -@objc -public class DBXTeamLogReplayAddingPeoplePolicyTeamAndAllowlist: DBXTeamLogReplayAddingPeoplePolicy { @objc - public init() { - let swift = TeamLog.ReplayAddingPeoplePolicy.teamAndAllowlist - super.init(swift: swift) + public var asFoldersInternal: DBXTeamLogProtectReportMetricFoldersInternal? { + return self as? DBXTeamLogProtectReportMetricFoldersInternal } -} -/// An unspecified error. -@objc -public class DBXTeamLogReplayAddingPeoplePolicyTeamOnly: DBXTeamLogReplayAddingPeoplePolicy { @objc - public init() { - let swift = TeamLog.ReplayAddingPeoplePolicy.teamOnly - super.init(swift: swift) + public var asFoldersOutside: DBXTeamLogProtectReportMetricFoldersOutside? { + return self as? DBXTeamLogProtectReportMetricFoldersOutside } -} -/// An unspecified error. -@objc -public class DBXTeamLogReplayAddingPeoplePolicyOther: DBXTeamLogReplayAddingPeoplePolicy { @objc - public init() { - let swift = TeamLog.ReplayAddingPeoplePolicy.other - super.init(swift: swift) + public var asFoldersPersonal: DBXTeamLogProtectReportMetricFoldersPersonal? { + return self as? DBXTeamLogProtectReportMetricFoldersPersonal } -} -/// Changed the policy for adding people to Replay content. -@objc -public class DBXTeamLogReplayAddingPeoplePolicyChangedDetails: NSObject { - /// To. @objc - public var newValue: DBXTeamLogReplayAddingPeoplePolicy { DBXTeamLogReplayAddingPeoplePolicy(swift: swift.newValue) } - /// From. + public var asFoldersPublic: DBXTeamLogProtectReportMetricFoldersPublic? { + return self as? DBXTeamLogProtectReportMetricFoldersPublic + } + @objc - public var previousValue: DBXTeamLogReplayAddingPeoplePolicy { DBXTeamLogReplayAddingPeoplePolicy(swift: swift.previousValue) } + public var asInternalModifiedOver1Year: DBXTeamLogProtectReportMetricInternalModifiedOver1Year? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver1Year + } @objc - public init(newValue: DBXTeamLogReplayAddingPeoplePolicy, previousValue: DBXTeamLogReplayAddingPeoplePolicy) { - self.swift = TeamLog.ReplayAddingPeoplePolicyChangedDetails(newValue: newValue.swift, previousValue: previousValue.swift) + public var asInternalModifiedOver1YearCompany: DBXTeamLogProtectReportMetricInternalModifiedOver1YearCompany? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver1YearCompany } - let swift: TeamLog.ReplayAddingPeoplePolicyChangedDetails + @objc + public var asInternalModifiedOver1YearOutside: DBXTeamLogProtectReportMetricInternalModifiedOver1YearOutside? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver1YearOutside + } - public init(swift: TeamLog.ReplayAddingPeoplePolicyChangedDetails) { - self.swift = swift + @objc + public var asInternalModifiedOver1YearPersonal: DBXTeamLogProtectReportMetricInternalModifiedOver1YearPersonal? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver1YearPersonal } + @objc + public var asInternalModifiedOver1YearPublic: DBXTeamLogProtectReportMetricInternalModifiedOver1YearPublic? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver1YearPublic + } @objc - public override var description: String { swift.description } -} + public var asInternalModifiedOver2Years: DBXTeamLogProtectReportMetricInternalModifiedOver2Years? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver2Years + } -/// Objective-C compatible ReplayAddingPeoplePolicyChangedType struct -@objc -public class DBXTeamLogReplayAddingPeoplePolicyChangedType: NSObject { - /// (no description) @objc - public var description_: String { swift.description_ } + public var asInternalModifiedOver2YearsCompany: DBXTeamLogProtectReportMetricInternalModifiedOver2YearsCompany? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver2YearsCompany + } @objc - public init(description_: String) { - self.swift = TeamLog.ReplayAddingPeoplePolicyChangedType(description_: description_) + public var asInternalModifiedOver2YearsOutside: DBXTeamLogProtectReportMetricInternalModifiedOver2YearsOutside? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver2YearsOutside } - let swift: TeamLog.ReplayAddingPeoplePolicyChangedType + @objc + public var asInternalModifiedOver2YearsPersonal: DBXTeamLogProtectReportMetricInternalModifiedOver2YearsPersonal? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver2YearsPersonal + } - public init(swift: TeamLog.ReplayAddingPeoplePolicyChangedType) { - self.swift = swift + @objc + public var asInternalModifiedOver2YearsPublic: DBXTeamLogProtectReportMetricInternalModifiedOver2YearsPublic? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver2YearsPublic } + @objc + public var asInternalModifiedOver3Years: DBXTeamLogProtectReportMetricInternalModifiedOver3Years? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver3Years + } @objc - public override var description: String { swift.description } -} + public var asInternalModifiedOver3YearsCompany: DBXTeamLogProtectReportMetricInternalModifiedOver3YearsCompany? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver3YearsCompany + } -/// Deleted files in Replay. -@objc -public class DBXTeamLogReplayFileDeleteDetails: NSObject { + @objc + public var asInternalModifiedOver3YearsOutside: DBXTeamLogProtectReportMetricInternalModifiedOver3YearsOutside? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver3YearsOutside + } - let swift: TeamLog.ReplayFileDeleteDetails + @objc + public var asInternalModifiedOver3YearsPersonal: DBXTeamLogProtectReportMetricInternalModifiedOver3YearsPersonal? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver3YearsPersonal + } - public init(swift: TeamLog.ReplayFileDeleteDetails) { - self.swift = swift + @objc + public var asInternalModifiedOver3YearsPublic: DBXTeamLogProtectReportMetricInternalModifiedOver3YearsPublic? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver3YearsPublic } + @objc + public var asInternalModifiedOver5Years: DBXTeamLogProtectReportMetricInternalModifiedOver5Years? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver5Years + } @objc - public override var description: String { swift.description } -} + public var asInternalModifiedOver5YearsCompany: DBXTeamLogProtectReportMetricInternalModifiedOver5YearsCompany? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver5YearsCompany + } -/// Objective-C compatible ReplayFileDeleteType struct -@objc -public class DBXTeamLogReplayFileDeleteType: NSObject { - /// (no description) @objc - public var description_: String { swift.description_ } + public var asInternalModifiedOver5YearsOutside: DBXTeamLogProtectReportMetricInternalModifiedOver5YearsOutside? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver5YearsOutside + } @objc - public init(description_: String) { - self.swift = TeamLog.ReplayFileDeleteType(description_: description_) + public var asInternalModifiedOver5YearsPersonal: DBXTeamLogProtectReportMetricInternalModifiedOver5YearsPersonal? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver5YearsPersonal } - let swift: TeamLog.ReplayFileDeleteType + @objc + public var asInternalModifiedOver5YearsPublic: DBXTeamLogProtectReportMetricInternalModifiedOver5YearsPublic? { + return self as? DBXTeamLogProtectReportMetricInternalModifiedOver5YearsPublic + } - public init(swift: TeamLog.ReplayFileDeleteType) { - self.swift = swift + @objc + public var asItemsAll: DBXTeamLogProtectReportMetricItemsAll? { + return self as? DBXTeamLogProtectReportMetricItemsAll + } + + @objc + public var asItemsCompanyAccess: DBXTeamLogProtectReportMetricItemsCompanyAccess? { + return self as? DBXTeamLogProtectReportMetricItemsCompanyAccess + } + + @objc + public var asItemsInternallyOwned: DBXTeamLogProtectReportMetricItemsInternallyOwned? { + return self as? DBXTeamLogProtectReportMetricItemsInternallyOwned + } + + @objc + public var asItemsModifiedOver1Year: DBXTeamLogProtectReportMetricItemsModifiedOver1Year? { + return self as? DBXTeamLogProtectReportMetricItemsModifiedOver1Year + } + + @objc + public var asItemsModifiedOver3Years: DBXTeamLogProtectReportMetricItemsModifiedOver3Years? { + return self as? DBXTeamLogProtectReportMetricItemsModifiedOver3Years + } + + @objc + public var asItemsOutsideAccess: DBXTeamLogProtectReportMetricItemsOutsideAccess? { + return self as? DBXTeamLogProtectReportMetricItemsOutsideAccess + } + + @objc + public var asItemsPersonalAccess: DBXTeamLogProtectReportMetricItemsPersonalAccess? { + return self as? DBXTeamLogProtectReportMetricItemsPersonalAccess + } + + @objc + public var asItemsPublicLinks: DBXTeamLogProtectReportMetricItemsPublicLinks? { + return self as? DBXTeamLogProtectReportMetricItemsPublicLinks + } + + @objc + public var asOtherFolders: DBXTeamLogProtectReportMetricOtherFolders? { + return self as? DBXTeamLogProtectReportMetricOtherFolders + } + + @objc + public var asOtherSharedDrives: DBXTeamLogProtectReportMetricOtherSharedDrives? { + return self as? DBXTeamLogProtectReportMetricOtherSharedDrives + } + + @objc + public var asSharedDrivesInternal: DBXTeamLogProtectReportMetricSharedDrivesInternal? { + return self as? DBXTeamLogProtectReportMetricSharedDrivesInternal + } + + @objc + public var asSharedDrivesOutside: DBXTeamLogProtectReportMetricSharedDrivesOutside? { + return self as? DBXTeamLogProtectReportMetricSharedDrivesOutside + } + + @objc + public var asSharedDrivesPersonal: DBXTeamLogProtectReportMetricSharedDrivesPersonal? { + return self as? DBXTeamLogProtectReportMetricSharedDrivesPersonal + } + + @objc + public var asOther: DBXTeamLogProtectReportMetricOther? { + return self as? DBXTeamLogProtectReportMetricOther + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver1Year: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver1Year + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver1YearCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver1YearCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver1YearOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver1YearOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver1YearPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver1YearPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver1YearPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver1YearPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver2Years: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver2Years + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver2YearsCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver2YearsCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver2YearsOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver2YearsOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver2YearsPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver2YearsPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver2YearsPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver2YearsPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver3Years: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver3Years + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver3YearsCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver3YearsCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver3YearsOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver3YearsOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver3YearsPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver3YearsPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver3YearsPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver3YearsPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver5Years: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver5Years + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver5YearsCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver5YearsCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver5YearsOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver5YearsOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver5YearsPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver5YearsPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricExternalModifiedOver5YearsPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.externalModifiedOver5YearsPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricFoldersCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.foldersCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricFoldersInternal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.foldersInternal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricFoldersOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.foldersOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricFoldersPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.foldersPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricFoldersPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.foldersPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver1Year: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver1Year + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver1YearCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver1YearCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver1YearOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver1YearOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver1YearPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver1YearPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver1YearPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver1YearPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver2Years: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver2Years + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver2YearsCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver2YearsCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver2YearsOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver2YearsOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver2YearsPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver2YearsPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver2YearsPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver2YearsPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver3Years: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver3Years + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver3YearsCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver3YearsCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver3YearsOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver3YearsOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver3YearsPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver3YearsPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver3YearsPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver3YearsPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver5Years: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver5Years + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver5YearsCompany: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver5YearsCompany + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver5YearsOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver5YearsOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver5YearsPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver5YearsPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricInternalModifiedOver5YearsPublic: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.internalModifiedOver5YearsPublic + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricItemsAll: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.itemsAll + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricItemsCompanyAccess: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.itemsCompanyAccess + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricItemsInternallyOwned: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.itemsInternallyOwned + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricItemsModifiedOver1Year: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.itemsModifiedOver1Year + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricItemsModifiedOver3Years: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.itemsModifiedOver3Years + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricItemsOutsideAccess: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.itemsOutsideAccess + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricItemsPersonalAccess: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.itemsPersonalAccess + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricItemsPublicLinks: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.itemsPublicLinks + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricOtherFolders: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.otherFolders + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricOtherSharedDrives: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.otherSharedDrives + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricSharedDrivesInternal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.sharedDrivesInternal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricSharedDrivesOutside: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.sharedDrivesOutside + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricSharedDrivesPersonal: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.sharedDrivesPersonal + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportMetricOther: DBXTeamLogProtectReportMetric { + @objc + public init() { + let swift = TeamLog.ProtectReportMetric.other + super.init(swift: swift) + } +} + +/// The section that a Dropbox Protect report belongs to +@objc +public class DBXTeamLogProtectReportSection: NSObject { + let swift: TeamLog.ProtectReportSection + + public init(swift: TeamLog.ProtectReportSection) { + self.swift = swift + } + + public static func factory(swift: TeamLog.ProtectReportSection) -> DBXTeamLogProtectReportSection { + switch swift { + case .items: + return DBXTeamLogProtectReportSectionItems() + case .overviewOther: + return DBXTeamLogProtectReportSectionOverviewOther() + case .ownedExternally: + return DBXTeamLogProtectReportSectionOwnedExternally() + case .ownedInternally: + return DBXTeamLogProtectReportSectionOwnedInternally() + case .other: + return DBXTeamLogProtectReportSectionOther() + } + } + + @objc + public override var description: String { swift.description } + + @objc + public var asItems: DBXTeamLogProtectReportSectionItems? { + return self as? DBXTeamLogProtectReportSectionItems + } + + @objc + public var asOverviewOther: DBXTeamLogProtectReportSectionOverviewOther? { + return self as? DBXTeamLogProtectReportSectionOverviewOther + } + + @objc + public var asOwnedExternally: DBXTeamLogProtectReportSectionOwnedExternally? { + return self as? DBXTeamLogProtectReportSectionOwnedExternally + } + + @objc + public var asOwnedInternally: DBXTeamLogProtectReportSectionOwnedInternally? { + return self as? DBXTeamLogProtectReportSectionOwnedInternally + } + + @objc + public var asOther: DBXTeamLogProtectReportSectionOther? { + return self as? DBXTeamLogProtectReportSectionOther + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportSectionItems: DBXTeamLogProtectReportSection { + @objc + public init() { + let swift = TeamLog.ProtectReportSection.items + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportSectionOverviewOther: DBXTeamLogProtectReportSection { + @objc + public init() { + let swift = TeamLog.ProtectReportSection.overviewOther + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportSectionOwnedExternally: DBXTeamLogProtectReportSection { + @objc + public init() { + let swift = TeamLog.ProtectReportSection.ownedExternally + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportSectionOwnedInternally: DBXTeamLogProtectReportSection { + @objc + public init() { + let swift = TeamLog.ProtectReportSection.ownedInternally + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogProtectReportSectionOther: DBXTeamLogProtectReportSection { + @objc + public init() { + let swift = TeamLog.ProtectReportSection.other + super.init(swift: swift) + } +} + +/// Viewed a Dropbox Protect report. +@objc +public class DBXTeamLogProtectReportViewDetails: NSObject { + /// The category of the report that was viewed. + @objc + public var reportCategory: DBXTeamLogProtectReportCategory { DBXTeamLogProtectReportCategory(swift: swift.reportCategory) } + /// The section of the report that was viewed. + @objc + public var reportSection: DBXTeamLogProtectReportSection? { guard let swift = swift.reportSection else { return nil }; return DBXTeamLogProtectReportSection(swift: swift) } + /// The metric of the report that was viewed. + @objc + public var reportMetric: DBXTeamLogProtectReportMetric? { guard let swift = swift.reportMetric else { return nil }; return DBXTeamLogProtectReportMetric(swift: swift) } + + @objc + public init(reportCategory: DBXTeamLogProtectReportCategory, reportSection: DBXTeamLogProtectReportSection?, reportMetric: DBXTeamLogProtectReportMetric?) { + self.swift = TeamLog.ProtectReportViewDetails(reportCategory: reportCategory.swift, reportSection: reportSection?.swift, reportMetric: reportMetric?.swift) + } + + let swift: TeamLog.ProtectReportViewDetails + + public init(swift: TeamLog.ProtectReportViewDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible ProtectReportViewType struct +@objc +public class DBXTeamLogProtectReportViewType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.ProtectReportViewType(description_: description_) + } + + let swift: TeamLog.ProtectReportViewType + + public init(swift: TeamLog.ProtectReportViewType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Quick action type. +@objc +public class DBXTeamLogQuickActionType: NSObject { + let swift: TeamLog.QuickActionType + + public init(swift: TeamLog.QuickActionType) { + self.swift = swift + } + + public static func factory(swift: TeamLog.QuickActionType) -> DBXTeamLogQuickActionType { + switch swift { + case .deleteSharedLink: + return DBXTeamLogQuickActionTypeDeleteSharedLink() + case .resetPassword: + return DBXTeamLogQuickActionTypeResetPassword() + case .restoreFileOrFolder: + return DBXTeamLogQuickActionTypeRestoreFileOrFolder() + case .unlinkApp: + return DBXTeamLogQuickActionTypeUnlinkApp() + case .unlinkDevice: + return DBXTeamLogQuickActionTypeUnlinkDevice() + case .unlinkSession: + return DBXTeamLogQuickActionTypeUnlinkSession() + case .other: + return DBXTeamLogQuickActionTypeOther() + } + } + + @objc + public override var description: String { swift.description } + + @objc + public var asDeleteSharedLink: DBXTeamLogQuickActionTypeDeleteSharedLink? { + return self as? DBXTeamLogQuickActionTypeDeleteSharedLink + } + + @objc + public var asResetPassword: DBXTeamLogQuickActionTypeResetPassword? { + return self as? DBXTeamLogQuickActionTypeResetPassword + } + + @objc + public var asRestoreFileOrFolder: DBXTeamLogQuickActionTypeRestoreFileOrFolder? { + return self as? DBXTeamLogQuickActionTypeRestoreFileOrFolder + } + + @objc + public var asUnlinkApp: DBXTeamLogQuickActionTypeUnlinkApp? { + return self as? DBXTeamLogQuickActionTypeUnlinkApp + } + + @objc + public var asUnlinkDevice: DBXTeamLogQuickActionTypeUnlinkDevice? { + return self as? DBXTeamLogQuickActionTypeUnlinkDevice + } + + @objc + public var asUnlinkSession: DBXTeamLogQuickActionTypeUnlinkSession? { + return self as? DBXTeamLogQuickActionTypeUnlinkSession + } + + @objc + public var asOther: DBXTeamLogQuickActionTypeOther? { + return self as? DBXTeamLogQuickActionTypeOther + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogQuickActionTypeDeleteSharedLink: DBXTeamLogQuickActionType { + @objc + public init() { + let swift = TeamLog.QuickActionType.deleteSharedLink + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogQuickActionTypeResetPassword: DBXTeamLogQuickActionType { + @objc + public init() { + let swift = TeamLog.QuickActionType.resetPassword + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogQuickActionTypeRestoreFileOrFolder: DBXTeamLogQuickActionType { + @objc + public init() { + let swift = TeamLog.QuickActionType.restoreFileOrFolder + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogQuickActionTypeUnlinkApp: DBXTeamLogQuickActionType { + @objc + public init() { + let swift = TeamLog.QuickActionType.unlinkApp + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogQuickActionTypeUnlinkDevice: DBXTeamLogQuickActionType { + @objc + public init() { + let swift = TeamLog.QuickActionType.unlinkDevice + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogQuickActionTypeUnlinkSession: DBXTeamLogQuickActionType { + @objc + public init() { + let swift = TeamLog.QuickActionType.unlinkSession + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogQuickActionTypeOther: DBXTeamLogQuickActionType { + @objc + public init() { + let swift = TeamLog.QuickActionType.other + super.init(swift: swift) + } +} + +/// Created ransomware report. +@objc +public class DBXTeamLogRansomwareAlertCreateReportDetails: NSObject { + + let swift: TeamLog.RansomwareAlertCreateReportDetails + + public init(swift: TeamLog.RansomwareAlertCreateReportDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Couldn't generate ransomware report. +@objc +public class DBXTeamLogRansomwareAlertCreateReportFailedDetails: NSObject { + /// Failure reason. + @objc + public var failureReason: DBXTeamTeamReportFailureReason { DBXTeamTeamReportFailureReason(swift: swift.failureReason) } + + @objc + public init(failureReason: DBXTeamTeamReportFailureReason) { + self.swift = TeamLog.RansomwareAlertCreateReportFailedDetails(failureReason: failureReason.swift) + } + + let swift: TeamLog.RansomwareAlertCreateReportFailedDetails + + public init(swift: TeamLog.RansomwareAlertCreateReportFailedDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible RansomwareAlertCreateReportFailedType struct +@objc +public class DBXTeamLogRansomwareAlertCreateReportFailedType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.RansomwareAlertCreateReportFailedType(description_: description_) + } + + let swift: TeamLog.RansomwareAlertCreateReportFailedType + + public init(swift: TeamLog.RansomwareAlertCreateReportFailedType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible RansomwareAlertCreateReportType struct +@objc +public class DBXTeamLogRansomwareAlertCreateReportType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.RansomwareAlertCreateReportType(description_: description_) + } + + let swift: TeamLog.RansomwareAlertCreateReportType + + public init(swift: TeamLog.RansomwareAlertCreateReportType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Completed ransomware restore process. +@objc +public class DBXTeamLogRansomwareRestoreProcessCompletedDetails: NSObject { + /// The status of the restore process. + @objc + public var status: String { swift.status } + /// Restored files count. + @objc + public var restoredFilesCount: NSNumber { swift.restoredFilesCount as NSNumber } + /// Restored files failed count. + @objc + public var restoredFilesFailedCount: NSNumber { swift.restoredFilesFailedCount as NSNumber } + + @objc + public init(status: String, restoredFilesCount: NSNumber, restoredFilesFailedCount: NSNumber) { + self.swift = TeamLog.RansomwareRestoreProcessCompletedDetails(status: status, restoredFilesCount: restoredFilesCount.int64Value, restoredFilesFailedCount: restoredFilesFailedCount.int64Value) + } + + let swift: TeamLog.RansomwareRestoreProcessCompletedDetails + + public init(swift: TeamLog.RansomwareRestoreProcessCompletedDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible RansomwareRestoreProcessCompletedType struct +@objc +public class DBXTeamLogRansomwareRestoreProcessCompletedType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.RansomwareRestoreProcessCompletedType(description_: description_) + } + + let swift: TeamLog.RansomwareRestoreProcessCompletedType + + public init(swift: TeamLog.RansomwareRestoreProcessCompletedType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Started ransomware restore process. +@objc +public class DBXTeamLogRansomwareRestoreProcessStartedDetails: NSObject { + /// Ransomware filename extension. + @objc + public var extension_: String { swift.extension_ } + + @objc + public init(extension_: String) { + self.swift = TeamLog.RansomwareRestoreProcessStartedDetails(extension_: extension_) + } + + let swift: TeamLog.RansomwareRestoreProcessStartedDetails + + public init(swift: TeamLog.RansomwareRestoreProcessStartedDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible RansomwareRestoreProcessStartedType struct +@objc +public class DBXTeamLogRansomwareRestoreProcessStartedType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.RansomwareRestoreProcessStartedType(description_: description_) + } + + let swift: TeamLog.RansomwareRestoreProcessStartedType + + public init(swift: TeamLog.RansomwareRestoreProcessStartedType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Recipients Configuration +@objc +public class DBXTeamLogRecipientsConfiguration: NSObject { + /// Recipients setting type. + @objc + public var recipientSettingType: DBXTeamLogAlertRecipientsSettingType? { guard let swift = swift.recipientSettingType else { return nil }; return DBXTeamLogAlertRecipientsSettingType(swift: swift) } + /// A list of user emails to notify. + @objc + public var emails: Array? { swift.emails } + /// A list of groups to notify. + @objc + public var groups: Array? { swift.groups } + + @objc + public init(recipientSettingType: DBXTeamLogAlertRecipientsSettingType?, emails: Array?, groups: Array?) { + self.swift = TeamLog.RecipientsConfiguration(recipientSettingType: recipientSettingType?.swift, emails: emails, groups: groups) + } + + let swift: TeamLog.RecipientsConfiguration + + public init(swift: TeamLog.RecipientsConfiguration) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Provides the indices of the source asset and the destination asset for a relocate action. +@objc +public class DBXTeamLogRelocateAssetReferencesLogInfo: NSObject { + /// Source asset position in the Assets list. + @objc + public var srcAssetIndex: NSNumber { swift.srcAssetIndex as NSNumber } + /// Destination asset position in the Assets list. + @objc + public var destAssetIndex: NSNumber { swift.destAssetIndex as NSNumber } + + @objc + public init(srcAssetIndex: NSNumber, destAssetIndex: NSNumber) { + self.swift = TeamLog.RelocateAssetReferencesLogInfo(srcAssetIndex: srcAssetIndex.uint64Value, destAssetIndex: destAssetIndex.uint64Value) + } + + let swift: TeamLog.RelocateAssetReferencesLogInfo + + public init(swift: TeamLog.RelocateAssetReferencesLogInfo) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Policy for deciding who can be added to Replay content +@objc +public class DBXTeamLogReplayAddingPeoplePolicy: NSObject { + let swift: TeamLog.ReplayAddingPeoplePolicy + + public init(swift: TeamLog.ReplayAddingPeoplePolicy) { + self.swift = swift + } + + public static func factory(swift: TeamLog.ReplayAddingPeoplePolicy) -> DBXTeamLogReplayAddingPeoplePolicy { + switch swift { + case .anyone: + return DBXTeamLogReplayAddingPeoplePolicyAnyone() + case .teamAndAllowlist: + return DBXTeamLogReplayAddingPeoplePolicyTeamAndAllowlist() + case .teamOnly: + return DBXTeamLogReplayAddingPeoplePolicyTeamOnly() + case .other: + return DBXTeamLogReplayAddingPeoplePolicyOther() + } + } + + @objc + public override var description: String { swift.description } + + @objc + public var asAnyone: DBXTeamLogReplayAddingPeoplePolicyAnyone? { + return self as? DBXTeamLogReplayAddingPeoplePolicyAnyone + } + + @objc + public var asTeamAndAllowlist: DBXTeamLogReplayAddingPeoplePolicyTeamAndAllowlist? { + return self as? DBXTeamLogReplayAddingPeoplePolicyTeamAndAllowlist + } + + @objc + public var asTeamOnly: DBXTeamLogReplayAddingPeoplePolicyTeamOnly? { + return self as? DBXTeamLogReplayAddingPeoplePolicyTeamOnly + } + + @objc + public var asOther: DBXTeamLogReplayAddingPeoplePolicyOther? { + return self as? DBXTeamLogReplayAddingPeoplePolicyOther + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogReplayAddingPeoplePolicyAnyone: DBXTeamLogReplayAddingPeoplePolicy { + @objc + public init() { + let swift = TeamLog.ReplayAddingPeoplePolicy.anyone + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogReplayAddingPeoplePolicyTeamAndAllowlist: DBXTeamLogReplayAddingPeoplePolicy { + @objc + public init() { + let swift = TeamLog.ReplayAddingPeoplePolicy.teamAndAllowlist + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogReplayAddingPeoplePolicyTeamOnly: DBXTeamLogReplayAddingPeoplePolicy { + @objc + public init() { + let swift = TeamLog.ReplayAddingPeoplePolicy.teamOnly + super.init(swift: swift) + } +} + +/// An unspecified error. +@objc +public class DBXTeamLogReplayAddingPeoplePolicyOther: DBXTeamLogReplayAddingPeoplePolicy { + @objc + public init() { + let swift = TeamLog.ReplayAddingPeoplePolicy.other + super.init(swift: swift) + } +} + +/// Changed the policy for adding people to Replay content. +@objc +public class DBXTeamLogReplayAddingPeoplePolicyChangedDetails: NSObject { + /// To. + @objc + public var newValue: DBXTeamLogReplayAddingPeoplePolicy { DBXTeamLogReplayAddingPeoplePolicy(swift: swift.newValue) } + /// From. + @objc + public var previousValue: DBXTeamLogReplayAddingPeoplePolicy { DBXTeamLogReplayAddingPeoplePolicy(swift: swift.previousValue) } + + @objc + public init(newValue: DBXTeamLogReplayAddingPeoplePolicy, previousValue: DBXTeamLogReplayAddingPeoplePolicy) { + self.swift = TeamLog.ReplayAddingPeoplePolicyChangedDetails(newValue: newValue.swift, previousValue: previousValue.swift) + } + + let swift: TeamLog.ReplayAddingPeoplePolicyChangedDetails + + public init(swift: TeamLog.ReplayAddingPeoplePolicyChangedDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible ReplayAddingPeoplePolicyChangedType struct +@objc +public class DBXTeamLogReplayAddingPeoplePolicyChangedType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.ReplayAddingPeoplePolicyChangedType(description_: description_) + } + + let swift: TeamLog.ReplayAddingPeoplePolicyChangedType + + public init(swift: TeamLog.ReplayAddingPeoplePolicyChangedType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Deleted files in Replay. +@objc +public class DBXTeamLogReplayFileDeleteDetails: NSObject { + + let swift: TeamLog.ReplayFileDeleteDetails + + public init(swift: TeamLog.ReplayFileDeleteDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible ReplayFileDeleteType struct +@objc +public class DBXTeamLogReplayFileDeleteType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.ReplayFileDeleteType(description_: description_) + } + + let swift: TeamLog.ReplayFileDeleteType + + public init(swift: TeamLog.ReplayFileDeleteType) { + self.swift = swift } @@ -78196,6 +80271,110 @@ public class DBXTeamLogTeamExtensionsPolicyChangedType: NSObject { public override var description: String { swift.description } } +/// Changed external sharing controls activation state. +@objc +public class DBXTeamLogTeamExternalSharingControlsActivationStateChangedDetails: NSObject { + /// Previous external sharing controls activation state. + @objc + public var previousActivationState: DBXTeamLogExternalSharingControlsActivationState { DBXTeamLogExternalSharingControlsActivationState(swift: swift.previousActivationState) } + /// New external sharing controls activation state. + @objc + public var newActivationState: DBXTeamLogExternalSharingControlsActivationState { DBXTeamLogExternalSharingControlsActivationState(swift: swift.newActivationState) } + + @objc + public init(previousActivationState: DBXTeamLogExternalSharingControlsActivationState, newActivationState: DBXTeamLogExternalSharingControlsActivationState) { + self.swift = TeamLog.TeamExternalSharingControlsActivationStateChangedDetails(previousActivationState: previousActivationState.swift, newActivationState: newActivationState.swift) + } + + let swift: TeamLog.TeamExternalSharingControlsActivationStateChangedDetails + + public init(swift: TeamLog.TeamExternalSharingControlsActivationStateChangedDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible TeamExternalSharingControlsActivationStateChangedType struct +@objc +public class DBXTeamLogTeamExternalSharingControlsActivationStateChangedType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.TeamExternalSharingControlsActivationStateChangedType(description_: description_) + } + + let swift: TeamLog.TeamExternalSharingControlsActivationStateChangedType + + public init(swift: TeamLog.TeamExternalSharingControlsActivationStateChangedType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Changed approved or blocked entries for external sharing controls. +@objc +public class DBXTeamLogTeamExternalSharingControlsRecipientListsChangedDetails: NSObject { + /// Added approved external sharing recipient entries. + @objc + public var addedApprovedEntries: Array? { swift.addedApprovedEntries } + /// Removed approved external sharing recipient entries. + @objc + public var removedApprovedEntries: Array? { swift.removedApprovedEntries } + /// Added blocked external sharing recipient entries. + @objc + public var addedBlockedEntries: Array? { swift.addedBlockedEntries } + /// Removed blocked external sharing recipient entries. + @objc + public var removedBlockedEntries: Array? { swift.removedBlockedEntries } + + @objc + public init(addedApprovedEntries: Array?, removedApprovedEntries: Array?, addedBlockedEntries: Array?, removedBlockedEntries: Array?) { + self.swift = TeamLog.TeamExternalSharingControlsRecipientListsChangedDetails(addedApprovedEntries: addedApprovedEntries, removedApprovedEntries: removedApprovedEntries, addedBlockedEntries: addedBlockedEntries, removedBlockedEntries: removedBlockedEntries) + } + + let swift: TeamLog.TeamExternalSharingControlsRecipientListsChangedDetails + + public init(swift: TeamLog.TeamExternalSharingControlsRecipientListsChangedDetails) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + +/// Objective-C compatible TeamExternalSharingControlsRecipientListsChangedType struct +@objc +public class DBXTeamLogTeamExternalSharingControlsRecipientListsChangedType: NSObject { + /// (no description) + @objc + public var description_: String { swift.description_ } + + @objc + public init(description_: String) { + self.swift = TeamLog.TeamExternalSharingControlsRecipientListsChangedType(description_: description_) + } + + let swift: TeamLog.TeamExternalSharingControlsRecipientListsChangedType + + public init(swift: TeamLog.TeamExternalSharingControlsRecipientListsChangedType) { + self.swift = swift + } + + + @objc + public override var description: String { swift.description } +} + /// Changed archival status of team folder. @objc public class DBXTeamLogTeamFolderChangeStatusDetails: NSObject { diff --git a/spec b/spec index f1b5fa6f..33adb3af 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit f1b5fa6f96526401bfee0a90171bd5bd19678062 +Subproject commit 33adb3af6ad7199532c03d880f0520619ef17763 diff --git a/stone b/stone index f32aedf7..947f3cad 160000 --- a/stone +++ b/stone @@ -1 +1 @@ -Subproject commit f32aedf70f3152ae91ae0b6226f0906312ba29ea +Subproject commit 947f3cad339d62faafb86278e92556f9b65c6081