diff --git a/Source/SwiftyDropbox/Shared/Generated/Account.swift b/Source/SwiftyDropbox/Shared/Generated/Account.swift index 4e8d4e1d..ef80d2f5 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Account.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Account.swift @@ -9,17 +9,21 @@ import Foundation /// Datatypes and serializers for the account namespace public class Account { /// The PhotoSourceArg union - public enum PhotoSourceArg: CustomStringConvertible { + public enum PhotoSourceArg: CustomStringConvertible, JSONRepresentable { /// Image data in base64-encoded bytes. case base64Data(String) /// An unspecified error. case other + func json() throws -> JSON { + try PhotoSourceArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PhotoSourceArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PhotoSourceArg: \(error)" } } } @@ -59,18 +63,22 @@ public class Account { } /// The SetProfilePhotoArg struct - public class SetProfilePhotoArg: CustomStringConvertible { + public class SetProfilePhotoArg: CustomStringConvertible, JSONRepresentable { /// Image to set as the user's new profile photo. public let photo: Account.PhotoSourceArg public init(photo: Account.PhotoSourceArg) { self.photo = photo } + func json() throws -> JSON { + try SetProfilePhotoArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SetProfilePhotoArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SetProfilePhotoArg: \(error)" } } } @@ -96,7 +104,7 @@ public class Account { } /// The SetProfilePhotoError union - public enum SetProfilePhotoError: CustomStringConvertible { + public enum SetProfilePhotoError: CustomStringConvertible, JSONRepresentable { /// File cannot be set as profile photo. case fileTypeError /// File cannot exceed 10 MB. @@ -110,11 +118,15 @@ public class Account { /// An unspecified error. case other + func json() throws -> JSON { + try SetProfilePhotoErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SetProfilePhotoErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SetProfilePhotoError: \(error)" } } } @@ -177,7 +189,7 @@ public class Account { } /// The SetProfilePhotoResult struct - public class SetProfilePhotoResult: CustomStringConvertible { + public class SetProfilePhotoResult: CustomStringConvertible, JSONRepresentable { /// URL for the photo representing the user, if one is set. public let profilePhotoUrl: String public init(profilePhotoUrl: String) { @@ -185,11 +197,15 @@ public class Account { self.profilePhotoUrl = profilePhotoUrl } + func json() throws -> JSON { + try SetProfilePhotoResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SetProfilePhotoResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SetProfilePhotoResult: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/AccountRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/AccountRoutes.swift index 0a6b572f..65e65283 100644 --- a/Source/SwiftyDropbox/Shared/Generated/AccountRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/AccountRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the account namespace /// For Objective-C compatible routes see DBAccountRoutes -public class AccountRoutes { +public class AccountRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/Async.swift b/Source/SwiftyDropbox/Shared/Generated/Async.swift index 5af405a2..104a5a87 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Async.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Async.swift @@ -11,16 +11,20 @@ public class Async { /// Result returned by methods that launch an asynchronous job. A method who may either launch an asynchronous job, /// or complete the request synchronously, can use this union by extending it, and adding a 'complete' field /// with the type of the synchronous response. See LaunchEmptyResult for an example. - public enum LaunchResultBase: CustomStringConvertible { + public enum LaunchResultBase: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) + func json() throws -> JSON { + try LaunchResultBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LaunchResultBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LaunchResultBase: \(error)" } } } @@ -55,18 +59,22 @@ public class Async { /// Result returned by methods that may either launch an asynchronous job or complete synchronously. Upon /// synchronous completion of the job, no additional information is returned. - public enum LaunchEmptyResult: CustomStringConvertible { + public enum LaunchEmptyResult: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) /// The job finished synchronously and successfully. case complete + func json() throws -> JSON { + try LaunchEmptyResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LaunchEmptyResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LaunchEmptyResult: \(error)" } } } @@ -106,7 +114,7 @@ public class Async { } /// Arguments for methods that poll the status of an asynchronous job. - public class PollArg: CustomStringConvertible { + public class PollArg: CustomStringConvertible, JSONRepresentable { /// Id of the asynchronous job. This is the value of a response returned from the method that launched the job. public let asyncJobId: String public init(asyncJobId: String) { @@ -114,11 +122,15 @@ public class Async { self.asyncJobId = asyncJobId } + func json() throws -> JSON { + try PollArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PollArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PollArg: \(error)" } } } @@ -146,15 +158,19 @@ public class Async { /// Result returned by methods that poll for the status of an asynchronous job. Unions that extend this union should /// add a 'complete' field with a type of the information returned upon job completion. See PollEmptyResult for /// an example. - public enum PollResultBase: CustomStringConvertible { + public enum PollResultBase: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress + func json() throws -> JSON { + try PollResultBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PollResultBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PollResultBase: \(error)" } } } @@ -188,17 +204,21 @@ public class Async { /// Result returned by methods that poll for the status of an asynchronous job. Upon completion of the job, no /// additional information is returned. - public enum PollEmptyResult: CustomStringConvertible { + public enum PollEmptyResult: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The asynchronous job has completed successfully. case complete + func json() throws -> JSON { + try PollEmptyResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PollEmptyResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PollEmptyResult: \(error)" } } } @@ -237,7 +257,7 @@ public class Async { } /// Error returned by methods for polling the status of asynchronous job. - public enum PollError: CustomStringConvertible { + public enum PollError: CustomStringConvertible, JSONRepresentable { /// The job ID is invalid. case invalidAsyncJobId /// Something went wrong with the job on Dropbox's end. You'll need to verify that the action you were taking @@ -246,11 +266,15 @@ public class Async { /// An unspecified error. case other + func json() throws -> JSON { + try PollErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PollErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PollError: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/Auth.swift b/Source/SwiftyDropbox/Shared/Generated/Auth.swift index 539d2dc5..0a368008 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Auth.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Auth.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the auth namespace public class Auth { /// Error occurred because the account doesn't have permission to access the resource. - public enum AccessError: CustomStringConvertible { + public enum AccessError: CustomStringConvertible, JSONRepresentable { /// Current account type cannot access the resource. case invalidAccountType(Auth.InvalidAccountTypeError) /// Current account cannot access Paper. @@ -17,11 +17,15 @@ public class Auth { /// An unspecified error. case other + func json() throws -> JSON { + try AccessErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccessErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccessError: \(error)" } } } @@ -68,7 +72,7 @@ public class Auth { } /// Errors occurred during authentication. - public enum AuthError: CustomStringConvertible { + public enum AuthError: CustomStringConvertible, JSONRepresentable { /// The access token is invalid. case invalidAccessToken /// The user specified in 'Dropbox-API-Select-User' is no longer on the team. @@ -86,11 +90,15 @@ public class Auth { /// An unspecified error. case other + func json() throws -> JSON { + try AuthErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AuthErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AuthError: \(error)" } } } @@ -166,7 +174,7 @@ public class Auth { } /// The InvalidAccountTypeError union - public enum InvalidAccountTypeError: CustomStringConvertible { + public enum InvalidAccountTypeError: CustomStringConvertible, JSONRepresentable { /// Current account type doesn't have permission to access this route endpoint. case endpoint /// Current account type doesn't have permission to access this feature. @@ -174,11 +182,15 @@ public class Auth { /// An unspecified error. case other + func json() throws -> JSON { + try InvalidAccountTypeErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InvalidAccountTypeErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InvalidAccountTypeError: \(error)" } } } @@ -223,7 +235,7 @@ public class Auth { } /// The PaperAccessError union - public enum PaperAccessError: CustomStringConvertible { + public enum PaperAccessError: CustomStringConvertible, JSONRepresentable { /// Paper is disabled. case paperDisabled /// The provided user has not used Paper yet. @@ -231,11 +243,15 @@ public class Auth { /// An unspecified error. case other + func json() throws -> JSON { + try PaperAccessErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperAccessErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperAccessError: \(error)" } } } @@ -280,7 +296,7 @@ public class Auth { } /// Error occurred because the app is being rate limited. - public class RateLimitError: CustomStringConvertible { + public class RateLimitError: CustomStringConvertible, JSONRepresentable { /// The reason why the app is being rate limited. public let reason: Auth.RateLimitReason /// The number of seconds that the app should wait before making another request. @@ -291,11 +307,15 @@ public class Auth { self.retryAfter = retryAfter } + func json() throws -> JSON { + try RateLimitErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RateLimitErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RateLimitError: \(error)" } } } @@ -323,7 +343,7 @@ public class Auth { } /// The RateLimitReason union - public enum RateLimitReason: CustomStringConvertible { + public enum RateLimitReason: CustomStringConvertible, JSONRepresentable { /// You are making too many requests in the past few minutes. case tooManyRequests /// There are currently too many write operations happening in the user's Dropbox. @@ -331,11 +351,15 @@ public class Auth { /// An unspecified error. case other + func json() throws -> JSON { + try RateLimitReasonSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RateLimitReasonSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RateLimitReason: \(error)" } } } @@ -380,7 +404,7 @@ public class Auth { } /// The TokenFromOAuth1Arg struct - public class TokenFromOAuth1Arg: CustomStringConvertible { + public class TokenFromOAuth1Arg: CustomStringConvertible, JSONRepresentable { /// The supplied OAuth 1.0 access token. public let oauth1Token: String /// The token secret associated with the supplied access token. @@ -392,11 +416,15 @@ public class Auth { self.oauth1TokenSecret = oauth1TokenSecret } + func json() throws -> JSON { + try TokenFromOAuth1ArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TokenFromOAuth1ArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TokenFromOAuth1Arg: \(error)" } } } @@ -424,7 +452,7 @@ public class Auth { } /// The TokenFromOAuth1Error union - public enum TokenFromOAuth1Error: CustomStringConvertible { + public enum TokenFromOAuth1Error: CustomStringConvertible, JSONRepresentable { /// Part or all of the OAuth 1.0 access token info is invalid. case invalidOauth1TokenInfo /// The authorized app does not match the app associated with the supplied access token. @@ -432,11 +460,15 @@ public class Auth { /// An unspecified error. case other + func json() throws -> JSON { + try TokenFromOAuth1ErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TokenFromOAuth1ErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TokenFromOAuth1Error: \(error)" } } } @@ -481,7 +513,7 @@ public class Auth { } /// The TokenFromOAuth1Result struct - public class TokenFromOAuth1Result: CustomStringConvertible { + public class TokenFromOAuth1Result: CustomStringConvertible, JSONRepresentable { /// The OAuth 2.0 token generated from the supplied OAuth 1.0 token. public let oauth2Token: String public init(oauth2Token: String) { @@ -489,11 +521,15 @@ public class Auth { self.oauth2Token = oauth2Token } + func json() throws -> JSON { + try TokenFromOAuth1ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TokenFromOAuth1ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TokenFromOAuth1Result: \(error)" } } } @@ -519,7 +555,7 @@ public class Auth { } /// The TokenScopeError struct - public class TokenScopeError: CustomStringConvertible { + public class TokenScopeError: CustomStringConvertible, JSONRepresentable { /// The required scope to access the route. public let requiredScope: String public init(requiredScope: String) { @@ -527,11 +563,15 @@ public class Auth { self.requiredScope = requiredScope } + func json() throws -> JSON { + try TokenScopeErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TokenScopeErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TokenScopeError: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/AuthAppAuthRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/AuthAppAuthRoutes.swift index 00f90583..31cbe8f1 100644 --- a/Source/SwiftyDropbox/Shared/Generated/AuthAppAuthRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/AuthAppAuthRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the authAppAuth namespace /// For Objective-C compatible routes see DBAuthRoutes -public class AuthAppAuthRoutes { +public class AuthAppAuthRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/AuthRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/AuthRoutes.swift index a784d133..2ea8c381 100644 --- a/Source/SwiftyDropbox/Shared/Generated/AuthRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/AuthRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the auth namespace /// For Objective-C compatible routes see DBAuthRoutes -public class AuthRoutes { +public class AuthRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/Check.swift b/Source/SwiftyDropbox/Shared/Generated/Check.swift index 2db83ada..675395f1 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Check.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Check.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the check namespace public class Check { /// Contains the arguments to be sent to the Dropbox servers. - public class EchoArg: CustomStringConvertible { + public class EchoArg: CustomStringConvertible, JSONRepresentable { /// The string that you'd like to be echoed back to you. public let query: String public init(query: String = "") { @@ -17,11 +17,15 @@ public class Check { self.query = query } + func json() throws -> JSON { + try EchoArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EchoArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EchoArg: \(error)" } } } @@ -47,7 +51,7 @@ public class Check { } /// EchoResult contains the result returned from the Dropbox servers. - public class EchoResult: CustomStringConvertible { + public class EchoResult: CustomStringConvertible, JSONRepresentable { /// If everything worked correctly, this would be the same as query. public let result: String public init(result: String = "") { @@ -55,11 +59,15 @@ public class Check { self.result = result } + func json() throws -> JSON { + try EchoResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EchoResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EchoResult: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/CheckAppAuthRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/CheckAppAuthRoutes.swift index 0a71936a..34120906 100644 --- a/Source/SwiftyDropbox/Shared/Generated/CheckAppAuthRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/CheckAppAuthRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the checkAppAuth namespace /// For Objective-C compatible routes see DBCheckRoutes -public class CheckAppAuthRoutes { +public class CheckAppAuthRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/CheckRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/CheckRoutes.swift index 63c665ac..b87f4641 100644 --- a/Source/SwiftyDropbox/Shared/Generated/CheckRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/CheckRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the check namespace /// For Objective-C compatible routes see DBCheckRoutes -public class CheckRoutes { +public class CheckRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/Common.swift b/Source/SwiftyDropbox/Shared/Generated/Common.swift index 0551ec63..acf05742 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Common.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Common.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the common namespace public class Common { /// The PathRoot union - public enum PathRoot: CustomStringConvertible { + public enum PathRoot: CustomStringConvertible, JSONRepresentable { /// Paths are relative to the authenticating user's home namespace, whether or not that user belongs to a team. case home /// Paths are relative to the authenticating user's root namespace (This results in invalidRoot in PathRootError @@ -21,11 +21,15 @@ public class Common { /// An unspecified error. case other + func json() throws -> JSON { + try PathRootSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PathRootSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PathRoot: \(error)" } } } @@ -78,7 +82,7 @@ public class Common { } /// The PathRootError union - public enum PathRootError: CustomStringConvertible { + public enum PathRootError: CustomStringConvertible, JSONRepresentable { /// The root namespace id in Dropbox-API-Path-Root header is not valid. The value of this error is the user's /// latest root info. case invalidRoot(Common.RootInfo) @@ -87,11 +91,15 @@ public class Common { /// An unspecified error. case other + func json() throws -> JSON { + try PathRootErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PathRootErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PathRootError: \(error)" } } } @@ -137,7 +145,7 @@ public class Common { } /// Information about current user's root. - public class RootInfo: CustomStringConvertible { + public class RootInfo: CustomStringConvertible, JSONRepresentable { /// The namespace ID for user's root namespace. It will be the namespace ID of the shared team root if the user /// is member of a team with a separate team root. Otherwise it will be same as homeNamespaceId in /// RootInfo. @@ -151,11 +159,15 @@ public class Common { self.homeNamespaceId = homeNamespaceId } + func json() throws -> JSON { + try RootInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RootInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RootInfo: \(error)" } } } @@ -218,7 +230,7 @@ public class Common { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamRootInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamRootInfo: \(error)" } } } @@ -254,7 +266,7 @@ public class Common { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserRootInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserRootInfo: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/Contacts.swift b/Source/SwiftyDropbox/Shared/Generated/Contacts.swift index 5cfb5e16..8dc2cd33 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Contacts.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Contacts.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the contacts namespace public class Contacts { /// The DeleteManualContactsArg struct - public class DeleteManualContactsArg: CustomStringConvertible { + public class DeleteManualContactsArg: CustomStringConvertible, JSONRepresentable { /// List of manually added contacts to be deleted. public let emailAddresses: [String] public init(emailAddresses: [String]) { @@ -20,11 +20,15 @@ public class Contacts { self.emailAddresses = emailAddresses } + func json() throws -> JSON { + try DeleteManualContactsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteManualContactsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteManualContactsArg: \(error)" } } } @@ -50,18 +54,22 @@ public class Contacts { } /// The DeleteManualContactsError union - public enum DeleteManualContactsError: CustomStringConvertible { + public enum DeleteManualContactsError: CustomStringConvertible, JSONRepresentable { /// Can't delete contacts from this list. Make sure the list only has manually added contacts. The deletion was /// cancelled. case contactsNotFound([String]) /// An unspecified error. case other + func json() throws -> JSON { + try DeleteManualContactsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteManualContactsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteManualContactsError: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/ContactsRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/ContactsRoutes.swift index 94cc87dc..8491123a 100644 --- a/Source/SwiftyDropbox/Shared/Generated/ContactsRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/ContactsRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the contacts namespace /// For Objective-C compatible routes see DBContactsRoutes -public class ContactsRoutes { +public class ContactsRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/FileProperties.swift b/Source/SwiftyDropbox/Shared/Generated/FileProperties.swift index 37df441b..f3c55212 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FileProperties.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FileProperties.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the file_properties namespace public class FileProperties { /// The AddPropertiesArg struct - public class AddPropertiesArg: CustomStringConvertible { + public class AddPropertiesArg: CustomStringConvertible, JSONRepresentable { /// A unique identifier for the file or folder. public let path: String /// The property groups which are to be added to a Dropbox file. No two groups in the input should refer to the @@ -21,11 +21,15 @@ public class FileProperties { self.propertyGroups = propertyGroups } + func json() throws -> JSON { + try AddPropertiesArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddPropertiesArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddPropertiesArg: \(error)" } } } @@ -53,7 +57,7 @@ public class FileProperties { } /// The TemplateError union - public enum TemplateError: CustomStringConvertible { + public enum TemplateError: CustomStringConvertible, JSONRepresentable { /// Template does not exist for the given identifier. case templateNotFound(String) /// You do not have permission to modify this template. @@ -61,11 +65,15 @@ public class FileProperties { /// An unspecified error. case other + func json() throws -> JSON { + try TemplateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TemplateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TemplateError: \(error)" } } } @@ -111,7 +119,7 @@ public class FileProperties { } /// The PropertiesError union - public enum PropertiesError: CustomStringConvertible { + public enum PropertiesError: CustomStringConvertible, JSONRepresentable { /// Template does not exist for the given identifier. case templateNotFound(String) /// You do not have permission to modify this template. @@ -123,11 +131,15 @@ public class FileProperties { /// This folder cannot be tagged. Tagging folders is not supported for team-owned templates. case unsupportedFolder + func json() throws -> JSON { + try PropertiesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesError: \(error)" } } } @@ -186,7 +198,7 @@ public class FileProperties { } /// The InvalidPropertyGroupError union - public enum InvalidPropertyGroupError: CustomStringConvertible { + public enum InvalidPropertyGroupError: CustomStringConvertible, JSONRepresentable { /// Template does not exist for the given identifier. case templateNotFound(String) /// You do not have permission to modify this template. @@ -204,11 +216,15 @@ public class FileProperties { /// There are 2 or more property groups referring to the same templates in the input. case duplicatePropertyGroups + func json() throws -> JSON { + try InvalidPropertyGroupErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InvalidPropertyGroupErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InvalidPropertyGroupError: \(error)" } } } @@ -285,7 +301,7 @@ public class FileProperties { } /// The AddPropertiesError union - public enum AddPropertiesError: CustomStringConvertible { + public enum AddPropertiesError: CustomStringConvertible, JSONRepresentable { /// Template does not exist for the given identifier. case templateNotFound(String) /// You do not have permission to modify this template. @@ -305,11 +321,15 @@ public class FileProperties { /// A property group associated with this template and file already exists. case propertyGroupAlreadyExists + func json() throws -> JSON { + try AddPropertiesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddPropertiesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddPropertiesError: \(error)" } } } @@ -392,7 +412,7 @@ public class FileProperties { } /// Defines how a property group may be structured. - public class PropertyGroupTemplate: CustomStringConvertible { + public class PropertyGroupTemplate: CustomStringConvertible, JSONRepresentable { /// Display name for the template. Template names can be up to 256 bytes. public let name: String /// Description for the template. Template descriptions can be up to 1024 bytes. @@ -408,11 +428,15 @@ public class FileProperties { self.fields = fields } + func json() throws -> JSON { + try PropertyGroupTemplateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertyGroupTemplateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertyGroupTemplate: \(error)" } } } @@ -447,7 +471,7 @@ public class FileProperties { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddTemplateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddTemplateArg: \(error)" } } } @@ -477,7 +501,7 @@ public class FileProperties { } /// The AddTemplateResult struct - public class AddTemplateResult: CustomStringConvertible { + public class AddTemplateResult: CustomStringConvertible, JSONRepresentable { /// An identifier for template added by See templatesAddForUser or templatesAddForTeam. public let templateId: String public init(templateId: String) { @@ -485,11 +509,15 @@ public class FileProperties { self.templateId = templateId } + func json() throws -> JSON { + try AddTemplateResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddTemplateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddTemplateResult: \(error)" } } } @@ -515,7 +543,7 @@ public class FileProperties { } /// The GetTemplateArg struct - public class GetTemplateArg: CustomStringConvertible { + public class GetTemplateArg: CustomStringConvertible, JSONRepresentable { /// An identifier for template added by route See templatesAddForUser or templatesAddForTeam. public let templateId: String public init(templateId: String) { @@ -523,11 +551,15 @@ public class FileProperties { self.templateId = templateId } + func json() throws -> JSON { + try GetTemplateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTemplateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTemplateArg: \(error)" } } } @@ -558,7 +590,7 @@ public class FileProperties { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTemplateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTemplateResult: \(error)" } } } @@ -588,7 +620,7 @@ public class FileProperties { } /// The ListTemplateResult struct - public class ListTemplateResult: CustomStringConvertible { + public class ListTemplateResult: CustomStringConvertible, JSONRepresentable { /// List of identifiers for templates added by See templatesAddForUser or templatesAddForTeam. public let templateIds: [String] public init(templateIds: [String]) { @@ -596,11 +628,15 @@ public class FileProperties { self.templateIds = templateIds } + func json() throws -> JSON { + try ListTemplateResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListTemplateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListTemplateResult: \(error)" } } } @@ -626,17 +662,21 @@ public class FileProperties { } /// Logical operator to join search queries together. - public enum LogicalOperator: CustomStringConvertible { + public enum LogicalOperator: CustomStringConvertible, JSONRepresentable { /// Append a query with an "or" operator. case orOperator /// An unspecified error. case other + func json() throws -> JSON { + try LogicalOperatorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LogicalOperatorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LogicalOperator: \(error)" } } } @@ -675,17 +715,21 @@ public class FileProperties { } /// The LookUpPropertiesError union - public enum LookUpPropertiesError: CustomStringConvertible { + public enum LookUpPropertiesError: CustomStringConvertible, JSONRepresentable { /// No property group was found. case propertyGroupNotFound /// An unspecified error. case other + func json() throws -> JSON { + try LookUpPropertiesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LookUpPropertiesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LookUpPropertiesError: \(error)" } } } @@ -724,7 +768,7 @@ public class FileProperties { } /// The LookupError union - public enum LookupError: CustomStringConvertible { + public enum LookupError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case malformedPath(String) /// There is nothing at the given path. @@ -739,11 +783,15 @@ public class FileProperties { /// An unspecified error. case other + func json() throws -> JSON { + try LookupErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LookupErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LookupError: \(error)" } } } @@ -807,7 +855,7 @@ public class FileProperties { } /// The ModifyTemplateError union - public enum ModifyTemplateError: CustomStringConvertible { + public enum ModifyTemplateError: CustomStringConvertible, JSONRepresentable { /// Template does not exist for the given identifier. case templateNotFound(String) /// You do not have permission to modify this template. @@ -823,11 +871,15 @@ public class FileProperties { /// The template name, description or one or more of the property field keys is too large. case templateAttributeTooLarge + func json() throws -> JSON { + try ModifyTemplateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ModifyTemplateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ModifyTemplateError: \(error)" } } } @@ -897,7 +949,7 @@ public class FileProperties { } /// The OverwritePropertyGroupArg struct - public class OverwritePropertyGroupArg: CustomStringConvertible { + public class OverwritePropertyGroupArg: CustomStringConvertible, JSONRepresentable { /// A unique identifier for the file or folder. public let path: String /// The property groups "snapshot" updates to force apply. No two groups in the input should refer to the same @@ -909,11 +961,15 @@ public class FileProperties { self.propertyGroups = propertyGroups } + func json() throws -> JSON { + try OverwritePropertyGroupArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OverwritePropertyGroupArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OverwritePropertyGroupArg: \(error)" } } } @@ -941,7 +997,7 @@ public class FileProperties { } /// The PropertiesSearchArg struct - public class PropertiesSearchArg: CustomStringConvertible { + public class PropertiesSearchArg: CustomStringConvertible, JSONRepresentable { /// Queries to search. public let queries: [FileProperties.PropertiesSearchQuery] /// Filter results to contain only properties associated with these template IDs. @@ -951,11 +1007,15 @@ public class FileProperties { self.templateFilter = templateFilter } + func json() throws -> JSON { + try PropertiesSearchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesSearchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesSearchArg: \(error)" } } } @@ -984,7 +1044,7 @@ public class FileProperties { } /// The PropertiesSearchContinueArg struct - public class PropertiesSearchContinueArg: CustomStringConvertible { + public class PropertiesSearchContinueArg: CustomStringConvertible, JSONRepresentable { /// The cursor returned by your last call to propertiesSearch or propertiesSearchContinue. public let cursor: String public init(cursor: String) { @@ -992,11 +1052,15 @@ public class FileProperties { self.cursor = cursor } + func json() throws -> JSON { + try PropertiesSearchContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesSearchContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesSearchContinueArg: \(error)" } } } @@ -1022,17 +1086,21 @@ public class FileProperties { } /// The PropertiesSearchContinueError union - public enum PropertiesSearchContinueError: CustomStringConvertible { + public enum PropertiesSearchContinueError: CustomStringConvertible, JSONRepresentable { /// Indicates that the cursor has been invalidated. Call propertiesSearch to obtain a new cursor. case reset /// An unspecified error. case other + func json() throws -> JSON { + try PropertiesSearchContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesSearchContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesSearchContinueError: \(error)" } } } @@ -1071,17 +1139,21 @@ public class FileProperties { } /// The PropertiesSearchError union - public enum PropertiesSearchError: CustomStringConvertible { + public enum PropertiesSearchError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case propertyGroupLookup(FileProperties.LookUpPropertiesError) /// An unspecified error. case other + func json() throws -> JSON { + try PropertiesSearchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesSearchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesSearchError: \(error)" } } } @@ -1121,7 +1193,7 @@ public class FileProperties { } /// The PropertiesSearchMatch struct - public class PropertiesSearchMatch: CustomStringConvertible { + public class PropertiesSearchMatch: CustomStringConvertible, JSONRepresentable { /// The ID for the matched file or folder. public let id: String /// The path for the matched file or folder. @@ -1139,11 +1211,15 @@ public class FileProperties { self.propertyGroups = propertyGroups } + func json() throws -> JSON { + try PropertiesSearchMatchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesSearchMatchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesSearchMatch: \(error)" } } } @@ -1175,17 +1251,21 @@ public class FileProperties { } /// The PropertiesSearchMode union - public enum PropertiesSearchMode: CustomStringConvertible { + public enum PropertiesSearchMode: CustomStringConvertible, JSONRepresentable { /// Search for a value associated with this field name. case fieldName(String) /// An unspecified error. case other + func json() throws -> JSON { + try PropertiesSearchModeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesSearchModeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesSearchMode: \(error)" } } } @@ -1225,7 +1305,7 @@ public class FileProperties { } /// The PropertiesSearchQuery struct - public class PropertiesSearchQuery: CustomStringConvertible { + public class PropertiesSearchQuery: CustomStringConvertible, JSONRepresentable { /// The property field value for which to search across templates. public let query: String /// The mode with which to perform the search. @@ -1239,11 +1319,15 @@ public class FileProperties { self.logicalOperator = logicalOperator } + func json() throws -> JSON { + try PropertiesSearchQuerySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesSearchQuerySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesSearchQuery: \(error)" } } } @@ -1274,7 +1358,7 @@ public class FileProperties { } /// The PropertiesSearchResult struct - public class PropertiesSearchResult: CustomStringConvertible { + public class PropertiesSearchResult: CustomStringConvertible, JSONRepresentable { /// A list (possibly empty) of matches for the query. public let matches: [FileProperties.PropertiesSearchMatch] /// Pass the cursor into propertiesSearchContinue to continue to receive search results. Cursor will be null @@ -1286,11 +1370,15 @@ public class FileProperties { self.cursor = cursor } + func json() throws -> JSON { + try PropertiesSearchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertiesSearchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertiesSearchResult: \(error)" } } } @@ -1319,7 +1407,7 @@ public class FileProperties { /// Raw key/value data to be associated with a Dropbox file. Property fields are added to Dropbox files as a /// PropertyGroup. - public class PropertyField: CustomStringConvertible { + public class PropertyField: CustomStringConvertible, JSONRepresentable { /// Key of the property field associated with a file and template. Keys can be up to 256 bytes. public let name: String /// Value of the property field associated with a file and template. Values can be up to 1024 bytes. @@ -1331,11 +1419,15 @@ public class FileProperties { self.value = value } + func json() throws -> JSON { + try PropertyFieldSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertyFieldSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertyField: \(error)" } } } @@ -1363,7 +1455,7 @@ public class FileProperties { } /// Defines how a single property field may be structured. Used exclusively by PropertyGroupTemplate. - public class PropertyFieldTemplate: CustomStringConvertible { + public class PropertyFieldTemplate: CustomStringConvertible, JSONRepresentable { /// Key of the property field being described. Property field keys can be up to 256 bytes. public let name: String /// Description of the property field. Property field descriptions can be up to 1024 bytes. @@ -1379,11 +1471,15 @@ public class FileProperties { self.type = type } + func json() throws -> JSON { + try PropertyFieldTemplateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertyFieldTemplateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertyFieldTemplate: \(error)" } } } @@ -1415,7 +1511,7 @@ public class FileProperties { /// A subset of the property fields described by the corresponding PropertyGroupTemplate. Properties are always /// added to a Dropbox file as a PropertyGroup. The possible key names and value types in this group are defined /// by the corresponding PropertyGroupTemplate. - public class PropertyGroup: CustomStringConvertible { + public class PropertyGroup: CustomStringConvertible, JSONRepresentable { /// A unique identifier for the associated template. public let templateId: String /// The actual properties associated with the template. There can be up to 32 property types per template. @@ -1426,11 +1522,15 @@ public class FileProperties { self.fields = fields } + func json() throws -> JSON { + try PropertyGroupSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertyGroupSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertyGroup: \(error)" } } } @@ -1458,7 +1558,7 @@ public class FileProperties { } /// The PropertyGroupUpdate struct - public class PropertyGroupUpdate: CustomStringConvertible { + public class PropertyGroupUpdate: CustomStringConvertible, JSONRepresentable { /// A unique identifier for a property template. public let templateId: String /// Property fields to update. If the property field already exists, it is updated. If the property field @@ -1474,11 +1574,15 @@ public class FileProperties { self.removeFields = removeFields } + func json() throws -> JSON { + try PropertyGroupUpdateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertyGroupUpdateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertyGroupUpdate: \(error)" } } } @@ -1509,17 +1613,21 @@ public class FileProperties { } /// Data type of the given property field added. - public enum PropertyType: CustomStringConvertible { + public enum PropertyType: CustomStringConvertible, JSONRepresentable { /// The associated property field will be of type string. Unicode is supported. case string_ /// An unspecified error. case other + func json() throws -> JSON { + try PropertyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PropertyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PropertyType: \(error)" } } } @@ -1558,7 +1666,7 @@ public class FileProperties { } /// The RemovePropertiesArg struct - public class RemovePropertiesArg: CustomStringConvertible { + public class RemovePropertiesArg: CustomStringConvertible, JSONRepresentable { /// A unique identifier for the file or folder. public let path: String /// A list of identifiers for a template created by templatesAddForUser or templatesAddForTeam. @@ -1570,11 +1678,15 @@ public class FileProperties { self.propertyTemplateIds = propertyTemplateIds } + func json() throws -> JSON { + try RemovePropertiesArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemovePropertiesArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemovePropertiesArg: \(error)" } } } @@ -1602,7 +1714,7 @@ public class FileProperties { } /// The RemovePropertiesError union - public enum RemovePropertiesError: CustomStringConvertible { + public enum RemovePropertiesError: CustomStringConvertible, JSONRepresentable { /// Template does not exist for the given identifier. case templateNotFound(String) /// You do not have permission to modify this template. @@ -1616,11 +1728,15 @@ public class FileProperties { /// An unspecified error. case propertyGroupLookup(FileProperties.LookUpPropertiesError) + func json() throws -> JSON { + try RemovePropertiesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemovePropertiesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemovePropertiesError: \(error)" } } } @@ -1686,7 +1802,7 @@ public class FileProperties { } /// The RemoveTemplateArg struct - public class RemoveTemplateArg: CustomStringConvertible { + public class RemoveTemplateArg: CustomStringConvertible, JSONRepresentable { /// An identifier for a template created by templatesAddForUser or templatesAddForTeam. public let templateId: String public init(templateId: String) { @@ -1694,11 +1810,15 @@ public class FileProperties { self.templateId = templateId } + func json() throws -> JSON { + try RemoveTemplateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveTemplateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveTemplateArg: \(error)" } } } @@ -1724,17 +1844,21 @@ public class FileProperties { } /// The TemplateFilterBase union - public enum TemplateFilterBase: CustomStringConvertible { + public enum TemplateFilterBase: CustomStringConvertible, JSONRepresentable { /// Only templates with an ID in the supplied list will be returned (a subset of templates will be returned). case filterSome([String]) /// An unspecified error. case other + func json() throws -> JSON { + try TemplateFilterBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TemplateFilterBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TemplateFilterBase: \(error)" } } } @@ -1774,7 +1898,7 @@ public class FileProperties { } /// The TemplateFilter union - public enum TemplateFilter: CustomStringConvertible { + public enum TemplateFilter: CustomStringConvertible, JSONRepresentable { /// Only templates with an ID in the supplied list will be returned (a subset of templates will be returned). case filterSome([String]) /// An unspecified error. @@ -1782,11 +1906,15 @@ public class FileProperties { /// No templates will be filtered from the result (all templates will be returned). case filterNone + func json() throws -> JSON { + try TemplateFilterSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TemplateFilterSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TemplateFilter: \(error)" } } } @@ -1832,7 +1960,7 @@ public class FileProperties { } /// The TemplateOwnerType union - public enum TemplateOwnerType: CustomStringConvertible { + public enum TemplateOwnerType: CustomStringConvertible, JSONRepresentable { /// Template will be associated with a user. case user /// Template will be associated with a team. @@ -1840,11 +1968,15 @@ public class FileProperties { /// An unspecified error. case other + func json() throws -> JSON { + try TemplateOwnerTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TemplateOwnerTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TemplateOwnerType: \(error)" } } } @@ -1889,7 +2021,7 @@ public class FileProperties { } /// The UpdatePropertiesArg struct - public class UpdatePropertiesArg: CustomStringConvertible { + public class UpdatePropertiesArg: CustomStringConvertible, JSONRepresentable { /// A unique identifier for the file or folder. public let path: String /// The property groups "delta" updates to apply. @@ -1900,11 +2032,15 @@ public class FileProperties { self.updatePropertyGroups = updatePropertyGroups } + func json() throws -> JSON { + try UpdatePropertiesArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdatePropertiesArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdatePropertiesArg: \(error)" } } } @@ -1933,7 +2069,7 @@ public class FileProperties { } /// The UpdatePropertiesError union - public enum UpdatePropertiesError: CustomStringConvertible { + public enum UpdatePropertiesError: CustomStringConvertible, JSONRepresentable { /// Template does not exist for the given identifier. case templateNotFound(String) /// You do not have permission to modify this template. @@ -1953,11 +2089,15 @@ public class FileProperties { /// An unspecified error. case propertyGroupLookup(FileProperties.LookUpPropertiesError) + func json() throws -> JSON { + try UpdatePropertiesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdatePropertiesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdatePropertiesError: \(error)" } } } @@ -2041,7 +2181,7 @@ public class FileProperties { } /// The UpdateTemplateArg struct - public class UpdateTemplateArg: CustomStringConvertible { + public class UpdateTemplateArg: CustomStringConvertible, JSONRepresentable { /// An identifier for template added by See templatesAddForUser or templatesAddForTeam. public let templateId: String /// A display name for the template. template names can be up to 256 bytes. @@ -2061,11 +2201,15 @@ public class FileProperties { self.addFields = addFields } + func json() throws -> JSON { + try UpdateTemplateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateTemplateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateTemplateArg: \(error)" } } } @@ -2098,7 +2242,7 @@ public class FileProperties { } /// The UpdateTemplateResult struct - public class UpdateTemplateResult: CustomStringConvertible { + public class UpdateTemplateResult: CustomStringConvertible, JSONRepresentable { /// An identifier for template added by route See templatesAddForUser or templatesAddForTeam. public let templateId: String public init(templateId: String) { @@ -2106,11 +2250,15 @@ public class FileProperties { self.templateId = templateId } + func json() throws -> JSON { + try UpdateTemplateResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateTemplateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateTemplateResult: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/FilePropertiesRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/FilePropertiesRoutes.swift index 00a9c6f5..47132f70 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FilePropertiesRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FilePropertiesRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the file_properties namespace /// For Objective-C compatible routes see DBFilePropertiesRoutes -public class FilePropertiesRoutes { +public class FilePropertiesRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/FileRequests.swift b/Source/SwiftyDropbox/Shared/Generated/FileRequests.swift index e3d3cc32..64061988 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FileRequests.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FileRequests.swift @@ -9,17 +9,21 @@ import Foundation /// Datatypes and serializers for the file_requests namespace public class FileRequests { /// There is an error accessing the file requests functionality. - public enum GeneralFileRequestsError: CustomStringConvertible { + public enum GeneralFileRequestsError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. case other + func json() throws -> JSON { + try GeneralFileRequestsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GeneralFileRequestsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GeneralFileRequestsError: \(error)" } } } @@ -58,17 +62,21 @@ public class FileRequests { } /// There was an error counting the file requests. - public enum CountFileRequestsError: CustomStringConvertible { + public enum CountFileRequestsError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. case other + func json() throws -> JSON { + try CountFileRequestsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CountFileRequestsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CountFileRequestsError: \(error)" } } } @@ -107,7 +115,7 @@ public class FileRequests { } /// Result for count. - public class CountFileRequestsResult: CustomStringConvertible { + public class CountFileRequestsResult: CustomStringConvertible, JSONRepresentable { /// The number file requests owner by this user. public let fileRequestCount: UInt64 public init(fileRequestCount: UInt64) { @@ -115,11 +123,15 @@ public class FileRequests { self.fileRequestCount = fileRequestCount } + func json() throws -> JSON { + try CountFileRequestsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CountFileRequestsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CountFileRequestsResult: \(error)" } } } @@ -145,7 +157,7 @@ public class FileRequests { } /// Arguments for create. - public class CreateFileRequestArgs: CustomStringConvertible { + public class CreateFileRequestArgs: CustomStringConvertible, JSONRepresentable { /// The title of the file request. Must not be empty. public let title: String /// The path of the folder in the Dropbox where uploaded files will be sent. For apps with the app folder @@ -169,11 +181,15 @@ public class FileRequests { self.description_ = description_ } + func json() throws -> JSON { + try CreateFileRequestArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFileRequestArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFileRequestArgs: \(error)" } } } @@ -207,7 +223,7 @@ public class FileRequests { } /// There is an error with the file request. - public enum FileRequestError: CustomStringConvertible { + public enum FileRequestError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. @@ -228,11 +244,15 @@ public class FileRequests { /// characters in the destination path. case validationError + func json() throws -> JSON { + try FileRequestErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestError: \(error)" } } } @@ -307,7 +327,7 @@ public class FileRequests { } /// There was an error creating the file request. - public enum CreateFileRequestError: CustomStringConvertible { + public enum CreateFileRequestError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. @@ -333,11 +353,15 @@ public class FileRequests { /// total. case rateLimit + func json() throws -> JSON { + try CreateFileRequestErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFileRequestErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFileRequestError: \(error)" } } } @@ -424,7 +448,7 @@ public class FileRequests { } /// There was an error deleting all closed file requests. - public enum DeleteAllClosedFileRequestsError: CustomStringConvertible { + public enum DeleteAllClosedFileRequestsError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. @@ -445,11 +469,15 @@ public class FileRequests { /// characters in the destination path. case validationError + func json() throws -> JSON { + try DeleteAllClosedFileRequestsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteAllClosedFileRequestsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteAllClosedFileRequestsError: \(error)" } } } @@ -524,18 +552,22 @@ public class FileRequests { } /// Result for deleteAllClosed. - public class DeleteAllClosedFileRequestsResult: CustomStringConvertible { + public class DeleteAllClosedFileRequestsResult: CustomStringConvertible, JSONRepresentable { /// The file requests deleted for this user. public let fileRequests: [FileRequests.FileRequest] public init(fileRequests: [FileRequests.FileRequest]) { self.fileRequests = fileRequests } + func json() throws -> JSON { + try DeleteAllClosedFileRequestsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteAllClosedFileRequestsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteAllClosedFileRequestsResult: \(error)" } } } @@ -561,7 +593,7 @@ public class FileRequests { } /// Arguments for delete. - public class DeleteFileRequestArgs: CustomStringConvertible { + public class DeleteFileRequestArgs: CustomStringConvertible, JSONRepresentable { /// List IDs of the file requests to delete. public let ids: [String] public init(ids: [String]) { @@ -569,11 +601,15 @@ public class FileRequests { self.ids = ids } + func json() throws -> JSON { + try DeleteFileRequestArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteFileRequestArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteFileRequestArgs: \(error)" } } } @@ -599,7 +635,7 @@ public class FileRequests { } /// There was an error deleting these file requests. - public enum DeleteFileRequestError: CustomStringConvertible { + public enum DeleteFileRequestError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. @@ -622,11 +658,15 @@ public class FileRequests { /// One or more file requests currently open. case fileRequestOpen + func json() throws -> JSON { + try DeleteFileRequestErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteFileRequestErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteFileRequestError: \(error)" } } } @@ -707,18 +747,22 @@ public class FileRequests { } /// Result for delete. - public class DeleteFileRequestsResult: CustomStringConvertible { + public class DeleteFileRequestsResult: CustomStringConvertible, JSONRepresentable { /// The file requests deleted by the request. public let fileRequests: [FileRequests.FileRequest] public init(fileRequests: [FileRequests.FileRequest]) { self.fileRequests = fileRequests } + func json() throws -> JSON { + try DeleteFileRequestsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteFileRequestsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteFileRequestsResult: \(error)" } } } @@ -744,7 +788,7 @@ public class FileRequests { } /// A file request https://www.dropbox.com/help/9090 for receiving files into the user's Dropbox account. - public class FileRequest: CustomStringConvertible { + public class FileRequest: CustomStringConvertible, JSONRepresentable { /// The ID of the file request. public let id: String /// The URL of the file request. @@ -793,11 +837,15 @@ public class FileRequests { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequest: \(error)" } } } @@ -849,7 +897,7 @@ public class FileRequests { } /// The FileRequestDeadline struct - public class FileRequestDeadline: CustomStringConvertible { + public class FileRequestDeadline: CustomStringConvertible, JSONRepresentable { /// The deadline for this file request. public let deadline: Date /// If set, allow uploads after the deadline has passed. These uploads will be marked overdue. @@ -859,11 +907,15 @@ public class FileRequests { self.allowLateUploads = allowLateUploads } + func json() throws -> JSON { + try FileRequestDeadlineSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestDeadlineSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestDeadline: \(error)" } } } @@ -891,7 +943,7 @@ public class FileRequests { } /// Arguments for get. - public class GetFileRequestArgs: CustomStringConvertible { + public class GetFileRequestArgs: CustomStringConvertible, JSONRepresentable { /// The ID of the file request to retrieve. public let id: String public init(id: String) { @@ -899,11 +951,15 @@ public class FileRequests { self.id = id } + func json() throws -> JSON { + try GetFileRequestArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetFileRequestArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetFileRequestArgs: \(error)" } } } @@ -929,7 +985,7 @@ public class FileRequests { } /// There was an error retrieving the specified file request. - public enum GetFileRequestError: CustomStringConvertible { + public enum GetFileRequestError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. @@ -950,11 +1006,15 @@ public class FileRequests { /// characters in the destination path. case validationError + func json() throws -> JSON { + try GetFileRequestErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetFileRequestErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetFileRequestError: \(error)" } } } @@ -1029,7 +1089,7 @@ public class FileRequests { } /// The GracePeriod union - public enum GracePeriod: CustomStringConvertible { + public enum GracePeriod: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case oneDay /// An unspecified error. @@ -1043,11 +1103,15 @@ public class FileRequests { /// An unspecified error. case other + func json() throws -> JSON { + try GracePeriodSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GracePeriodSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GracePeriod: \(error)" } } } @@ -1110,7 +1174,7 @@ public class FileRequests { } /// Arguments for listV2. - public class ListFileRequestsArg: CustomStringConvertible { + public class ListFileRequestsArg: CustomStringConvertible, JSONRepresentable { /// The maximum number of file requests that should be returned per request. public let limit: UInt64 public init(limit: UInt64 = 1_000) { @@ -1118,11 +1182,15 @@ public class FileRequests { self.limit = limit } + func json() throws -> JSON { + try ListFileRequestsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileRequestsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileRequestsArg: \(error)" } } } @@ -1148,7 +1216,7 @@ public class FileRequests { } /// The ListFileRequestsContinueArg struct - public class ListFileRequestsContinueArg: CustomStringConvertible { + public class ListFileRequestsContinueArg: CustomStringConvertible, JSONRepresentable { /// The cursor returned by the previous API call specified in the endpoint description. public let cursor: String public init(cursor: String) { @@ -1156,11 +1224,15 @@ public class FileRequests { self.cursor = cursor } + func json() throws -> JSON { + try ListFileRequestsContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileRequestsContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileRequestsContinueArg: \(error)" } } } @@ -1186,7 +1258,7 @@ public class FileRequests { } /// There was an error retrieving the file requests. - public enum ListFileRequestsContinueError: CustomStringConvertible { + public enum ListFileRequestsContinueError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. @@ -1194,11 +1266,15 @@ public class FileRequests { /// The cursor is invalid. case invalidCursor + func json() throws -> JSON { + try ListFileRequestsContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileRequestsContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileRequestsContinueError: \(error)" } } } @@ -1243,17 +1319,21 @@ public class FileRequests { } /// There was an error retrieving the file requests. - public enum ListFileRequestsError: CustomStringConvertible { + public enum ListFileRequestsError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. case other + func json() throws -> JSON { + try ListFileRequestsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileRequestsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileRequestsError: \(error)" } } } @@ -1292,7 +1372,7 @@ public class FileRequests { } /// Result for list_. - public class ListFileRequestsResult: CustomStringConvertible { + public class ListFileRequestsResult: CustomStringConvertible, JSONRepresentable { /// The file requests owned by this user. Apps with the app folder permission will only see file requests in /// their app folder. public let fileRequests: [FileRequests.FileRequest] @@ -1300,11 +1380,15 @@ public class FileRequests { self.fileRequests = fileRequests } + func json() throws -> JSON { + try ListFileRequestsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileRequestsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileRequestsResult: \(error)" } } } @@ -1330,7 +1414,7 @@ public class FileRequests { } /// Result for listV2 and listContinue. - public class ListFileRequestsV2Result: CustomStringConvertible { + public class ListFileRequestsV2Result: CustomStringConvertible, JSONRepresentable { /// The file requests owned by this user. Apps with the app folder permission will only see file requests in /// their app folder. public let fileRequests: [FileRequests.FileRequest] @@ -1346,11 +1430,15 @@ public class FileRequests { self.hasMore = hasMore } + func json() throws -> JSON { + try ListFileRequestsV2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileRequestsV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileRequestsV2Result: \(error)" } } } @@ -1380,7 +1468,7 @@ public class FileRequests { } /// Arguments for update. - public class UpdateFileRequestArgs: CustomStringConvertible { + public class UpdateFileRequestArgs: CustomStringConvertible, JSONRepresentable { /// The ID of the file request to update. public let id: String /// The new title of the file request. Must not be empty. @@ -1414,11 +1502,15 @@ public class FileRequests { self.description_ = description_ } + func json() throws -> JSON { + try UpdateFileRequestArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateFileRequestArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateFileRequestArgs: \(error)" } } } @@ -1455,7 +1547,7 @@ public class FileRequests { } /// The UpdateFileRequestDeadline union - public enum UpdateFileRequestDeadline: CustomStringConvertible { + public enum UpdateFileRequestDeadline: CustomStringConvertible, JSONRepresentable { /// Do not change the file request's deadline. case noUpdate /// If null, the file request's deadline is cleared. @@ -1463,11 +1555,15 @@ public class FileRequests { /// An unspecified error. case other + func json() throws -> JSON { + try UpdateFileRequestDeadlineSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateFileRequestDeadlineSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateFileRequestDeadline: \(error)" } } } @@ -1513,7 +1609,7 @@ public class FileRequests { } /// There is an error updating the file request. - public enum UpdateFileRequestError: CustomStringConvertible { + public enum UpdateFileRequestError: CustomStringConvertible, JSONRepresentable { /// This user's Dropbox Business team doesn't allow file requests. case disabledForTeam /// An unspecified error. @@ -1534,11 +1630,15 @@ public class FileRequests { /// characters in the destination path. case validationError + func json() throws -> JSON { + try UpdateFileRequestErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateFileRequestErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateFileRequestError: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/FileRequestsRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/FileRequestsRoutes.swift index 16736d25..6ea345af 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FileRequestsRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FileRequestsRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the file_requests namespace /// For Objective-C compatible routes see DBFileRequestsRoutes -public class FileRequestsRoutes { +public class FileRequestsRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/Files.swift b/Source/SwiftyDropbox/Shared/Generated/Files.swift index 41629343..52dd2f0d 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Files.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Files.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the files namespace public class Files { /// The AddTagArg struct - public class AddTagArg: CustomStringConvertible { + public class AddTagArg: CustomStringConvertible, JSONRepresentable { /// Path to the item to be tagged. public let path: String /// The value of the tag to add. Will be automatically converted to lowercase letters. @@ -21,11 +21,15 @@ public class Files { self.tagText = tagText } + func json() throws -> JSON { + try AddTagArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddTagArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddTagArg: \(error)" } } } @@ -53,17 +57,21 @@ public class Files { } /// The BaseTagError union - public enum BaseTagError: CustomStringConvertible { + public enum BaseTagError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. case other + func json() throws -> JSON { + try BaseTagErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BaseTagErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BaseTagError: \(error)" } } } @@ -103,7 +111,7 @@ public class Files { } /// The AddTagError union - public enum AddTagError: CustomStringConvertible { + public enum AddTagError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. @@ -111,11 +119,15 @@ public class Files { /// The item already has the maximum supported number of tags. case tooManyTags + func json() throws -> JSON { + try AddTagErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddTagErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddTagError: \(error)" } } } @@ -161,7 +173,7 @@ public class Files { } /// The GetMetadataArg struct - public class GetMetadataArg: CustomStringConvertible { + public class GetMetadataArg: CustomStringConvertible, JSONRepresentable { /// The path of a file or folder on Dropbox. public let path: String /// If true, mediaInfo in FileMetadata is set for photo and video. @@ -190,11 +202,15 @@ public class Files { self.includePropertyGroups = includePropertyGroups } + func json() throws -> JSON { + try GetMetadataArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetMetadataArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetMetadataArg: \(error)" } } } @@ -263,7 +279,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try AlphaGetMetadataArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AlphaGetMetadataArg: \(error)" } } } @@ -310,15 +326,19 @@ public class Files { } /// The GetMetadataError union - public enum GetMetadataError: CustomStringConvertible { + public enum GetMetadataError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) + func json() throws -> JSON { + try GetMetadataErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetMetadataErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetMetadataError: \(error)" } } } @@ -352,17 +372,21 @@ public class Files { } /// The AlphaGetMetadataError union - public enum AlphaGetMetadataError: CustomStringConvertible { + public enum AlphaGetMetadataError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. case propertiesError(FileProperties.LookUpPropertiesError) + func json() throws -> JSON { + try AlphaGetMetadataErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AlphaGetMetadataErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AlphaGetMetadataError: \(error)" } } } @@ -403,7 +427,7 @@ public class Files { } /// The CommitInfo struct - public class CommitInfo: CustomStringConvertible { + public class CommitInfo: CustomStringConvertible, JSONRepresentable { /// Path in the user's Dropbox to save the file. public let path: String /// Selects what to do if the file already exists. @@ -445,11 +469,15 @@ public class Files { self.strictConflict = strictConflict } + func json() throws -> JSON { + try CommitInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CommitInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CommitInfo: \(error)" } } } @@ -496,7 +524,7 @@ public class Files { } /// The ContentSyncSetting struct - public class ContentSyncSetting: CustomStringConvertible { + public class ContentSyncSetting: CustomStringConvertible, JSONRepresentable { /// Id of the item this setting is applied to. public let id: String /// Setting for this item. @@ -507,11 +535,15 @@ public class Files { self.syncSetting = syncSetting } + func json() throws -> JSON { + try ContentSyncSettingSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ContentSyncSettingSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ContentSyncSetting: \(error)" } } } @@ -539,7 +571,7 @@ public class Files { } /// The ContentSyncSettingArg struct - public class ContentSyncSettingArg: CustomStringConvertible { + public class ContentSyncSettingArg: CustomStringConvertible, JSONRepresentable { /// Id of the item this setting is applied to. public let id: String /// Setting for this item. @@ -550,11 +582,15 @@ public class Files { self.syncSetting = syncSetting } + func json() throws -> JSON { + try ContentSyncSettingArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ContentSyncSettingArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ContentSyncSettingArg: \(error)" } } } @@ -582,7 +618,7 @@ public class Files { } /// The CreateFolderArg struct - public class CreateFolderArg: CustomStringConvertible { + public class CreateFolderArg: CustomStringConvertible, JSONRepresentable { /// Path in the user's Dropbox to create. public let path: String /// If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. @@ -593,11 +629,15 @@ public class Files { self.autorename = autorename } + func json() throws -> JSON { + try CreateFolderArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderArg: \(error)" } } } @@ -625,7 +665,7 @@ public class Files { } /// The CreateFolderBatchArg struct - public class CreateFolderBatchArg: CustomStringConvertible { + public class CreateFolderBatchArg: CustomStringConvertible, JSONRepresentable { /// List of paths to be created in the user's Dropbox. Duplicate path arguments in the batch are considered only /// once. public let paths: [String] @@ -640,11 +680,15 @@ public class Files { self.forceAsync = forceAsync } + func json() throws -> JSON { + try CreateFolderBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderBatchArg: \(error)" } } } @@ -674,17 +718,21 @@ public class Files { } /// The CreateFolderBatchError union - public enum CreateFolderBatchError: CustomStringConvertible { + public enum CreateFolderBatchError: CustomStringConvertible, JSONRepresentable { /// The operation would involve too many files or folders. case tooManyFiles /// An unspecified error. case other + func json() throws -> JSON { + try CreateFolderBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderBatchError: \(error)" } } } @@ -723,7 +771,7 @@ public class Files { } /// The CreateFolderBatchJobStatus union - public enum CreateFolderBatchJobStatus: CustomStringConvertible { + public enum CreateFolderBatchJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The batch create folder has finished. @@ -733,11 +781,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try CreateFolderBatchJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderBatchJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderBatchJobStatus: \(error)" } } } @@ -790,7 +842,7 @@ public class Files { } /// Result returned by createFolderBatch that may either launch an asynchronous job or complete synchronously. - public enum CreateFolderBatchLaunch: CustomStringConvertible { + public enum CreateFolderBatchLaunch: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) @@ -799,11 +851,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try CreateFolderBatchLaunchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderBatchLaunchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderBatchLaunch: \(error)" } } } @@ -850,12 +906,16 @@ public class Files { } /// The FileOpsResult struct - public class FileOpsResult: CustomStringConvertible { + public class FileOpsResult: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileOpsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileOpsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileOpsResult: \(error)" } } } @@ -891,7 +951,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderBatchResult: \(error)" } } } @@ -917,17 +977,21 @@ public class Files { } /// The CreateFolderBatchResultEntry union - public enum CreateFolderBatchResultEntry: CustomStringConvertible { + public enum CreateFolderBatchResultEntry: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case success(Files.CreateFolderEntryResult) /// An unspecified error. case failure(Files.CreateFolderEntryError) + func json() throws -> JSON { + try CreateFolderBatchResultEntrySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderBatchResultEntrySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderBatchResultEntry: \(error)" } } } @@ -968,17 +1032,21 @@ public class Files { } /// The CreateFolderEntryError union - public enum CreateFolderEntryError: CustomStringConvertible { + public enum CreateFolderEntryError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.WriteError) /// An unspecified error. case other + func json() throws -> JSON { + try CreateFolderEntryErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderEntryErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderEntryError: \(error)" } } } @@ -1018,18 +1086,22 @@ public class Files { } /// The CreateFolderEntryResult struct - public class CreateFolderEntryResult: CustomStringConvertible { + public class CreateFolderEntryResult: CustomStringConvertible, JSONRepresentable { /// Metadata of the created folder. public let metadata: Files.FolderMetadata public init(metadata: Files.FolderMetadata) { self.metadata = metadata } + func json() throws -> JSON { + try CreateFolderEntryResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderEntryResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderEntryResult: \(error)" } } } @@ -1055,15 +1127,19 @@ public class Files { } /// The CreateFolderError union - public enum CreateFolderError: CustomStringConvertible { + public enum CreateFolderError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.WriteError) + func json() throws -> JSON { + try CreateFolderErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderError: \(error)" } } } @@ -1109,7 +1185,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderResult: \(error)" } } } @@ -1135,7 +1211,7 @@ public class Files { } /// The DeleteArg struct - public class DeleteArg: CustomStringConvertible { + public class DeleteArg: CustomStringConvertible, JSONRepresentable { /// Path in the user's Dropbox to delete. public let path: String /// Perform delete if given "rev" matches the existing file's latest "rev". This field does not support deleting @@ -1148,11 +1224,15 @@ public class Files { self.parentRev = parentRev } + func json() throws -> JSON { + try DeleteArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteArg: \(error)" } } } @@ -1180,18 +1260,22 @@ public class Files { } /// The DeleteBatchArg struct - public class DeleteBatchArg: CustomStringConvertible { + public class DeleteBatchArg: CustomStringConvertible, JSONRepresentable { /// (no description) public let entries: [Files.DeleteArg] public init(entries: [Files.DeleteArg]) { self.entries = entries } + func json() throws -> JSON { + try DeleteBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteBatchArg: \(error)" } } } @@ -1217,18 +1301,22 @@ public class Files { } /// The DeleteBatchError union - public enum DeleteBatchError: CustomStringConvertible { + public enum DeleteBatchError: CustomStringConvertible, JSONRepresentable { /// Use tooManyWriteOperations in DeleteError. deleteBatch now provides smaller granularity about which entry /// has failed because of this. case tooManyWriteOperations /// An unspecified error. case other + func json() throws -> JSON { + try DeleteBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteBatchError: \(error)" } } } @@ -1267,7 +1355,7 @@ public class Files { } /// The DeleteBatchJobStatus union - public enum DeleteBatchJobStatus: CustomStringConvertible { + public enum DeleteBatchJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The batch delete has finished. @@ -1277,11 +1365,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try DeleteBatchJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteBatchJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteBatchJobStatus: \(error)" } } } @@ -1334,7 +1426,7 @@ public class Files { } /// Result returned by deleteBatch that may either launch an asynchronous job or complete synchronously. - public enum DeleteBatchLaunch: CustomStringConvertible { + public enum DeleteBatchLaunch: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) @@ -1343,11 +1435,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try DeleteBatchLaunchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteBatchLaunchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteBatchLaunch: \(error)" } } } @@ -1407,7 +1503,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteBatchResult: \(error)" } } } @@ -1433,18 +1529,22 @@ public class Files { } /// The DeleteBatchResultData struct - public class DeleteBatchResultData: CustomStringConvertible { + public class DeleteBatchResultData: CustomStringConvertible, JSONRepresentable { /// Metadata of the deleted object. public let metadata: Files.Metadata public init(metadata: Files.Metadata) { self.metadata = metadata } + func json() throws -> JSON { + try DeleteBatchResultDataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteBatchResultDataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteBatchResultData: \(error)" } } } @@ -1470,17 +1570,21 @@ public class Files { } /// The DeleteBatchResultEntry union - public enum DeleteBatchResultEntry: CustomStringConvertible { + public enum DeleteBatchResultEntry: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case success(Files.DeleteBatchResultData) /// An unspecified error. case failure(Files.DeleteError) + func json() throws -> JSON { + try DeleteBatchResultEntrySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteBatchResultEntrySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteBatchResultEntry: \(error)" } } } @@ -1521,7 +1625,7 @@ public class Files { } /// The DeleteError union - public enum DeleteError: CustomStringConvertible { + public enum DeleteError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case pathLookup(Files.LookupError) /// An unspecified error. @@ -1533,11 +1637,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try DeleteErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteError: \(error)" } } } @@ -1608,7 +1716,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteResult: \(error)" } } } @@ -1634,7 +1742,7 @@ public class Files { } /// Metadata for a file or folder. - public class Metadata: CustomStringConvertible { + public class Metadata: CustomStringConvertible, JSONRepresentable { /// The last component of the path (including extension). This never contains a slash. public let name: String /// The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if @@ -1663,11 +1771,15 @@ public class Files { self.previewUrl = previewUrl } + func json() throws -> JSON { + try MetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Metadata: \(error)" } } } @@ -1730,7 +1842,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeletedMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeletedMetadata: \(error)" } } } @@ -1770,7 +1882,7 @@ public class Files { } /// Dimensions for a photo or video. - public class Dimensions: CustomStringConvertible { + public class Dimensions: CustomStringConvertible, JSONRepresentable { /// Height of the photo/video. public let height: UInt64 /// Width of the photo/video. @@ -1782,11 +1894,15 @@ public class Files { self.width = width } + func json() throws -> JSON { + try DimensionsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DimensionsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Dimensions: \(error)" } } } @@ -1814,7 +1930,7 @@ public class Files { } /// The DownloadArg struct - public class DownloadArg: CustomStringConvertible { + public class DownloadArg: CustomStringConvertible, JSONRepresentable { /// The path of the file to download. public let path: String /// Please specify revision in path instead. @@ -1826,11 +1942,15 @@ public class Files { self.rev = rev } + func json() throws -> JSON { + try DownloadArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DownloadArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DownloadArg: \(error)" } } } @@ -1858,7 +1978,7 @@ public class Files { } /// The DownloadError union - public enum DownloadError: CustomStringConvertible { + public enum DownloadError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// This file type cannot be downloaded directly; use export instead. @@ -1866,11 +1986,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try DownloadErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DownloadErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DownloadError: \(error)" } } } @@ -1916,7 +2040,7 @@ public class Files { } /// The DownloadZipArg struct - public class DownloadZipArg: CustomStringConvertible { + public class DownloadZipArg: CustomStringConvertible, JSONRepresentable { /// The path of the folder to download. public let path: String public init(path: String) { @@ -1924,11 +2048,15 @@ public class Files { self.path = path } + func json() throws -> JSON { + try DownloadZipArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DownloadZipArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DownloadZipArg: \(error)" } } } @@ -1954,7 +2082,7 @@ public class Files { } /// The DownloadZipError union - public enum DownloadZipError: CustomStringConvertible { + public enum DownloadZipError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// The folder or a file is too large to download. @@ -1964,11 +2092,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try DownloadZipErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DownloadZipErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DownloadZipError: \(error)" } } } @@ -2020,18 +2152,22 @@ public class Files { } /// The DownloadZipResult struct - public class DownloadZipResult: CustomStringConvertible { + public class DownloadZipResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let metadata: Files.FolderMetadata public init(metadata: Files.FolderMetadata) { self.metadata = metadata } + func json() throws -> JSON { + try DownloadZipResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DownloadZipResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DownloadZipResult: \(error)" } } } @@ -2057,7 +2193,7 @@ public class Files { } /// The ExportArg struct - public class ExportArg: CustomStringConvertible { + public class ExportArg: CustomStringConvertible, JSONRepresentable { /// The path of the file to be exported. public let path: String /// The file format to which the file should be exported. This must be one of the formats listed in the file's @@ -2071,11 +2207,15 @@ public class Files { self.exportFormat = exportFormat } + func json() throws -> JSON { + try ExportArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportArg: \(error)" } } } @@ -2103,7 +2243,7 @@ public class Files { } /// The ExportError union - public enum ExportError: CustomStringConvertible { + public enum ExportError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// This file type cannot be exported. Use download instead. @@ -2115,11 +2255,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try ExportErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportError: \(error)" } } } @@ -2177,7 +2321,7 @@ public class Files { } /// Export information for a file. - public class ExportInfo: CustomStringConvertible { + public class ExportInfo: CustomStringConvertible, JSONRepresentable { /// Format to which the file can be exported to. public let exportAs: String? /// Additional formats to which the file can be exported. These values can be specified as the export_format in @@ -2190,11 +2334,15 @@ public class Files { self.exportOptions = exportOptions } + func json() throws -> JSON { + try ExportInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportInfo: \(error)" } } } @@ -2222,7 +2370,7 @@ public class Files { } /// The ExportMetadata struct - public class ExportMetadata: CustomStringConvertible { + public class ExportMetadata: CustomStringConvertible, JSONRepresentable { /// The last component of the path (including extension). This never contains a slash. public let name: String /// The file size in bytes. @@ -2244,11 +2392,15 @@ public class Files { self.paperRevision = paperRevision } + func json() throws -> JSON { + try ExportMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportMetadata: \(error)" } } } @@ -2280,7 +2432,7 @@ public class Files { } /// The ExportResult struct - public class ExportResult: CustomStringConvertible { + public class ExportResult: CustomStringConvertible, JSONRepresentable { /// Metadata for the exported version of the file. public let exportMetadata: Files.ExportMetadata /// Metadata for the original file. @@ -2290,11 +2442,15 @@ public class Files { self.fileMetadata = fileMetadata } + func json() throws -> JSON { + try ExportResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportResult: \(error)" } } } @@ -2322,7 +2478,7 @@ public class Files { } /// The FileCategory union - public enum FileCategory: CustomStringConvertible { + public enum FileCategory: CustomStringConvertible, JSONRepresentable { /// jpg, png, gif, and more. case image /// doc, docx, txt, and more. @@ -2346,11 +2502,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try FileCategorySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileCategorySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileCategory: \(error)" } } } @@ -2443,18 +2603,22 @@ public class Files { } /// The FileLock struct - public class FileLock: CustomStringConvertible { + public class FileLock: CustomStringConvertible, JSONRepresentable { /// The lock description. public let content: Files.FileLockContent public init(content: Files.FileLockContent) { self.content = content } + func json() throws -> JSON { + try FileLockSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLock: \(error)" } } } @@ -2480,7 +2644,7 @@ public class Files { } /// The FileLockContent union - public enum FileLockContent: CustomStringConvertible { + public enum FileLockContent: CustomStringConvertible, JSONRepresentable { /// Empty type to indicate no lock. case unlocked /// A lock held by a single user. @@ -2488,11 +2652,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try FileLockContentSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockContentSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLockContent: \(error)" } } } @@ -2538,7 +2706,7 @@ public class Files { } /// The FileLockMetadata struct - public class FileLockMetadata: CustomStringConvertible { + public class FileLockMetadata: CustomStringConvertible, JSONRepresentable { /// True if caller holds the file lock. public let isLockholder: Bool? /// The display name of the lock holder. @@ -2556,11 +2724,15 @@ public class Files { self.created = created } + func json() throws -> JSON { + try FileLockMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLockMetadata: \(error)" } } } @@ -2682,7 +2854,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileMetadata: \(error)" } } } @@ -2766,18 +2938,22 @@ public class Files { } /// Sharing info for a file or folder. - public class SharingInfo: CustomStringConvertible { + public class SharingInfo: CustomStringConvertible, JSONRepresentable { /// True if the file or folder is inside a read-only shared folder. public let readOnly: Bool public init(readOnly: Bool) { self.readOnly = readOnly } + func json() throws -> JSON { + try SharingInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingInfo: \(error)" } } } @@ -2820,7 +2996,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileSharingInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileSharingInfo: \(error)" } } } @@ -2850,7 +3026,7 @@ public class Files { } /// The FileStatus union - public enum FileStatus: CustomStringConvertible { + public enum FileStatus: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case active /// An unspecified error. @@ -2858,11 +3034,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try FileStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileStatus: \(error)" } } } @@ -2942,7 +3122,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderMetadata: \(error)" } } } @@ -3020,7 +3200,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderSharingInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderSharingInfo: \(error)" } } } @@ -3060,7 +3240,7 @@ public class Files { } /// The GetCopyReferenceArg struct - public class GetCopyReferenceArg: CustomStringConvertible { + public class GetCopyReferenceArg: CustomStringConvertible, JSONRepresentable { /// The path to the file or folder you want to get a copy reference to. public let path: String public init(path: String) { @@ -3068,11 +3248,15 @@ public class Files { self.path = path } + func json() throws -> JSON { + try GetCopyReferenceArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetCopyReferenceArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetCopyReferenceArg: \(error)" } } } @@ -3098,17 +3282,21 @@ public class Files { } /// The GetCopyReferenceError union - public enum GetCopyReferenceError: CustomStringConvertible { + public enum GetCopyReferenceError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. case other + func json() throws -> JSON { + try GetCopyReferenceErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetCopyReferenceErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetCopyReferenceError: \(error)" } } } @@ -3148,7 +3336,7 @@ public class Files { } /// The GetCopyReferenceResult struct - public class GetCopyReferenceResult: CustomStringConvertible { + public class GetCopyReferenceResult: CustomStringConvertible, JSONRepresentable { /// Metadata of the file or folder. public let metadata: Files.Metadata /// A copy reference to the file or folder. @@ -3163,11 +3351,15 @@ public class Files { self.expires = expires } + func json() throws -> JSON { + try GetCopyReferenceResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetCopyReferenceResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetCopyReferenceResult: \(error)" } } } @@ -3197,7 +3389,7 @@ public class Files { } /// The GetTagsArg struct - public class GetTagsArg: CustomStringConvertible { + public class GetTagsArg: CustomStringConvertible, JSONRepresentable { /// Path to the items. public let paths: [String] public init(paths: [String]) { @@ -3205,11 +3397,15 @@ public class Files { self.paths = paths } + func json() throws -> JSON { + try GetTagsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTagsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTagsArg: \(error)" } } } @@ -3235,18 +3431,22 @@ public class Files { } /// The GetTagsResult struct - public class GetTagsResult: CustomStringConvertible { + public class GetTagsResult: CustomStringConvertible, JSONRepresentable { /// List of paths and their corresponding tags. public let pathsToTags: [Files.PathToTags] public init(pathsToTags: [Files.PathToTags]) { self.pathsToTags = pathsToTags } + func json() throws -> JSON { + try GetTagsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTagsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTagsResult: \(error)" } } } @@ -3272,7 +3472,7 @@ public class Files { } /// The GetTemporaryLinkArg struct - public class GetTemporaryLinkArg: CustomStringConvertible { + public class GetTemporaryLinkArg: CustomStringConvertible, JSONRepresentable { /// The path to the file you want a temporary link to. public let path: String public init(path: String) { @@ -3280,11 +3480,15 @@ public class Files { self.path = path } + func json() throws -> JSON { + try GetTemporaryLinkArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTemporaryLinkArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTemporaryLinkArg: \(error)" } } } @@ -3310,7 +3514,7 @@ public class Files { } /// The GetTemporaryLinkError union - public enum GetTemporaryLinkError: CustomStringConvertible { + public enum GetTemporaryLinkError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// This user's email address is not verified. This functionality is only available on accounts with a verified @@ -3325,11 +3529,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try GetTemporaryLinkErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTemporaryLinkErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTemporaryLinkError: \(error)" } } } @@ -3387,7 +3595,7 @@ public class Files { } /// The GetTemporaryLinkResult struct - public class GetTemporaryLinkResult: CustomStringConvertible { + public class GetTemporaryLinkResult: CustomStringConvertible, JSONRepresentable { /// Metadata of the file. public let metadata: Files.FileMetadata /// The temporary link which can be used to stream content the file. @@ -3398,11 +3606,15 @@ public class Files { self.link = link } + func json() throws -> JSON { + try GetTemporaryLinkResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTemporaryLinkResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTemporaryLinkResult: \(error)" } } } @@ -3430,7 +3642,7 @@ public class Files { } /// The GetTemporaryUploadLinkArg struct - public class GetTemporaryUploadLinkArg: CustomStringConvertible { + public class GetTemporaryUploadLinkArg: CustomStringConvertible, JSONRepresentable { /// Contains the path and other optional modifiers for the future upload commit. Equivalent to the parameters /// provided to upload. public let commitInfo: Files.CommitInfo @@ -3443,11 +3655,15 @@ public class Files { self.duration = duration } + func json() throws -> JSON { + try GetTemporaryUploadLinkArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTemporaryUploadLinkArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTemporaryUploadLinkArg: \(error)" } } } @@ -3475,7 +3691,7 @@ public class Files { } /// The GetTemporaryUploadLinkResult struct - public class GetTemporaryUploadLinkResult: CustomStringConvertible { + public class GetTemporaryUploadLinkResult: CustomStringConvertible, JSONRepresentable { /// The temporary link which can be used to stream a file to a Dropbox location. public let link: String public init(link: String) { @@ -3483,11 +3699,15 @@ public class Files { self.link = link } + func json() throws -> JSON { + try GetTemporaryUploadLinkResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTemporaryUploadLinkResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTemporaryUploadLinkResult: \(error)" } } } @@ -3513,18 +3733,22 @@ public class Files { } /// Arguments for getThumbnailBatch. - public class GetThumbnailBatchArg: CustomStringConvertible { + public class GetThumbnailBatchArg: CustomStringConvertible, JSONRepresentable { /// List of files to get thumbnails. public let entries: [Files.ThumbnailArg] public init(entries: [Files.ThumbnailArg]) { self.entries = entries } + func json() throws -> JSON { + try GetThumbnailBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetThumbnailBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetThumbnailBatchArg: \(error)" } } } @@ -3550,17 +3774,21 @@ public class Files { } /// The GetThumbnailBatchError union - public enum GetThumbnailBatchError: CustomStringConvertible { + public enum GetThumbnailBatchError: CustomStringConvertible, JSONRepresentable { /// The operation involves more than 25 files. case tooManyFiles /// An unspecified error. case other + func json() throws -> JSON { + try GetThumbnailBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetThumbnailBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetThumbnailBatchError: \(error)" } } } @@ -3599,18 +3827,22 @@ public class Files { } /// The GetThumbnailBatchResult struct - public class GetThumbnailBatchResult: CustomStringConvertible { + public class GetThumbnailBatchResult: CustomStringConvertible, JSONRepresentable { /// List of files and their thumbnails. public let entries: [Files.GetThumbnailBatchResultEntry] public init(entries: [Files.GetThumbnailBatchResultEntry]) { self.entries = entries } + func json() throws -> JSON { + try GetThumbnailBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetThumbnailBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetThumbnailBatchResult: \(error)" } } } @@ -3636,7 +3868,7 @@ public class Files { } /// The GetThumbnailBatchResultData struct - public class GetThumbnailBatchResultData: CustomStringConvertible { + public class GetThumbnailBatchResultData: CustomStringConvertible, JSONRepresentable { /// (no description) public let metadata: Files.FileMetadata /// A string containing the base64-encoded thumbnail data for this file. @@ -3647,11 +3879,15 @@ public class Files { self.thumbnail = thumbnail } + func json() throws -> JSON { + try GetThumbnailBatchResultDataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetThumbnailBatchResultDataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetThumbnailBatchResultData: \(error)" } } } @@ -3679,7 +3915,7 @@ public class Files { } /// The GetThumbnailBatchResultEntry union - public enum GetThumbnailBatchResultEntry: CustomStringConvertible { + public enum GetThumbnailBatchResultEntry: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case success(Files.GetThumbnailBatchResultData) /// The result for this file if it was an error. @@ -3687,11 +3923,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try GetThumbnailBatchResultEntrySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetThumbnailBatchResultEntrySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetThumbnailBatchResultEntry: \(error)" } } } @@ -3738,7 +3978,7 @@ public class Files { } /// GPS coordinates for a photo or video. - public class GpsCoordinates: CustomStringConvertible { + public class GpsCoordinates: CustomStringConvertible, JSONRepresentable { /// Latitude of the GPS coordinates. public let latitude: Double /// Longitude of the GPS coordinates. @@ -3750,11 +3990,15 @@ public class Files { self.longitude = longitude } + func json() throws -> JSON { + try GpsCoordinatesSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GpsCoordinatesSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GpsCoordinates: \(error)" } } } @@ -3782,7 +4026,7 @@ public class Files { } /// The HighlightSpan struct - public class HighlightSpan: CustomStringConvertible { + public class HighlightSpan: CustomStringConvertible, JSONRepresentable { /// String to be determined whether it should be highlighted or not. public let highlightStr: String /// The string should be highlighted or not. @@ -3793,11 +4037,15 @@ public class Files { self.isHighlighted = isHighlighted } + func json() throws -> JSON { + try HighlightSpanSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try HighlightSpanSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for HighlightSpan: \(error)" } } } @@ -3825,7 +4073,7 @@ public class Files { } /// The import format of the incoming Paper doc content. - public enum ImportFormat: CustomStringConvertible { + public enum ImportFormat: CustomStringConvertible, JSONRepresentable { /// The provided data is interpreted as standard HTML. case html /// The provided data is interpreted as markdown. @@ -3835,11 +4083,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try ImportFormatSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ImportFormatSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ImportFormat: \(error)" } } } @@ -3890,7 +4142,7 @@ public class Files { } /// The ListFolderArg struct - public class ListFolderArg: CustomStringConvertible { + public class ListFolderArg: CustomStringConvertible, JSONRepresentable { /// A unique identifier for the file. public let path: String /// If true, the list folder operation will be applied recursively to all subfolders and the response will @@ -3945,11 +4197,15 @@ public class Files { self.includeNonDownloadableFiles = includeNonDownloadableFiles } + func json() throws -> JSON { + try ListFolderArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderArg: \(error)" } } } @@ -4006,7 +4262,7 @@ public class Files { } /// The ListFolderContinueArg struct - public class ListFolderContinueArg: CustomStringConvertible { + public class ListFolderContinueArg: CustomStringConvertible, JSONRepresentable { /// The cursor returned by your last call to listFolder or listFolderContinue. public let cursor: String public init(cursor: String) { @@ -4014,11 +4270,15 @@ public class Files { self.cursor = cursor } + func json() throws -> JSON { + try ListFolderContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderContinueArg: \(error)" } } } @@ -4044,7 +4304,7 @@ public class Files { } /// The ListFolderContinueError union - public enum ListFolderContinueError: CustomStringConvertible { + public enum ListFolderContinueError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// Indicates that the cursor has been invalidated. Call listFolder to obtain a new cursor. @@ -4052,11 +4312,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try ListFolderContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderContinueError: \(error)" } } } @@ -4102,7 +4366,7 @@ public class Files { } /// The ListFolderError union - public enum ListFolderError: CustomStringConvertible { + public enum ListFolderError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. @@ -4110,11 +4374,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try ListFolderErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderError: \(error)" } } } @@ -4161,7 +4429,7 @@ public class Files { } /// The ListFolderGetLatestCursorResult struct - public class ListFolderGetLatestCursorResult: CustomStringConvertible { + public class ListFolderGetLatestCursorResult: CustomStringConvertible, JSONRepresentable { /// Pass the cursor into listFolderContinue to see what's changed in the folder since your previous query. public let cursor: String public init(cursor: String) { @@ -4169,11 +4437,15 @@ public class Files { self.cursor = cursor } + func json() throws -> JSON { + try ListFolderGetLatestCursorResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderGetLatestCursorResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderGetLatestCursorResult: \(error)" } } } @@ -4199,7 +4471,7 @@ public class Files { } /// The ListFolderLongpollArg struct - public class ListFolderLongpollArg: CustomStringConvertible { + public class ListFolderLongpollArg: CustomStringConvertible, JSONRepresentable { /// A cursor as returned by listFolder or listFolderContinue. Cursors retrieved by setting includeMediaInfo in /// ListFolderArg to true are not supported. public let cursor: String @@ -4214,11 +4486,15 @@ public class Files { self.timeout = timeout } + func json() throws -> JSON { + try ListFolderLongpollArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderLongpollArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderLongpollArg: \(error)" } } } @@ -4246,17 +4522,21 @@ public class Files { } /// The ListFolderLongpollError union - public enum ListFolderLongpollError: CustomStringConvertible { + public enum ListFolderLongpollError: CustomStringConvertible, JSONRepresentable { /// Indicates that the cursor has been invalidated. Call listFolder to obtain a new cursor. case reset /// An unspecified error. case other + func json() throws -> JSON { + try ListFolderLongpollErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderLongpollErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderLongpollError: \(error)" } } } @@ -4295,7 +4575,7 @@ public class Files { } /// The ListFolderLongpollResult struct - public class ListFolderLongpollResult: CustomStringConvertible { + public class ListFolderLongpollResult: CustomStringConvertible, JSONRepresentable { /// Indicates whether new changes are available. If true, call listFolderContinue to retrieve the changes. public let changes: Bool /// If present, backoff for at least this many seconds before calling listFolderLongpoll again. @@ -4306,11 +4586,15 @@ public class Files { self.backoff = backoff } + func json() throws -> JSON { + try ListFolderLongpollResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderLongpollResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderLongpollResult: \(error)" } } } @@ -4338,7 +4622,7 @@ public class Files { } /// The ListFolderResult struct - public class ListFolderResult: CustomStringConvertible { + public class ListFolderResult: CustomStringConvertible, JSONRepresentable { /// The files and (direct) subfolders in the folder. public let entries: [Files.Metadata] /// Pass the cursor into listFolderContinue to see what's changed in the folder since your previous query. @@ -4352,11 +4636,15 @@ public class Files { self.hasMore = hasMore } + func json() throws -> JSON { + try ListFolderResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderResult: \(error)" } } } @@ -4386,7 +4674,7 @@ public class Files { } /// The ListRevisionsArg struct - public class ListRevisionsArg: CustomStringConvertible { + public class ListRevisionsArg: CustomStringConvertible, JSONRepresentable { /// The path to the file you want to see the revisions of. public let path: String /// Determines the behavior of the API in listing the revisions for a given file path or id. @@ -4401,11 +4689,15 @@ public class Files { self.limit = limit } + func json() throws -> JSON { + try ListRevisionsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListRevisionsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListRevisionsArg: \(error)" } } } @@ -4435,17 +4727,21 @@ public class Files { } /// The ListRevisionsError union - public enum ListRevisionsError: CustomStringConvertible { + public enum ListRevisionsError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. case other + func json() throws -> JSON { + try ListRevisionsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListRevisionsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListRevisionsError: \(error)" } } } @@ -4485,7 +4781,7 @@ public class Files { } /// The ListRevisionsMode union - public enum ListRevisionsMode: CustomStringConvertible { + public enum ListRevisionsMode: CustomStringConvertible, JSONRepresentable { /// Returns revisions with the same file path as identified by the latest file entry at the given file path or /// id. case path @@ -4494,11 +4790,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try ListRevisionsModeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListRevisionsModeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListRevisionsMode: \(error)" } } } @@ -4543,7 +4843,7 @@ public class Files { } /// The ListRevisionsResult struct - public class ListRevisionsResult: CustomStringConvertible { + public class ListRevisionsResult: CustomStringConvertible, JSONRepresentable { /// If the file identified by the latest revision in the response is either deleted or moved. public let isDeleted: Bool /// The time of deletion if the file was deleted. @@ -4556,11 +4856,15 @@ public class Files { self.entries = entries } + func json() throws -> JSON { + try ListRevisionsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListRevisionsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListRevisionsResult: \(error)" } } } @@ -4590,18 +4894,22 @@ public class Files { } /// The LockConflictError struct - public class LockConflictError: CustomStringConvertible { + public class LockConflictError: CustomStringConvertible, JSONRepresentable { /// The lock that caused the conflict. public let lock: Files.FileLock public init(lock: Files.FileLock) { self.lock = lock } + func json() throws -> JSON { + try LockConflictErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LockConflictErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LockConflictError: \(error)" } } } @@ -4627,7 +4935,7 @@ public class Files { } /// The LockFileArg struct - public class LockFileArg: CustomStringConvertible { + public class LockFileArg: CustomStringConvertible, JSONRepresentable { /// Path in the user's Dropbox to a file. public let path: String public init(path: String) { @@ -4635,11 +4943,15 @@ public class Files { self.path = path } + func json() throws -> JSON { + try LockFileArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LockFileArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LockFileArg: \(error)" } } } @@ -4665,7 +4977,7 @@ public class Files { } /// The LockFileBatchArg struct - public class LockFileBatchArg: CustomStringConvertible { + public class LockFileBatchArg: CustomStringConvertible, JSONRepresentable { /// List of 'entries'. Each 'entry' contains a path of the file which will be locked or queried. Duplicate path /// arguments in the batch are considered only once. public let entries: [Files.LockFileArg] @@ -4673,11 +4985,15 @@ public class Files { self.entries = entries } + func json() throws -> JSON { + try LockFileBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LockFileBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LockFileBatchArg: \(error)" } } } @@ -4716,7 +5032,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try LockFileBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LockFileBatchResult: \(error)" } } } @@ -4742,7 +5058,7 @@ public class Files { } /// The LockFileError union - public enum LockFileError: CustomStringConvertible { + public enum LockFileError: CustomStringConvertible, JSONRepresentable { /// Could not find the specified resource. case pathLookup(Files.LookupError) /// There are too many write operations in user's Dropbox. Please retry this request. @@ -4763,11 +5079,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try LockFileErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LockFileErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LockFileError: \(error)" } } } @@ -4850,7 +5170,7 @@ public class Files { } /// The LockFileResult struct - public class LockFileResult: CustomStringConvertible { + public class LockFileResult: CustomStringConvertible, JSONRepresentable { /// Metadata of the file. public let metadata: Files.Metadata /// The file lock state after the operation. @@ -4860,11 +5180,15 @@ public class Files { self.lock = lock } + func json() throws -> JSON { + try LockFileResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LockFileResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LockFileResult: \(error)" } } } @@ -4892,17 +5216,21 @@ public class Files { } /// The LockFileResultEntry union - public enum LockFileResultEntry: CustomStringConvertible { + public enum LockFileResultEntry: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case success(Files.LockFileResult) /// An unspecified error. case failure(Files.LockFileError) + func json() throws -> JSON { + try LockFileResultEntrySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LockFileResultEntrySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LockFileResultEntry: \(error)" } } } @@ -4943,7 +5271,7 @@ public class Files { } /// The LookupError union - public enum LookupError: CustomStringConvertible { + public enum LookupError: CustomStringConvertible, JSONRepresentable { /// The given path does not satisfy the required path format. Please refer to the Path formats documentation /// https://www.dropbox.com/developers/documentation/http/documentation#path-formats for more /// information. @@ -4964,11 +5292,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try LookupErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LookupErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LookupError: \(error)" } } } @@ -5044,17 +5376,21 @@ public class Files { } /// The MediaInfo union - public enum MediaInfo: CustomStringConvertible { + public enum MediaInfo: CustomStringConvertible, JSONRepresentable { /// Indicate the photo/video is still under processing and metadata is not available yet. case pending /// The metadata for the photo/video. case metadata(Files.MediaMetadata) + func json() throws -> JSON { + try MediaInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MediaInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MediaInfo: \(error)" } } } @@ -5094,7 +5430,7 @@ public class Files { } /// Metadata for a photo or video. - public class MediaMetadata: CustomStringConvertible { + public class MediaMetadata: CustomStringConvertible, JSONRepresentable { /// Dimension of the photo/video. public let dimensions: Files.Dimensions? /// The GPS coordinate of the photo/video. @@ -5107,11 +5443,15 @@ public class Files { self.timeTaken = timeTaken } + func json() throws -> JSON { + try MediaMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MediaMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MediaMetadata: \(error)" } } } @@ -5160,17 +5500,21 @@ public class Files { } /// Metadata for a file, folder or other resource types. - public enum MetadataV2: CustomStringConvertible { + public enum MetadataV2: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case metadata(Files.Metadata) /// An unspecified error. case other + func json() throws -> JSON { + try MetadataV2Serializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MetadataV2Serializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MetadataV2: \(error)" } } } @@ -5210,7 +5554,7 @@ public class Files { } /// The MinimalFileLinkMetadata struct - public class MinimalFileLinkMetadata: CustomStringConvertible { + public class MinimalFileLinkMetadata: CustomStringConvertible, JSONRepresentable { /// URL of the shared link. public let url: String /// Unique identifier for the linked file. @@ -5232,11 +5576,15 @@ public class Files { self.rev = rev } + func json() throws -> JSON { + try MinimalFileLinkMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MinimalFileLinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MinimalFileLinkMetadata: \(error)" } } } @@ -5268,7 +5616,7 @@ public class Files { } /// The RelocationBatchArgBase struct - public class RelocationBatchArgBase: CustomStringConvertible { + public class RelocationBatchArgBase: CustomStringConvertible, JSONRepresentable { /// List of entries to be moved or copied. Each entry is RelocationPath. public let entries: [Files.RelocationPath] /// If there's a conflict with any file, have the Dropbox server try to autorename that file to avoid the @@ -5279,11 +5627,15 @@ public class Files { self.autorename = autorename } + func json() throws -> JSON { + try RelocationBatchArgBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchArgBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchArgBase: \(error)" } } } @@ -5324,7 +5676,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try MoveBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MoveBatchArg: \(error)" } } } @@ -5354,17 +5706,21 @@ public class Files { } /// The MoveIntoFamilyError union - public enum MoveIntoFamilyError: CustomStringConvertible { + public enum MoveIntoFamilyError: CustomStringConvertible, JSONRepresentable { /// Moving shared folder into Family Room folder is not allowed. case isSharedFolder /// An unspecified error. case other + func json() throws -> JSON { + try MoveIntoFamilyErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MoveIntoFamilyErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MoveIntoFamilyError: \(error)" } } } @@ -5403,17 +5759,21 @@ public class Files { } /// The MoveIntoVaultError union - public enum MoveIntoVaultError: CustomStringConvertible { + public enum MoveIntoVaultError: CustomStringConvertible, JSONRepresentable { /// Moving shared folder into Vault is not allowed. case isSharedFolder /// An unspecified error. case other + func json() throws -> JSON { + try MoveIntoVaultErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MoveIntoVaultErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MoveIntoVaultError: \(error)" } } } @@ -5452,7 +5812,7 @@ public class Files { } /// The PaperContentError union - public enum PaperContentError: CustomStringConvertible { + public enum PaperContentError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to edit Paper docs. case insufficientPermissions /// The provided content was malformed and cannot be imported to Paper. @@ -5465,11 +5825,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try PaperContentErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentError: \(error)" } } } @@ -5526,7 +5890,7 @@ public class Files { } /// The PaperCreateArg struct - public class PaperCreateArg: CustomStringConvertible { + public class PaperCreateArg: CustomStringConvertible, JSONRepresentable { /// The fully qualified path to the location in the user's Dropbox where the Paper Doc should be created. This /// should include the document's title and end with .paper. public let path: String @@ -5538,11 +5902,15 @@ public class Files { self.importFormat = importFormat } + func json() throws -> JSON { + try PaperCreateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperCreateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperCreateArg: \(error)" } } } @@ -5570,7 +5938,7 @@ public class Files { } /// The PaperCreateError union - public enum PaperCreateError: CustomStringConvertible { + public enum PaperCreateError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to edit Paper docs. case insufficientPermissions /// The provided content was malformed and cannot be imported to Paper. @@ -5591,11 +5959,15 @@ public class Files { /// Paper is disabled for your team. case paperDisabled + func json() throws -> JSON { + try PaperCreateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperCreateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperCreateError: \(error)" } } } @@ -5676,7 +6048,7 @@ public class Files { } /// The PaperCreateResult struct - public class PaperCreateResult: CustomStringConvertible { + public class PaperCreateResult: CustomStringConvertible, JSONRepresentable { /// URL to open the Paper Doc. public let url: String /// The fully qualified path the Paper Doc was actually created at. @@ -5696,11 +6068,15 @@ public class Files { self.paperRevision = paperRevision } + func json() throws -> JSON { + try PaperCreateResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperCreateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperCreateResult: \(error)" } } } @@ -5732,7 +6108,7 @@ public class Files { } /// The PaperDocUpdatePolicy union - public enum PaperDocUpdatePolicy: CustomStringConvertible { + public enum PaperDocUpdatePolicy: CustomStringConvertible, JSONRepresentable { /// Sets the doc content to the provided content if the provided paper_revision matches the latest doc revision. /// Otherwise, returns an error. case update @@ -5745,11 +6121,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDocUpdatePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocUpdatePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocUpdatePolicy: \(error)" } } } @@ -5806,7 +6186,7 @@ public class Files { } /// The PaperUpdateArg struct - public class PaperUpdateArg: CustomStringConvertible { + public class PaperUpdateArg: CustomStringConvertible, JSONRepresentable { /// Path in the user's Dropbox to update. The path must correspond to a Paper doc or an error will be returned. public let path: String /// The format of the provided data. @@ -5825,11 +6205,15 @@ public class Files { self.paperRevision = paperRevision } + func json() throws -> JSON { + try PaperUpdateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperUpdateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperUpdateArg: \(error)" } } } @@ -5861,7 +6245,7 @@ public class Files { } /// The PaperUpdateError union - public enum PaperUpdateError: CustomStringConvertible { + public enum PaperUpdateError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to edit Paper docs. case insufficientPermissions /// The provided content was malformed and cannot be imported to Paper. @@ -5882,11 +6266,15 @@ public class Files { /// This operation is not allowed on deleted Paper docs. case docDeleted + func json() throws -> JSON { + try PaperUpdateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperUpdateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperUpdateError: \(error)" } } } @@ -5968,7 +6356,7 @@ public class Files { } /// The PaperUpdateResult struct - public class PaperUpdateResult: CustomStringConvertible { + public class PaperUpdateResult: CustomStringConvertible, JSONRepresentable { /// The current doc revision. public let paperRevision: Int64 public init(paperRevision: Int64) { @@ -5976,11 +6364,15 @@ public class Files { self.paperRevision = paperRevision } + func json() throws -> JSON { + try PaperUpdateResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperUpdateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperUpdateResult: \(error)" } } } @@ -6006,7 +6398,7 @@ public class Files { } /// The PathOrLink union - public enum PathOrLink: CustomStringConvertible { + public enum PathOrLink: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(String) /// An unspecified error. @@ -6014,11 +6406,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try PathOrLinkSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PathOrLinkSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PathOrLink: \(error)" } } } @@ -6065,7 +6461,7 @@ public class Files { } /// The PathToTags struct - public class PathToTags: CustomStringConvertible { + public class PathToTags: CustomStringConvertible, JSONRepresentable { /// Path of the item. public let path: String /// Tags assigned to this item. @@ -6076,11 +6472,15 @@ public class Files { self.tags = tags } + func json() throws -> JSON { + try PathToTagsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PathToTagsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PathToTags: \(error)" } } } @@ -6113,7 +6513,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try PhotoMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PhotoMetadata: \(error)" } } } @@ -6143,7 +6543,7 @@ public class Files { } /// The PreviewArg struct - public class PreviewArg: CustomStringConvertible { + public class PreviewArg: CustomStringConvertible, JSONRepresentable { /// The path of the file to preview. public let path: String /// Please specify revision in path instead. @@ -6155,11 +6555,15 @@ public class Files { self.rev = rev } + func json() throws -> JSON { + try PreviewArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PreviewArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PreviewArg: \(error)" } } } @@ -6187,7 +6591,7 @@ public class Files { } /// The PreviewError union - public enum PreviewError: CustomStringConvertible { + public enum PreviewError: CustomStringConvertible, JSONRepresentable { /// An error occurs when downloading metadata for the file. case path(Files.LookupError) /// This preview generation is still in progress and the file is not ready for preview yet. @@ -6197,11 +6601,15 @@ public class Files { /// The file content is not supported for preview generation. case unsupportedContent + func json() throws -> JSON { + try PreviewErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PreviewErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PreviewError: \(error)" } } } @@ -6253,7 +6661,7 @@ public class Files { } /// The PreviewResult struct - public class PreviewResult: CustomStringConvertible { + public class PreviewResult: CustomStringConvertible, JSONRepresentable { /// Metadata corresponding to the file received as an argument. Will be populated if the endpoint is called with /// a path (ReadPath). public let fileMetadata: Files.FileMetadata? @@ -6265,11 +6673,15 @@ public class Files { self.linkMetadata = linkMetadata } + func json() throws -> JSON { + try PreviewResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PreviewResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PreviewResult: \(error)" } } } @@ -6297,7 +6709,7 @@ public class Files { } /// The RelocationPath struct - public class RelocationPath: CustomStringConvertible { + public class RelocationPath: CustomStringConvertible, JSONRepresentable { /// Path in the user's Dropbox to be copied or moved. public let fromPath: String /// Path in the user's Dropbox that is the destination. @@ -6309,11 +6721,15 @@ public class Files { self.toPath = toPath } + func json() throws -> JSON { + try RelocationPathSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationPathSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationPath: \(error)" } } } @@ -6360,7 +6776,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationArg: \(error)" } } } @@ -6416,7 +6832,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchArg: \(error)" } } } @@ -6453,7 +6869,7 @@ public class Files { } /// The RelocationError union - public enum RelocationError: CustomStringConvertible { + public enum RelocationError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case fromLookup(Files.LookupError) /// An unspecified error. @@ -6487,11 +6903,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try RelocationErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationError: \(error)" } } } @@ -6613,7 +7033,7 @@ public class Files { } /// The RelocationBatchError union - public enum RelocationBatchError: CustomStringConvertible { + public enum RelocationBatchError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case fromLookup(Files.LookupError) /// An unspecified error. @@ -6649,11 +7069,15 @@ public class Files { /// There are too many write operations in user's Dropbox. Please retry this request. case tooManyWriteOperations + func json() throws -> JSON { + try RelocationBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchError: \(error)" } } } @@ -6781,7 +7205,7 @@ public class Files { } /// The RelocationBatchErrorEntry union - public enum RelocationBatchErrorEntry: CustomStringConvertible { + public enum RelocationBatchErrorEntry: CustomStringConvertible, JSONRepresentable { /// User errors that retry won't help. case relocationError(Files.RelocationError) /// Something went wrong with the job on Dropbox's end. You'll need to verify that the action you were taking @@ -6792,11 +7216,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try RelocationBatchErrorEntrySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchErrorEntrySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchErrorEntry: \(error)" } } } @@ -6848,7 +7276,7 @@ public class Files { } /// The RelocationBatchJobStatus union - public enum RelocationBatchJobStatus: CustomStringConvertible { + public enum RelocationBatchJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The copy or move batch job has finished. @@ -6856,11 +7284,15 @@ public class Files { /// The copy or move batch job has failed with exception. case failed(Files.RelocationBatchError) + func json() throws -> JSON { + try RelocationBatchJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchJobStatus: \(error)" } } } @@ -6907,7 +7339,7 @@ public class Files { } /// Result returned by copyBatch or moveBatch that may either launch an asynchronous job or complete synchronously. - public enum RelocationBatchLaunch: CustomStringConvertible { + public enum RelocationBatchLaunch: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) @@ -6916,11 +7348,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try RelocationBatchLaunchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchLaunchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchLaunch: \(error)" } } } @@ -6979,7 +7415,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchResult: \(error)" } } } @@ -7005,18 +7441,22 @@ public class Files { } /// The RelocationBatchResultData struct - public class RelocationBatchResultData: CustomStringConvertible { + public class RelocationBatchResultData: CustomStringConvertible, JSONRepresentable { /// Metadata of the relocated object. public let metadata: Files.Metadata public init(metadata: Files.Metadata) { self.metadata = metadata } + func json() throws -> JSON { + try RelocationBatchResultDataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchResultDataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchResultData: \(error)" } } } @@ -7042,7 +7482,7 @@ public class Files { } /// The RelocationBatchResultEntry union - public enum RelocationBatchResultEntry: CustomStringConvertible { + public enum RelocationBatchResultEntry: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case success(Files.Metadata) /// An unspecified error. @@ -7050,11 +7490,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try RelocationBatchResultEntrySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchResultEntrySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchResultEntry: \(error)" } } } @@ -7102,17 +7546,21 @@ public class Files { /// Result returned by copyBatchCheckV2 or moveBatchCheckV2 that may either be in progress or completed with result /// for each entry. - public enum RelocationBatchV2JobStatus: CustomStringConvertible { + public enum RelocationBatchV2JobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The copy or move batch job has finished. case complete(Files.RelocationBatchV2Result) + func json() throws -> JSON { + try RelocationBatchV2JobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchV2JobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchV2JobStatus: \(error)" } } } @@ -7153,18 +7601,22 @@ public class Files { /// Result returned by copyBatchV2 or moveBatchV2 that may either launch an asynchronous job or complete /// synchronously. - public enum RelocationBatchV2Launch: CustomStringConvertible { + public enum RelocationBatchV2Launch: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) /// An unspecified error. case complete(Files.RelocationBatchV2Result) + func json() throws -> JSON { + try RelocationBatchV2LaunchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchV2LaunchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchV2Launch: \(error)" } } } @@ -7218,7 +7670,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationBatchV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationBatchV2Result: \(error)" } } } @@ -7256,7 +7708,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocationResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocationResult: \(error)" } } } @@ -7282,7 +7734,7 @@ public class Files { } /// The RemoveTagArg struct - public class RemoveTagArg: CustomStringConvertible { + public class RemoveTagArg: CustomStringConvertible, JSONRepresentable { /// Path to the item to tag. public let path: String /// The tag to remove. Will be automatically converted to lowercase letters. @@ -7294,11 +7746,15 @@ public class Files { self.tagText = tagText } + func json() throws -> JSON { + try RemoveTagArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveTagArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveTagArg: \(error)" } } } @@ -7326,7 +7782,7 @@ public class Files { } /// The RemoveTagError union - public enum RemoveTagError: CustomStringConvertible { + public enum RemoveTagError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. @@ -7334,11 +7790,15 @@ public class Files { /// That tag doesn't exist at this path. case tagNotPresent + func json() throws -> JSON { + try RemoveTagErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveTagErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveTagError: \(error)" } } } @@ -7384,7 +7844,7 @@ public class Files { } /// The RestoreArg struct - public class RestoreArg: CustomStringConvertible { + public class RestoreArg: CustomStringConvertible, JSONRepresentable { /// The path to save the restored file. public let path: String /// The revision to restore. @@ -7396,11 +7856,15 @@ public class Files { self.rev = rev } + func json() throws -> JSON { + try RestoreArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RestoreArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RestoreArg: \(error)" } } } @@ -7428,7 +7892,7 @@ public class Files { } /// The RestoreError union - public enum RestoreError: CustomStringConvertible { + public enum RestoreError: CustomStringConvertible, JSONRepresentable { /// An error occurs when downloading metadata for the file. case pathLookup(Files.LookupError) /// An error occurs when trying to restore the file to that path. @@ -7440,11 +7904,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try RestoreErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RestoreErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RestoreError: \(error)" } } } @@ -7503,7 +7971,7 @@ public class Files { } /// The SaveCopyReferenceArg struct - public class SaveCopyReferenceArg: CustomStringConvertible { + public class SaveCopyReferenceArg: CustomStringConvertible, JSONRepresentable { /// A copy reference returned by copyReferenceGet. public let copyReference: String /// Path in the user's Dropbox that is the destination. @@ -7515,11 +7983,15 @@ public class Files { self.path = path } + func json() throws -> JSON { + try SaveCopyReferenceArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SaveCopyReferenceArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SaveCopyReferenceArg: \(error)" } } } @@ -7547,7 +8019,7 @@ public class Files { } /// The SaveCopyReferenceError union - public enum SaveCopyReferenceError: CustomStringConvertible { + public enum SaveCopyReferenceError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.WriteError) /// The copy reference is invalid. @@ -7562,11 +8034,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try SaveCopyReferenceErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SaveCopyReferenceErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SaveCopyReferenceError: \(error)" } } } @@ -7630,18 +8106,22 @@ public class Files { } /// The SaveCopyReferenceResult struct - public class SaveCopyReferenceResult: CustomStringConvertible { + public class SaveCopyReferenceResult: CustomStringConvertible, JSONRepresentable { /// The metadata of the saved file or folder in the user's Dropbox. public let metadata: Files.Metadata public init(metadata: Files.Metadata) { self.metadata = metadata } + func json() throws -> JSON { + try SaveCopyReferenceResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SaveCopyReferenceResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SaveCopyReferenceResult: \(error)" } } } @@ -7667,7 +8147,7 @@ public class Files { } /// The SaveUrlArg struct - public class SaveUrlArg: CustomStringConvertible { + public class SaveUrlArg: CustomStringConvertible, JSONRepresentable { /// The path in Dropbox where the URL will be saved to. public let path: String /// The URL to be saved. @@ -7679,11 +8159,15 @@ public class Files { self.url = url } + func json() throws -> JSON { + try SaveUrlArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SaveUrlArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SaveUrlArg: \(error)" } } } @@ -7711,7 +8195,7 @@ public class Files { } /// The SaveUrlError union - public enum SaveUrlError: CustomStringConvertible { + public enum SaveUrlError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.WriteError) /// Failed downloading the given URL. The URL may be password-protected and the password provided was @@ -7724,11 +8208,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try SaveUrlErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SaveUrlErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SaveUrlError: \(error)" } } } @@ -7786,7 +8274,7 @@ public class Files { } /// The SaveUrlJobStatus union - public enum SaveUrlJobStatus: CustomStringConvertible { + public enum SaveUrlJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// Metadata of the file where the URL is saved to. @@ -7794,11 +8282,15 @@ public class Files { /// An unspecified error. case failed(Files.SaveUrlError) + func json() throws -> JSON { + try SaveUrlJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SaveUrlJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SaveUrlJobStatus: \(error)" } } } @@ -7845,18 +8337,22 @@ public class Files { } /// The SaveUrlResult union - public enum SaveUrlResult: CustomStringConvertible { + public enum SaveUrlResult: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) /// Metadata of the file where the URL is saved to. case complete(Files.FileMetadata) + func json() throws -> JSON { + try SaveUrlResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SaveUrlResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SaveUrlResult: \(error)" } } } @@ -7897,7 +8393,7 @@ public class Files { } /// The SearchArg struct - public class SearchArg: CustomStringConvertible { + public class SearchArg: CustomStringConvertible, JSONRepresentable { /// The path in the user's Dropbox to search. Should probably be a folder. public let path: String /// The string to search for. Query string may be rewritten to improve relevance of results. The string is split @@ -7923,11 +8419,15 @@ public class Files { self.mode = mode } + func json() throws -> JSON { + try SearchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchArg: \(error)" } } } @@ -7961,7 +8461,7 @@ public class Files { } /// The SearchError union - public enum SearchError: CustomStringConvertible { + public enum SearchError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. @@ -7971,11 +8471,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try SearchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchError: \(error)" } } } @@ -8028,7 +8532,7 @@ public class Files { } /// The SearchMatch struct - public class SearchMatch: CustomStringConvertible { + public class SearchMatch: CustomStringConvertible, JSONRepresentable { /// The type of the match. public let matchType: Files.SearchMatchType /// The metadata for the matched file or folder. @@ -8038,11 +8542,15 @@ public class Files { self.metadata = metadata } + func json() throws -> JSON { + try SearchMatchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchMatchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchMatch: \(error)" } } } @@ -8070,18 +8578,22 @@ public class Files { } /// The SearchMatchFieldOptions struct - public class SearchMatchFieldOptions: CustomStringConvertible { + public class SearchMatchFieldOptions: CustomStringConvertible, JSONRepresentable { /// Whether to include highlight span from file title. public let includeHighlights: Bool public init(includeHighlights: Bool = false) { self.includeHighlights = includeHighlights } + func json() throws -> JSON { + try SearchMatchFieldOptionsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchMatchFieldOptionsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchMatchFieldOptions: \(error)" } } } @@ -8107,7 +8619,7 @@ public class Files { } /// Indicates what type of match was found for a given item. - public enum SearchMatchType: CustomStringConvertible { + public enum SearchMatchType: CustomStringConvertible, JSONRepresentable { /// This item was matched on its file or folder name. case filename /// This item was matched based on its file contents. @@ -8115,11 +8627,15 @@ public class Files { /// This item was matched based on both its contents and its file name. case both + func json() throws -> JSON { + try SearchMatchTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchMatchTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchMatchType: \(error)" } } } @@ -8164,7 +8680,7 @@ public class Files { } /// Indicates what type of match was found for a given item. - public enum SearchMatchTypeV2: CustomStringConvertible { + public enum SearchMatchTypeV2: CustomStringConvertible, JSONRepresentable { /// This item was matched on its file or folder name. case filename /// This item was matched based on its file contents. @@ -8176,11 +8692,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try SearchMatchTypeV2Serializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchMatchTypeV2Serializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchMatchTypeV2: \(error)" } } } @@ -8237,7 +8757,7 @@ public class Files { } /// The SearchMatchV2 struct - public class SearchMatchV2: CustomStringConvertible { + public class SearchMatchV2: CustomStringConvertible, JSONRepresentable { /// The metadata for the matched file or folder. public let metadata: Files.MetadataV2 /// The type of the match. @@ -8250,11 +8770,15 @@ public class Files { self.highlightSpans = highlightSpans } + func json() throws -> JSON { + try SearchMatchV2Serializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchMatchV2Serializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchMatchV2: \(error)" } } } @@ -8284,7 +8808,7 @@ public class Files { } /// The SearchMode union - public enum SearchMode: CustomStringConvertible { + public enum SearchMode: CustomStringConvertible, JSONRepresentable { /// Search file and folder names. case filename /// Search file and folder names as well as file contents. @@ -8292,11 +8816,15 @@ public class Files { /// Search for deleted file and folder names. case deletedFilename + func json() throws -> JSON { + try SearchModeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchModeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchMode: \(error)" } } } @@ -8341,7 +8869,7 @@ public class Files { } /// The SearchOptions struct - public class SearchOptions: CustomStringConvertible { + public class SearchOptions: CustomStringConvertible, JSONRepresentable { /// Scopes the search to a path in the user's Dropbox. Searches the entire Dropbox if not specified. public let path: String? /// The maximum number of search results to return. @@ -8382,11 +8910,15 @@ public class Files { self.accountId = accountId } + func json() throws -> JSON { + try SearchOptionsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchOptionsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchOptions: \(error)" } } } @@ -8435,7 +8967,7 @@ public class Files { } /// The SearchOrderBy union - public enum SearchOrderBy: CustomStringConvertible { + public enum SearchOrderBy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case relevance /// An unspecified error. @@ -8443,11 +8975,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try SearchOrderBySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchOrderBySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchOrderBy: \(error)" } } } @@ -8492,7 +9028,7 @@ public class Files { } /// The SearchResult struct - public class SearchResult: CustomStringConvertible { + public class SearchResult: CustomStringConvertible, JSONRepresentable { /// A list (possibly empty) of matches for the query. public let matches: [Files.SearchMatch] /// Used for paging. If true, indicates there is another page of results available that can be fetched by @@ -8507,11 +9043,15 @@ public class Files { self.start = start } + func json() throws -> JSON { + try SearchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchResult: \(error)" } } } @@ -8541,7 +9081,7 @@ public class Files { } /// The SearchV2Arg struct - public class SearchV2Arg: CustomStringConvertible { + public class SearchV2Arg: CustomStringConvertible, JSONRepresentable { /// The string to search for. May match across multiple fields based on the request arguments. public let query: String /// Options for more targeted search results. @@ -8563,11 +9103,15 @@ public class Files { self.includeHighlights = includeHighlights } + func json() throws -> JSON { + try SearchV2ArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchV2ArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchV2Arg: \(error)" } } } @@ -8599,7 +9143,7 @@ public class Files { } /// The SearchV2ContinueArg struct - public class SearchV2ContinueArg: CustomStringConvertible { + public class SearchV2ContinueArg: CustomStringConvertible, JSONRepresentable { /// The cursor returned by your last call to searchV2. Used to fetch the next page of results. public let cursor: String public init(cursor: String) { @@ -8607,11 +9151,15 @@ public class Files { self.cursor = cursor } + func json() throws -> JSON { + try SearchV2ContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchV2ContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchV2ContinueArg: \(error)" } } } @@ -8637,7 +9185,7 @@ public class Files { } /// The SearchV2Result struct - public class SearchV2Result: CustomStringConvertible { + public class SearchV2Result: CustomStringConvertible, JSONRepresentable { /// A list (possibly empty) of matches for the query. public let matches: [Files.SearchMatchV2] /// Used for paging. If true, indicates there is another page of results available that can be fetched by @@ -8652,11 +9200,15 @@ public class Files { self.cursor = cursor } + func json() throws -> JSON { + try SearchV2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SearchV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SearchV2Result: \(error)" } } } @@ -8686,7 +9238,7 @@ public class Files { } /// The SharedLink struct - public class SharedLink: CustomStringConvertible { + public class SharedLink: CustomStringConvertible, JSONRepresentable { /// Shared link url. public let url: String /// Password for the shared link. @@ -8698,11 +9250,15 @@ public class Files { self.password = password } + func json() throws -> JSON { + try SharedLinkSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLink: \(error)" } } } @@ -8730,7 +9286,7 @@ public class Files { } /// The SharedLinkFileInfo struct - public class SharedLinkFileInfo: CustomStringConvertible { + public class SharedLinkFileInfo: CustomStringConvertible, JSONRepresentable { /// The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared /// link, we use the path param to determine for which file in the folder the view is for. public let url: String @@ -8748,11 +9304,15 @@ public class Files { self.password = password } + func json() throws -> JSON { + try SharedLinkFileInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkFileInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkFileInfo: \(error)" } } } @@ -8782,7 +9342,7 @@ public class Files { } /// The SingleUserLock struct - public class SingleUserLock: CustomStringConvertible { + public class SingleUserLock: CustomStringConvertible, JSONRepresentable { /// The time the lock was created. public let created: Date /// The account ID of the lock holder if known. @@ -8797,11 +9357,15 @@ public class Files { self.lockHolderTeamId = lockHolderTeamId } + func json() throws -> JSON { + try SingleUserLockSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SingleUserLockSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SingleUserLock: \(error)" } } } @@ -8831,7 +9395,7 @@ public class Files { } /// The SymlinkInfo struct - public class SymlinkInfo: CustomStringConvertible { + public class SymlinkInfo: CustomStringConvertible, JSONRepresentable { /// The target this symlink points to. public let target: String public init(target: String) { @@ -8839,11 +9403,15 @@ public class Files { self.target = target } + func json() throws -> JSON { + try SymlinkInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SymlinkInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SymlinkInfo: \(error)" } } } @@ -8869,7 +9437,7 @@ public class Files { } /// The SyncSetting union - public enum SyncSetting: CustomStringConvertible { + public enum SyncSetting: CustomStringConvertible, JSONRepresentable { /// On first sync to members' computers, the specified folder will follow its parent folder's setting or /// otherwise follow default sync behavior. case default_ @@ -8881,11 +9449,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try SyncSettingSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SyncSettingSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SyncSetting: \(error)" } } } @@ -8936,7 +9508,7 @@ public class Files { } /// The SyncSettingArg union - public enum SyncSettingArg: CustomStringConvertible { + public enum SyncSettingArg: CustomStringConvertible, JSONRepresentable { /// On first sync to members' computers, the specified folder will follow its parent folder's setting or /// otherwise follow default sync behavior. case default_ @@ -8945,11 +9517,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try SyncSettingArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SyncSettingArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SyncSettingArg: \(error)" } } } @@ -8994,7 +9570,7 @@ public class Files { } /// The SyncSettingsError union - public enum SyncSettingsError: CustomStringConvertible { + public enum SyncSettingsError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// Setting this combination of sync settings simultaneously is not supported. @@ -9004,11 +9580,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try SyncSettingsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SyncSettingsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SyncSettingsError: \(error)" } } } @@ -9060,17 +9640,21 @@ public class Files { } /// Tag that can be added in multiple ways. - public enum Tag: CustomStringConvertible { + public enum Tag: CustomStringConvertible, JSONRepresentable { /// Tag generated by the user. case userGeneratedTag(Files.UserGeneratedTag) /// An unspecified error. case other + func json() throws -> JSON { + try TagSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TagSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Tag: \(error)" } } } @@ -9110,7 +9694,7 @@ public class Files { } /// The ThumbnailArg struct - public class ThumbnailArg: CustomStringConvertible { + public class ThumbnailArg: CustomStringConvertible, JSONRepresentable { /// The path to the image file you want to thumbnail. public let path: String /// The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be @@ -9128,11 +9712,15 @@ public class Files { self.mode = mode } + func json() throws -> JSON { + try ThumbnailArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ThumbnailArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ThumbnailArg: \(error)" } } } @@ -9164,7 +9752,7 @@ public class Files { } /// The ThumbnailError union - public enum ThumbnailError: CustomStringConvertible { + public enum ThumbnailError: CustomStringConvertible, JSONRepresentable { /// An error occurs when downloading metadata for the image. case path(Files.LookupError) /// The file extension doesn't allow conversion to a thumbnail. @@ -9174,11 +9762,15 @@ public class Files { /// An error occurs during thumbnail conversion. case conversionError + func json() throws -> JSON { + try ThumbnailErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ThumbnailErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ThumbnailError: \(error)" } } } @@ -9230,17 +9822,21 @@ public class Files { } /// The ThumbnailFormat union - public enum ThumbnailFormat: CustomStringConvertible { + public enum ThumbnailFormat: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case jpeg /// An unspecified error. case png + func json() throws -> JSON { + try ThumbnailFormatSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ThumbnailFormatSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ThumbnailFormat: \(error)" } } } @@ -9279,7 +9875,7 @@ public class Files { } /// The ThumbnailMode union - public enum ThumbnailMode: CustomStringConvertible { + public enum ThumbnailMode: CustomStringConvertible, JSONRepresentable { /// Scale down the image to fit within the given size. case strict /// Scale down the image to fit within the given size or its transpose. @@ -9287,11 +9883,15 @@ public class Files { /// Scale down the image to completely cover the given size or its transpose. case fitoneBestfit + func json() throws -> JSON { + try ThumbnailModeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ThumbnailModeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ThumbnailMode: \(error)" } } } @@ -9336,7 +9936,7 @@ public class Files { } /// The ThumbnailSize union - public enum ThumbnailSize: CustomStringConvertible { + public enum ThumbnailSize: CustomStringConvertible, JSONRepresentable { /// 32 by 32 px. case w32h32 /// 64 by 64 px. @@ -9356,11 +9956,15 @@ public class Files { /// 2048 by 1536 px. case w2048h1536 + func json() throws -> JSON { + try ThumbnailSizeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ThumbnailSizeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ThumbnailSize: \(error)" } } } @@ -9441,7 +10045,7 @@ public class Files { } /// The ThumbnailV2Arg struct - public class ThumbnailV2Arg: CustomStringConvertible { + public class ThumbnailV2Arg: CustomStringConvertible, JSONRepresentable { /// Information specifying which file to preview. This could be a path to a file, a shared link pointing to a /// file, or a shared link pointing to a folder, with a relative path. public let resource: Files.PathOrLink @@ -9464,11 +10068,15 @@ public class Files { self.mode = mode } + func json() throws -> JSON { + try ThumbnailV2ArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ThumbnailV2ArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ThumbnailV2Arg: \(error)" } } } @@ -9500,7 +10108,7 @@ public class Files { } /// The ThumbnailV2Error union - public enum ThumbnailV2Error: CustomStringConvertible { + public enum ThumbnailV2Error: CustomStringConvertible, JSONRepresentable { /// An error occurred when downloading metadata for the image. case path(Files.LookupError) /// The file extension doesn't allow conversion to a thumbnail. @@ -9516,11 +10124,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try ThumbnailV2ErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ThumbnailV2ErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ThumbnailV2Error: \(error)" } } } @@ -9590,7 +10202,7 @@ public class Files { } /// The UnlockFileArg struct - public class UnlockFileArg: CustomStringConvertible { + public class UnlockFileArg: CustomStringConvertible, JSONRepresentable { /// Path in the user's Dropbox to a file. public let path: String public init(path: String) { @@ -9598,11 +10210,15 @@ public class Files { self.path = path } + func json() throws -> JSON { + try UnlockFileArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UnlockFileArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UnlockFileArg: \(error)" } } } @@ -9628,7 +10244,7 @@ public class Files { } /// The UnlockFileBatchArg struct - public class UnlockFileBatchArg: CustomStringConvertible { + public class UnlockFileBatchArg: CustomStringConvertible, JSONRepresentable { /// List of 'entries'. Each 'entry' contains a path of the file which will be unlocked. Duplicate path arguments /// in the batch are considered only once. public let entries: [Files.UnlockFileArg] @@ -9636,11 +10252,15 @@ public class Files { self.entries = entries } + func json() throws -> JSON { + try UnlockFileBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UnlockFileBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UnlockFileBatchArg: \(error)" } } } @@ -9698,7 +10318,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadArg: \(error)" } } } @@ -9748,7 +10368,7 @@ public class Files { } /// The UploadError union - public enum UploadError: CustomStringConvertible { + public enum UploadError: CustomStringConvertible, JSONRepresentable { /// Unable to save the uploaded contents to a file. case path(Files.UploadWriteFailed) /// The supplied property group is invalid. The file has uploaded without property groups. @@ -9760,11 +10380,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try UploadErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadError: \(error)" } } } @@ -9823,7 +10447,7 @@ public class Files { } /// The UploadSessionAppendArg struct - public class UploadSessionAppendArg: CustomStringConvertible { + public class UploadSessionAppendArg: CustomStringConvertible, JSONRepresentable { /// Contains the upload session ID and the offset. public let cursor: Files.UploadSessionCursor /// If true, the current session will be closed, at which point you won't be able to call uploadSessionAppendV2 @@ -9840,11 +10464,15 @@ public class Files { self.contentHash = contentHash } + func json() throws -> JSON { + try UploadSessionAppendArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionAppendArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionAppendArg: \(error)" } } } @@ -9874,7 +10502,7 @@ public class Files { } /// The UploadSessionLookupError union - public enum UploadSessionLookupError: CustomStringConvertible { + public enum UploadSessionLookupError: CustomStringConvertible, JSONRepresentable { /// The upload session ID was not found or has expired. Upload sessions are valid for 7 days. case notFound /// The specified offset was incorrect. See the value for the correct offset. This error may occur when a @@ -9897,11 +10525,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try UploadSessionLookupErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionLookupErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionLookupError: \(error)" } } } @@ -9983,7 +10615,7 @@ public class Files { } /// The UploadSessionAppendError union - public enum UploadSessionAppendError: CustomStringConvertible { + public enum UploadSessionAppendError: CustomStringConvertible, JSONRepresentable { /// The upload session ID was not found or has expired. Upload sessions are valid for 7 days. case notFound /// The specified offset was incorrect. See the value for the correct offset. This error may occur when a @@ -10008,11 +10640,15 @@ public class Files { /// The content received by the Dropbox server in this call does not match the provided content hash. case contentHashMismatch + func json() throws -> JSON { + try UploadSessionAppendErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionAppendErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionAppendError: \(error)" } } } @@ -10100,7 +10736,7 @@ public class Files { } /// The UploadSessionCursor struct - public class UploadSessionCursor: CustomStringConvertible { + public class UploadSessionCursor: CustomStringConvertible, JSONRepresentable { /// The upload session ID (returned by uploadSessionStart). public let sessionId: String /// Offset in bytes at which data should be appended. We use this to make sure upload data isn't lost or @@ -10113,11 +10749,15 @@ public class Files { self.offset = offset } + func json() throws -> JSON { + try UploadSessionCursorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionCursorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionCursor: \(error)" } } } @@ -10145,7 +10785,7 @@ public class Files { } /// The UploadSessionFinishArg struct - public class UploadSessionFinishArg: CustomStringConvertible { + public class UploadSessionFinishArg: CustomStringConvertible, JSONRepresentable { /// Contains the upload session ID and the offset. public let cursor: Files.UploadSessionCursor /// Contains the path and other optional modifiers for the commit. @@ -10161,11 +10801,15 @@ public class Files { self.contentHash = contentHash } + func json() throws -> JSON { + try UploadSessionFinishArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionFinishArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionFinishArg: \(error)" } } } @@ -10195,18 +10839,22 @@ public class Files { } /// The UploadSessionFinishBatchArg struct - public class UploadSessionFinishBatchArg: CustomStringConvertible { + public class UploadSessionFinishBatchArg: CustomStringConvertible, JSONRepresentable { /// Commit information for each file in the batch. public let entries: [Files.UploadSessionFinishArg] public init(entries: [Files.UploadSessionFinishArg]) { self.entries = entries } + func json() throws -> JSON { + try UploadSessionFinishBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionFinishBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionFinishBatchArg: \(error)" } } } @@ -10232,17 +10880,21 @@ public class Files { } /// The UploadSessionFinishBatchJobStatus union - public enum UploadSessionFinishBatchJobStatus: CustomStringConvertible { + public enum UploadSessionFinishBatchJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The uploadSessionFinishBatch has finished. case complete(Files.UploadSessionFinishBatchResult) + func json() throws -> JSON { + try UploadSessionFinishBatchJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionFinishBatchJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionFinishBatchJobStatus: \(error)" } } } @@ -10283,7 +10935,7 @@ public class Files { /// Result returned by uploadSessionFinishBatch that may either launch an asynchronous job or complete /// synchronously. - public enum UploadSessionFinishBatchLaunch: CustomStringConvertible { + public enum UploadSessionFinishBatchLaunch: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) @@ -10292,11 +10944,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try UploadSessionFinishBatchLaunchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionFinishBatchLaunchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionFinishBatchLaunch: \(error)" } } } @@ -10343,7 +10999,7 @@ public class Files { } /// The UploadSessionFinishBatchResult struct - public class UploadSessionFinishBatchResult: CustomStringConvertible { + public class UploadSessionFinishBatchResult: CustomStringConvertible, JSONRepresentable { /// Each entry in entries in UploadSessionFinishBatchArg will appear at the same position inside entries in /// UploadSessionFinishBatchResult. public let entries: [Files.UploadSessionFinishBatchResultEntry] @@ -10351,11 +11007,15 @@ public class Files { self.entries = entries } + func json() throws -> JSON { + try UploadSessionFinishBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionFinishBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionFinishBatchResult: \(error)" } } } @@ -10381,17 +11041,21 @@ public class Files { } /// The UploadSessionFinishBatchResultEntry union - public enum UploadSessionFinishBatchResultEntry: CustomStringConvertible { + public enum UploadSessionFinishBatchResultEntry: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case success(Files.FileMetadata) /// An unspecified error. case failure(Files.UploadSessionFinishError) + func json() throws -> JSON { + try UploadSessionFinishBatchResultEntrySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionFinishBatchResultEntrySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionFinishBatchResultEntry: \(error)" } } } @@ -10432,7 +11096,7 @@ public class Files { } /// The UploadSessionFinishError union - public enum UploadSessionFinishError: CustomStringConvertible { + public enum UploadSessionFinishError: CustomStringConvertible, JSONRepresentable { /// The session arguments are incorrect; the value explains the reason. case lookupFailed(Files.UploadSessionLookupError) /// Unable to save the uploaded contents to a file. Data has already been appended to the upload session. Please @@ -10458,11 +11122,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try UploadSessionFinishErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionFinishErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionFinishError: \(error)" } } } @@ -10558,7 +11226,7 @@ public class Files { } /// The UploadSessionOffsetError struct - public class UploadSessionOffsetError: CustomStringConvertible { + public class UploadSessionOffsetError: CustomStringConvertible, JSONRepresentable { /// The offset up to which data has been collected. public let correctOffset: UInt64 public init(correctOffset: UInt64) { @@ -10566,11 +11234,15 @@ public class Files { self.correctOffset = correctOffset } + func json() throws -> JSON { + try UploadSessionOffsetErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionOffsetErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionOffsetError: \(error)" } } } @@ -10596,7 +11268,7 @@ public class Files { } /// The UploadSessionStartArg struct - public class UploadSessionStartArg: CustomStringConvertible { + public class UploadSessionStartArg: CustomStringConvertible, JSONRepresentable { /// If true, the current session will be closed, at which point you won't be able to call uploadSessionAppendV2 /// anymore with the current session. public let close: Bool @@ -10613,11 +11285,15 @@ public class Files { self.contentHash = contentHash } + func json() throws -> JSON { + try UploadSessionStartArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionStartArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionStartArg: \(error)" } } } @@ -10647,7 +11323,7 @@ public class Files { } /// The UploadSessionStartBatchArg struct - public class UploadSessionStartBatchArg: CustomStringConvertible { + public class UploadSessionStartBatchArg: CustomStringConvertible, JSONRepresentable { /// Type of upload session you want to start. If not specified, default is sequential in UploadSessionType. public let sessionType: Files.UploadSessionType? /// The number of upload sessions to start. @@ -10658,11 +11334,15 @@ public class Files { self.numSessions = numSessions } + func json() throws -> JSON { + try UploadSessionStartBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionStartBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionStartBatchArg: \(error)" } } } @@ -10690,7 +11370,7 @@ public class Files { } /// The UploadSessionStartBatchResult struct - public class UploadSessionStartBatchResult: CustomStringConvertible { + public class UploadSessionStartBatchResult: CustomStringConvertible, JSONRepresentable { /// A List of unique identifiers for the upload session. Pass each session_id to uploadSessionAppendV2 and /// uploadSessionFinish. public let sessionIds: [String] @@ -10699,11 +11379,15 @@ public class Files { self.sessionIds = sessionIds } + func json() throws -> JSON { + try UploadSessionStartBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionStartBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionStartBatchResult: \(error)" } } } @@ -10729,7 +11413,7 @@ public class Files { } /// The UploadSessionStartError union - public enum UploadSessionStartError: CustomStringConvertible { + public enum UploadSessionStartError: CustomStringConvertible, JSONRepresentable { /// Uploading data not allowed when starting concurrent upload session. case concurrentSessionDataNotAllowed /// Can not start a closed concurrent upload session. @@ -10741,11 +11425,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try UploadSessionStartErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionStartErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionStartError: \(error)" } } } @@ -10802,7 +11490,7 @@ public class Files { } /// The UploadSessionStartResult struct - public class UploadSessionStartResult: CustomStringConvertible { + public class UploadSessionStartResult: CustomStringConvertible, JSONRepresentable { /// A unique identifier for the upload session. Pass this to uploadSessionAppendV2 and uploadSessionFinish. public let sessionId: String public init(sessionId: String) { @@ -10810,11 +11498,15 @@ public class Files { self.sessionId = sessionId } + func json() throws -> JSON { + try UploadSessionStartResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionStartResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionStartResult: \(error)" } } } @@ -10840,7 +11532,7 @@ public class Files { } /// The UploadSessionType union - public enum UploadSessionType: CustomStringConvertible { + public enum UploadSessionType: CustomStringConvertible, JSONRepresentable { /// Pieces of data are uploaded sequentially one after another. This is the default behavior. case sequential /// Pieces of data can be uploaded in concurrent RPCs in any order. @@ -10848,11 +11540,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try UploadSessionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadSessionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadSessionType: \(error)" } } } @@ -10897,7 +11593,7 @@ public class Files { } /// The UploadWriteFailed struct - public class UploadWriteFailed: CustomStringConvertible { + public class UploadWriteFailed: CustomStringConvertible, JSONRepresentable { /// The reason why the file couldn't be saved. public let reason: Files.WriteError /// The upload session ID; data has already been uploaded to the corresponding upload session and this ID may be @@ -10909,11 +11605,15 @@ public class Files { self.uploadSessionId = uploadSessionId } + func json() throws -> JSON { + try UploadWriteFailedSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadWriteFailedSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadWriteFailed: \(error)" } } } @@ -10941,7 +11641,7 @@ public class Files { } /// The UserGeneratedTag struct - public class UserGeneratedTag: CustomStringConvertible { + public class UserGeneratedTag: CustomStringConvertible, JSONRepresentable { /// (no description) public let tagText: String public init(tagText: String) { @@ -10949,11 +11649,15 @@ public class Files { self.tagText = tagText } + func json() throws -> JSON { + try UserGeneratedTagSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserGeneratedTagSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserGeneratedTag: \(error)" } } } @@ -10992,7 +11696,7 @@ public class Files { do { return "\(SerializeUtil.prepareJSONForSerialization(try VideoMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for VideoMetadata: \(error)" } } } @@ -11024,7 +11728,7 @@ public class Files { } /// The WriteConflictError union - public enum WriteConflictError: CustomStringConvertible { + public enum WriteConflictError: CustomStringConvertible, JSONRepresentable { /// There's a file in the way. case file /// There's a folder in the way. @@ -11034,11 +11738,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try WriteConflictErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WriteConflictErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WriteConflictError: \(error)" } } } @@ -11089,7 +11797,7 @@ public class Files { } /// The WriteError union - public enum WriteError: CustomStringConvertible { + public enum WriteError: CustomStringConvertible, JSONRepresentable { /// The given path does not satisfy the required path format. Please refer to the Path formats documentation /// https://www.dropbox.com/developers/documentation/http/documentation#path-formats for more /// information. @@ -11111,11 +11819,15 @@ public class Files { /// An unspecified error. case other + func json() throws -> JSON { + try WriteErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WriteErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WriteError: \(error)" } } } @@ -11203,7 +11915,7 @@ public class Files { /// folder, it's always a conflict. (c) If the target path refers to a file with identical contents, nothing /// gets written; no conflict. The conflict checking differs in the case where there's a file at the target path /// with contents different from the contents you're trying to write. - public enum WriteMode: CustomStringConvertible { + public enum WriteMode: CustomStringConvertible, JSONRepresentable { /// Do not overwrite an existing file if there is a conflict. The autorename strategy is to append a number to /// the file name. For example, "document.txt" might become "document (2).txt". case add @@ -11217,11 +11929,15 @@ public class Files { /// "document (conflicted copy).txt" or "document (Panda's conflicted copy).txt". case update(String) + func json() throws -> JSON { + try WriteModeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WriteModeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WriteMode: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift index af6a2c09..e5ca7d5b 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the files namespace /// For Objective-C compatible routes see DBFilesRoutes -public class FilesRoutes { +public class FilesRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/Openid.swift b/Source/SwiftyDropbox/Shared/Generated/Openid.swift index b9337d7e..c594937b 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Openid.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Openid.swift @@ -9,17 +9,21 @@ import Foundation /// Datatypes and serializers for the openid namespace public class Openid { /// The OpenIdError union - public enum OpenIdError: CustomStringConvertible { + public enum OpenIdError: CustomStringConvertible, JSONRepresentable { /// Missing openid claims for the associated access token. case incorrectOpenidScopes /// An unspecified error. case other + func json() throws -> JSON { + try OpenIdErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OpenIdErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OpenIdError: \(error)" } } } @@ -58,12 +62,16 @@ public class Openid { } /// No Parameters - public class UserInfoArgs: CustomStringConvertible { + public class UserInfoArgs: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try UserInfoArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserInfoArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserInfoArgs: \(error)" } } } @@ -86,17 +94,21 @@ public class Openid { } /// The UserInfoError union - public enum UserInfoError: CustomStringConvertible { + public enum UserInfoError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case openidError(Openid.OpenIdError) /// An unspecified error. case other + func json() throws -> JSON { + try UserInfoErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserInfoErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserInfoError: \(error)" } } } @@ -136,7 +148,7 @@ public class Openid { } /// The UserInfoResult struct - public class UserInfoResult: CustomStringConvertible { + public class UserInfoResult: CustomStringConvertible, JSONRepresentable { /// Last name of user. public let familyName: String? /// First name of user. @@ -164,11 +176,15 @@ public class Openid { self.sub = sub } + func json() throws -> JSON { + try UserInfoResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserInfoResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserInfoResult: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/OpenidRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/OpenidRoutes.swift index 95d1fbb0..186c997f 100644 --- a/Source/SwiftyDropbox/Shared/Generated/OpenidRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/OpenidRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the openid namespace /// For Objective-C compatible routes see DBOpenidRoutes -public class OpenidRoutes { +public class OpenidRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/Paper.swift b/Source/SwiftyDropbox/Shared/Generated/Paper.swift index eca477ff..5f525bf3 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Paper.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Paper.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the paper namespace public class Paper { /// The AddMember struct - public class AddMember: CustomStringConvertible { + public class AddMember: CustomStringConvertible, JSONRepresentable { /// Permission for the user. public let permissionLevel: Paper.PaperDocPermissionLevel /// User which should be added to the Paper doc. Specify only email address or Dropbox account ID. @@ -19,11 +19,15 @@ public class Paper { self.member = member } + func json() throws -> JSON { + try AddMemberSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddMemberSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddMember: \(error)" } } } @@ -52,7 +56,7 @@ public class Paper { } /// The RefPaperDoc struct - public class RefPaperDoc: CustomStringConvertible { + public class RefPaperDoc: CustomStringConvertible, JSONRepresentable { /// The Paper doc ID. public let docId: String public init(docId: String) { @@ -60,11 +64,15 @@ public class Paper { self.docId = docId } + func json() throws -> JSON { + try RefPaperDocSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RefPaperDocSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RefPaperDoc: \(error)" } } } @@ -109,7 +117,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddPaperDocUserSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddPaperDocUser: \(error)" } } } @@ -141,7 +149,7 @@ public class Paper { } /// Per-member result for docsUsersAdd. - public class AddPaperDocUserMemberResult: CustomStringConvertible { + public class AddPaperDocUserMemberResult: CustomStringConvertible, JSONRepresentable { /// One of specified input members. public let member: Sharing.MemberSelector /// The outcome of the action on this member. @@ -151,11 +159,15 @@ public class Paper { self.result = result } + func json() throws -> JSON { + try AddPaperDocUserMemberResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddPaperDocUserMemberResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddPaperDocUserMemberResult: \(error)" } } } @@ -183,7 +195,7 @@ public class Paper { } /// The AddPaperDocUserResult union - public enum AddPaperDocUserResult: CustomStringConvertible { + public enum AddPaperDocUserResult: CustomStringConvertible, JSONRepresentable { /// User was successfully added to the Paper doc. case success /// Something unexpected happened when trying to add the user to the Paper doc. @@ -201,11 +213,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try AddPaperDocUserResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddPaperDocUserResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddPaperDocUserResult: \(error)" } } } @@ -280,7 +296,7 @@ public class Paper { } /// The Cursor struct - public class Cursor: CustomStringConvertible { + public class Cursor: CustomStringConvertible, JSONRepresentable { /// The actual cursor value. public let value: String /// Expiration time of value. Some cursors might have expiration time assigned. This is a UTC value after which @@ -299,11 +315,15 @@ public class Paper { self.expiration = expiration } + func json() throws -> JSON { + try CursorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CursorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Cursor: \(error)" } } } @@ -331,7 +351,7 @@ public class Paper { } /// The PaperApiBaseError union - public enum PaperApiBaseError: CustomStringConvertible { + public enum PaperApiBaseError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to perform this action. This may be due to it only having access to /// Paper as files in the Dropbox filesystem. For more information, refer to the Paper Migration Guide /// https://www.dropbox.com/lp/developers/reference/paper-migration-guide. @@ -339,11 +359,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try PaperApiBaseErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperApiBaseErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperApiBaseError: \(error)" } } } @@ -382,7 +406,7 @@ public class Paper { } /// The DocLookupError union - public enum DocLookupError: CustomStringConvertible { + public enum DocLookupError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to perform this action. This may be due to it only having access to /// Paper as files in the Dropbox filesystem. For more information, refer to the Paper Migration Guide /// https://www.dropbox.com/lp/developers/reference/paper-migration-guide. @@ -392,11 +416,15 @@ public class Paper { /// The required doc was not found. case docNotFound + func json() throws -> JSON { + try DocLookupErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DocLookupErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DocLookupError: \(error)" } } } @@ -441,7 +469,7 @@ public class Paper { } /// The subscription level of a Paper doc. - public enum DocSubscriptionLevel: CustomStringConvertible { + public enum DocSubscriptionLevel: CustomStringConvertible, JSONRepresentable { /// No change email messages unless you're the creator. case default_ /// Ignored: Not shown in pad lists or activity and no email message is sent. @@ -451,11 +479,15 @@ public class Paper { /// Unsubscribed: Shown in pad lists, but not in activity and no change email messages are sent. case noEmail + func json() throws -> JSON { + try DocSubscriptionLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DocSubscriptionLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DocSubscriptionLevel: \(error)" } } } @@ -506,7 +538,7 @@ public class Paper { } /// The desired export format of the Paper doc. - public enum ExportFormat: CustomStringConvertible { + public enum ExportFormat: CustomStringConvertible, JSONRepresentable { /// The HTML export format. case html /// The markdown export format. @@ -514,11 +546,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try ExportFormatSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportFormatSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportFormat: \(error)" } } } @@ -563,7 +599,7 @@ public class Paper { } /// Data structure representing a Paper folder. - public class Folder: CustomStringConvertible { + public class Folder: CustomStringConvertible, JSONRepresentable { /// Paper folder ID. This ID uniquely identifies the folder. public let id: String /// Paper folder name. @@ -575,11 +611,15 @@ public class Paper { self.name = name } + func json() throws -> JSON { + try FolderSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Folder: \(error)" } } } @@ -607,17 +647,21 @@ public class Paper { } /// The sharing policy of a Paper folder. The sharing policy of subfolders is inherited from the root folder. - public enum FolderSharingPolicyType: CustomStringConvertible { + public enum FolderSharingPolicyType: CustomStringConvertible, JSONRepresentable { /// Everyone in your team and anyone directly invited can access this folder. case team /// Only people directly invited can access this folder. case inviteOnly + func json() throws -> JSON { + try FolderSharingPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderSharingPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderSharingPolicyType: \(error)" } } } @@ -656,7 +700,7 @@ public class Paper { } /// The subscription level of a Paper folder. - public enum FolderSubscriptionLevel: CustomStringConvertible { + public enum FolderSubscriptionLevel: CustomStringConvertible, JSONRepresentable { /// Not shown in activity, no email messages. case none /// Shown in activity, no email messages. @@ -666,11 +710,15 @@ public class Paper { /// Shown in activity, weekly email messages. case weeklyEmails + func json() throws -> JSON { + try FolderSubscriptionLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderSubscriptionLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderSubscriptionLevel: \(error)" } } } @@ -721,7 +769,7 @@ public class Paper { } /// Metadata about Paper folders containing the specififed Paper doc. - public class FoldersContainingPaperDoc: CustomStringConvertible { + public class FoldersContainingPaperDoc: CustomStringConvertible, JSONRepresentable { /// The sharing policy of the folder containing the Paper doc. public let folderSharingPolicyType: Paper.FolderSharingPolicyType? /// The folder path. If present the first folder is the root folder. @@ -731,11 +779,15 @@ public class Paper { self.folders = folders } + func json() throws -> JSON { + try FoldersContainingPaperDocSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FoldersContainingPaperDocSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FoldersContainingPaperDoc: \(error)" } } } @@ -764,7 +816,7 @@ public class Paper { } /// The import format of the incoming data. - public enum ImportFormat: CustomStringConvertible { + public enum ImportFormat: CustomStringConvertible, JSONRepresentable { /// The provided data is interpreted as standard HTML. case html /// The provided data is interpreted as markdown. The first line of the provided document will be used as the @@ -776,11 +828,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try ImportFormatSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ImportFormatSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ImportFormat: \(error)" } } } @@ -831,7 +887,7 @@ public class Paper { } /// The InviteeInfoWithPermissionLevel struct - public class InviteeInfoWithPermissionLevel: CustomStringConvertible { + public class InviteeInfoWithPermissionLevel: CustomStringConvertible, JSONRepresentable { /// Email address invited to the Paper doc. public let invitee: Sharing.InviteeInfo /// Permission level for the invitee. @@ -841,11 +897,15 @@ public class Paper { self.permissionLevel = permissionLevel } + func json() throws -> JSON { + try InviteeInfoWithPermissionLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InviteeInfoWithPermissionLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InviteeInfoWithPermissionLevel: \(error)" } } } @@ -873,17 +933,21 @@ public class Paper { } /// The ListDocsCursorError union - public enum ListDocsCursorError: CustomStringConvertible { + public enum ListDocsCursorError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case cursorError(Paper.PaperApiCursorError) /// An unspecified error. case other + func json() throws -> JSON { + try ListDocsCursorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListDocsCursorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListDocsCursorError: \(error)" } } } @@ -923,7 +987,7 @@ public class Paper { } /// The ListPaperDocsArgs struct - public class ListPaperDocsArgs: CustomStringConvertible { + public class ListPaperDocsArgs: CustomStringConvertible, JSONRepresentable { /// Allows user to specify how the Paper docs should be filtered. public let filterBy: Paper.ListPaperDocsFilterBy /// Allows user to specify how the Paper docs should be sorted. @@ -946,11 +1010,15 @@ public class Paper { self.limit = limit } + func json() throws -> JSON { + try ListPaperDocsArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListPaperDocsArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListPaperDocsArgs: \(error)" } } } @@ -985,7 +1053,7 @@ public class Paper { } /// The ListPaperDocsContinueArgs struct - public class ListPaperDocsContinueArgs: CustomStringConvertible { + public class ListPaperDocsContinueArgs: CustomStringConvertible, JSONRepresentable { /// The cursor obtained from docsList or docsListContinue. Allows for pagination. public let cursor: String public init(cursor: String) { @@ -993,11 +1061,15 @@ public class Paper { self.cursor = cursor } + func json() throws -> JSON { + try ListPaperDocsContinueArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListPaperDocsContinueArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListPaperDocsContinueArgs: \(error)" } } } @@ -1023,7 +1095,7 @@ public class Paper { } /// The ListPaperDocsFilterBy union - public enum ListPaperDocsFilterBy: CustomStringConvertible { + public enum ListPaperDocsFilterBy: CustomStringConvertible, JSONRepresentable { /// Fetches all Paper doc IDs that the user has ever accessed. case docsAccessed /// Fetches only the Paper doc IDs that the user has created. @@ -1031,11 +1103,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try ListPaperDocsFilterBySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListPaperDocsFilterBySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListPaperDocsFilterBy: \(error)" } } } @@ -1080,7 +1156,7 @@ public class Paper { } /// The ListPaperDocsResponse struct - public class ListPaperDocsResponse: CustomStringConvertible { + public class ListPaperDocsResponse: CustomStringConvertible, JSONRepresentable { /// The list of Paper doc IDs that can be used to access the given Paper docs or supplied to other API methods. /// The list is sorted in the order specified by the initial call to docsList. public let docIds: [String] @@ -1098,11 +1174,15 @@ public class Paper { self.hasMore = hasMore } + func json() throws -> JSON { + try ListPaperDocsResponseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListPaperDocsResponseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListPaperDocsResponse: \(error)" } } } @@ -1132,7 +1212,7 @@ public class Paper { } /// The ListPaperDocsSortBy union - public enum ListPaperDocsSortBy: CustomStringConvertible { + public enum ListPaperDocsSortBy: CustomStringConvertible, JSONRepresentable { /// Sorts the Paper docs by the time they were last accessed. case accessed /// Sorts the Paper docs by the time they were last modified. @@ -1142,11 +1222,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try ListPaperDocsSortBySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListPaperDocsSortBySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListPaperDocsSortBy: \(error)" } } } @@ -1197,7 +1281,7 @@ public class Paper { } /// The ListPaperDocsSortOrder union - public enum ListPaperDocsSortOrder: CustomStringConvertible { + public enum ListPaperDocsSortOrder: CustomStringConvertible, JSONRepresentable { /// Sorts the search result in ascending order. case ascending /// Sorts the search result in descending order. @@ -1205,11 +1289,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try ListPaperDocsSortOrderSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListPaperDocsSortOrderSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListPaperDocsSortOrder: \(error)" } } } @@ -1254,7 +1342,7 @@ public class Paper { } /// The ListUsersCursorError union - public enum ListUsersCursorError: CustomStringConvertible { + public enum ListUsersCursorError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to perform this action. This may be due to it only having access to /// Paper as files in the Dropbox filesystem. For more information, refer to the Paper Migration Guide /// https://www.dropbox.com/lp/developers/reference/paper-migration-guide. @@ -1266,11 +1354,15 @@ public class Paper { /// An unspecified error. case cursorError(Paper.PaperApiCursorError) + func json() throws -> JSON { + try ListUsersCursorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListUsersCursorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListUsersCursorError: \(error)" } } } @@ -1336,7 +1428,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListUsersOnFolderArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListUsersOnFolderArgs: \(error)" } } } @@ -1377,7 +1469,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListUsersOnFolderContinueArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListUsersOnFolderContinueArgs: \(error)" } } } @@ -1405,7 +1497,7 @@ public class Paper { } /// The ListUsersOnFolderResponse struct - public class ListUsersOnFolderResponse: CustomStringConvertible { + public class ListUsersOnFolderResponse: CustomStringConvertible, JSONRepresentable { /// List of email addresses that are invited on the Paper folder. public let invitees: [Sharing.InviteeInfo] /// List of users that are invited on the Paper folder. @@ -1424,11 +1516,15 @@ public class Paper { self.hasMore = hasMore } + func json() throws -> JSON { + try ListUsersOnFolderResponseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListUsersOnFolderResponseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListUsersOnFolderResponse: \(error)" } } } @@ -1477,7 +1573,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListUsersOnPaperDocArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListUsersOnPaperDocArgs: \(error)" } } } @@ -1521,7 +1617,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListUsersOnPaperDocContinueArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListUsersOnPaperDocContinueArgs: \(error)" } } } @@ -1549,7 +1645,7 @@ public class Paper { } /// The ListUsersOnPaperDocResponse struct - public class ListUsersOnPaperDocResponse: CustomStringConvertible { + public class ListUsersOnPaperDocResponse: CustomStringConvertible, JSONRepresentable { /// List of email addresses with their respective permission levels that are invited on the Paper doc. public let invitees: [Paper.InviteeInfoWithPermissionLevel] /// List of users with their respective permission levels that are invited on the Paper folder. @@ -1577,11 +1673,15 @@ public class Paper { self.hasMore = hasMore } + func json() throws -> JSON { + try ListUsersOnPaperDocResponseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListUsersOnPaperDocResponseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListUsersOnPaperDocResponse: \(error)" } } } @@ -1615,7 +1715,7 @@ public class Paper { } /// The PaperApiCursorError union - public enum PaperApiCursorError: CustomStringConvertible { + public enum PaperApiCursorError: CustomStringConvertible, JSONRepresentable { /// The provided cursor is expired. case expiredCursor /// The provided cursor is invalid. @@ -1628,11 +1728,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try PaperApiCursorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperApiCursorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperApiCursorError: \(error)" } } } @@ -1689,7 +1793,7 @@ public class Paper { } /// The PaperDocCreateArgs struct - public class PaperDocCreateArgs: CustomStringConvertible { + public class PaperDocCreateArgs: CustomStringConvertible, JSONRepresentable { /// The Paper folder ID where the Paper document should be created. The API user has to have write access to /// this folder or error is thrown. public let parentFolderId: String? @@ -1701,11 +1805,15 @@ public class Paper { self.importFormat = importFormat } + func json() throws -> JSON { + try PaperDocCreateArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocCreateArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocCreateArgs: \(error)" } } } @@ -1733,7 +1841,7 @@ public class Paper { } /// The PaperDocCreateError union - public enum PaperDocCreateError: CustomStringConvertible { + public enum PaperDocCreateError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to perform this action. This may be due to it only having access to /// Paper as files in the Dropbox filesystem. For more information, refer to the Paper Migration Guide /// https://www.dropbox.com/lp/developers/reference/paper-migration-guide. @@ -1750,11 +1858,15 @@ public class Paper { /// HTML with data URI. case imageSizeExceeded + func json() throws -> JSON { + try PaperDocCreateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocCreateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocCreateError: \(error)" } } } @@ -1817,7 +1929,7 @@ public class Paper { } /// The PaperDocCreateUpdateResult struct - public class PaperDocCreateUpdateResult: CustomStringConvertible { + public class PaperDocCreateUpdateResult: CustomStringConvertible, JSONRepresentable { /// Doc ID of the newly created doc. public let docId: String /// The Paper doc revision. Simply an ever increasing number. @@ -1833,11 +1945,15 @@ public class Paper { self.title = title } + func json() throws -> JSON { + try PaperDocCreateUpdateResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocCreateUpdateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocCreateUpdateResult: \(error)" } } } @@ -1879,7 +1995,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocExportSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocExport: \(error)" } } } @@ -1907,7 +2023,7 @@ public class Paper { } /// The PaperDocExportResult struct - public class PaperDocExportResult: CustomStringConvertible { + public class PaperDocExportResult: CustomStringConvertible, JSONRepresentable { /// The Paper doc owner's email address. public let owner: String /// The Paper doc title. @@ -1927,11 +2043,15 @@ public class Paper { self.mimeType = mimeType } + func json() throws -> JSON { + try PaperDocExportResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocExportResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocExportResult: \(error)" } } } @@ -1963,7 +2083,7 @@ public class Paper { } /// The PaperDocPermissionLevel union - public enum PaperDocPermissionLevel: CustomStringConvertible { + public enum PaperDocPermissionLevel: CustomStringConvertible, JSONRepresentable { /// User will be granted edit permissions. case edit /// User will be granted view and comment permissions. @@ -1971,11 +2091,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDocPermissionLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocPermissionLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocPermissionLevel: \(error)" } } } @@ -2032,7 +2156,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocSharingPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocSharingPolicy: \(error)" } } } @@ -2080,7 +2204,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocUpdateArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocUpdateArgs: \(error)" } } } @@ -2112,7 +2236,7 @@ public class Paper { } /// The PaperDocUpdateError union - public enum PaperDocUpdateError: CustomStringConvertible { + public enum PaperDocUpdateError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to perform this action. This may be due to it only having access to /// Paper as files in the Dropbox filesystem. For more information, refer to the Paper Migration Guide /// https://www.dropbox.com/lp/developers/reference/paper-migration-guide. @@ -2135,11 +2259,15 @@ public class Paper { /// This operation is not allowed on deleted Paper docs. case docDeleted + func json() throws -> JSON { + try PaperDocUpdateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocUpdateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocUpdateError: \(error)" } } } @@ -2220,7 +2348,7 @@ public class Paper { } /// The PaperDocUpdatePolicy union - public enum PaperDocUpdatePolicy: CustomStringConvertible { + public enum PaperDocUpdatePolicy: CustomStringConvertible, JSONRepresentable { /// The content will be appended to the doc. case append /// The content will be prepended to the doc. The doc title will not be affected. @@ -2230,11 +2358,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDocUpdatePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocUpdatePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocUpdatePolicy: \(error)" } } } @@ -2285,7 +2417,7 @@ public class Paper { } /// The PaperFolderCreateArg struct - public class PaperFolderCreateArg: CustomStringConvertible { + public class PaperFolderCreateArg: CustomStringConvertible, JSONRepresentable { /// The name of the new Paper folder. public let name: String /// The encrypted Paper folder Id where the new Paper folder should be created. The API user has to have write @@ -2305,11 +2437,15 @@ public class Paper { self.isTeamFolder = isTeamFolder } + func json() throws -> JSON { + try PaperFolderCreateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderCreateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderCreateArg: \(error)" } } } @@ -2339,7 +2475,7 @@ public class Paper { } /// The PaperFolderCreateError union - public enum PaperFolderCreateError: CustomStringConvertible { + public enum PaperFolderCreateError: CustomStringConvertible, JSONRepresentable { /// Your account does not have permissions to perform this action. This may be due to it only having access to /// Paper as files in the Dropbox filesystem. For more information, refer to the Paper Migration Guide /// https://www.dropbox.com/lp/developers/reference/paper-migration-guide. @@ -2351,11 +2487,15 @@ public class Paper { /// The folder id cannot be decrypted to valid folder id. case invalidFolderId + func json() throws -> JSON { + try PaperFolderCreateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderCreateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderCreateError: \(error)" } } } @@ -2406,7 +2546,7 @@ public class Paper { } /// The PaperFolderCreateResult struct - public class PaperFolderCreateResult: CustomStringConvertible { + public class PaperFolderCreateResult: CustomStringConvertible, JSONRepresentable { /// Folder ID of the newly created folder. public let folderId: String public init(folderId: String) { @@ -2414,11 +2554,15 @@ public class Paper { self.folderId = folderId } + func json() throws -> JSON { + try PaperFolderCreateResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderCreateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderCreateResult: \(error)" } } } @@ -2456,7 +2600,7 @@ public class Paper { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemovePaperDocUserSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemovePaperDocUser: \(error)" } } } @@ -2484,7 +2628,7 @@ public class Paper { } /// Sharing policy of Paper doc. - public class SharingPolicy: CustomStringConvertible { + public class SharingPolicy: CustomStringConvertible, JSONRepresentable { /// This value applies to the non-team members. public let publicSharingPolicy: Paper.SharingPublicPolicyType? /// This value applies to the team members only. The value is null for all personal accounts. @@ -2494,11 +2638,15 @@ public class Paper { self.teamSharingPolicy = teamSharingPolicy } + func json() throws -> JSON { + try SharingPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingPolicy: \(error)" } } } @@ -2527,7 +2675,7 @@ public class Paper { } /// The sharing policy type of the Paper doc. - public enum SharingTeamPolicyType: CustomStringConvertible { + public enum SharingTeamPolicyType: CustomStringConvertible, JSONRepresentable { /// Users who have a link to this doc can edit it. case peopleWithLinkCanEdit /// Users who have a link to this doc can view and comment on it. @@ -2535,11 +2683,15 @@ public class Paper { /// Users must be explicitly invited to this doc. case inviteOnly + func json() throws -> JSON { + try SharingTeamPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingTeamPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingTeamPolicyType: \(error)" } } } @@ -2584,7 +2736,7 @@ public class Paper { } /// The SharingPublicPolicyType union - public enum SharingPublicPolicyType: CustomStringConvertible { + public enum SharingPublicPolicyType: CustomStringConvertible, JSONRepresentable { /// Users who have a link to this doc can edit it. case peopleWithLinkCanEdit /// Users who have a link to this doc can view and comment on it. @@ -2594,11 +2746,15 @@ public class Paper { /// Value used to indicate that doc sharing is enabled only within team. case disabled + func json() throws -> JSON { + try SharingPublicPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingPublicPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingPublicPolicyType: \(error)" } } } @@ -2649,7 +2805,7 @@ public class Paper { } /// The UserInfoWithPermissionLevel struct - public class UserInfoWithPermissionLevel: CustomStringConvertible { + public class UserInfoWithPermissionLevel: CustomStringConvertible, JSONRepresentable { /// User shared on the Paper doc. public let user: Sharing.UserInfo /// Permission level for the user. @@ -2659,11 +2815,15 @@ public class Paper { self.permissionLevel = permissionLevel } + func json() throws -> JSON { + try UserInfoWithPermissionLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserInfoWithPermissionLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserInfoWithPermissionLevel: \(error)" } } } @@ -2691,7 +2851,7 @@ public class Paper { } /// The UserOnPaperDocFilter union - public enum UserOnPaperDocFilter: CustomStringConvertible { + public enum UserOnPaperDocFilter: CustomStringConvertible, JSONRepresentable { /// all users who have visited the Paper doc. case visited /// All uses who are shared on the Paper doc. This includes all users who have visited the Paper doc as well as @@ -2700,11 +2860,15 @@ public class Paper { /// An unspecified error. case other + func json() throws -> JSON { + try UserOnPaperDocFilterSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserOnPaperDocFilterSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserOnPaperDocFilter: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/PaperRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/PaperRoutes.swift index 227c884d..f582edee 100644 --- a/Source/SwiftyDropbox/Shared/Generated/PaperRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/PaperRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the paper namespace /// For Objective-C compatible routes see DBPaperRoutes -public class PaperRoutes { +public class PaperRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/SecondaryEmails.swift b/Source/SwiftyDropbox/Shared/Generated/SecondaryEmails.swift index f5c2766c..d9e58ecd 100644 --- a/Source/SwiftyDropbox/Shared/Generated/SecondaryEmails.swift +++ b/Source/SwiftyDropbox/Shared/Generated/SecondaryEmails.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the secondary_emails namespace public class SecondaryEmails { /// The SecondaryEmail struct - public class SecondaryEmail: CustomStringConvertible { + public class SecondaryEmail: CustomStringConvertible, JSONRepresentable { /// Secondary email address. public let email: String /// Whether or not the secondary email address is verified to be owned by a user. @@ -20,11 +20,15 @@ public class SecondaryEmails { self.isVerified = isVerified } + func json() throws -> JSON { + try SecondaryEmailSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryEmailSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryEmail: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/SeenState.swift b/Source/SwiftyDropbox/Shared/Generated/SeenState.swift index b03c276d..7ab8736a 100644 --- a/Source/SwiftyDropbox/Shared/Generated/SeenState.swift +++ b/Source/SwiftyDropbox/Shared/Generated/SeenState.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the seen_state namespace public class SeenState { /// Possible platforms on which a user may view content. - public enum PlatformType: CustomStringConvertible { + public enum PlatformType: CustomStringConvertible, JSONRepresentable { /// The content was viewed on the web. case web /// The content was viewed on a desktop client. @@ -27,11 +27,15 @@ public class SeenState { /// An unspecified error. case other + func json() throws -> JSON { + try PlatformTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PlatformTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PlatformType: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/Sharing.swift b/Source/SwiftyDropbox/Shared/Generated/Sharing.swift index 5e9584a3..352fdde7 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Sharing.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Sharing.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the sharing namespace public class Sharing { /// Information about the inheritance policy of a shared folder. - public enum AccessInheritance: CustomStringConvertible { + public enum AccessInheritance: CustomStringConvertible, JSONRepresentable { /// The shared folder inherits its members from the parent folder. case inherit /// The shared folder does not inherit its members from the parent folder. @@ -17,11 +17,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try AccessInheritanceSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccessInheritanceSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccessInheritance: \(error)" } } } @@ -66,7 +70,7 @@ public class Sharing { } /// Defines the access levels for collaborators. - public enum AccessLevel: CustomStringConvertible { + public enum AccessLevel: CustomStringConvertible, JSONRepresentable { /// The collaborator is the owner of the shared folder. Owners can view and edit the shared folder as well as /// set the folder's policies using updateFolderPolicy. case owner @@ -85,11 +89,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try AccessLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccessLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccessLevel: \(error)" } } } @@ -159,7 +167,7 @@ public class Sharing { /// Who can change a shared folder's access control list (ACL). In other words, who can add, remove, or change the /// privileges of members. - public enum AclUpdatePolicy: CustomStringConvertible { + public enum AclUpdatePolicy: CustomStringConvertible, JSONRepresentable { /// Only the owner can update the ACL. case owner /// Any editor can update the ACL. This may be further restricted to editors on the same team. @@ -167,11 +175,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try AclUpdatePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AclUpdatePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AclUpdatePolicy: \(error)" } } } @@ -216,7 +228,7 @@ public class Sharing { } /// Arguments for addFileMember. - public class AddFileMemberArgs: CustomStringConvertible { + public class AddFileMemberArgs: CustomStringConvertible, JSONRepresentable { /// File to which to add members. public let file: String /// Members to add. Note that even an email address is given, this may result in a user being directly added to @@ -248,11 +260,15 @@ public class Sharing { self.addMessageAsComment = addMessageAsComment } + func json() throws -> JSON { + try AddFileMemberArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddFileMemberArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddFileMemberArgs: \(error)" } } } @@ -296,7 +312,7 @@ public class Sharing { } /// Errors for addFileMember. - public enum AddFileMemberError: CustomStringConvertible { + public enum AddFileMemberError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case userError(Sharing.SharingUserError) /// An unspecified error. @@ -308,11 +324,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try AddFileMemberErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddFileMemberErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddFileMemberError: \(error)" } } } @@ -371,7 +391,7 @@ public class Sharing { } /// The AddFolderMemberArg struct - public class AddFolderMemberArg: CustomStringConvertible { + public class AddFolderMemberArg: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String /// The intended list of members to add. Added members will receive invites to join the shared folder. @@ -389,11 +409,15 @@ public class Sharing { self.customMessage = customMessage } + func json() throws -> JSON { + try AddFolderMemberArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddFolderMemberArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddFolderMemberArg: \(error)" } } } @@ -425,7 +449,7 @@ public class Sharing { } /// The AddFolderMemberError union - public enum AddFolderMemberError: CustomStringConvertible { + public enum AddFolderMemberError: CustomStringConvertible, JSONRepresentable { /// Unable to access shared folder. case accessError(Sharing.SharedFolderAccessError) /// This user's email address is not verified. This functionality is only available on accounts with a verified @@ -457,11 +481,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try AddFolderMemberErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddFolderMemberErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddFolderMemberError: \(error)" } } } @@ -576,7 +604,7 @@ public class Sharing { } /// The member and type of access the member should have when added to a shared folder. - public class AddMember: CustomStringConvertible { + public class AddMember: CustomStringConvertible, JSONRepresentable { /// The member to add to the shared folder. public let member: Sharing.MemberSelector /// The access level to grant member to the shared folder. owner in AccessLevel is disallowed. @@ -586,11 +614,15 @@ public class Sharing { self.accessLevel = accessLevel } + func json() throws -> JSON { + try AddMemberSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddMemberSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddMember: \(error)" } } } @@ -619,7 +651,7 @@ public class Sharing { } /// The AddMemberSelectorError union - public enum AddMemberSelectorError: CustomStringConvertible { + public enum AddMemberSelectorError: CustomStringConvertible, JSONRepresentable { /// Automatically created groups can only be added to team folders. case automaticGroup /// The value is the ID that could not be identified. @@ -636,11 +668,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try AddMemberSelectorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddMemberSelectorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddMemberSelectorError: \(error)" } } } @@ -714,7 +750,7 @@ public class Sharing { /// The access permission that can be requested by the caller for the shared link. Note that the final resolved /// visibility of the shared link takes into account other aspects, such as team and shared folder settings. /// Check the ResolvedVisibility for more info on the possible resolved visibility values of shared links. - public enum RequestedVisibility: CustomStringConvertible { + public enum RequestedVisibility: CustomStringConvertible, JSONRepresentable { /// Anyone who has received the link can access it. No login required. case public_ /// Only members of the same team can access the link. Login is required. @@ -722,11 +758,15 @@ public class Sharing { /// A link-specific password is required to access the link. Login is not required. case password + func json() throws -> JSON { + try RequestedVisibilitySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RequestedVisibilitySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RequestedVisibility: \(error)" } } } @@ -773,7 +813,7 @@ public class Sharing { /// The actual access permissions values of shared links after taking into account user preferences and the team and /// shared folder settings. Check the RequestedVisibility for more info on the possible visibility values that /// can be set by the shared link's owner. - public enum ResolvedVisibility: CustomStringConvertible { + public enum ResolvedVisibility: CustomStringConvertible, JSONRepresentable { /// Anyone who has received the link can access it. No login required. case public_ /// Only members of the same team can access the link. Login is required. @@ -793,11 +833,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ResolvedVisibilitySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResolvedVisibilitySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResolvedVisibility: \(error)" } } } @@ -872,7 +916,7 @@ public class Sharing { } /// check documentation for ResolvedVisibility. - public enum AlphaResolvedVisibility: CustomStringConvertible { + public enum AlphaResolvedVisibility: CustomStringConvertible, JSONRepresentable { /// Anyone who has received the link can access it. No login required. case public_ /// Only members of the same team can access the link. Login is required. @@ -892,11 +936,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try AlphaResolvedVisibilitySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AlphaResolvedVisibilitySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AlphaResolvedVisibility: \(error)" } } } @@ -971,7 +1019,7 @@ public class Sharing { } /// Information about the content that has a link audience different than that of this folder. - public class AudienceExceptionContentInfo: CustomStringConvertible { + public class AudienceExceptionContentInfo: CustomStringConvertible, JSONRepresentable { /// The name of the content, which is either a file or a folder. public let name: String public init(name: String) { @@ -979,11 +1027,15 @@ public class Sharing { self.name = name } + func json() throws -> JSON { + try AudienceExceptionContentInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AudienceExceptionContentInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AudienceExceptionContentInfo: \(error)" } } } @@ -1010,7 +1062,7 @@ public class Sharing { /// The total count and truncated list of information of content inside this folder that has a different audience /// than the link on this folder. This is only returned for folders. - public class AudienceExceptions: CustomStringConvertible { + public class AudienceExceptions: CustomStringConvertible, JSONRepresentable { /// (no description) public let count: UInt32 /// A truncated list of some of the content that is an exception. The length of this list could be smaller than @@ -1022,11 +1074,15 @@ public class Sharing { self.exceptions = exceptions } + func json() throws -> JSON { + try AudienceExceptionsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AudienceExceptionsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AudienceExceptions: \(error)" } } } @@ -1054,7 +1110,7 @@ public class Sharing { } /// Information about the shared folder that prevents the link audience for this link from being more restrictive. - public class AudienceRestrictingSharedFolder: CustomStringConvertible { + public class AudienceRestrictingSharedFolder: CustomStringConvertible, JSONRepresentable { /// The ID of the shared folder. public let sharedFolderId: String /// The name of the shared folder. @@ -1069,11 +1125,15 @@ public class Sharing { self.audience = audience } + func json() throws -> JSON { + try AudienceRestrictingSharedFolderSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AudienceRestrictingSharedFolderSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AudienceRestrictingSharedFolder: \(error)" } } } @@ -1103,7 +1163,7 @@ public class Sharing { } /// Metadata for a shared link. This can be either a PathLinkMetadata or CollectionLinkMetadata. - public class LinkMetadata: CustomStringConvertible { + public class LinkMetadata: CustomStringConvertible, JSONRepresentable { /// URL of the shared link. public let url: String /// Who can access the link. @@ -1117,11 +1177,15 @@ public class Sharing { self.expires = expires } + func json() throws -> JSON { + try LinkMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkMetadata: \(error)" } } } @@ -1178,7 +1242,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try CollectionLinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CollectionLinkMetadata: \(error)" } } } @@ -1208,7 +1272,7 @@ public class Sharing { } /// The CreateSharedLinkArg struct - public class CreateSharedLinkArg: CustomStringConvertible { + public class CreateSharedLinkArg: CustomStringConvertible, JSONRepresentable { /// The path to share. public let path: String /// (no description) @@ -1223,11 +1287,15 @@ public class Sharing { self.pendingUpload = pendingUpload } + func json() throws -> JSON { + try CreateSharedLinkArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateSharedLinkArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateSharedLinkArg: \(error)" } } } @@ -1257,17 +1325,21 @@ public class Sharing { } /// The CreateSharedLinkError union - public enum CreateSharedLinkError: CustomStringConvertible { + public enum CreateSharedLinkError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// An unspecified error. case other + func json() throws -> JSON { + try CreateSharedLinkErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateSharedLinkErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateSharedLinkError: \(error)" } } } @@ -1307,7 +1379,7 @@ public class Sharing { } /// The CreateSharedLinkWithSettingsArg struct - public class CreateSharedLinkWithSettingsArg: CustomStringConvertible { + public class CreateSharedLinkWithSettingsArg: CustomStringConvertible, JSONRepresentable { /// The path to be shared by the shared link. public let path: String /// The requested settings for the newly created shared link. @@ -1318,11 +1390,15 @@ public class Sharing { self.settings = settings } + func json() throws -> JSON { + try CreateSharedLinkWithSettingsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateSharedLinkWithSettingsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateSharedLinkWithSettingsArg: \(error)" } } } @@ -1350,7 +1426,7 @@ public class Sharing { } /// The CreateSharedLinkWithSettingsError union - public enum CreateSharedLinkWithSettingsError: CustomStringConvertible { + public enum CreateSharedLinkWithSettingsError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// This user's email address is not verified. This functionality is only available on accounts with a verified @@ -1366,11 +1442,15 @@ public class Sharing { /// https://help.dropbox.com/files-folders/share/banned-links. case accessDenied + func json() throws -> JSON { + try CreateSharedLinkWithSettingsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateSharedLinkWithSettingsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateSharedLinkWithSettingsError: \(error)" } } } @@ -1431,7 +1511,7 @@ public class Sharing { } /// The SharedContentLinkMetadataBase struct - public class SharedContentLinkMetadataBase: CustomStringConvertible { + public class SharedContentLinkMetadataBase: CustomStringConvertible, JSONRepresentable { /// The access level on the link for this file. public let accessLevel: Sharing.AccessLevel? /// The audience options that are available for the content. Some audience options may be unavailable. For @@ -1467,11 +1547,15 @@ public class Sharing { self.passwordProtected = passwordProtected } + func json() throws -> JSON { + try SharedContentLinkMetadataBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentLinkMetadataBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentLinkMetadataBase: \(error)" } } } @@ -1525,7 +1609,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExpectedSharedContentLinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExpectedSharedContentLinkMetadata: \(error)" } } } @@ -1573,7 +1657,7 @@ public class Sharing { } /// Sharing actions that may be taken on files. - public enum FileAction: CustomStringConvertible { + public enum FileAction: CustomStringConvertible, JSONRepresentable { /// Disable viewer information on the file. case disableViewerInfo /// Change or edit contents of the file. @@ -1601,11 +1685,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try FileActionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileActionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileAction: \(error)" } } } @@ -1710,7 +1798,7 @@ public class Sharing { } /// The FileErrorResult union - public enum FileErrorResult: CustomStringConvertible { + public enum FileErrorResult: CustomStringConvertible, JSONRepresentable { /// File specified by id was not found. case fileNotFoundError(String) /// User does not have permission to take the specified action on the file. @@ -1720,11 +1808,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try FileErrorResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileErrorResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileErrorResult: \(error)" } } } @@ -1778,7 +1870,7 @@ public class Sharing { } /// The metadata of a shared link. - public class SharedLinkMetadata: CustomStringConvertible { + public class SharedLinkMetadata: CustomStringConvertible, JSONRepresentable { /// URL of the shared link. public let url: String /// A unique identifier for the linked file. @@ -1822,11 +1914,15 @@ public class Sharing { self.contentOwnerTeamInfo = contentOwnerTeamInfo } + func json() throws -> JSON { + try SharedLinkMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkMetadata: \(error)" } } } @@ -1946,7 +2042,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLinkMetadata: \(error)" } } } @@ -2007,7 +2103,7 @@ public class Sharing { } /// The FileMemberActionError union - public enum FileMemberActionError: CustomStringConvertible { + public enum FileMemberActionError: CustomStringConvertible, JSONRepresentable { /// Specified member was not found. case invalidMember /// User does not have permission to perform this action on this member. @@ -2020,11 +2116,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try FileMemberActionErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileMemberActionErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileMemberActionError: \(error)" } } } @@ -2083,7 +2183,7 @@ public class Sharing { } /// The FileMemberActionIndividualResult union - public enum FileMemberActionIndividualResult: CustomStringConvertible { + public enum FileMemberActionIndividualResult: CustomStringConvertible, JSONRepresentable { /// Part of the response for both add_file_member and remove_file_member_v1 (deprecated). For add_file_member, /// indicates giving access was successful and at what AccessLevel. For remove_file_member_v1, indicates /// member was successfully removed from the file. If AccessLevel is given, the member still has access @@ -2092,11 +2192,15 @@ public class Sharing { /// User was not able to perform this action. case memberError(Sharing.FileMemberActionError) + func json() throws -> JSON { + try FileMemberActionIndividualResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileMemberActionIndividualResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileMemberActionIndividualResult: \(error)" } } } @@ -2137,7 +2241,7 @@ public class Sharing { } /// Per-member result for addFileMember. - public class FileMemberActionResult: CustomStringConvertible { + public class FileMemberActionResult: CustomStringConvertible, JSONRepresentable { /// One of specified input members. public let member: Sharing.MemberSelector /// The outcome of the action on this member. @@ -2161,11 +2265,15 @@ public class Sharing { self.invitationSignature = invitationSignature } + func json() throws -> JSON { + try FileMemberActionResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileMemberActionResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileMemberActionResult: \(error)" } } } @@ -2198,7 +2306,7 @@ public class Sharing { } /// The FileMemberRemoveActionResult union - public enum FileMemberRemoveActionResult: CustomStringConvertible { + public enum FileMemberRemoveActionResult: CustomStringConvertible, JSONRepresentable { /// Member was successfully removed from this file. case success(Sharing.MemberAccessLevelResult) /// User was not able to remove this member. @@ -2206,11 +2314,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try FileMemberRemoveActionResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileMemberRemoveActionResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileMemberRemoveActionResult: \(error)" } } } @@ -2257,7 +2369,7 @@ public class Sharing { } /// Whether the user is allowed to take the sharing action on the file. - public class FilePermission: CustomStringConvertible { + public class FilePermission: CustomStringConvertible, JSONRepresentable { /// The action that the user may wish to take on the file. public let action: Sharing.FileAction /// True if the user is allowed to take the action. @@ -2270,11 +2382,15 @@ public class Sharing { self.reason = reason } + func json() throws -> JSON { + try FilePermissionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FilePermissionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FilePermission: \(error)" } } } @@ -2304,7 +2420,7 @@ public class Sharing { } /// Actions that may be taken on shared folders. - public enum FolderAction: CustomStringConvertible { + public enum FolderAction: CustomStringConvertible, JSONRepresentable { /// Change folder options, such as who can be invited to join the folder. case changeOptions /// Disable viewer information for this folder. @@ -2336,11 +2452,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try FolderActionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderActionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderAction: \(error)" } } } @@ -2462,7 +2582,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderLinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderLinkMetadata: \(error)" } } } @@ -2511,7 +2631,7 @@ public class Sharing { } /// Whether the user is allowed to take the action on the shared folder. - public class FolderPermission: CustomStringConvertible { + public class FolderPermission: CustomStringConvertible, JSONRepresentable { /// The action that the user may wish to take on the folder. public let action: Sharing.FolderAction /// True if the user is allowed to take the action. @@ -2525,11 +2645,15 @@ public class Sharing { self.reason = reason } + func json() throws -> JSON { + try FolderPermissionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderPermissionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderPermission: \(error)" } } } @@ -2559,7 +2683,7 @@ public class Sharing { } /// A set of policies governing membership and privileges for a shared folder. - public class FolderPolicy: CustomStringConvertible { + public class FolderPolicy: CustomStringConvertible, JSONRepresentable { /// Who can be a member of this shared folder, as set on the folder itself. The effective policy may differ from /// this value if the team-wide policy is more restrictive. Present only if the folder is owned by a /// team. @@ -2588,11 +2712,15 @@ public class Sharing { self.viewerInfoPolicy = viewerInfoPolicy } + func json() throws -> JSON { + try FolderPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderPolicy: \(error)" } } } @@ -2632,7 +2760,7 @@ public class Sharing { } /// Arguments of getFileMetadata. - public class GetFileMetadataArg: CustomStringConvertible { + public class GetFileMetadataArg: CustomStringConvertible, JSONRepresentable { /// The file to query. public let file: String /// A list of `FileAction`s corresponding to `FilePermission`s that should appear in the response's permissions @@ -2644,11 +2772,15 @@ public class Sharing { self.actions = actions } + func json() throws -> JSON { + try GetFileMetadataArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetFileMetadataArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetFileMetadataArg: \(error)" } } } @@ -2676,7 +2808,7 @@ public class Sharing { } /// Arguments of getFileMetadataBatch. - public class GetFileMetadataBatchArg: CustomStringConvertible { + public class GetFileMetadataBatchArg: CustomStringConvertible, JSONRepresentable { /// The files to query. public let files: [String] /// A list of `FileAction`s corresponding to `FilePermission`s that should appear in the response's permissions @@ -2688,11 +2820,15 @@ public class Sharing { self.actions = actions } + func json() throws -> JSON { + try GetFileMetadataBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetFileMetadataBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetFileMetadataBatchArg: \(error)" } } } @@ -2720,7 +2856,7 @@ public class Sharing { } /// Per file results of getFileMetadataBatch. - public class GetFileMetadataBatchResult: CustomStringConvertible { + public class GetFileMetadataBatchResult: CustomStringConvertible, JSONRepresentable { /// This is the input file identifier corresponding to one of files in GetFileMetadataBatchArg. public let file: String /// The result for this particular file. @@ -2731,11 +2867,15 @@ public class Sharing { self.result = result } + func json() throws -> JSON { + try GetFileMetadataBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetFileMetadataBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetFileMetadataBatchResult: \(error)" } } } @@ -2763,7 +2903,7 @@ public class Sharing { } /// Error result for getFileMetadata. - public enum GetFileMetadataError: CustomStringConvertible { + public enum GetFileMetadataError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case userError(Sharing.SharingUserError) /// An unspecified error. @@ -2771,11 +2911,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try GetFileMetadataErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetFileMetadataErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetFileMetadataError: \(error)" } } } @@ -2822,7 +2966,7 @@ public class Sharing { } /// The GetFileMetadataIndividualResult union - public enum GetFileMetadataIndividualResult: CustomStringConvertible { + public enum GetFileMetadataIndividualResult: CustomStringConvertible, JSONRepresentable { /// The result for this file if it was successful. case metadata(Sharing.SharedFileMetadata) /// The result for this file if it was an error. @@ -2830,11 +2974,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try GetFileMetadataIndividualResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetFileMetadataIndividualResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetFileMetadataIndividualResult: \(error)" } } } @@ -2881,7 +3029,7 @@ public class Sharing { } /// The GetMetadataArgs struct - public class GetMetadataArgs: CustomStringConvertible { + public class GetMetadataArgs: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String /// A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the response's @@ -2894,11 +3042,15 @@ public class Sharing { self.actions = actions } + func json() throws -> JSON { + try GetMetadataArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetMetadataArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetMetadataArgs: \(error)" } } } @@ -2926,7 +3078,7 @@ public class Sharing { } /// The SharedLinkError union - public enum SharedLinkError: CustomStringConvertible { + public enum SharedLinkError: CustomStringConvertible, JSONRepresentable { /// The shared link wasn't found. case sharedLinkNotFound /// The caller is not allowed to access this shared link. @@ -2936,11 +3088,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try SharedLinkErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkError: \(error)" } } } @@ -2991,7 +3147,7 @@ public class Sharing { } /// The GetSharedLinkFileError union - public enum GetSharedLinkFileError: CustomStringConvertible { + public enum GetSharedLinkFileError: CustomStringConvertible, JSONRepresentable { /// The shared link wasn't found. case sharedLinkNotFound /// The caller is not allowed to access this shared link. @@ -3003,11 +3159,15 @@ public class Sharing { /// Directories cannot be retrieved by this endpoint. case sharedLinkIsDirectory + func json() throws -> JSON { + try GetSharedLinkFileErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetSharedLinkFileErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetSharedLinkFileError: \(error)" } } } @@ -3064,7 +3224,7 @@ public class Sharing { } /// The GetSharedLinkMetadataArg struct - public class GetSharedLinkMetadataArg: CustomStringConvertible { + public class GetSharedLinkMetadataArg: CustomStringConvertible, JSONRepresentable { /// URL of the shared link. public let url: String /// If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file @@ -3081,11 +3241,15 @@ public class Sharing { self.linkPassword = linkPassword } + func json() throws -> JSON { + try GetSharedLinkMetadataArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetSharedLinkMetadataArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetSharedLinkMetadataArg: \(error)" } } } @@ -3115,7 +3279,7 @@ public class Sharing { } /// The GetSharedLinksArg struct - public class GetSharedLinksArg: CustomStringConvertible { + public class GetSharedLinksArg: CustomStringConvertible, JSONRepresentable { /// See getSharedLinks description. public let path: String? public init(path: String? = nil) { @@ -3123,11 +3287,15 @@ public class Sharing { self.path = path } + func json() throws -> JSON { + try GetSharedLinksArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetSharedLinksArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetSharedLinksArg: \(error)" } } } @@ -3153,17 +3321,21 @@ public class Sharing { } /// The GetSharedLinksError union - public enum GetSharedLinksError: CustomStringConvertible { + public enum GetSharedLinksError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(String?) /// An unspecified error. case other + func json() throws -> JSON { + try GetSharedLinksErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetSharedLinksErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetSharedLinksError: \(error)" } } } @@ -3203,18 +3375,22 @@ public class Sharing { } /// The GetSharedLinksResult struct - public class GetSharedLinksResult: CustomStringConvertible { + public class GetSharedLinksResult: CustomStringConvertible, JSONRepresentable { /// Shared links applicable to the path argument. public let links: [Sharing.LinkMetadata] public init(links: [Sharing.LinkMetadata]) { self.links = links } + func json() throws -> JSON { + try GetSharedLinksResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetSharedLinksResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetSharedLinksResult: \(error)" } } } @@ -3278,7 +3454,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupInfo: \(error)" } } } @@ -3330,7 +3506,7 @@ public class Sharing { } /// The information about a member of the shared content. - public class MembershipInfo: CustomStringConvertible { + public class MembershipInfo: CustomStringConvertible, JSONRepresentable { /// The access type for this member. It contains inherited access type from parent folder, and acquired access /// type from this folder. public let accessType: Sharing.AccessLevel @@ -3349,11 +3525,15 @@ public class Sharing { self.isInherited = isInherited } + func json() throws -> JSON { + try MembershipInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembershipInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembershipInfo: \(error)" } } } @@ -3403,7 +3583,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembershipInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembershipInfo: \(error)" } } } @@ -3437,7 +3617,7 @@ public class Sharing { } /// The InsufficientPlan struct - public class InsufficientPlan: CustomStringConvertible { + public class InsufficientPlan: CustomStringConvertible, JSONRepresentable { /// A message to tell the user to upgrade in order to support expected action. public let message: String /// A URL to send the user to in order to obtain the account type they need, e.g. upgrading. Absent if there is @@ -3450,11 +3630,15 @@ public class Sharing { self.upsellUrl = upsellUrl } + func json() throws -> JSON { + try InsufficientPlanSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InsufficientPlanSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InsufficientPlan: \(error)" } } } @@ -3482,7 +3666,7 @@ public class Sharing { } /// The InsufficientQuotaAmounts struct - public class InsufficientQuotaAmounts: CustomStringConvertible { + public class InsufficientQuotaAmounts: CustomStringConvertible, JSONRepresentable { /// The amount of space needed to add the item (the size of the item). public let spaceNeeded: UInt64 /// The amount of extra space needed to add the item. @@ -3498,11 +3682,15 @@ public class Sharing { self.spaceLeft = spaceLeft } + func json() throws -> JSON { + try InsufficientQuotaAmountsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InsufficientQuotaAmountsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InsufficientQuotaAmounts: \(error)" } } } @@ -3532,17 +3720,21 @@ public class Sharing { } /// Information about the recipient of a shared content invitation. - public enum InviteeInfo: CustomStringConvertible { + public enum InviteeInfo: CustomStringConvertible, JSONRepresentable { /// Email address of invited user. case email(String) /// An unspecified error. case other + func json() throws -> JSON { + try InviteeInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InviteeInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InviteeInfo: \(error)" } } } @@ -3604,7 +3796,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try InviteeMembershipInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InviteeMembershipInfo: \(error)" } } } @@ -3647,7 +3839,7 @@ public class Sharing { } /// Error occurred while performing an asynchronous job from unshareFolder or removeFolderMember. - public enum JobError: CustomStringConvertible { + public enum JobError: CustomStringConvertible, JSONRepresentable { /// Error occurred while performing unshareFolder action. case unshareFolderError(Sharing.UnshareFolderError) /// Error occurred while performing removeFolderMember action. @@ -3657,11 +3849,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try JobErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try JobErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for JobError: \(error)" } } } @@ -3715,7 +3911,7 @@ public class Sharing { } /// The JobStatus union - public enum JobStatus: CustomStringConvertible { + public enum JobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The asynchronous job has finished. @@ -3723,11 +3919,15 @@ public class Sharing { /// The asynchronous job returned an error. case failed(Sharing.JobError) + func json() throws -> JSON { + try JobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try JobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for JobStatus: \(error)" } } } @@ -3773,7 +3973,7 @@ public class Sharing { } /// The LinkAccessLevel union - public enum LinkAccessLevel: CustomStringConvertible { + public enum LinkAccessLevel: CustomStringConvertible, JSONRepresentable { /// Users who use the link can view and comment on the content. case viewer /// Users who use the link can edit, view and comment on the content. @@ -3781,11 +3981,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try LinkAccessLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkAccessLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkAccessLevel: \(error)" } } } @@ -3830,7 +4034,7 @@ public class Sharing { } /// Actions that can be performed on a link. - public enum LinkAction: CustomStringConvertible { + public enum LinkAction: CustomStringConvertible, JSONRepresentable { /// Change the access level of the link. case changeAccessLevel /// Change the audience of the link. @@ -3846,11 +4050,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try LinkActionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkActionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkAction: \(error)" } } } @@ -3919,7 +4127,7 @@ public class Sharing { } /// The LinkAudience union - public enum LinkAudience: CustomStringConvertible { + public enum LinkAudience: CustomStringConvertible, JSONRepresentable { /// Link is accessible by anyone. case public_ /// Link is accessible only by team members. @@ -3936,11 +4144,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try LinkAudienceSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkAudienceSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkAudience: \(error)" } } } @@ -4003,7 +4215,7 @@ public class Sharing { } /// The VisibilityPolicyDisallowedReason union - public enum VisibilityPolicyDisallowedReason: CustomStringConvertible { + public enum VisibilityPolicyDisallowedReason: CustomStringConvertible, JSONRepresentable { /// The user needs to delete and recreate the link to change the visibility policy. case deleteAndRecreate /// The parent shared folder restricts sharing of links outside the shared folder. To change the visibility @@ -4020,11 +4232,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try VisibilityPolicyDisallowedReasonSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try VisibilityPolicyDisallowedReasonSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for VisibilityPolicyDisallowedReason: \(error)" } } } @@ -4093,7 +4309,7 @@ public class Sharing { } /// check documentation for VisibilityPolicyDisallowedReason. - public enum LinkAudienceDisallowedReason: CustomStringConvertible { + public enum LinkAudienceDisallowedReason: CustomStringConvertible, JSONRepresentable { /// The user needs to delete and recreate the link to change the visibility policy. case deleteAndRecreate /// The parent shared folder restricts sharing of links outside the shared folder. To change the visibility @@ -4110,11 +4326,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try LinkAudienceDisallowedReasonSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkAudienceDisallowedReasonSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkAudienceDisallowedReason: \(error)" } } } @@ -4183,7 +4403,7 @@ public class Sharing { } /// The LinkAudienceOption struct - public class LinkAudienceOption: CustomStringConvertible { + public class LinkAudienceOption: CustomStringConvertible, JSONRepresentable { /// Specifies who can access the link. public let audience: Sharing.LinkAudience /// Whether the user calling this API can select this audience option. @@ -4197,11 +4417,15 @@ public class Sharing { self.disallowedReason = disallowedReason } + func json() throws -> JSON { + try LinkAudienceOptionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkAudienceOptionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkAudienceOption: \(error)" } } } @@ -4232,7 +4456,7 @@ public class Sharing { } /// The LinkExpiry union - public enum LinkExpiry: CustomStringConvertible { + public enum LinkExpiry: CustomStringConvertible, JSONRepresentable { /// Remove the currently set expiry for the link. case removeExpiry /// Set a new expiry or change an existing expiry. @@ -4240,11 +4464,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try LinkExpirySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkExpirySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkExpiry: \(error)" } } } @@ -4290,7 +4518,7 @@ public class Sharing { } /// The LinkPassword union - public enum LinkPassword: CustomStringConvertible { + public enum LinkPassword: CustomStringConvertible, JSONRepresentable { /// Remove the currently set password for the link. case removePassword /// Set a new password or change an existing password. @@ -4298,11 +4526,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try LinkPasswordSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkPasswordSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkPassword: \(error)" } } } @@ -4348,7 +4580,7 @@ public class Sharing { } /// Permissions for actions that can be performed on a link. - public class LinkPermission: CustomStringConvertible { + public class LinkPermission: CustomStringConvertible, JSONRepresentable { /// (no description) public let action: Sharing.LinkAction /// (no description) @@ -4361,11 +4593,15 @@ public class Sharing { self.reason = reason } + func json() throws -> JSON { + try LinkPermissionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkPermissionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkPermission: \(error)" } } } @@ -4395,7 +4631,7 @@ public class Sharing { } /// The LinkPermissions struct - public class LinkPermissions: CustomStringConvertible { + public class LinkPermissions: CustomStringConvertible, JSONRepresentable { /// The current visibility of the link after considering the shared links policies of the the team (in case the /// link's owner is part of a team) and the shared folder (in case the linked file is part of a shared /// folder). This field is shown only if the caller has access to this info (the link's owner always has @@ -4490,11 +4726,15 @@ public class Sharing { self.canUseExtendedSharingControls = canUseExtendedSharingControls } + func json() throws -> JSON { + try LinkPermissionsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkPermissionsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkPermissions: \(error)" } } } @@ -4579,7 +4819,7 @@ public class Sharing { } /// Settings that apply to a link. - public class LinkSettings: CustomStringConvertible { + public class LinkSettings: CustomStringConvertible, JSONRepresentable { /// The access level on the link for this file. Currently, it only accepts 'viewer' and 'viewer_no_comment'. public let accessLevel: Sharing.AccessLevel? /// The type of audience on the link for this file. @@ -4600,11 +4840,15 @@ public class Sharing { self.password = password } + func json() throws -> JSON { + try LinkSettingsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkSettingsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkSettings: \(error)" } } } @@ -4636,7 +4880,7 @@ public class Sharing { } /// Arguments for listFileMembers. - public class ListFileMembersArg: CustomStringConvertible { + public class ListFileMembersArg: CustomStringConvertible, JSONRepresentable { /// The file for which you want to see members. public let file: String /// The actions for which to return permissions on a member. @@ -4654,11 +4898,15 @@ public class Sharing { self.limit = limit } + func json() throws -> JSON { + try ListFileMembersArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileMembersArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileMembersArg: \(error)" } } } @@ -4690,7 +4938,7 @@ public class Sharing { } /// Arguments for listFileMembersBatch. - public class ListFileMembersBatchArg: CustomStringConvertible { + public class ListFileMembersBatchArg: CustomStringConvertible, JSONRepresentable { /// Files for which to return members. public let files: [String] /// Number of members to return max per query. Defaults to 10 if no limit is specified. @@ -4702,11 +4950,15 @@ public class Sharing { self.limit = limit } + func json() throws -> JSON { + try ListFileMembersBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileMembersBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileMembersBatchArg: \(error)" } } } @@ -4734,7 +4986,7 @@ public class Sharing { } /// Per-file result for listFileMembersBatch. - public class ListFileMembersBatchResult: CustomStringConvertible { + public class ListFileMembersBatchResult: CustomStringConvertible, JSONRepresentable { /// This is the input file identifier, whether an ID or a path. public let file: String /// The result for this particular file. @@ -4745,11 +4997,15 @@ public class Sharing { self.result = result } + func json() throws -> JSON { + try ListFileMembersBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileMembersBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileMembersBatchResult: \(error)" } } } @@ -4777,7 +5033,7 @@ public class Sharing { } /// Arguments for listFileMembersContinue. - public class ListFileMembersContinueArg: CustomStringConvertible { + public class ListFileMembersContinueArg: CustomStringConvertible, JSONRepresentable { /// The cursor returned by your last call to listFileMembers, listFileMembersContinue, or listFileMembersBatch. public let cursor: String public init(cursor: String) { @@ -4785,11 +5041,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try ListFileMembersContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileMembersContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileMembersContinueArg: \(error)" } } } @@ -4815,7 +5075,7 @@ public class Sharing { } /// Error for listFileMembersContinue. - public enum ListFileMembersContinueError: CustomStringConvertible { + public enum ListFileMembersContinueError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case userError(Sharing.SharingUserError) /// An unspecified error. @@ -4825,11 +5085,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ListFileMembersContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileMembersContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileMembersContinueError: \(error)" } } } @@ -4882,7 +5146,7 @@ public class Sharing { } /// The ListFileMembersCountResult struct - public class ListFileMembersCountResult: CustomStringConvertible { + public class ListFileMembersCountResult: CustomStringConvertible, JSONRepresentable { /// A list of members on this file. public let members: Sharing.SharedFileMembers /// The number of members on this file. This does not include inherited members. @@ -4893,11 +5157,15 @@ public class Sharing { self.memberCount = memberCount } + func json() throws -> JSON { + try ListFileMembersCountResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileMembersCountResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileMembersCountResult: \(error)" } } } @@ -4925,7 +5193,7 @@ public class Sharing { } /// Error for listFileMembers. - public enum ListFileMembersError: CustomStringConvertible { + public enum ListFileMembersError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case userError(Sharing.SharingUserError) /// An unspecified error. @@ -4933,11 +5201,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ListFileMembersErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileMembersErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileMembersError: \(error)" } } } @@ -4984,7 +5256,7 @@ public class Sharing { } /// The ListFileMembersIndividualResult union - public enum ListFileMembersIndividualResult: CustomStringConvertible { + public enum ListFileMembersIndividualResult: CustomStringConvertible, JSONRepresentable { /// The results of the query for this file if it was successful. case result(Sharing.ListFileMembersCountResult) /// The result of the query for this file if it was an error. @@ -4992,11 +5264,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ListFileMembersIndividualResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFileMembersIndividualResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFileMembersIndividualResult: \(error)" } } } @@ -5043,7 +5319,7 @@ public class Sharing { } /// Arguments for listReceivedFiles. - public class ListFilesArg: CustomStringConvertible { + public class ListFilesArg: CustomStringConvertible, JSONRepresentable { /// Number of files to return max per query. Defaults to 100 if no limit is specified. public let limit: UInt32 /// A list of `FileAction`s corresponding to `FilePermission`s that should appear in the response's permissions @@ -5055,11 +5331,15 @@ public class Sharing { self.actions = actions } + func json() throws -> JSON { + try ListFilesArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFilesArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFilesArg: \(error)" } } } @@ -5087,7 +5367,7 @@ public class Sharing { } /// Arguments for listReceivedFilesContinue. - public class ListFilesContinueArg: CustomStringConvertible { + public class ListFilesContinueArg: CustomStringConvertible, JSONRepresentable { /// Cursor in cursor in ListFilesResult. public let cursor: String public init(cursor: String) { @@ -5095,11 +5375,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try ListFilesContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFilesContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFilesContinueArg: \(error)" } } } @@ -5125,7 +5409,7 @@ public class Sharing { } /// Error results for listReceivedFilesContinue. - public enum ListFilesContinueError: CustomStringConvertible { + public enum ListFilesContinueError: CustomStringConvertible, JSONRepresentable { /// User account had a problem. case userError(Sharing.SharingUserError) /// cursor in ListFilesContinueArg is invalid. @@ -5133,11 +5417,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ListFilesContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFilesContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFilesContinueError: \(error)" } } } @@ -5183,7 +5471,7 @@ public class Sharing { } /// Success results for listReceivedFiles. - public class ListFilesResult: CustomStringConvertible { + public class ListFilesResult: CustomStringConvertible, JSONRepresentable { /// Information about the files shared with current user. public let entries: [Sharing.SharedFileMetadata] /// Cursor used to obtain additional shared files. @@ -5194,11 +5482,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try ListFilesResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFilesResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFilesResult: \(error)" } } } @@ -5226,7 +5518,7 @@ public class Sharing { } /// The ListFolderMembersCursorArg struct - public class ListFolderMembersCursorArg: CustomStringConvertible { + public class ListFolderMembersCursorArg: CustomStringConvertible, JSONRepresentable { /// This is a list indicating whether each returned member will include a boolean value allow in /// MemberPermission that describes whether the current user can perform the MemberAction on the member. public let actions: [Sharing.MemberAction]? @@ -5238,11 +5530,15 @@ public class Sharing { self.limit = limit } + func json() throws -> JSON { + try ListFolderMembersCursorArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderMembersCursorArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderMembersCursorArg: \(error)" } } } @@ -5283,7 +5579,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderMembersArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderMembersArgs: \(error)" } } } @@ -5313,7 +5609,7 @@ public class Sharing { } /// The ListFolderMembersContinueArg struct - public class ListFolderMembersContinueArg: CustomStringConvertible { + public class ListFolderMembersContinueArg: CustomStringConvertible, JSONRepresentable { /// The cursor returned by your last call to listFolderMembers or listFolderMembersContinue. public let cursor: String public init(cursor: String) { @@ -5321,11 +5617,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try ListFolderMembersContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderMembersContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderMembersContinueArg: \(error)" } } } @@ -5351,7 +5651,7 @@ public class Sharing { } /// The ListFolderMembersContinueError union - public enum ListFolderMembersContinueError: CustomStringConvertible { + public enum ListFolderMembersContinueError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// cursor in ListFolderMembersContinueArg is invalid. @@ -5359,11 +5659,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ListFolderMembersContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFolderMembersContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFolderMembersContinueError: \(error)" } } } @@ -5409,7 +5713,7 @@ public class Sharing { } /// The ListFoldersArgs struct - public class ListFoldersArgs: CustomStringConvertible { + public class ListFoldersArgs: CustomStringConvertible, JSONRepresentable { /// The maximum number of results to return per request. public let limit: UInt32 /// A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the response's @@ -5422,11 +5726,15 @@ public class Sharing { self.actions = actions } + func json() throws -> JSON { + try ListFoldersArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFoldersArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFoldersArgs: \(error)" } } } @@ -5454,7 +5762,7 @@ public class Sharing { } /// The ListFoldersContinueArg struct - public class ListFoldersContinueArg: CustomStringConvertible { + public class ListFoldersContinueArg: CustomStringConvertible, JSONRepresentable { /// The cursor returned by the previous API call specified in the endpoint description. public let cursor: String public init(cursor: String) { @@ -5462,11 +5770,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try ListFoldersContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFoldersContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFoldersContinueArg: \(error)" } } } @@ -5492,17 +5804,21 @@ public class Sharing { } /// The ListFoldersContinueError union - public enum ListFoldersContinueError: CustomStringConvertible { + public enum ListFoldersContinueError: CustomStringConvertible, JSONRepresentable { /// cursor in ListFoldersContinueArg is invalid. case invalidCursor /// An unspecified error. case other + func json() throws -> JSON { + try ListFoldersContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFoldersContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFoldersContinueError: \(error)" } } } @@ -5542,7 +5858,7 @@ public class Sharing { /// Result for listFolders or listMountableFolders, depending on which endpoint was requested. Unmounted shared /// folders can be identified by the absence of pathLower in SharedFolderMetadata. - public class ListFoldersResult: CustomStringConvertible { + public class ListFoldersResult: CustomStringConvertible, JSONRepresentable { /// List of all shared folders the authenticated user has access to. public let entries: [Sharing.SharedFolderMetadata] /// Present if there are additional shared folders that have not been returned yet. Pass the cursor into the @@ -5555,11 +5871,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try ListFoldersResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListFoldersResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListFoldersResult: \(error)" } } } @@ -5587,7 +5907,7 @@ public class Sharing { } /// The ListSharedLinksArg struct - public class ListSharedLinksArg: CustomStringConvertible { + public class ListSharedLinksArg: CustomStringConvertible, JSONRepresentable { /// See listSharedLinks description. public let path: String? /// The cursor returned by your last call to listSharedLinks. @@ -5602,11 +5922,15 @@ public class Sharing { self.directOnly = directOnly } + func json() throws -> JSON { + try ListSharedLinksArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListSharedLinksArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListSharedLinksArg: \(error)" } } } @@ -5636,7 +5960,7 @@ public class Sharing { } /// The ListSharedLinksError union - public enum ListSharedLinksError: CustomStringConvertible { + public enum ListSharedLinksError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case path(Files.LookupError) /// Indicates that the cursor has been invalidated. Call listSharedLinks to obtain a new cursor. @@ -5644,11 +5968,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ListSharedLinksErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListSharedLinksErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListSharedLinksError: \(error)" } } } @@ -5694,7 +6022,7 @@ public class Sharing { } /// The ListSharedLinksResult struct - public class ListSharedLinksResult: CustomStringConvertible { + public class ListSharedLinksResult: CustomStringConvertible, JSONRepresentable { /// Shared links applicable to the path argument. public let links: [Sharing.SharedLinkMetadata] /// Is true if there are additional shared links that have not been returned yet. Pass the cursor into @@ -5710,11 +6038,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try ListSharedLinksResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListSharedLinksResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListSharedLinksResult: \(error)" } } } @@ -5744,7 +6076,7 @@ public class Sharing { } /// Contains information about a member's access level to content after an operation. - public class MemberAccessLevelResult: CustomStringConvertible { + public class MemberAccessLevelResult: CustomStringConvertible, JSONRepresentable { /// The member still has this level of access to the content through a parent folder. public let accessLevel: Sharing.AccessLevel? /// A localized string with additional information about why the user has this access level to the content. @@ -5759,11 +6091,15 @@ public class Sharing { self.accessDetails = accessDetails } + func json() throws -> JSON { + try MemberAccessLevelResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAccessLevelResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAccessLevelResult: \(error)" } } } @@ -5794,7 +6130,7 @@ public class Sharing { } /// Actions that may be taken on members of a shared folder. - public enum MemberAction: CustomStringConvertible { + public enum MemberAction: CustomStringConvertible, JSONRepresentable { /// Allow the member to keep a copy of the folder when removing. case leaveACopy /// Make the member an editor of the folder. @@ -5810,11 +6146,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try MemberActionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberActionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAction: \(error)" } } } @@ -5883,7 +6223,7 @@ public class Sharing { } /// Whether the user is allowed to take the action on the associated member. - public class MemberPermission: CustomStringConvertible { + public class MemberPermission: CustomStringConvertible, JSONRepresentable { /// The action that the user may wish to take on the member. public let action: Sharing.MemberAction /// True if the user is allowed to take the action. @@ -5896,11 +6236,15 @@ public class Sharing { self.reason = reason } + func json() throws -> JSON { + try MemberPermissionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberPermissionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberPermission: \(error)" } } } @@ -5930,7 +6274,7 @@ public class Sharing { } /// Policy governing who can be a member of a shared folder. Only applicable to folders owned by a user on a team. - public enum MemberPolicy: CustomStringConvertible { + public enum MemberPolicy: CustomStringConvertible, JSONRepresentable { /// Only a teammate can become a member. case team /// Anyone can become a member. @@ -5938,11 +6282,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try MemberPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberPolicy: \(error)" } } } @@ -5987,7 +6335,7 @@ public class Sharing { } /// Includes different ways to identify a member of a shared folder. - public enum MemberSelector: CustomStringConvertible { + public enum MemberSelector: CustomStringConvertible, JSONRepresentable { /// Dropbox account, team member, or group ID of member. case dropboxId(String) /// Email address of member. @@ -5995,11 +6343,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try MemberSelectorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSelectorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSelector: \(error)" } } } @@ -6046,7 +6398,7 @@ public class Sharing { } /// The ModifySharedLinkSettingsArgs struct - public class ModifySharedLinkSettingsArgs: CustomStringConvertible { + public class ModifySharedLinkSettingsArgs: CustomStringConvertible, JSONRepresentable { /// URL of the shared link to change its settings. public let url: String /// Set of settings for the shared link. @@ -6060,11 +6412,15 @@ public class Sharing { self.removeExpiration = removeExpiration } + func json() throws -> JSON { + try ModifySharedLinkSettingsArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ModifySharedLinkSettingsArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ModifySharedLinkSettingsArgs: \(error)" } } } @@ -6094,7 +6450,7 @@ public class Sharing { } /// The ModifySharedLinkSettingsError union - public enum ModifySharedLinkSettingsError: CustomStringConvertible { + public enum ModifySharedLinkSettingsError: CustomStringConvertible, JSONRepresentable { /// The shared link wasn't found. case sharedLinkNotFound /// The caller is not allowed to access this shared link. @@ -6109,11 +6465,15 @@ public class Sharing { /// email address. Users can verify their email address here https://www.dropbox.com/help/317. case emailNotVerified + func json() throws -> JSON { + try ModifySharedLinkSettingsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ModifySharedLinkSettingsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ModifySharedLinkSettingsError: \(error)" } } } @@ -6177,7 +6537,7 @@ public class Sharing { } /// The MountFolderArg struct - public class MountFolderArg: CustomStringConvertible { + public class MountFolderArg: CustomStringConvertible, JSONRepresentable { /// The ID of the shared folder to mount. public let sharedFolderId: String public init(sharedFolderId: String) { @@ -6185,11 +6545,15 @@ public class Sharing { self.sharedFolderId = sharedFolderId } + func json() throws -> JSON { + try MountFolderArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MountFolderArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MountFolderArg: \(error)" } } } @@ -6215,7 +6579,7 @@ public class Sharing { } /// The MountFolderError union - public enum MountFolderError: CustomStringConvertible { + public enum MountFolderError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// Mounting would cause a shared folder to be inside another, which is disallowed. @@ -6232,11 +6596,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try MountFolderErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MountFolderErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MountFolderError: \(error)" } } } @@ -6307,7 +6675,7 @@ public class Sharing { } /// Contains information about a parent folder that a member has access to. - public class ParentFolderAccessInfo: CustomStringConvertible { + public class ParentFolderAccessInfo: CustomStringConvertible, JSONRepresentable { /// Display name for the folder. public let folderName: String /// The identifier of the parent shared folder. @@ -6326,11 +6694,15 @@ public class Sharing { self.path = path } + func json() throws -> JSON { + try ParentFolderAccessInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ParentFolderAccessInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ParentFolderAccessInfo: \(error)" } } } @@ -6375,7 +6747,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try PathLinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PathLinkMetadata: \(error)" } } } @@ -6407,17 +6779,21 @@ public class Sharing { } /// Flag to indicate pending upload default (for linking to not-yet-existing paths). - public enum PendingUploadMode: CustomStringConvertible { + public enum PendingUploadMode: CustomStringConvertible, JSONRepresentable { /// Assume pending uploads are files. case file /// Assume pending uploads are folders. case folder + func json() throws -> JSON { + try PendingUploadModeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PendingUploadModeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PendingUploadMode: \(error)" } } } @@ -6456,7 +6832,7 @@ public class Sharing { } /// Possible reasons the user is denied a permission. - public enum PermissionDeniedReason: CustomStringConvertible { + public enum PermissionDeniedReason: CustomStringConvertible, JSONRepresentable { /// User is not on the same team as the folder owner. case userNotSameTeamAsOwner /// User is prohibited by the owner from taking the action. @@ -6490,11 +6866,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try PermissionDeniedReasonSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PermissionDeniedReasonSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PermissionDeniedReason: \(error)" } } } @@ -6618,7 +6998,7 @@ public class Sharing { } /// The RelinquishFileMembershipArg struct - public class RelinquishFileMembershipArg: CustomStringConvertible { + public class RelinquishFileMembershipArg: CustomStringConvertible, JSONRepresentable { /// The path or id for the file. public let file: String public init(file: String) { @@ -6626,11 +7006,15 @@ public class Sharing { self.file = file } + func json() throws -> JSON { + try RelinquishFileMembershipArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelinquishFileMembershipArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelinquishFileMembershipArg: \(error)" } } } @@ -6656,7 +7040,7 @@ public class Sharing { } /// The RelinquishFileMembershipError union - public enum RelinquishFileMembershipError: CustomStringConvertible { + public enum RelinquishFileMembershipError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharingFileAccessError) /// The current user has access to the shared file via a group. You can't relinquish membership to a file @@ -6667,11 +7051,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try RelinquishFileMembershipErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelinquishFileMembershipErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelinquishFileMembershipError: \(error)" } } } @@ -6723,7 +7111,7 @@ public class Sharing { } /// The RelinquishFolderMembershipArg struct - public class RelinquishFolderMembershipArg: CustomStringConvertible { + public class RelinquishFolderMembershipArg: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String /// Keep a copy of the folder's contents upon relinquishing membership. This must be set to false when the @@ -6735,11 +7123,15 @@ public class Sharing { self.leaveACopy = leaveACopy } + func json() throws -> JSON { + try RelinquishFolderMembershipArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelinquishFolderMembershipArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelinquishFolderMembershipArg: \(error)" } } } @@ -6767,7 +7159,7 @@ public class Sharing { } /// The RelinquishFolderMembershipError union - public enum RelinquishFolderMembershipError: CustomStringConvertible { + public enum RelinquishFolderMembershipError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// The current user is the owner of the shared folder. Owners cannot relinquish membership to their own @@ -6788,11 +7180,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try RelinquishFolderMembershipErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelinquishFolderMembershipErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelinquishFolderMembershipError: \(error)" } } } @@ -6868,7 +7264,7 @@ public class Sharing { } /// Arguments for removeFileMember2. - public class RemoveFileMemberArg: CustomStringConvertible { + public class RemoveFileMemberArg: CustomStringConvertible, JSONRepresentable { /// File from which to remove members. public let file: String /// Member to remove from this file. Note that even if an email is specified, it may result in the removal of a @@ -6880,11 +7276,15 @@ public class Sharing { self.member = member } + func json() throws -> JSON { + try RemoveFileMemberArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveFileMemberArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveFileMemberArg: \(error)" } } } @@ -6912,7 +7312,7 @@ public class Sharing { } /// Errors for removeFileMember2. - public enum RemoveFileMemberError: CustomStringConvertible { + public enum RemoveFileMemberError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case userError(Sharing.SharingUserError) /// An unspecified error. @@ -6923,11 +7323,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try RemoveFileMemberErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveFileMemberErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveFileMemberError: \(error)" } } } @@ -6981,7 +7385,7 @@ public class Sharing { } /// The RemoveFolderMemberArg struct - public class RemoveFolderMemberArg: CustomStringConvertible { + public class RemoveFolderMemberArg: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String /// The member to remove from the folder. @@ -6997,11 +7401,15 @@ public class Sharing { self.leaveACopy = leaveACopy } + func json() throws -> JSON { + try RemoveFolderMemberArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveFolderMemberArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveFolderMemberArg: \(error)" } } } @@ -7031,7 +7439,7 @@ public class Sharing { } /// The RemoveFolderMemberError union - public enum RemoveFolderMemberError: CustomStringConvertible { + public enum RemoveFolderMemberError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// An unspecified error. @@ -7051,11 +7459,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try RemoveFolderMemberErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveFolderMemberErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveFolderMemberError: \(error)" } } } @@ -7132,7 +7544,7 @@ public class Sharing { } /// The RemoveMemberJobStatus union - public enum RemoveMemberJobStatus: CustomStringConvertible { + public enum RemoveMemberJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// Removing the folder member has finished. The value is information about whether the member has another form @@ -7141,11 +7553,15 @@ public class Sharing { /// An unspecified error. case failed(Sharing.RemoveFolderMemberError) + func json() throws -> JSON { + try RemoveMemberJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveMemberJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveMemberJobStatus: \(error)" } } } @@ -7192,7 +7608,7 @@ public class Sharing { } /// The RequestedLinkAccessLevel union - public enum RequestedLinkAccessLevel: CustomStringConvertible { + public enum RequestedLinkAccessLevel: CustomStringConvertible, JSONRepresentable { /// Users who use the link can view and comment on the content. case viewer /// Users who use the link can edit, view and comment on the content. Note not all file types support edit links @@ -7205,11 +7621,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try RequestedLinkAccessLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RequestedLinkAccessLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RequestedLinkAccessLevel: \(error)" } } } @@ -7266,7 +7686,7 @@ public class Sharing { } /// The RevokeSharedLinkArg struct - public class RevokeSharedLinkArg: CustomStringConvertible { + public class RevokeSharedLinkArg: CustomStringConvertible, JSONRepresentable { /// URL of the shared link. public let url: String public init(url: String) { @@ -7274,11 +7694,15 @@ public class Sharing { self.url = url } + func json() throws -> JSON { + try RevokeSharedLinkArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeSharedLinkArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeSharedLinkArg: \(error)" } } } @@ -7304,7 +7728,7 @@ public class Sharing { } /// The RevokeSharedLinkError union - public enum RevokeSharedLinkError: CustomStringConvertible { + public enum RevokeSharedLinkError: CustomStringConvertible, JSONRepresentable { /// The shared link wasn't found. case sharedLinkNotFound /// The caller is not allowed to access this shared link. @@ -7316,11 +7740,15 @@ public class Sharing { /// Shared link is malformed. case sharedLinkMalformed + func json() throws -> JSON { + try RevokeSharedLinkErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeSharedLinkErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeSharedLinkError: \(error)" } } } @@ -7377,7 +7805,7 @@ public class Sharing { } /// The SetAccessInheritanceArg struct - public class SetAccessInheritanceArg: CustomStringConvertible { + public class SetAccessInheritanceArg: CustomStringConvertible, JSONRepresentable { /// The access inheritance settings for the folder. public let accessInheritance: Sharing.AccessInheritance /// The ID for the shared folder. @@ -7388,11 +7816,15 @@ public class Sharing { self.sharedFolderId = sharedFolderId } + func json() throws -> JSON { + try SetAccessInheritanceArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SetAccessInheritanceArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SetAccessInheritanceArg: \(error)" } } } @@ -7421,7 +7853,7 @@ public class Sharing { } /// The SetAccessInheritanceError union - public enum SetAccessInheritanceError: CustomStringConvertible { + public enum SetAccessInheritanceError: CustomStringConvertible, JSONRepresentable { /// Unable to access shared folder. case accessError(Sharing.SharedFolderAccessError) /// The current user does not have permission to perform this action. @@ -7429,11 +7861,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try SetAccessInheritanceErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SetAccessInheritanceErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SetAccessInheritanceError: \(error)" } } } @@ -7479,7 +7915,7 @@ public class Sharing { } /// The ShareFolderArgBase struct - public class ShareFolderArgBase: CustomStringConvertible { + public class ShareFolderArgBase: CustomStringConvertible, JSONRepresentable { /// Who can add and remove members of this shared folder. public let aclUpdatePolicy: Sharing.AclUpdatePolicy? /// Whether to force the share to happen asynchronously. @@ -7514,11 +7950,15 @@ public class Sharing { self.accessInheritance = accessInheritance } + func json() throws -> JSON { + try ShareFolderArgBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShareFolderArgBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShareFolderArgBase: \(error)" } } } @@ -7600,7 +8040,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShareFolderArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShareFolderArg: \(error)" } } } @@ -7653,7 +8093,7 @@ public class Sharing { } /// The ShareFolderErrorBase union - public enum ShareFolderErrorBase: CustomStringConvertible { + public enum ShareFolderErrorBase: CustomStringConvertible, JSONRepresentable { /// This user's email address is not verified. This functionality is only available on accounts with a verified /// email address. Users can verify their email address here https://www.dropbox.com/help/317. case emailUnverified @@ -7666,11 +8106,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ShareFolderErrorBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShareFolderErrorBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShareFolderErrorBase: \(error)" } } } @@ -7728,7 +8172,7 @@ public class Sharing { } /// The ShareFolderError union - public enum ShareFolderError: CustomStringConvertible { + public enum ShareFolderError: CustomStringConvertible, JSONRepresentable { /// This user's email address is not verified. This functionality is only available on accounts with a verified /// email address. Users can verify their email address here https://www.dropbox.com/help/317. case emailUnverified @@ -7743,11 +8187,15 @@ public class Sharing { /// The current user does not have permission to perform this action. case noPermission + func json() throws -> JSON { + try ShareFolderErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShareFolderErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShareFolderError: \(error)" } } } @@ -7811,7 +8259,7 @@ public class Sharing { } /// The ShareFolderJobStatus union - public enum ShareFolderJobStatus: CustomStringConvertible { + public enum ShareFolderJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The share job has finished. The value is the metadata for the folder. @@ -7819,11 +8267,15 @@ public class Sharing { /// An unspecified error. case failed(Sharing.ShareFolderError) + func json() throws -> JSON { + try ShareFolderJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShareFolderJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShareFolderJobStatus: \(error)" } } } @@ -7870,18 +8322,22 @@ public class Sharing { } /// The ShareFolderLaunch union - public enum ShareFolderLaunch: CustomStringConvertible { + public enum ShareFolderLaunch: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) /// An unspecified error. case complete(Sharing.SharedFolderMetadata) + func json() throws -> JSON { + try ShareFolderLaunchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShareFolderLaunchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShareFolderLaunch: \(error)" } } } @@ -7922,7 +8378,7 @@ public class Sharing { } /// The SharePathError union - public enum SharePathError: CustomStringConvertible { + public enum SharePathError: CustomStringConvertible, JSONRepresentable { /// A file is at the specified path. case isFile /// We do not support sharing a folder inside a shared folder. @@ -7958,11 +8414,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try SharePathErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharePathErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharePathError: \(error)" } } } @@ -8127,7 +8587,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentLinkMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentLinkMetadata: \(error)" } } } @@ -8182,7 +8642,7 @@ public class Sharing { /// Shared file user, group, and invitee membership. Used for the results of listFileMembers and /// listFileMembersContinue, and used as part of the results for listFileMembersBatch. - public class SharedFileMembers: CustomStringConvertible { + public class SharedFileMembers: CustomStringConvertible, JSONRepresentable { /// The list of user members of the shared file. public let users: [Sharing.UserFileMembershipInfo] /// The list of group members of the shared file. @@ -8205,11 +8665,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try SharedFileMembersSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFileMembersSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFileMembers: \(error)" } } } @@ -8241,7 +8705,7 @@ public class Sharing { } /// Properties of the shared file. - public class SharedFileMetadata: CustomStringConvertible { + public class SharedFileMetadata: CustomStringConvertible, JSONRepresentable { /// The current user's access level for this shared file. public let accessType: Sharing.AccessLevel? /// The ID of the file. @@ -8318,11 +8782,15 @@ public class Sharing { self.timeInvited = timeInvited } + func json() throws -> JSON { + try SharedFileMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFileMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFileMetadata: \(error)" } } } @@ -8391,7 +8859,7 @@ public class Sharing { } /// There is an error accessing the shared folder. - public enum SharedFolderAccessError: CustomStringConvertible { + public enum SharedFolderAccessError: CustomStringConvertible, JSONRepresentable { /// This shared folder ID is invalid. case invalidId /// The user is not a member of the shared folder thus cannot access it. @@ -8405,11 +8873,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try SharedFolderAccessErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderAccessErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderAccessError: \(error)" } } } @@ -8472,7 +8944,7 @@ public class Sharing { } /// The SharedFolderMemberError union - public enum SharedFolderMemberError: CustomStringConvertible { + public enum SharedFolderMemberError: CustomStringConvertible, JSONRepresentable { /// The target dropbox_id is invalid. case invalidDropboxId /// The target dropbox_id is not a member of the shared folder. @@ -8482,11 +8954,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try SharedFolderMemberErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderMemberErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderMemberError: \(error)" } } } @@ -8538,7 +9014,7 @@ public class Sharing { } /// Shared folder user and group membership. - public class SharedFolderMembers: CustomStringConvertible { + public class SharedFolderMembers: CustomStringConvertible, JSONRepresentable { /// The list of user members of the shared folder. public let users: [Sharing.UserMembershipInfo] /// The list of group members of the shared folder. @@ -8561,11 +9037,15 @@ public class Sharing { self.cursor = cursor } + func json() throws -> JSON { + try SharedFolderMembersSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderMembersSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderMembers: \(error)" } } } @@ -8597,7 +9077,7 @@ public class Sharing { } /// Properties of the shared folder. - public class SharedFolderMetadataBase: CustomStringConvertible { + public class SharedFolderMetadataBase: CustomStringConvertible, JSONRepresentable { /// The current user's access level for this shared folder. public let accessType: Sharing.AccessLevel /// Whether this folder is inside of a team folder. @@ -8645,11 +9125,15 @@ public class Sharing { self.parentFolderName = parentFolderName } + func json() throws -> JSON { + try SharedFolderMetadataBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderMetadataBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderMetadataBase: \(error)" } } } @@ -8768,7 +9252,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderMetadata: \(error)" } } } @@ -8846,7 +9330,7 @@ public class Sharing { } /// The SharedLinkAccessFailureReason union - public enum SharedLinkAccessFailureReason: CustomStringConvertible { + public enum SharedLinkAccessFailureReason: CustomStringConvertible, JSONRepresentable { /// User is not logged in. case loginRequired /// This user's email address is not verified. This functionality is only available on accounts with a verified @@ -8861,11 +9345,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try SharedLinkAccessFailureReasonSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkAccessFailureReasonSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkAccessFailureReason: \(error)" } } } @@ -8928,17 +9416,21 @@ public class Sharing { } /// The SharedLinkAlreadyExistsMetadata union - public enum SharedLinkAlreadyExistsMetadata: CustomStringConvertible { + public enum SharedLinkAlreadyExistsMetadata: CustomStringConvertible, JSONRepresentable { /// Metadata of the shared link that already exists. case metadata(Sharing.SharedLinkMetadata) /// An unspecified error. case other + func json() throws -> JSON { + try SharedLinkAlreadyExistsMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkAlreadyExistsMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkAlreadyExistsMetadata: \(error)" } } } @@ -8978,7 +9470,7 @@ public class Sharing { } /// Who can view shared links in this folder. - public enum SharedLinkPolicy: CustomStringConvertible { + public enum SharedLinkPolicy: CustomStringConvertible, JSONRepresentable { /// Links can be shared with anyone. case anyone /// Links can be shared with anyone on the same team as the owner. @@ -8988,11 +9480,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try SharedLinkPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkPolicy: \(error)" } } } @@ -9043,7 +9539,7 @@ public class Sharing { } /// The SharedLinkSettings struct - public class SharedLinkSettings: CustomStringConvertible { + public class SharedLinkSettings: CustomStringConvertible, JSONRepresentable { /// Boolean flag to enable or disable password protection. public let requirePassword: Bool? /// If requirePassword is true, this is needed to specify the password to access the link. @@ -9081,11 +9577,15 @@ public class Sharing { self.allowDownload = allowDownload } + func json() throws -> JSON { + try SharedLinkSettingsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettings: \(error)" } } } @@ -9131,7 +9631,7 @@ public class Sharing { } /// The SharedLinkSettingsError union - public enum SharedLinkSettingsError: CustomStringConvertible { + public enum SharedLinkSettingsError: CustomStringConvertible, JSONRepresentable { /// The given settings are invalid (for example, all attributes of the SharedLinkSettings are empty, the /// requested visibility is password in RequestedVisibility but the linkPassword in SharedLinkSettings /// is missing, expires in SharedLinkSettings is set to the past, etc.). @@ -9141,11 +9641,15 @@ public class Sharing { /// SharedLinkSettings. case notAuthorized + func json() throws -> JSON { + try SharedLinkSettingsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsError: \(error)" } } } @@ -9184,7 +9688,7 @@ public class Sharing { } /// User could not access this file. - public enum SharingFileAccessError: CustomStringConvertible { + public enum SharingFileAccessError: CustomStringConvertible, JSONRepresentable { /// Current user does not have sufficient privileges to perform the desired action. case noPermission /// File specified was not found. @@ -9198,11 +9702,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try SharingFileAccessErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingFileAccessErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingFileAccessError: \(error)" } } } @@ -9265,18 +9773,22 @@ public class Sharing { } /// User account had a problem preventing this action. - public enum SharingUserError: CustomStringConvertible { + public enum SharingUserError: CustomStringConvertible, JSONRepresentable { /// This user's email address is not verified. This functionality is only available on accounts with a verified /// email address. Users can verify their email address here https://www.dropbox.com/help/317. case emailUnverified /// An unspecified error. case other + func json() throws -> JSON { + try SharingUserErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingUserErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingUserError: \(error)" } } } @@ -9315,7 +9827,7 @@ public class Sharing { } /// Information about a team member. - public class TeamMemberInfo: CustomStringConvertible { + public class TeamMemberInfo: CustomStringConvertible, JSONRepresentable { /// Information about the member's team. public let teamInfo: Users.Team /// The display name of the user. @@ -9331,11 +9843,15 @@ public class Sharing { self.memberId = memberId } + func json() throws -> JSON { + try TeamMemberInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberInfo: \(error)" } } } @@ -9365,7 +9881,7 @@ public class Sharing { } /// The TransferFolderArg struct - public class TransferFolderArg: CustomStringConvertible { + public class TransferFolderArg: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String /// A account or team member ID to transfer ownership to. @@ -9377,11 +9893,15 @@ public class Sharing { self.toDropboxId = toDropboxId } + func json() throws -> JSON { + try TransferFolderArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TransferFolderArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TransferFolderArg: \(error)" } } } @@ -9409,7 +9929,7 @@ public class Sharing { } /// The TransferFolderError union - public enum TransferFolderError: CustomStringConvertible { + public enum TransferFolderError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// toDropboxId in TransferFolderArg is invalid. @@ -9429,11 +9949,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try TransferFolderErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TransferFolderErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TransferFolderError: \(error)" } } } @@ -9509,7 +10033,7 @@ public class Sharing { } /// The UnmountFolderArg struct - public class UnmountFolderArg: CustomStringConvertible { + public class UnmountFolderArg: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String public init(sharedFolderId: String) { @@ -9517,11 +10041,15 @@ public class Sharing { self.sharedFolderId = sharedFolderId } + func json() throws -> JSON { + try UnmountFolderArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UnmountFolderArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UnmountFolderArg: \(error)" } } } @@ -9547,7 +10075,7 @@ public class Sharing { } /// The UnmountFolderError union - public enum UnmountFolderError: CustomStringConvertible { + public enum UnmountFolderError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// The current user does not have permission to perform this action. @@ -9558,11 +10086,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try UnmountFolderErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UnmountFolderErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UnmountFolderError: \(error)" } } } @@ -9614,7 +10146,7 @@ public class Sharing { } /// Arguments for unshareFile. - public class UnshareFileArg: CustomStringConvertible { + public class UnshareFileArg: CustomStringConvertible, JSONRepresentable { /// The file to unshare. public let file: String public init(file: String) { @@ -9622,11 +10154,15 @@ public class Sharing { self.file = file } + func json() throws -> JSON { + try UnshareFileArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UnshareFileArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UnshareFileArg: \(error)" } } } @@ -9652,7 +10188,7 @@ public class Sharing { } /// Error result for unshareFile. - public enum UnshareFileError: CustomStringConvertible { + public enum UnshareFileError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case userError(Sharing.SharingUserError) /// An unspecified error. @@ -9660,11 +10196,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try UnshareFileErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UnshareFileErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UnshareFileError: \(error)" } } } @@ -9711,7 +10251,7 @@ public class Sharing { } /// The UnshareFolderArg struct - public class UnshareFolderArg: CustomStringConvertible { + public class UnshareFolderArg: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String /// If true, members of this shared folder will get a copy of this folder after it's unshared. Otherwise, it @@ -9724,11 +10264,15 @@ public class Sharing { self.leaveACopy = leaveACopy } + func json() throws -> JSON { + try UnshareFolderArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UnshareFolderArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UnshareFolderArg: \(error)" } } } @@ -9756,7 +10300,7 @@ public class Sharing { } /// The UnshareFolderError union - public enum UnshareFolderError: CustomStringConvertible { + public enum UnshareFolderError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// This action cannot be performed on a team shared folder. @@ -9768,11 +10312,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try UnshareFolderErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UnshareFolderErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UnshareFolderError: \(error)" } } } @@ -9830,7 +10378,7 @@ public class Sharing { } /// Arguments for updateFileMember. - public class UpdateFileMemberArgs: CustomStringConvertible { + public class UpdateFileMemberArgs: CustomStringConvertible, JSONRepresentable { /// File for which we are changing a member's access. public let file: String /// The member whose access we are changing. @@ -9844,11 +10392,15 @@ public class Sharing { self.accessLevel = accessLevel } + func json() throws -> JSON { + try UpdateFileMemberArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateFileMemberArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateFileMemberArgs: \(error)" } } } @@ -9878,7 +10430,7 @@ public class Sharing { } /// The UpdateFolderMemberArg struct - public class UpdateFolderMemberArg: CustomStringConvertible { + public class UpdateFolderMemberArg: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String /// The member of the shared folder to update. Only the dropboxId in MemberSelector may be set at this time. @@ -9892,11 +10444,15 @@ public class Sharing { self.accessLevel = accessLevel } + func json() throws -> JSON { + try UpdateFolderMemberArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateFolderMemberArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateFolderMemberArg: \(error)" } } } @@ -9926,7 +10482,7 @@ public class Sharing { } /// The UpdateFolderMemberError union - public enum UpdateFolderMemberError: CustomStringConvertible { + public enum UpdateFolderMemberError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// An unspecified error. @@ -9943,11 +10499,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try UpdateFolderMemberErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateFolderMemberErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateFolderMemberError: \(error)" } } } @@ -10013,7 +10573,7 @@ public class Sharing { } /// If any of the policies are unset, then they retain their current setting. - public class UpdateFolderPolicyArg: CustomStringConvertible { + public class UpdateFolderPolicyArg: CustomStringConvertible, JSONRepresentable { /// The ID for the shared folder. public let sharedFolderId: String /// Who can be a member of this shared folder. Only applicable if the current user is on a team. @@ -10050,11 +10610,15 @@ public class Sharing { self.actions = actions } + func json() throws -> JSON { + try UpdateFolderPolicyArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateFolderPolicyArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateFolderPolicyArg: \(error)" } } } @@ -10100,7 +10664,7 @@ public class Sharing { } /// The UpdateFolderPolicyError union - public enum UpdateFolderPolicyError: CustomStringConvertible { + public enum UpdateFolderPolicyError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Sharing.SharedFolderAccessError) /// memberPolicy in UpdateFolderPolicyArg was set even though user is not on a team. @@ -10116,11 +10680,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try UpdateFolderPolicyErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UpdateFolderPolicyErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UpdateFolderPolicyError: \(error)" } } } @@ -10208,7 +10776,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserMembershipInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserMembershipInfo: \(error)" } } } @@ -10266,7 +10834,7 @@ public class Sharing { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserFileMembershipInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserFileMembershipInfo: \(error)" } } } @@ -10312,7 +10880,7 @@ public class Sharing { } /// Basic information about a user. Use usersAccount and usersAccountBatch to obtain more detailed information. - public class UserInfo: CustomStringConvertible { + public class UserInfo: CustomStringConvertible, JSONRepresentable { /// The account ID of the user. public let accountId: String /// Email address of user. @@ -10335,11 +10903,15 @@ public class Sharing { self.teamMemberId = teamMemberId } + func json() throws -> JSON { + try UserInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserInfo: \(error)" } } } @@ -10373,7 +10945,7 @@ public class Sharing { } /// The ViewerInfoPolicy union - public enum ViewerInfoPolicy: CustomStringConvertible { + public enum ViewerInfoPolicy: CustomStringConvertible, JSONRepresentable { /// Viewer information is available on this file. case enabled /// Viewer information is disabled on this file. @@ -10381,11 +10953,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try ViewerInfoPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ViewerInfoPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ViewerInfoPolicy: \(error)" } } } @@ -10431,7 +11007,7 @@ public class Sharing { /// Who can access a shared link. The most open visibility is public_. The default depends on many aspects, such as /// team and user preferences and shared folder settings. - public enum Visibility: CustomStringConvertible { + public enum Visibility: CustomStringConvertible, JSONRepresentable { /// Anyone who has received the link can access it. No login required. case public_ /// Only members of the same team can access the link. Login is required. @@ -10445,11 +11021,15 @@ public class Sharing { /// An unspecified error. case other + func json() throws -> JSON { + try VisibilitySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try VisibilitySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Visibility: \(error)" } } } @@ -10512,7 +11092,7 @@ public class Sharing { } /// The VisibilityPolicy struct - public class VisibilityPolicy: CustomStringConvertible { + public class VisibilityPolicy: CustomStringConvertible, JSONRepresentable { /// This is the value to submit when saving the visibility setting. public let policy: Sharing.RequestedVisibility /// This is what the effective policy would be, if you selected this option. The resolved policy is obtained @@ -10536,11 +11116,15 @@ public class Sharing { self.disallowedReason = disallowedReason } + func json() throws -> JSON { + try VisibilityPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try VisibilityPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for VisibilityPolicy: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/SharingRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/SharingRoutes.swift index ea08c6ac..edf81ea3 100644 --- a/Source/SwiftyDropbox/Shared/Generated/SharingRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/SharingRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the sharing namespace /// For Objective-C compatible routes see DBSharingRoutes -public class SharingRoutes { +public class SharingRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/Team.swift b/Source/SwiftyDropbox/Shared/Generated/Team.swift index a7810846..2cf40989 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Team.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Team.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the team namespace public class Team { /// The DeviceSession struct - public class DeviceSession: CustomStringConvertible { + public class DeviceSession: CustomStringConvertible, JSONRepresentable { /// The session id. public let sessionId: String /// The IP address of the last activity from this session. @@ -31,11 +31,15 @@ public class Team { self.updated = updated } + func json() throws -> JSON { + try DeviceSessionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceSessionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceSession: \(error)" } } } @@ -103,7 +107,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try ActiveWebSessionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ActiveWebSession: \(error)" } } } @@ -157,7 +161,7 @@ public class Team { /// Result of trying to add a secondary email to a user. 'success' is the only value indicating that a secondary /// email was successfully added to a user. The other values explain the type of error that occurred, and /// include the email for which the error occurred. - public enum AddSecondaryEmailResult: CustomStringConvertible { + public enum AddSecondaryEmailResult: CustomStringConvertible, JSONRepresentable { /// Describes a secondary email that was successfully added to a user. case success(SecondaryEmails.SecondaryEmail) /// Secondary email is not available to be claimed by the user. @@ -179,11 +183,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try AddSecondaryEmailResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddSecondaryEmailResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddSecondaryEmailResult: \(error)" } } } @@ -279,18 +287,22 @@ public class Team { } /// The AddSecondaryEmailsArg struct - public class AddSecondaryEmailsArg: CustomStringConvertible { + public class AddSecondaryEmailsArg: CustomStringConvertible, JSONRepresentable { /// List of users and secondary emails to add. public let newSecondaryEmails: [Team.UserSecondaryEmailsArg] public init(newSecondaryEmails: [Team.UserSecondaryEmailsArg]) { self.newSecondaryEmails = newSecondaryEmails } + func json() throws -> JSON { + try AddSecondaryEmailsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddSecondaryEmailsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddSecondaryEmailsArg: \(error)" } } } @@ -316,7 +328,7 @@ public class Team { } /// Error returned when adding secondary emails fails. - public enum AddSecondaryEmailsError: CustomStringConvertible { + public enum AddSecondaryEmailsError: CustomStringConvertible, JSONRepresentable { /// Secondary emails are disabled for the team. case secondaryEmailsDisabled /// A maximum of 20 secondary emails can be added in a single call. @@ -324,11 +336,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try AddSecondaryEmailsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddSecondaryEmailsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddSecondaryEmailsError: \(error)" } } } @@ -373,18 +389,22 @@ public class Team { } /// The AddSecondaryEmailsResult struct - public class AddSecondaryEmailsResult: CustomStringConvertible { + public class AddSecondaryEmailsResult: CustomStringConvertible, JSONRepresentable { /// List of users and secondary email results. public let results: [Team.UserAddResult] public init(results: [Team.UserAddResult]) { self.results = results } + func json() throws -> JSON { + try AddSecondaryEmailsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AddSecondaryEmailsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AddSecondaryEmailsResult: \(error)" } } } @@ -410,7 +430,7 @@ public class Team { } /// Describes which team-related admin permissions a user has. - public enum AdminTier: CustomStringConvertible { + public enum AdminTier: CustomStringConvertible, JSONRepresentable { /// User is an administrator of the team - has all permissions. case teamAdmin /// User can do most user provisioning, de-provisioning and management. @@ -421,11 +441,15 @@ public class Team { /// User is not an admin of the team. case memberOnly + func json() throws -> JSON { + try AdminTierSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminTierSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminTier: \(error)" } } } @@ -476,7 +500,7 @@ public class Team { } /// Information on linked third party applications. - public class ApiApp: CustomStringConvertible { + public class ApiApp: CustomStringConvertible, JSONRepresentable { /// The application unique id. public let appId: String /// The application name. @@ -502,11 +526,15 @@ public class Team { self.isAppFolder = isAppFolder } + func json() throws -> JSON { + try ApiAppSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ApiAppSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ApiApp: \(error)" } } } @@ -542,7 +570,7 @@ public class Team { } /// Base report structure. - public class BaseDfbReport: CustomStringConvertible { + public class BaseDfbReport: CustomStringConvertible, JSONRepresentable { /// First date present in the results as 'YYYY-MM-DD' or None. public let startDate: String public init(startDate: String) { @@ -550,11 +578,15 @@ public class Team { self.startDate = startDate } + func json() throws -> JSON { + try BaseDfbReportSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BaseDfbReportSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BaseDfbReport: \(error)" } } } @@ -580,7 +612,7 @@ public class Team { } /// Base error that all errors for existing team folders should extend. - public enum BaseTeamFolderError: CustomStringConvertible { + public enum BaseTeamFolderError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Team.TeamFolderAccessError) /// An unspecified error. @@ -590,11 +622,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try BaseTeamFolderErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BaseTeamFolderErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BaseTeamFolderError: \(error)" } } } @@ -648,17 +684,21 @@ public class Team { } /// Error returned when getting member custom quota. - public enum CustomQuotaError: CustomStringConvertible { + public enum CustomQuotaError: CustomStringConvertible, JSONRepresentable { /// A maximum of 1000 users can be set for a single call. case tooManyUsers /// An unspecified error. case other + func json() throws -> JSON { + try CustomQuotaErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CustomQuotaErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CustomQuotaError: \(error)" } } } @@ -697,7 +737,7 @@ public class Team { } /// User custom quota. - public enum CustomQuotaResult: CustomStringConvertible { + public enum CustomQuotaResult: CustomStringConvertible, JSONRepresentable { /// User's custom quota. case success(Team.UserCustomQuotaResult) /// Invalid user (not in team). @@ -705,11 +745,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try CustomQuotaResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CustomQuotaResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CustomQuotaResult: \(error)" } } } @@ -756,18 +800,22 @@ public class Team { } /// The CustomQuotaUsersArg struct - public class CustomQuotaUsersArg: CustomStringConvertible { + public class CustomQuotaUsersArg: CustomStringConvertible, JSONRepresentable { /// List of users. public let users: [Team.UserSelectorArg] public init(users: [Team.UserSelectorArg]) { self.users = users } + func json() throws -> JSON { + try CustomQuotaUsersArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CustomQuotaUsersArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CustomQuotaUsersArg: \(error)" } } } @@ -793,7 +841,7 @@ public class Team { } /// Input arguments that can be provided for most reports. - public class DateRange: CustomStringConvertible { + public class DateRange: CustomStringConvertible, JSONRepresentable { /// Optional starting date (inclusive). If start_date is None or too long ago, this field will be set to 6 /// months ago. public let startDate: Date? @@ -804,11 +852,15 @@ public class Team { self.endDate = endDate } + func json() throws -> JSON { + try DateRangeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DateRangeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DateRange: \(error)" } } } @@ -836,15 +888,19 @@ public class Team { } /// Errors that can originate from problems in input arguments to reports. - public enum DateRangeError: CustomStringConvertible { + public enum DateRangeError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case other + func json() throws -> JSON { + try DateRangeErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DateRangeErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DateRangeError: \(error)" } } } @@ -879,7 +935,7 @@ public class Team { /// Result of trying to delete a secondary email address. 'success' is the only value indicating that a secondary /// email was successfully deleted. The other values explain the type of error that occurred, and include the /// email for which the error occurred. - public enum DeleteSecondaryEmailResult: CustomStringConvertible { + public enum DeleteSecondaryEmailResult: CustomStringConvertible, JSONRepresentable { /// The secondary email was successfully deleted. case success(String) /// The email address was not found for the user. @@ -889,11 +945,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try DeleteSecondaryEmailResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteSecondaryEmailResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteSecondaryEmailResult: \(error)" } } } @@ -947,18 +1007,22 @@ public class Team { } /// The DeleteSecondaryEmailsArg struct - public class DeleteSecondaryEmailsArg: CustomStringConvertible { + public class DeleteSecondaryEmailsArg: CustomStringConvertible, JSONRepresentable { /// List of users and their secondary emails to delete. public let emailsToDelete: [Team.UserSecondaryEmailsArg] public init(emailsToDelete: [Team.UserSecondaryEmailsArg]) { self.emailsToDelete = emailsToDelete } + func json() throws -> JSON { + try DeleteSecondaryEmailsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteSecondaryEmailsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteSecondaryEmailsArg: \(error)" } } } @@ -984,18 +1048,22 @@ public class Team { } /// The DeleteSecondaryEmailsResult struct - public class DeleteSecondaryEmailsResult: CustomStringConvertible { + public class DeleteSecondaryEmailsResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let results: [Team.UserDeleteResult] public init(results: [Team.UserDeleteResult]) { self.results = results } + func json() throws -> JSON { + try DeleteSecondaryEmailsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteSecondaryEmailsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteSecondaryEmailsResult: \(error)" } } } @@ -1059,7 +1127,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try DesktopClientSessionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DesktopClientSession: \(error)" } } } @@ -1114,7 +1182,7 @@ public class Team { } /// The DesktopPlatform union - public enum DesktopPlatform: CustomStringConvertible { + public enum DesktopPlatform: CustomStringConvertible, JSONRepresentable { /// Official Windows Dropbox desktop client. case windows /// Official Mac Dropbox desktop client. @@ -1124,11 +1192,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try DesktopPlatformSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DesktopPlatformSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DesktopPlatform: \(error)" } } } @@ -1179,7 +1251,7 @@ public class Team { } /// The DeviceSessionArg struct - public class DeviceSessionArg: CustomStringConvertible { + public class DeviceSessionArg: CustomStringConvertible, JSONRepresentable { /// The session id. public let sessionId: String /// The unique id of the member owning the device. @@ -1191,11 +1263,15 @@ public class Team { self.teamMemberId = teamMemberId } + func json() throws -> JSON { + try DeviceSessionArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceSessionArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceSessionArg: \(error)" } } } @@ -1224,7 +1300,7 @@ public class Team { /// Each of the items is an array of values, one value per day. The value is the number of devices active within a /// time window, ending with that day. If there is no data for a day, then the value will be None. - public class DevicesActive: CustomStringConvertible { + public class DevicesActive: CustomStringConvertible, JSONRepresentable { /// Array of number of linked windows (desktop) clients with activity. public let windows: [UInt64?] /// Array of number of linked mac (desktop) clients with activity. @@ -1256,11 +1332,15 @@ public class Team { self.total = total } + func json() throws -> JSON { + try DevicesActiveSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DevicesActiveSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DevicesActive: \(error)" } } } @@ -1298,7 +1378,7 @@ public class Team { } /// Excluded users list argument. - public class ExcludedUsersListArg: CustomStringConvertible { + public class ExcludedUsersListArg: CustomStringConvertible, JSONRepresentable { /// Number of results to return per call. public let limit: UInt32 public init(limit: UInt32 = 1_000) { @@ -1306,11 +1386,15 @@ public class Team { self.limit = limit } + func json() throws -> JSON { + try ExcludedUsersListArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersListArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersListArg: \(error)" } } } @@ -1336,7 +1420,7 @@ public class Team { } /// Excluded users list continue argument. - public class ExcludedUsersListContinueArg: CustomStringConvertible { + public class ExcludedUsersListContinueArg: CustomStringConvertible, JSONRepresentable { /// Indicates from what point to get the next set of users. public let cursor: String public init(cursor: String) { @@ -1344,11 +1428,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try ExcludedUsersListContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersListContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersListContinueArg: \(error)" } } } @@ -1374,17 +1462,21 @@ public class Team { } /// Excluded users list continue error. - public enum ExcludedUsersListContinueError: CustomStringConvertible { + public enum ExcludedUsersListContinueError: CustomStringConvertible, JSONRepresentable { /// The cursor is invalid. case invalidCursor /// An unspecified error. case other + func json() throws -> JSON { + try ExcludedUsersListContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersListContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersListContinueError: \(error)" } } } @@ -1423,17 +1515,21 @@ public class Team { } /// Excluded users list error. - public enum ExcludedUsersListError: CustomStringConvertible { + public enum ExcludedUsersListError: CustomStringConvertible, JSONRepresentable { /// An error occurred. case listError /// An unspecified error. case other + func json() throws -> JSON { + try ExcludedUsersListErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersListErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersListError: \(error)" } } } @@ -1472,7 +1568,7 @@ public class Team { } /// Excluded users list result. - public class ExcludedUsersListResult: CustomStringConvertible { + public class ExcludedUsersListResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let users: [Team.MemberProfile] /// Pass the cursor into memberSpaceLimitsExcludedUsersListContinue to obtain additional excluded users. @@ -1487,11 +1583,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try ExcludedUsersListResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersListResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersListResult: \(error)" } } } @@ -1522,18 +1622,22 @@ public class Team { /// Argument of excluded users update operation. Should include a list of users to add/remove (according to /// endpoint), Maximum size of the list is 1000 users. - public class ExcludedUsersUpdateArg: CustomStringConvertible { + public class ExcludedUsersUpdateArg: CustomStringConvertible, JSONRepresentable { /// List of users to be added/removed. public let users: [Team.UserSelectorArg]? public init(users: [Team.UserSelectorArg]? = nil) { self.users = users } + func json() throws -> JSON { + try ExcludedUsersUpdateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersUpdateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersUpdateArg: \(error)" } } } @@ -1559,7 +1663,7 @@ public class Team { } /// Excluded users update error. - public enum ExcludedUsersUpdateError: CustomStringConvertible { + public enum ExcludedUsersUpdateError: CustomStringConvertible, JSONRepresentable { /// At least one of the users is not part of your team. case usersNotInTeam /// A maximum of 1000 users for each of addition/removal can be supplied. @@ -1567,11 +1671,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try ExcludedUsersUpdateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersUpdateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersUpdateError: \(error)" } } } @@ -1616,18 +1724,22 @@ public class Team { } /// Excluded users update result. - public class ExcludedUsersUpdateResult: CustomStringConvertible { + public class ExcludedUsersUpdateResult: CustomStringConvertible, JSONRepresentable { /// Update status. public let status: Team.ExcludedUsersUpdateStatus public init(status: Team.ExcludedUsersUpdateStatus) { self.status = status } + func json() throws -> JSON { + try ExcludedUsersUpdateResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersUpdateResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersUpdateResult: \(error)" } } } @@ -1653,17 +1765,21 @@ public class Team { } /// Excluded users update operation status. - public enum ExcludedUsersUpdateStatus: CustomStringConvertible { + public enum ExcludedUsersUpdateStatus: CustomStringConvertible, JSONRepresentable { /// Update successful. case success /// An unspecified error. case other + func json() throws -> JSON { + try ExcludedUsersUpdateStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExcludedUsersUpdateStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExcludedUsersUpdateStatus: \(error)" } } } @@ -1702,7 +1818,7 @@ public class Team { } /// A set of features that a Dropbox Business account may support. - public enum Feature: CustomStringConvertible { + public enum Feature: CustomStringConvertible, JSONRepresentable { /// The number of upload API calls allowed per month. case uploadApiRateLimit /// Does this team have a shared team root. @@ -1714,11 +1830,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try FeatureSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FeatureSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Feature: \(error)" } } } @@ -1776,7 +1896,7 @@ public class Team { /// The values correspond to entries in Feature. You may get different value according to your Dropbox Business /// plan. - public enum FeatureValue: CustomStringConvertible { + public enum FeatureValue: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case uploadApiRateLimit(Team.UploadApiRateLimitValue) /// An unspecified error. @@ -1788,11 +1908,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try FeatureValueSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FeatureValueSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FeatureValue: \(error)" } } } @@ -1853,18 +1977,22 @@ public class Team { } /// The FeaturesGetValuesBatchArg struct - public class FeaturesGetValuesBatchArg: CustomStringConvertible { + public class FeaturesGetValuesBatchArg: CustomStringConvertible, JSONRepresentable { /// A list of features in Feature. If the list is empty, this route will return FeaturesGetValuesBatchError. public let features: [Team.Feature] public init(features: [Team.Feature]) { self.features = features } + func json() throws -> JSON { + try FeaturesGetValuesBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FeaturesGetValuesBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FeaturesGetValuesBatchArg: \(error)" } } } @@ -1890,17 +2018,21 @@ public class Team { } /// The FeaturesGetValuesBatchError union - public enum FeaturesGetValuesBatchError: CustomStringConvertible { + public enum FeaturesGetValuesBatchError: CustomStringConvertible, JSONRepresentable { /// At least one Feature must be included in the FeaturesGetValuesBatchArg.features list. case emptyFeaturesList /// An unspecified error. case other + func json() throws -> JSON { + try FeaturesGetValuesBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FeaturesGetValuesBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FeaturesGetValuesBatchError: \(error)" } } } @@ -1939,18 +2071,22 @@ public class Team { } /// The FeaturesGetValuesBatchResult struct - public class FeaturesGetValuesBatchResult: CustomStringConvertible { + public class FeaturesGetValuesBatchResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let values: [Team.FeatureValue] public init(values: [Team.FeatureValue]) { self.values = values } + func json() throws -> JSON { + try FeaturesGetValuesBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FeaturesGetValuesBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FeaturesGetValuesBatchResult: \(error)" } } } @@ -2059,7 +2195,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetActivityReportSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetActivityReport: \(error)" } } } @@ -2166,7 +2302,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetDevicesReportSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetDevicesReport: \(error)" } } } @@ -2235,7 +2371,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetMembershipReportSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetMembershipReport: \(error)" } } } @@ -2318,7 +2454,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetStorageReportSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetStorageReport: \(error)" } } } @@ -2361,17 +2497,21 @@ public class Team { } /// Role of a user in group. - public enum GroupAccessType: CustomStringConvertible { + public enum GroupAccessType: CustomStringConvertible, JSONRepresentable { /// User is a member of the group, but has no special permissions. case member /// User can rename the group, and add/remove members. case owner + func json() throws -> JSON { + try GroupAccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupAccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupAccessType: \(error)" } } } @@ -2410,7 +2550,7 @@ public class Team { } /// The GroupCreateArg struct - public class GroupCreateArg: CustomStringConvertible { + public class GroupCreateArg: CustomStringConvertible, JSONRepresentable { /// Group name. public let groupName: String /// Automatically add the creator of the group. @@ -2433,11 +2573,15 @@ public class Team { self.groupManagementType = groupManagementType } + func json() throws -> JSON { + try GroupCreateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupCreateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupCreateArg: \(error)" } } } @@ -2475,7 +2619,7 @@ public class Team { } /// The GroupCreateError union - public enum GroupCreateError: CustomStringConvertible { + public enum GroupCreateError: CustomStringConvertible, JSONRepresentable { /// The requested group name is already being used by another group. case groupNameAlreadyUsed /// Group name is empty or has invalid characters. @@ -2487,11 +2631,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try GroupCreateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupCreateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupCreateError: \(error)" } } } @@ -2548,17 +2696,21 @@ public class Team { } /// Error that can be raised when GroupSelector is used. - public enum GroupSelectorError: CustomStringConvertible { + public enum GroupSelectorError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. case other + func json() throws -> JSON { + try GroupSelectorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupSelectorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupSelectorError: \(error)" } } } @@ -2597,7 +2749,7 @@ public class Team { } /// Error that can be raised when GroupSelector is used and team groups are disallowed from being used. - public enum GroupSelectorWithTeamGroupError: CustomStringConvertible { + public enum GroupSelectorWithTeamGroupError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. @@ -2605,11 +2757,15 @@ public class Team { /// This operation is not supported on system-managed groups. case systemManagedGroupDisallowed + func json() throws -> JSON { + try GroupSelectorWithTeamGroupErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupSelectorWithTeamGroupErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupSelectorWithTeamGroupError: \(error)" } } } @@ -2654,7 +2810,7 @@ public class Team { } /// The GroupDeleteError union - public enum GroupDeleteError: CustomStringConvertible { + public enum GroupDeleteError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. @@ -2664,11 +2820,15 @@ public class Team { /// This group has already been deleted. case groupAlreadyDeleted + func json() throws -> JSON { + try GroupDeleteErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupDeleteErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupDeleteError: \(error)" } } } @@ -2749,7 +2909,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupFullInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupFullInfo: \(error)" } } } @@ -2795,7 +2955,7 @@ public class Team { } /// Profile of group member, and role in group. - public class GroupMemberInfo: CustomStringConvertible { + public class GroupMemberInfo: CustomStringConvertible, JSONRepresentable { /// Profile of group member. public let profile: Team.MemberProfile /// The role that the user has in the group. @@ -2805,11 +2965,15 @@ public class Team { self.accessType = accessType } + func json() throws -> JSON { + try GroupMemberInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMemberInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMemberInfo: \(error)" } } } @@ -2837,7 +3001,7 @@ public class Team { } /// Argument for selecting a group and a single user. - public class GroupMemberSelector: CustomStringConvertible { + public class GroupMemberSelector: CustomStringConvertible, JSONRepresentable { /// Specify a group. public let group: Team.GroupSelector /// Identity of a user that is a member of group. @@ -2847,11 +3011,15 @@ public class Team { self.user = user } + func json() throws -> JSON { + try GroupMemberSelectorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMemberSelectorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMemberSelector: \(error)" } } } @@ -2880,7 +3048,7 @@ public class Team { /// Error that can be raised when GroupMemberSelector is used, and the user is required to be a member of the /// specified group. - public enum GroupMemberSelectorError: CustomStringConvertible { + public enum GroupMemberSelectorError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. @@ -2890,11 +3058,15 @@ public class Team { /// The specified user is not a member of this group. case memberNotInGroup + func json() throws -> JSON { + try GroupMemberSelectorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMemberSelectorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMemberSelectorError: \(error)" } } } @@ -2945,7 +3117,7 @@ public class Team { } /// The GroupMemberSetAccessTypeError union - public enum GroupMemberSetAccessTypeError: CustomStringConvertible { + public enum GroupMemberSetAccessTypeError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. @@ -2957,11 +3129,15 @@ public class Team { /// A company managed group cannot be managed by a user. case userCannotBeManagerOfCompanyManagedGroup + func json() throws -> JSON { + try GroupMemberSetAccessTypeErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMemberSetAccessTypeErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMemberSetAccessTypeError: \(error)" } } } @@ -3018,7 +3194,7 @@ public class Team { } /// The IncludeMembersArg struct - public class IncludeMembersArg: CustomStringConvertible { + public class IncludeMembersArg: CustomStringConvertible, JSONRepresentable { /// Whether to return the list of members in the group. Note that the default value will cause all the group /// members to be returned in the response. This may take a long time for large groups. public let returnMembers: Bool @@ -3026,11 +3202,15 @@ public class Team { self.returnMembers = returnMembers } + func json() throws -> JSON { + try IncludeMembersArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IncludeMembersArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IncludeMembersArg: \(error)" } } } @@ -3071,7 +3251,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembersAddArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembersAddArg: \(error)" } } } @@ -3101,7 +3281,7 @@ public class Team { } /// The GroupMembersAddError union - public enum GroupMembersAddError: CustomStringConvertible { + public enum GroupMembersAddError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. @@ -3124,11 +3304,15 @@ public class Team { /// A company-managed group cannot be managed by a user. case userCannotBeManagerOfCompanyManagedGroup([String]) + func json() throws -> JSON { + try GroupMembersAddErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembersAddErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembersAddError: \(error)" } } } @@ -3213,7 +3397,7 @@ public class Team { } /// Result returned by groupsMembersAdd and groupsMembersRemove. - public class GroupMembersChangeResult: CustomStringConvertible { + public class GroupMembersChangeResult: CustomStringConvertible, JSONRepresentable { /// The group info after member change operation has been performed. public let groupInfo: Team.GroupFullInfo /// For legacy purposes async_job_id will always return one space ' '. Formerly, it was an ID that was used to @@ -3226,11 +3410,15 @@ public class Team { self.asyncJobId = asyncJobId } + func json() throws -> JSON { + try GroupMembersChangeResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembersChangeResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembersChangeResult: \(error)" } } } @@ -3273,7 +3461,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembersRemoveArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembersRemoveArg: \(error)" } } } @@ -3304,7 +3492,7 @@ public class Team { /// Error that can be raised when GroupMembersSelector is used, and the users are required to be members of the /// specified group. - public enum GroupMembersSelectorError: CustomStringConvertible { + public enum GroupMembersSelectorError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. @@ -3314,11 +3502,15 @@ public class Team { /// At least one of the specified users is not a member of the group. case memberNotInGroup + func json() throws -> JSON { + try GroupMembersSelectorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembersSelectorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembersSelectorError: \(error)" } } } @@ -3369,7 +3561,7 @@ public class Team { } /// The GroupMembersRemoveError union - public enum GroupMembersRemoveError: CustomStringConvertible { + public enum GroupMembersRemoveError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. @@ -3385,11 +3577,15 @@ public class Team { /// These users were not found in Dropbox. case usersNotFound([String]) + func json() throws -> JSON { + try GroupMembersRemoveErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembersRemoveErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembersRemoveError: \(error)" } } } @@ -3460,7 +3656,7 @@ public class Team { } /// Argument for selecting a group and a list of users. - public class GroupMembersSelector: CustomStringConvertible { + public class GroupMembersSelector: CustomStringConvertible, JSONRepresentable { /// Specify a group. public let group: Team.GroupSelector /// A list of users that are members of group. @@ -3470,11 +3666,15 @@ public class Team { self.users = users } + func json() throws -> JSON { + try GroupMembersSelectorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembersSelectorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembersSelector: \(error)" } } } @@ -3518,7 +3718,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMembersSetAccessTypeArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMembersSetAccessTypeArg: \(error)" } } } @@ -3550,17 +3750,21 @@ public class Team { } /// Argument for selecting a single group, either by group_id or by external group ID. - public enum GroupSelector: CustomStringConvertible { + public enum GroupSelector: CustomStringConvertible, JSONRepresentable { /// Group ID. case groupId(String) /// External ID of the group. case groupExternalId(String) + func json() throws -> JSON { + try GroupSelectorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupSelectorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupSelector: \(error)" } } } @@ -3631,7 +3835,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupUpdateArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupUpdateArgs: \(error)" } } } @@ -3672,7 +3876,7 @@ public class Team { } /// The GroupUpdateError union - public enum GroupUpdateError: CustomStringConvertible { + public enum GroupUpdateError: CustomStringConvertible, JSONRepresentable { /// No matching group found. No groups match the specified group ID. case groupNotFound /// An unspecified error. @@ -3686,11 +3890,15 @@ public class Team { /// The requested external ID is already being used by another group. case externalIdAlreadyInUse + func json() throws -> JSON { + try GroupUpdateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupUpdateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupUpdateError: \(error)" } } } @@ -3753,17 +3961,21 @@ public class Team { } /// The GroupsGetInfoError union - public enum GroupsGetInfoError: CustomStringConvertible { + public enum GroupsGetInfoError: CustomStringConvertible, JSONRepresentable { /// The group is not on your team. case groupNotOnTeam /// An unspecified error. case other + func json() throws -> JSON { + try GroupsGetInfoErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsGetInfoErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsGetInfoError: \(error)" } } } @@ -3802,18 +4014,22 @@ public class Team { } /// The GroupsGetInfoItem union - public enum GroupsGetInfoItem: CustomStringConvertible { + public enum GroupsGetInfoItem: CustomStringConvertible, JSONRepresentable { /// An ID that was provided as a parameter to groupsGetInfo, and did not match a corresponding group. The ID can /// be a group ID, or an external ID, depending on how the method was called. case idNotFound(String) /// Info about a group. case groupInfo(Team.GroupFullInfo) + func json() throws -> JSON { + try GroupsGetInfoItemSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsGetInfoItemSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsGetInfoItem: \(error)" } } } @@ -3854,7 +4070,7 @@ public class Team { } /// The GroupsListArg struct - public class GroupsListArg: CustomStringConvertible { + public class GroupsListArg: CustomStringConvertible, JSONRepresentable { /// Number of results to return per call. public let limit: UInt32 public init(limit: UInt32 = 1_000) { @@ -3862,11 +4078,15 @@ public class Team { self.limit = limit } + func json() throws -> JSON { + try GroupsListArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsListArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsListArg: \(error)" } } } @@ -3892,7 +4112,7 @@ public class Team { } /// The GroupsListContinueArg struct - public class GroupsListContinueArg: CustomStringConvertible { + public class GroupsListContinueArg: CustomStringConvertible, JSONRepresentable { /// Indicates from what point to get the next set of groups. public let cursor: String public init(cursor: String) { @@ -3900,11 +4120,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try GroupsListContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsListContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsListContinueArg: \(error)" } } } @@ -3930,17 +4154,21 @@ public class Team { } /// The GroupsListContinueError union - public enum GroupsListContinueError: CustomStringConvertible { + public enum GroupsListContinueError: CustomStringConvertible, JSONRepresentable { /// The cursor is invalid. case invalidCursor /// An unspecified error. case other + func json() throws -> JSON { + try GroupsListContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsListContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsListContinueError: \(error)" } } } @@ -3979,7 +4207,7 @@ public class Team { } /// The GroupsListResult struct - public class GroupsListResult: CustomStringConvertible { + public class GroupsListResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let groups: [TeamCommon.GroupSummary] /// Pass the cursor into groupsListContinue to obtain the additional groups. @@ -3994,11 +4222,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try GroupsListResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsListResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsListResult: \(error)" } } } @@ -4028,7 +4260,7 @@ public class Team { } /// The GroupsMembersListArg struct - public class GroupsMembersListArg: CustomStringConvertible { + public class GroupsMembersListArg: CustomStringConvertible, JSONRepresentable { /// The group whose members are to be listed. public let group: Team.GroupSelector /// Number of results to return per call. @@ -4039,11 +4271,15 @@ public class Team { self.limit = limit } + func json() throws -> JSON { + try GroupsMembersListArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsMembersListArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsMembersListArg: \(error)" } } } @@ -4071,7 +4307,7 @@ public class Team { } /// The GroupsMembersListContinueArg struct - public class GroupsMembersListContinueArg: CustomStringConvertible { + public class GroupsMembersListContinueArg: CustomStringConvertible, JSONRepresentable { /// Indicates from what point to get the next set of groups. public let cursor: String public init(cursor: String) { @@ -4079,11 +4315,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try GroupsMembersListContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsMembersListContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsMembersListContinueArg: \(error)" } } } @@ -4109,17 +4349,21 @@ public class Team { } /// The GroupsMembersListContinueError union - public enum GroupsMembersListContinueError: CustomStringConvertible { + public enum GroupsMembersListContinueError: CustomStringConvertible, JSONRepresentable { /// The cursor is invalid. case invalidCursor /// An unspecified error. case other + func json() throws -> JSON { + try GroupsMembersListContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsMembersListContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsMembersListContinueError: \(error)" } } } @@ -4158,7 +4402,7 @@ public class Team { } /// The GroupsMembersListResult struct - public class GroupsMembersListResult: CustomStringConvertible { + public class GroupsMembersListResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let members: [Team.GroupMemberInfo] /// Pass the cursor into groupsMembersListContinue to obtain additional group members. @@ -4173,11 +4417,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try GroupsMembersListResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsMembersListResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsMembersListResult: \(error)" } } } @@ -4207,7 +4455,7 @@ public class Team { } /// The GroupsPollError union - public enum GroupsPollError: CustomStringConvertible { + public enum GroupsPollError: CustomStringConvertible, JSONRepresentable { /// The job ID is invalid. case invalidAsyncJobId /// Something went wrong with the job on Dropbox's end. You'll need to verify that the action you were taking @@ -4218,11 +4466,15 @@ public class Team { /// You are not allowed to poll this job. case accessDenied + func json() throws -> JSON { + try GroupsPollErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsPollErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsPollError: \(error)" } } } @@ -4273,17 +4525,21 @@ public class Team { } /// Argument for selecting a list of groups, either by group_ids, or external group IDs. - public enum GroupsSelector: CustomStringConvertible { + public enum GroupsSelector: CustomStringConvertible, JSONRepresentable { /// List of group IDs. case groupIds([String]) /// List of external IDs of groups. case groupExternalIds([String]) + func json() throws -> JSON { + try GroupsSelectorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupsSelectorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupsSelector: \(error)" } } } @@ -4324,17 +4580,21 @@ public class Team { } /// The value for hasTeamFileEvents in Feature. - public enum HasTeamFileEventsValue: CustomStringConvertible { + public enum HasTeamFileEventsValue: CustomStringConvertible, JSONRepresentable { /// Does this team have file events. case enabled(Bool) /// An unspecified error. case other + func json() throws -> JSON { + try HasTeamFileEventsValueSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try HasTeamFileEventsValueSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for HasTeamFileEventsValue: \(error)" } } } @@ -4374,17 +4634,21 @@ public class Team { } /// The value for hasTeamSelectiveSync in Feature. - public enum HasTeamSelectiveSyncValue: CustomStringConvertible { + public enum HasTeamSelectiveSyncValue: CustomStringConvertible, JSONRepresentable { /// Does this team have team selective sync enabled. case hasTeamSelectiveSync(Bool) /// An unspecified error. case other + func json() throws -> JSON { + try HasTeamSelectiveSyncValueSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try HasTeamSelectiveSyncValueSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for HasTeamSelectiveSyncValue: \(error)" } } } @@ -4424,17 +4688,21 @@ public class Team { } /// The value for hasTeamSharedDropbox in Feature. - public enum HasTeamSharedDropboxValue: CustomStringConvertible { + public enum HasTeamSharedDropboxValue: CustomStringConvertible, JSONRepresentable { /// Does this team have a shared team root. case hasTeamSharedDropbox(Bool) /// An unspecified error. case other + func json() throws -> JSON { + try HasTeamSharedDropboxValueSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try HasTeamSharedDropboxValueSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for HasTeamSharedDropboxValue: \(error)" } } } @@ -4474,7 +4742,7 @@ public class Team { } /// The LegalHoldHeldRevisionMetadata struct - public class LegalHoldHeldRevisionMetadata: CustomStringConvertible { + public class LegalHoldHeldRevisionMetadata: CustomStringConvertible, JSONRepresentable { /// The held revision filename. public let newFilename: String /// The id of the held revision. @@ -4528,11 +4796,15 @@ public class Team { self.contentHash = contentHash } + func json() throws -> JSON { + try LegalHoldHeldRevisionMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldHeldRevisionMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldHeldRevisionMetadata: \(error)" } } } @@ -4587,7 +4859,7 @@ public class Team { } /// The LegalHoldPolicy struct - public class LegalHoldPolicy: CustomStringConvertible { + public class LegalHoldPolicy: CustomStringConvertible, JSONRepresentable { /// The legal hold id. public let id: String /// Policy name. @@ -4627,11 +4899,15 @@ public class Team { self.endDate = endDate } + func json() throws -> JSON { + try LegalHoldPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldPolicy: \(error)" } } } @@ -4680,7 +4956,7 @@ public class Team { } /// The LegalHoldStatus union - public enum LegalHoldStatus: CustomStringConvertible { + public enum LegalHoldStatus: CustomStringConvertible, JSONRepresentable { /// The legal hold policy is active. case active /// The legal hold policy was released. @@ -4696,11 +4972,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try LegalHoldStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldStatus: \(error)" } } } @@ -4769,7 +5049,7 @@ public class Team { } /// The LegalHoldsError union - public enum LegalHoldsError: CustomStringConvertible { + public enum LegalHoldsError: CustomStringConvertible, JSONRepresentable { /// There has been an unknown legal hold error. case unknownLegalHoldError /// You don't have permissions to perform this action. @@ -4777,11 +5057,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try LegalHoldsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsError: \(error)" } } } @@ -4826,7 +5110,7 @@ public class Team { } /// The LegalHoldsGetPolicyArg struct - public class LegalHoldsGetPolicyArg: CustomStringConvertible { + public class LegalHoldsGetPolicyArg: CustomStringConvertible, JSONRepresentable { /// The legal hold Id. public let id: String public init(id: String) { @@ -4834,11 +5118,15 @@ public class Team { self.id = id } + func json() throws -> JSON { + try LegalHoldsGetPolicyArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsGetPolicyArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsGetPolicyArg: \(error)" } } } @@ -4864,7 +5152,7 @@ public class Team { } /// The LegalHoldsGetPolicyError union - public enum LegalHoldsGetPolicyError: CustomStringConvertible { + public enum LegalHoldsGetPolicyError: CustomStringConvertible, JSONRepresentable { /// There has been an unknown legal hold error. case unknownLegalHoldError /// You don't have permissions to perform this action. @@ -4874,11 +5162,15 @@ public class Team { /// Legal hold policy does not exist for id in LegalHoldsGetPolicyArg. case legalHoldPolicyNotFound + func json() throws -> JSON { + try LegalHoldsGetPolicyErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsGetPolicyErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsGetPolicyError: \(error)" } } } @@ -4929,7 +5221,7 @@ public class Team { } /// The LegalHoldsListHeldRevisionResult struct - public class LegalHoldsListHeldRevisionResult: CustomStringConvertible { + public class LegalHoldsListHeldRevisionResult: CustomStringConvertible, JSONRepresentable { /// List of file entries that under the hold. public let entries: [Team.LegalHoldHeldRevisionMetadata] /// The cursor idicates where to continue reading file metadata entries for the next API call. When there are no @@ -4946,11 +5238,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try LegalHoldsListHeldRevisionResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsListHeldRevisionResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsListHeldRevisionResult: \(error)" } } } @@ -4980,7 +5276,7 @@ public class Team { } /// The LegalHoldsListHeldRevisionsArg struct - public class LegalHoldsListHeldRevisionsArg: CustomStringConvertible { + public class LegalHoldsListHeldRevisionsArg: CustomStringConvertible, JSONRepresentable { /// The legal hold Id. public let id: String public init(id: String) { @@ -4988,11 +5284,15 @@ public class Team { self.id = id } + func json() throws -> JSON { + try LegalHoldsListHeldRevisionsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsListHeldRevisionsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsListHeldRevisionsArg: \(error)" } } } @@ -5018,7 +5318,7 @@ public class Team { } /// The LegalHoldsListHeldRevisionsContinueArg struct - public class LegalHoldsListHeldRevisionsContinueArg: CustomStringConvertible { + public class LegalHoldsListHeldRevisionsContinueArg: CustomStringConvertible, JSONRepresentable { /// The legal hold Id. public let id: String /// The cursor idicates where to continue reading file metadata entries for the next API call. When there are no @@ -5031,11 +5331,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try LegalHoldsListHeldRevisionsContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsListHeldRevisionsContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsListHeldRevisionsContinueArg: \(error)" } } } @@ -5063,7 +5367,7 @@ public class Team { } /// The LegalHoldsListHeldRevisionsContinueError union - public enum LegalHoldsListHeldRevisionsContinueError: CustomStringConvertible { + public enum LegalHoldsListHeldRevisionsContinueError: CustomStringConvertible, JSONRepresentable { /// There has been an unknown legal hold error. case unknownLegalHoldError /// Temporary infrastructure failure, please retry. @@ -5074,11 +5378,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try LegalHoldsListHeldRevisionsContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsListHeldRevisionsContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsListHeldRevisionsContinueError: \(error)" } } } @@ -5129,7 +5437,7 @@ public class Team { } /// The LegalHoldsListHeldRevisionsError union - public enum LegalHoldsListHeldRevisionsError: CustomStringConvertible { + public enum LegalHoldsListHeldRevisionsError: CustomStringConvertible, JSONRepresentable { /// There has been an unknown legal hold error. case unknownLegalHoldError /// You don't have permissions to perform this action. @@ -5143,11 +5451,15 @@ public class Team { /// Trying to list revisions for an inactive legal hold. case inactiveLegalHold + func json() throws -> JSON { + try LegalHoldsListHeldRevisionsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsListHeldRevisionsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsListHeldRevisionsError: \(error)" } } } @@ -5210,18 +5522,22 @@ public class Team { } /// The LegalHoldsListPoliciesArg struct - public class LegalHoldsListPoliciesArg: CustomStringConvertible { + public class LegalHoldsListPoliciesArg: CustomStringConvertible, JSONRepresentable { /// Whether to return holds that were released. public let includeReleased: Bool public init(includeReleased: Bool = false) { self.includeReleased = includeReleased } + func json() throws -> JSON { + try LegalHoldsListPoliciesArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsListPoliciesArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsListPoliciesArg: \(error)" } } } @@ -5247,7 +5563,7 @@ public class Team { } /// The LegalHoldsListPoliciesError union - public enum LegalHoldsListPoliciesError: CustomStringConvertible { + public enum LegalHoldsListPoliciesError: CustomStringConvertible, JSONRepresentable { /// There has been an unknown legal hold error. case unknownLegalHoldError /// You don't have permissions to perform this action. @@ -5257,11 +5573,15 @@ public class Team { /// Temporary infrastructure failure, please retry. case transientError + func json() throws -> JSON { + try LegalHoldsListPoliciesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsListPoliciesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsListPoliciesError: \(error)" } } } @@ -5312,18 +5632,22 @@ public class Team { } /// The LegalHoldsListPoliciesResult struct - public class LegalHoldsListPoliciesResult: CustomStringConvertible { + public class LegalHoldsListPoliciesResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let policies: [Team.LegalHoldPolicy] public init(policies: [Team.LegalHoldPolicy]) { self.policies = policies } + func json() throws -> JSON { + try LegalHoldsListPoliciesResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsListPoliciesResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsListPoliciesResult: \(error)" } } } @@ -5349,7 +5673,7 @@ public class Team { } /// The LegalHoldsPolicyCreateArg struct - public class LegalHoldsPolicyCreateArg: CustomStringConvertible { + public class LegalHoldsPolicyCreateArg: CustomStringConvertible, JSONRepresentable { /// Policy name. public let name: String /// A description of the legal hold policy. @@ -5371,11 +5695,15 @@ public class Team { self.endDate = endDate } + func json() throws -> JSON { + try LegalHoldsPolicyCreateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsPolicyCreateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsPolicyCreateArg: \(error)" } } } @@ -5409,7 +5737,7 @@ public class Team { } /// The LegalHoldsPolicyCreateError union - public enum LegalHoldsPolicyCreateError: CustomStringConvertible { + public enum LegalHoldsPolicyCreateError: CustomStringConvertible, JSONRepresentable { /// There has been an unknown legal hold error. case unknownLegalHoldError /// You don't have permissions to perform this action. @@ -5433,11 +5761,15 @@ public class Team { /// The provided date is invalid. case invalidDate + func json() throws -> JSON { + try LegalHoldsPolicyCreateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsPolicyCreateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsPolicyCreateError: \(error)" } } } @@ -5530,7 +5862,7 @@ public class Team { } /// The LegalHoldsPolicyReleaseArg struct - public class LegalHoldsPolicyReleaseArg: CustomStringConvertible { + public class LegalHoldsPolicyReleaseArg: CustomStringConvertible, JSONRepresentable { /// The legal hold Id. public let id: String public init(id: String) { @@ -5538,11 +5870,15 @@ public class Team { self.id = id } + func json() throws -> JSON { + try LegalHoldsPolicyReleaseArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsPolicyReleaseArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsPolicyReleaseArg: \(error)" } } } @@ -5568,7 +5904,7 @@ public class Team { } /// The LegalHoldsPolicyReleaseError union - public enum LegalHoldsPolicyReleaseError: CustomStringConvertible { + public enum LegalHoldsPolicyReleaseError: CustomStringConvertible, JSONRepresentable { /// There has been an unknown legal hold error. case unknownLegalHoldError /// You don't have permissions to perform this action. @@ -5582,11 +5918,15 @@ public class Team { /// Legal hold policy does not exist for id in LegalHoldsPolicyReleaseArg. case legalHoldPolicyNotFound + func json() throws -> JSON { + try LegalHoldsPolicyReleaseErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsPolicyReleaseErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsPolicyReleaseError: \(error)" } } } @@ -5649,7 +5989,7 @@ public class Team { } /// The LegalHoldsPolicyUpdateArg struct - public class LegalHoldsPolicyUpdateArg: CustomStringConvertible { + public class LegalHoldsPolicyUpdateArg: CustomStringConvertible, JSONRepresentable { /// The legal hold Id. public let id: String /// Policy new name. @@ -5669,11 +6009,15 @@ public class Team { self.members = members } + func json() throws -> JSON { + try LegalHoldsPolicyUpdateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsPolicyUpdateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsPolicyUpdateArg: \(error)" } } } @@ -5705,7 +6049,7 @@ public class Team { } /// The LegalHoldsPolicyUpdateError union - public enum LegalHoldsPolicyUpdateError: CustomStringConvertible { + public enum LegalHoldsPolicyUpdateError: CustomStringConvertible, JSONRepresentable { /// There has been an unknown legal hold error. case unknownLegalHoldError /// You don't have permissions to perform this action. @@ -5729,11 +6073,15 @@ public class Team { /// Legal hold policy does not exist for id in LegalHoldsPolicyUpdateArg. case legalHoldPolicyNotFound + func json() throws -> JSON { + try LegalHoldsPolicyUpdateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsPolicyUpdateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsPolicyUpdateError: \(error)" } } } @@ -5826,7 +6174,7 @@ public class Team { } /// The ListMemberAppsArg struct - public class ListMemberAppsArg: CustomStringConvertible { + public class ListMemberAppsArg: CustomStringConvertible, JSONRepresentable { /// The team member id. public let teamMemberId: String public init(teamMemberId: String) { @@ -5834,11 +6182,15 @@ public class Team { self.teamMemberId = teamMemberId } + func json() throws -> JSON { + try ListMemberAppsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMemberAppsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMemberAppsArg: \(error)" } } } @@ -5864,17 +6216,21 @@ public class Team { } /// Error returned by linkedAppsListMemberLinkedApps. - public enum ListMemberAppsError: CustomStringConvertible { + public enum ListMemberAppsError: CustomStringConvertible, JSONRepresentable { /// Member not found. case memberNotFound /// An unspecified error. case other + func json() throws -> JSON { + try ListMemberAppsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMemberAppsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMemberAppsError: \(error)" } } } @@ -5913,18 +6269,22 @@ public class Team { } /// The ListMemberAppsResult struct - public class ListMemberAppsResult: CustomStringConvertible { + public class ListMemberAppsResult: CustomStringConvertible, JSONRepresentable { /// List of third party applications linked by this team member. public let linkedApiApps: [Team.ApiApp] public init(linkedApiApps: [Team.ApiApp]) { self.linkedApiApps = linkedApiApps } + func json() throws -> JSON { + try ListMemberAppsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMemberAppsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMemberAppsResult: \(error)" } } } @@ -5950,7 +6310,7 @@ public class Team { } /// The ListMemberDevicesArg struct - public class ListMemberDevicesArg: CustomStringConvertible { + public class ListMemberDevicesArg: CustomStringConvertible, JSONRepresentable { /// The team's member id. public let teamMemberId: String /// Whether to list web sessions of the team's member. @@ -5967,11 +6327,15 @@ public class Team { self.includeMobileClients = includeMobileClients } + func json() throws -> JSON { + try ListMemberDevicesArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMemberDevicesArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMemberDevicesArg: \(error)" } } } @@ -6008,17 +6372,21 @@ public class Team { } /// The ListMemberDevicesError union - public enum ListMemberDevicesError: CustomStringConvertible { + public enum ListMemberDevicesError: CustomStringConvertible, JSONRepresentable { /// Member not found. case memberNotFound /// An unspecified error. case other + func json() throws -> JSON { + try ListMemberDevicesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMemberDevicesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMemberDevicesError: \(error)" } } } @@ -6057,7 +6425,7 @@ public class Team { } /// The ListMemberDevicesResult struct - public class ListMemberDevicesResult: CustomStringConvertible { + public class ListMemberDevicesResult: CustomStringConvertible, JSONRepresentable { /// List of web sessions made by this team member. public let activeWebSessions: [Team.ActiveWebSession]? /// List of desktop clients used by this team member. @@ -6074,11 +6442,15 @@ public class Team { self.mobileClientSessions = mobileClientSessions } + func json() throws -> JSON { + try ListMemberDevicesResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMemberDevicesResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMemberDevicesResult: \(error)" } } } @@ -6116,7 +6488,7 @@ public class Team { } /// Arguments for linkedAppsListMembersLinkedApps. - public class ListMembersAppsArg: CustomStringConvertible { + public class ListMembersAppsArg: CustomStringConvertible, JSONRepresentable { /// At the first call to the linkedAppsListMembersLinkedApps the cursor shouldn't be passed. Then, if the result /// of the call includes a cursor, the following requests should include the received cursors in order /// to receive the next sub list of the team applications. @@ -6126,11 +6498,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try ListMembersAppsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMembersAppsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMembersAppsArg: \(error)" } } } @@ -6156,18 +6532,22 @@ public class Team { } /// Error returned by linkedAppsListMembersLinkedApps. - public enum ListMembersAppsError: CustomStringConvertible { + public enum ListMembersAppsError: CustomStringConvertible, JSONRepresentable { /// Indicates that the cursor has been invalidated. Call linkedAppsListMembersLinkedApps again with an empty /// cursor to obtain a new cursor. case reset /// An unspecified error. case other + func json() throws -> JSON { + try ListMembersAppsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMembersAppsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMembersAppsError: \(error)" } } } @@ -6206,7 +6586,7 @@ public class Team { } /// Information returned by linkedAppsListMembersLinkedApps. - public class ListMembersAppsResult: CustomStringConvertible { + public class ListMembersAppsResult: CustomStringConvertible, JSONRepresentable { /// The linked applications of each member of the team. public let apps: [Team.MemberLinkedApps] /// If true, then there are more apps available. Pass the cursor to linkedAppsListMembersLinkedApps to retrieve @@ -6221,11 +6601,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try ListMembersAppsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMembersAppsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMembersAppsResult: \(error)" } } } @@ -6255,7 +6639,7 @@ public class Team { } /// The ListMembersDevicesArg struct - public class ListMembersDevicesArg: CustomStringConvertible { + public class ListMembersDevicesArg: CustomStringConvertible, JSONRepresentable { /// At the first call to the devicesListMembersDevices the cursor shouldn't be passed. Then, if the result of /// the call includes a cursor, the following requests should include the received cursors in order to /// receive the next sub list of team devices. @@ -6274,11 +6658,15 @@ public class Team { self.includeMobileClients = includeMobileClients } + func json() throws -> JSON { + try ListMembersDevicesArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMembersDevicesArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMembersDevicesArg: \(error)" } } } @@ -6315,18 +6703,22 @@ public class Team { } /// The ListMembersDevicesError union - public enum ListMembersDevicesError: CustomStringConvertible { + public enum ListMembersDevicesError: CustomStringConvertible, JSONRepresentable { /// Indicates that the cursor has been invalidated. Call devicesListMembersDevices again with an empty cursor to /// obtain a new cursor. case reset /// An unspecified error. case other + func json() throws -> JSON { + try ListMembersDevicesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMembersDevicesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMembersDevicesError: \(error)" } } } @@ -6365,7 +6757,7 @@ public class Team { } /// The ListMembersDevicesResult struct - public class ListMembersDevicesResult: CustomStringConvertible { + public class ListMembersDevicesResult: CustomStringConvertible, JSONRepresentable { /// The devices of each member of the team. public let devices: [Team.MemberDevices] /// If true, then there are more devices available. Pass the cursor to devicesListMembersDevices to retrieve the @@ -6380,11 +6772,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try ListMembersDevicesResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListMembersDevicesResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListMembersDevicesResult: \(error)" } } } @@ -6414,7 +6810,7 @@ public class Team { } /// Arguments for linkedAppsListTeamLinkedApps. - public class ListTeamAppsArg: CustomStringConvertible { + public class ListTeamAppsArg: CustomStringConvertible, JSONRepresentable { /// At the first call to the linkedAppsListTeamLinkedApps the cursor shouldn't be passed. Then, if the result of /// the call includes a cursor, the following requests should include the received cursors in order to /// receive the next sub list of the team applications. @@ -6424,11 +6820,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try ListTeamAppsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListTeamAppsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListTeamAppsArg: \(error)" } } } @@ -6454,18 +6854,22 @@ public class Team { } /// Error returned by linkedAppsListTeamLinkedApps. - public enum ListTeamAppsError: CustomStringConvertible { + public enum ListTeamAppsError: CustomStringConvertible, JSONRepresentable { /// Indicates that the cursor has been invalidated. Call linkedAppsListTeamLinkedApps again with an empty cursor /// to obtain a new cursor. case reset /// An unspecified error. case other + func json() throws -> JSON { + try ListTeamAppsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListTeamAppsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListTeamAppsError: \(error)" } } } @@ -6504,7 +6908,7 @@ public class Team { } /// Information returned by linkedAppsListTeamLinkedApps. - public class ListTeamAppsResult: CustomStringConvertible { + public class ListTeamAppsResult: CustomStringConvertible, JSONRepresentable { /// The linked applications of each member of the team. public let apps: [Team.MemberLinkedApps] /// If true, then there are more apps available. Pass the cursor to linkedAppsListTeamLinkedApps to retrieve the @@ -6519,11 +6923,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try ListTeamAppsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListTeamAppsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListTeamAppsResult: \(error)" } } } @@ -6553,7 +6961,7 @@ public class Team { } /// The ListTeamDevicesArg struct - public class ListTeamDevicesArg: CustomStringConvertible { + public class ListTeamDevicesArg: CustomStringConvertible, JSONRepresentable { /// At the first call to the devicesListTeamDevices the cursor shouldn't be passed. Then, if the result of the /// call includes a cursor, the following requests should include the received cursors in order to /// receive the next sub list of team devices. @@ -6572,11 +6980,15 @@ public class Team { self.includeMobileClients = includeMobileClients } + func json() throws -> JSON { + try ListTeamDevicesArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListTeamDevicesArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListTeamDevicesArg: \(error)" } } } @@ -6613,18 +7025,22 @@ public class Team { } /// The ListTeamDevicesError union - public enum ListTeamDevicesError: CustomStringConvertible { + public enum ListTeamDevicesError: CustomStringConvertible, JSONRepresentable { /// Indicates that the cursor has been invalidated. Call devicesListTeamDevices again with an empty cursor to /// obtain a new cursor. case reset /// An unspecified error. case other + func json() throws -> JSON { + try ListTeamDevicesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListTeamDevicesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListTeamDevicesError: \(error)" } } } @@ -6663,7 +7079,7 @@ public class Team { } /// The ListTeamDevicesResult struct - public class ListTeamDevicesResult: CustomStringConvertible { + public class ListTeamDevicesResult: CustomStringConvertible, JSONRepresentable { /// The devices of each member of the team. public let devices: [Team.MemberDevices] /// If true, then there are more devices available. Pass the cursor to devicesListTeamDevices to retrieve the @@ -6678,11 +7094,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try ListTeamDevicesResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ListTeamDevicesResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ListTeamDevicesResult: \(error)" } } } @@ -6712,7 +7132,7 @@ public class Team { } /// Specify access type a member should have when joined to a group. - public class MemberAccess: CustomStringConvertible { + public class MemberAccess: CustomStringConvertible, JSONRepresentable { /// Identity of a user. public let user: Team.UserSelectorArg /// Access type. @@ -6722,11 +7142,15 @@ public class Team { self.accessType = accessType } + func json() throws -> JSON { + try MemberAccessSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAccessSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAccess: \(error)" } } } @@ -6754,7 +7178,7 @@ public class Team { } /// The MemberAddArgBase struct - public class MemberAddArgBase: CustomStringConvertible { + public class MemberAddArgBase: CustomStringConvertible, JSONRepresentable { /// (no description) public let memberEmail: String /// Member's first name. @@ -6794,11 +7218,15 @@ public class Team { self.isDirectoryRestricted = isDirectoryRestricted } + func json() throws -> JSON { + try MemberAddArgBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddArgBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddArgBase: \(error)" } } } @@ -6873,7 +7301,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddArg: \(error)" } } } @@ -6922,7 +7350,7 @@ public class Team { } /// The MemberAddResultBase union - public enum MemberAddResultBase: CustomStringConvertible { + public enum MemberAddResultBase: CustomStringConvertible, JSONRepresentable { /// Team is already full. The organization has no available licenses. case teamLicenseLimit(String) /// Team is already full. The free team member limit has been reached. @@ -6947,11 +7375,15 @@ public class Team { /// User creation has failed. case userCreationFailed(String) + func json() throws -> JSON { + try MemberAddResultBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddResultBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddResultBase: \(error)" } } } @@ -7050,7 +7482,7 @@ public class Team { /// Describes the result of attempting to add a single user to the team. 'success' is the only value indicating that /// a user was indeed added to the team - the other values explain the type of failure that occurred, and /// include the email of the user for which the operation has failed. - public enum MemberAddResult: CustomStringConvertible { + public enum MemberAddResult: CustomStringConvertible, JSONRepresentable { /// Team is already full. The organization has no available licenses. case teamLicenseLimit(String) /// Team is already full. The free team member limit has been reached. @@ -7077,11 +7509,15 @@ public class Team { /// Describes a user that was successfully added to the team. case success(Team.TeamMemberInfo) + func json() throws -> JSON { + try MemberAddResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddResult: \(error)" } } } @@ -7215,7 +7651,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddV2ArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddV2Arg: \(error)" } } } @@ -7266,7 +7702,7 @@ public class Team { /// Describes the result of attempting to add a single user to the team. 'success' is the only value indicating that /// a user was indeed added to the team - the other values explain the type of failure that occurred, and /// include the email of the user for which the operation has failed. - public enum MemberAddV2Result: CustomStringConvertible { + public enum MemberAddV2Result: CustomStringConvertible, JSONRepresentable { /// Team is already full. The organization has no available licenses. case teamLicenseLimit(String) /// Team is already full. The free team member limit has been reached. @@ -7295,11 +7731,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MemberAddV2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddV2Result: \(error)" } } } @@ -7409,7 +7849,7 @@ public class Team { } /// Information on devices of a team's member. - public class MemberDevices: CustomStringConvertible { + public class MemberDevices: CustomStringConvertible, JSONRepresentable { /// The member unique Id. public let teamMemberId: String /// List of web sessions made by this team member. @@ -7431,11 +7871,15 @@ public class Team { self.mobileClients = mobileClients } + func json() throws -> JSON { + try MemberDevicesSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberDevicesSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberDevices: \(error)" } } } @@ -7469,7 +7913,7 @@ public class Team { } /// Information on linked applications of a team member. - public class MemberLinkedApps: CustomStringConvertible { + public class MemberLinkedApps: CustomStringConvertible, JSONRepresentable { /// The member unique Id. public let teamMemberId: String /// List of third party applications linked by this team member. @@ -7480,11 +7924,15 @@ public class Team { self.linkedApiApps = linkedApiApps } + func json() throws -> JSON { + try MemberLinkedAppsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberLinkedAppsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberLinkedApps: \(error)" } } } @@ -7512,7 +7960,7 @@ public class Team { } /// Basic member profile. - public class MemberProfile: CustomStringConvertible { + public class MemberProfile: CustomStringConvertible, JSONRepresentable { /// ID of user as a member of a team. public let teamMemberId: String /// External ID that a team can attach to the user. An application using the API may find it easier to use their @@ -7588,11 +8036,15 @@ public class Team { self.profilePhotoUrl = profilePhotoUrl } + func json() throws -> JSON { + try MemberProfileSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberProfileSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberProfile: \(error)" } } } @@ -7663,15 +8115,19 @@ public class Team { } /// Error that can be returned whenever a struct derived from UserSelectorArg is used. - public enum UserSelectorError: CustomStringConvertible { + public enum UserSelectorError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound + func json() throws -> JSON { + try UserSelectorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserSelectorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserSelectorError: \(error)" } } } @@ -7704,17 +8160,21 @@ public class Team { } /// The MemberSelectorError union - public enum MemberSelectorError: CustomStringConvertible { + public enum MemberSelectorError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. case userNotInTeam + func json() throws -> JSON { + try MemberSelectorErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSelectorErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSelectorError: \(error)" } } } @@ -7753,18 +8213,22 @@ public class Team { } /// The MembersAddArgBase struct - public class MembersAddArgBase: CustomStringConvertible { + public class MembersAddArgBase: CustomStringConvertible, JSONRepresentable { /// Whether to force the add to happen asynchronously. public let forceAsync: Bool public init(forceAsync: Bool = false) { self.forceAsync = forceAsync } + func json() throws -> JSON { + try MembersAddArgBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersAddArgBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersAddArgBase: \(error)" } } } @@ -7802,7 +8266,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersAddArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersAddArg: \(error)" } } } @@ -7830,7 +8294,7 @@ public class Team { } /// The MembersAddJobStatus union - public enum MembersAddJobStatus: CustomStringConvertible { + public enum MembersAddJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The asynchronous job has finished. For each member that was specified in the parameter MembersAddArg that @@ -7839,11 +8303,15 @@ public class Team { /// The asynchronous job returned an error. The string contains an error message. case failed(String) + func json() throws -> JSON { + try MembersAddJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersAddJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersAddJobStatus: \(error)" } } } @@ -7890,7 +8358,7 @@ public class Team { } /// The MembersAddJobStatusV2Result union - public enum MembersAddJobStatusV2Result: CustomStringConvertible { + public enum MembersAddJobStatusV2Result: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The asynchronous job has finished. For each member that was specified in the parameter MembersAddArg that @@ -7901,11 +8369,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersAddJobStatusV2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersAddJobStatusV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersAddJobStatusV2Result: \(error)" } } } @@ -7958,18 +8430,22 @@ public class Team { } /// The MembersAddLaunch union - public enum MembersAddLaunch: CustomStringConvertible { + public enum MembersAddLaunch: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) /// An unspecified error. case complete([Team.MemberAddResult]) + func json() throws -> JSON { + try MembersAddLaunchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersAddLaunchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersAddLaunch: \(error)" } } } @@ -8010,7 +8486,7 @@ public class Team { } /// The MembersAddLaunchV2Result union - public enum MembersAddLaunchV2Result: CustomStringConvertible { + public enum MembersAddLaunchV2Result: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) @@ -8019,11 +8495,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersAddLaunchV2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersAddLaunchV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersAddLaunchV2Result: \(error)" } } } @@ -8082,7 +8562,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersAddV2ArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersAddV2Arg: \(error)" } } } @@ -8110,18 +8590,22 @@ public class Team { } /// Exactly one of team_member_id, email, or external_id must be provided to identify the user account. - public class MembersDeactivateBaseArg: CustomStringConvertible { + public class MembersDeactivateBaseArg: CustomStringConvertible, JSONRepresentable { /// Identity of user to remove/suspend/have their files moved. public let user: Team.UserSelectorArg public init(user: Team.UserSelectorArg) { self.user = user } + func json() throws -> JSON { + try MembersDeactivateBaseArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersDeactivateBaseArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersDeactivateBaseArg: \(error)" } } } @@ -8162,7 +8646,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersDataTransferArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersDataTransferArg: \(error)" } } } @@ -8204,7 +8688,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersDeactivateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersDeactivateArg: \(error)" } } } @@ -8232,7 +8716,7 @@ public class Team { } /// The MembersDeactivateError union - public enum MembersDeactivateError: CustomStringConvertible { + public enum MembersDeactivateError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -8240,11 +8724,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersDeactivateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersDeactivateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersDeactivateError: \(error)" } } } @@ -8289,18 +8777,22 @@ public class Team { } /// The MembersDeleteProfilePhotoArg struct - public class MembersDeleteProfilePhotoArg: CustomStringConvertible { + public class MembersDeleteProfilePhotoArg: CustomStringConvertible, JSONRepresentable { /// Identity of the user whose profile photo will be deleted. public let user: Team.UserSelectorArg public init(user: Team.UserSelectorArg) { self.user = user } + func json() throws -> JSON { + try MembersDeleteProfilePhotoArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersDeleteProfilePhotoArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersDeleteProfilePhotoArg: \(error)" } } } @@ -8326,7 +8818,7 @@ public class Team { } /// The MembersDeleteProfilePhotoError union - public enum MembersDeleteProfilePhotoError: CustomStringConvertible { + public enum MembersDeleteProfilePhotoError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -8336,11 +8828,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersDeleteProfilePhotoErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersDeleteProfilePhotoErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersDeleteProfilePhotoError: \(error)" } } } @@ -8391,18 +8887,22 @@ public class Team { } /// Available TeamMemberRole for the connected team. To be used with membersSetAdminPermissionsV2. - public class MembersGetAvailableTeamMemberRolesResult: CustomStringConvertible { + public class MembersGetAvailableTeamMemberRolesResult: CustomStringConvertible, JSONRepresentable { /// Available roles. public let roles: [Team.TeamMemberRole] public init(roles: [Team.TeamMemberRole]) { self.roles = roles } + func json() throws -> JSON { + try MembersGetAvailableTeamMemberRolesResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersGetAvailableTeamMemberRolesResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersGetAvailableTeamMemberRolesResult: \(error)" } } } @@ -8428,18 +8928,22 @@ public class Team { } /// The MembersGetInfoArgs struct - public class MembersGetInfoArgs: CustomStringConvertible { + public class MembersGetInfoArgs: CustomStringConvertible, JSONRepresentable { /// List of team members. public let members: [Team.UserSelectorArg] public init(members: [Team.UserSelectorArg]) { self.members = members } + func json() throws -> JSON { + try MembersGetInfoArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersGetInfoArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersGetInfoArgs: \(error)" } } } @@ -8465,15 +8969,19 @@ public class Team { } /// The MembersGetInfoError union - public enum MembersGetInfoError: CustomStringConvertible { + public enum MembersGetInfoError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case other + func json() throws -> JSON { + try MembersGetInfoErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersGetInfoErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersGetInfoError: \(error)" } } } @@ -8506,17 +9014,21 @@ public class Team { } /// The MembersGetInfoItemBase union - public enum MembersGetInfoItemBase: CustomStringConvertible { + public enum MembersGetInfoItemBase: CustomStringConvertible, JSONRepresentable { /// An ID that was provided as a parameter to membersGetInfo or membersGetInfoV2, and did not match a /// corresponding user. This might be a team_member_id, an email, or an external ID, depending on how /// the method was called. case idNotFound(String) + func json() throws -> JSON { + try MembersGetInfoItemBaseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersGetInfoItemBaseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersGetInfoItemBase: \(error)" } } } @@ -8550,7 +9062,7 @@ public class Team { } /// Describes a result obtained for a single user whose id was specified in the parameter of membersGetInfo. - public enum MembersGetInfoItem: CustomStringConvertible { + public enum MembersGetInfoItem: CustomStringConvertible, JSONRepresentable { /// An ID that was provided as a parameter to membersGetInfo or membersGetInfoV2, and did not match a /// corresponding user. This might be a team_member_id, an email, or an external ID, depending on how /// the method was called. @@ -8558,11 +9070,15 @@ public class Team { /// Info about a team member. case memberInfo(Team.TeamMemberInfo) + func json() throws -> JSON { + try MembersGetInfoItemSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersGetInfoItemSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersGetInfoItem: \(error)" } } } @@ -8603,7 +9119,7 @@ public class Team { } /// Describes a result obtained for a single user whose id was specified in the parameter of membersGetInfoV2. - public enum MembersGetInfoItemV2: CustomStringConvertible { + public enum MembersGetInfoItemV2: CustomStringConvertible, JSONRepresentable { /// An ID that was provided as a parameter to membersGetInfo or membersGetInfoV2, and did not match a /// corresponding user. This might be a team_member_id, an email, or an external ID, depending on how /// the method was called. @@ -8613,11 +9129,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersGetInfoItemV2Serializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersGetInfoItemV2Serializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersGetInfoItemV2: \(error)" } } } @@ -8664,18 +9184,22 @@ public class Team { } /// The MembersGetInfoV2Arg struct - public class MembersGetInfoV2Arg: CustomStringConvertible { + public class MembersGetInfoV2Arg: CustomStringConvertible, JSONRepresentable { /// List of team members. public let members: [Team.UserSelectorArg] public init(members: [Team.UserSelectorArg]) { self.members = members } + func json() throws -> JSON { + try MembersGetInfoV2ArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersGetInfoV2ArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersGetInfoV2Arg: \(error)" } } } @@ -8701,18 +9225,22 @@ public class Team { } /// The MembersGetInfoV2Result struct - public class MembersGetInfoV2Result: CustomStringConvertible { + public class MembersGetInfoV2Result: CustomStringConvertible, JSONRepresentable { /// List of team members info. public let membersInfo: [Team.MembersGetInfoItemV2] public init(membersInfo: [Team.MembersGetInfoItemV2]) { self.membersInfo = membersInfo } + func json() throws -> JSON { + try MembersGetInfoV2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersGetInfoV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersGetInfoV2Result: \(error)" } } } @@ -8738,7 +9266,7 @@ public class Team { } /// The MembersInfo struct - public class MembersInfo: CustomStringConvertible { + public class MembersInfo: CustomStringConvertible, JSONRepresentable { /// Team member IDs of the users under this hold. public let teamMemberIds: [String] /// The number of permanently deleted users that were under this hold. @@ -8750,11 +9278,15 @@ public class Team { self.permanentlyDeletedUsers = permanentlyDeletedUsers } + func json() throws -> JSON { + try MembersInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersInfo: \(error)" } } } @@ -8782,7 +9314,7 @@ public class Team { } /// The MembersListArg struct - public class MembersListArg: CustomStringConvertible { + public class MembersListArg: CustomStringConvertible, JSONRepresentable { /// Number of results to return per call. public let limit: UInt32 /// Whether to return removed members. @@ -8793,11 +9325,15 @@ public class Team { self.includeRemoved = includeRemoved } + func json() throws -> JSON { + try MembersListArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersListArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersListArg: \(error)" } } } @@ -8825,7 +9361,7 @@ public class Team { } /// The MembersListContinueArg struct - public class MembersListContinueArg: CustomStringConvertible { + public class MembersListContinueArg: CustomStringConvertible, JSONRepresentable { /// Indicates from what point to get the next set of members. public let cursor: String public init(cursor: String) { @@ -8833,11 +9369,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try MembersListContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersListContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersListContinueArg: \(error)" } } } @@ -8863,17 +9403,21 @@ public class Team { } /// The MembersListContinueError union - public enum MembersListContinueError: CustomStringConvertible { + public enum MembersListContinueError: CustomStringConvertible, JSONRepresentable { /// The cursor is invalid. case invalidCursor /// An unspecified error. case other + func json() throws -> JSON { + try MembersListContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersListContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersListContinueError: \(error)" } } } @@ -8912,15 +9456,19 @@ public class Team { } /// The MembersListError union - public enum MembersListError: CustomStringConvertible { + public enum MembersListError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case other + func json() throws -> JSON { + try MembersListErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersListErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersListError: \(error)" } } } @@ -8953,7 +9501,7 @@ public class Team { } /// The MembersListResult struct - public class MembersListResult: CustomStringConvertible { + public class MembersListResult: CustomStringConvertible, JSONRepresentable { /// List of team members. public let members: [Team.TeamMemberInfo] /// Pass the cursor into membersListContinue to obtain the additional members. @@ -8968,11 +9516,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try MembersListResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersListResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersListResult: \(error)" } } } @@ -9002,7 +9554,7 @@ public class Team { } /// The MembersListV2Result struct - public class MembersListV2Result: CustomStringConvertible { + public class MembersListV2Result: CustomStringConvertible, JSONRepresentable { /// List of team members. public let members: [Team.TeamMemberInfoV2] /// Pass the cursor into membersListContinueV2 to obtain the additional members. @@ -9017,11 +9569,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try MembersListV2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersListV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersListV2Result: \(error)" } } } @@ -9051,18 +9607,22 @@ public class Team { } /// Exactly one of team_member_id, email, or external_id must be provided to identify the user account. - public class MembersRecoverArg: CustomStringConvertible { + public class MembersRecoverArg: CustomStringConvertible, JSONRepresentable { /// Identity of user to recover. public let user: Team.UserSelectorArg public init(user: Team.UserSelectorArg) { self.user = user } + func json() throws -> JSON { + try MembersRecoverArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersRecoverArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersRecoverArg: \(error)" } } } @@ -9088,7 +9648,7 @@ public class Team { } /// The MembersRecoverError union - public enum MembersRecoverError: CustomStringConvertible { + public enum MembersRecoverError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not recoverable. @@ -9100,11 +9660,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersRecoverErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersRecoverErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersRecoverError: \(error)" } } } @@ -9195,7 +9759,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersRemoveArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersRemoveArg: \(error)" } } } @@ -9238,7 +9802,7 @@ public class Team { } /// The MembersTransferFilesError union - public enum MembersTransferFilesError: CustomStringConvertible { + public enum MembersTransferFilesError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -9264,11 +9828,15 @@ public class Team { /// The recipient user's email is not verified. case recipientNotVerified + func json() throws -> JSON { + try MembersTransferFilesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersTransferFilesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersTransferFilesError: \(error)" } } } @@ -9367,7 +9935,7 @@ public class Team { } /// The MembersRemoveError union - public enum MembersRemoveError: CustomStringConvertible { + public enum MembersRemoveError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -9421,11 +9989,15 @@ public class Team { /// of service. case cannotKeepAccountRequiredToSignTos + func json() throws -> JSON { + try MembersRemoveErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersRemoveErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersRemoveError: \(error)" } } } @@ -9590,7 +10162,7 @@ public class Team { } /// The MembersSendWelcomeError union - public enum MembersSendWelcomeError: CustomStringConvertible { + public enum MembersSendWelcomeError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -9598,11 +10170,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersSendWelcomeErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSendWelcomeErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSendWelcomeError: \(error)" } } } @@ -9647,7 +10223,7 @@ public class Team { } /// Exactly one of team_member_id, email, or external_id must be provided to identify the user account. - public class MembersSetPermissions2Arg: CustomStringConvertible { + public class MembersSetPermissions2Arg: CustomStringConvertible, JSONRepresentable { /// Identity of user whose role will be set. public let user: Team.UserSelectorArg /// The new roles for the member. Send empty list to make user member only. For now, only up to one role is @@ -9659,11 +10235,15 @@ public class Team { self.newRoles = newRoles } + func json() throws -> JSON { + try MembersSetPermissions2ArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetPermissions2ArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetPermissions2Arg: \(error)" } } } @@ -9691,7 +10271,7 @@ public class Team { } /// The MembersSetPermissions2Error union - public enum MembersSetPermissions2Error: CustomStringConvertible { + public enum MembersSetPermissions2Error: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// Cannot remove the admin setting of the last admin. @@ -9705,11 +10285,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersSetPermissions2ErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetPermissions2ErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetPermissions2Error: \(error)" } } } @@ -9772,7 +10356,7 @@ public class Team { } /// The MembersSetPermissions2Result struct - public class MembersSetPermissions2Result: CustomStringConvertible { + public class MembersSetPermissions2Result: CustomStringConvertible, JSONRepresentable { /// The member ID of the user to which the change was applied. public let teamMemberId: String /// The roles after the change. Empty in case the user become a non-admin. @@ -9783,11 +10367,15 @@ public class Team { self.roles = roles } + func json() throws -> JSON { + try MembersSetPermissions2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetPermissions2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetPermissions2Result: \(error)" } } } @@ -9815,7 +10403,7 @@ public class Team { } /// Exactly one of team_member_id, email, or external_id must be provided to identify the user account. - public class MembersSetPermissionsArg: CustomStringConvertible { + public class MembersSetPermissionsArg: CustomStringConvertible, JSONRepresentable { /// Identity of user whose role will be set. public let user: Team.UserSelectorArg /// The new role of the member. @@ -9825,11 +10413,15 @@ public class Team { self.newRole = newRole } + func json() throws -> JSON { + try MembersSetPermissionsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetPermissionsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetPermissionsArg: \(error)" } } } @@ -9857,7 +10449,7 @@ public class Team { } /// The MembersSetPermissionsError union - public enum MembersSetPermissionsError: CustomStringConvertible { + public enum MembersSetPermissionsError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// Cannot remove the admin setting of the last admin. @@ -9871,11 +10463,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersSetPermissionsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetPermissionsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetPermissionsError: \(error)" } } } @@ -9938,7 +10534,7 @@ public class Team { } /// The MembersSetPermissionsResult struct - public class MembersSetPermissionsResult: CustomStringConvertible { + public class MembersSetPermissionsResult: CustomStringConvertible, JSONRepresentable { /// The member ID of the user to which the change was applied. public let teamMemberId: String /// The role after the change. @@ -9949,11 +10545,15 @@ public class Team { self.role = role } + func json() throws -> JSON { + try MembersSetPermissionsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetPermissionsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetPermissionsResult: \(error)" } } } @@ -9982,7 +10582,7 @@ public class Team { /// Exactly one of team_member_id, email, or external_id must be provided to identify the user account. At least one /// of new_email, new_external_id, new_given_name, and/or new_surname must be provided. - public class MembersSetProfileArg: CustomStringConvertible { + public class MembersSetProfileArg: CustomStringConvertible, JSONRepresentable { /// Identity of user whose profile will be set. public let user: Team.UserSelectorArg /// New email for member. @@ -10020,11 +10620,15 @@ public class Team { self.newIsDirectoryRestricted = newIsDirectoryRestricted } + func json() throws -> JSON { + try MembersSetProfileArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetProfileArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetProfileArg: \(error)" } } } @@ -10071,7 +10675,7 @@ public class Team { } /// The MembersSetProfileError union - public enum MembersSetProfileError: CustomStringConvertible { + public enum MembersSetProfileError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -10098,11 +10702,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersSetProfileErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetProfileErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetProfileError: \(error)" } } } @@ -10201,7 +10809,7 @@ public class Team { } /// The MembersSetProfilePhotoArg struct - public class MembersSetProfilePhotoArg: CustomStringConvertible { + public class MembersSetProfilePhotoArg: CustomStringConvertible, JSONRepresentable { /// Identity of the user whose profile photo will be set. public let user: Team.UserSelectorArg /// Image to set as the member's new profile photo. @@ -10211,11 +10819,15 @@ public class Team { self.photo = photo } + func json() throws -> JSON { + try MembersSetProfilePhotoArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetProfilePhotoArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetProfilePhotoArg: \(error)" } } } @@ -10243,7 +10855,7 @@ public class Team { } /// The MembersSetProfilePhotoError union - public enum MembersSetProfilePhotoError: CustomStringConvertible { + public enum MembersSetProfilePhotoError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -10255,11 +10867,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MembersSetProfilePhotoErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSetProfilePhotoErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSetProfilePhotoError: \(error)" } } } @@ -10317,7 +10933,7 @@ public class Team { } /// The MembersSuspendError union - public enum MembersSuspendError: CustomStringConvertible { + public enum MembersSuspendError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -10331,11 +10947,15 @@ public class Team { /// Team is full. The organization has no available licenses. case teamLicenseLimit + func json() throws -> JSON { + try MembersSuspendErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersSuspendErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersSuspendError: \(error)" } } } @@ -10398,7 +11018,7 @@ public class Team { } /// The MembersTransferFormerMembersFilesError union - public enum MembersTransferFormerMembersFilesError: CustomStringConvertible { + public enum MembersTransferFormerMembersFilesError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -10432,11 +11052,15 @@ public class Team { /// User's data has already been transferred to another user. case userDataAlreadyTransferred + func json() throws -> JSON { + try MembersTransferFormerMembersFilesErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersTransferFormerMembersFilesErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersTransferFormerMembersFilesError: \(error)" } } } @@ -10559,18 +11183,22 @@ public class Team { } /// Exactly one of team_member_id, email, or external_id must be provided to identify the user account. - public class MembersUnsuspendArg: CustomStringConvertible { + public class MembersUnsuspendArg: CustomStringConvertible, JSONRepresentable { /// Identity of user to unsuspend. public let user: Team.UserSelectorArg public init(user: Team.UserSelectorArg) { self.user = user } + func json() throws -> JSON { + try MembersUnsuspendArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersUnsuspendArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersUnsuspendArg: \(error)" } } } @@ -10596,7 +11224,7 @@ public class Team { } /// The MembersUnsuspendError union - public enum MembersUnsuspendError: CustomStringConvertible { + public enum MembersUnsuspendError: CustomStringConvertible, JSONRepresentable { /// No matching user found. The provided team_member_id, email, or external_id does not exist on this team. case userNotFound /// The user is not a member of the team. @@ -10608,11 +11236,15 @@ public class Team { /// Team is full. The organization has no available licenses. case teamLicenseLimit + func json() throws -> JSON { + try MembersUnsuspendErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MembersUnsuspendErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MembersUnsuspendError: \(error)" } } } @@ -10669,7 +11301,7 @@ public class Team { } /// The MobileClientPlatform union - public enum MobileClientPlatform: CustomStringConvertible { + public enum MobileClientPlatform: CustomStringConvertible, JSONRepresentable { /// Official Dropbox iPhone client. case iphone /// Official Dropbox iPad client. @@ -10683,11 +11315,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try MobileClientPlatformSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MobileClientPlatformSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MobileClientPlatform: \(error)" } } } @@ -10789,7 +11425,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try MobileClientSessionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MobileClientSession: \(error)" } } } @@ -10844,7 +11480,7 @@ public class Team { } /// Properties of a namespace. - public class NamespaceMetadata: CustomStringConvertible { + public class NamespaceMetadata: CustomStringConvertible, JSONRepresentable { /// The name of this namespace. public let name: String /// The ID of this namespace. @@ -10864,11 +11500,15 @@ public class Team { self.teamMemberId = teamMemberId } + func json() throws -> JSON { + try NamespaceMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NamespaceMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NamespaceMetadata: \(error)" } } } @@ -10900,7 +11540,7 @@ public class Team { } /// The NamespaceType union - public enum NamespaceType: CustomStringConvertible { + public enum NamespaceType: CustomStringConvertible, JSONRepresentable { /// App sandbox folder. case appFolder /// Shared folder. @@ -10912,11 +11552,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try NamespaceTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NamespaceTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NamespaceType: \(error)" } } } @@ -10973,7 +11617,7 @@ public class Team { } /// User result for setting member custom quota. - public enum RemoveCustomQuotaResult: CustomStringConvertible { + public enum RemoveCustomQuotaResult: CustomStringConvertible, JSONRepresentable { /// Successfully removed user. case success(Team.UserSelectorArg) /// Invalid user (not in team). @@ -10981,11 +11625,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try RemoveCustomQuotaResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemoveCustomQuotaResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemoveCustomQuotaResult: \(error)" } } } @@ -11032,7 +11680,7 @@ public class Team { } /// The RemovedStatus struct - public class RemovedStatus: CustomStringConvertible { + public class RemovedStatus: CustomStringConvertible, JSONRepresentable { /// True if the removed team member is recoverable. public let isRecoverable: Bool /// True if the team member's account was converted to individual account. @@ -11042,11 +11690,15 @@ public class Team { self.isDisconnected = isDisconnected } + func json() throws -> JSON { + try RemovedStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RemovedStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RemovedStatus: \(error)" } } } @@ -11076,7 +11728,7 @@ public class Team { /// Result of trying to resend verification email to a secondary email address. 'success' is the only value /// indicating that a verification email was successfully sent. The other values explain the type of error that /// occurred, and include the email for which the error occurred. - public enum ResendSecondaryEmailResult: CustomStringConvertible { + public enum ResendSecondaryEmailResult: CustomStringConvertible, JSONRepresentable { /// A verification email was successfully sent to the secondary email address. case success(String) /// This secondary email address is not pending for the user. @@ -11086,11 +11738,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try ResendSecondaryEmailResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResendSecondaryEmailResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResendSecondaryEmailResult: \(error)" } } } @@ -11144,18 +11800,22 @@ public class Team { } /// The ResendVerificationEmailArg struct - public class ResendVerificationEmailArg: CustomStringConvertible { + public class ResendVerificationEmailArg: CustomStringConvertible, JSONRepresentable { /// List of users and secondary emails to resend verification emails to. public let emailsToResend: [Team.UserSecondaryEmailsArg] public init(emailsToResend: [Team.UserSecondaryEmailsArg]) { self.emailsToResend = emailsToResend } + func json() throws -> JSON { + try ResendVerificationEmailArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResendVerificationEmailArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResendVerificationEmailArg: \(error)" } } } @@ -11181,18 +11841,22 @@ public class Team { } /// List of users and resend results. - public class ResendVerificationEmailResult: CustomStringConvertible { + public class ResendVerificationEmailResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let results: [Team.UserResendResult] public init(results: [Team.UserResendResult]) { self.results = results } + func json() throws -> JSON { + try ResendVerificationEmailResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResendVerificationEmailResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResendVerificationEmailResult: \(error)" } } } @@ -11231,7 +11895,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeDesktopClientArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeDesktopClientArg: \(error)" } } } @@ -11261,7 +11925,7 @@ public class Team { } /// The RevokeDeviceSessionArg union - public enum RevokeDeviceSessionArg: CustomStringConvertible { + public enum RevokeDeviceSessionArg: CustomStringConvertible, JSONRepresentable { /// End an active session. case webSession(Team.DeviceSessionArg) /// Unlink a linked desktop device. @@ -11269,11 +11933,15 @@ public class Team { /// Unlink a linked mobile device. case mobileClient(Team.DeviceSessionArg) + func json() throws -> JSON { + try RevokeDeviceSessionArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeDeviceSessionArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeDeviceSessionArg: \(error)" } } } @@ -11321,18 +11989,22 @@ public class Team { } /// The RevokeDeviceSessionBatchArg struct - public class RevokeDeviceSessionBatchArg: CustomStringConvertible { + public class RevokeDeviceSessionBatchArg: CustomStringConvertible, JSONRepresentable { /// (no description) public let revokeDevices: [Team.RevokeDeviceSessionArg] public init(revokeDevices: [Team.RevokeDeviceSessionArg]) { self.revokeDevices = revokeDevices } + func json() throws -> JSON { + try RevokeDeviceSessionBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeDeviceSessionBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeDeviceSessionBatchArg: \(error)" } } } @@ -11358,15 +12030,19 @@ public class Team { } /// The RevokeDeviceSessionBatchError union - public enum RevokeDeviceSessionBatchError: CustomStringConvertible { + public enum RevokeDeviceSessionBatchError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case other + func json() throws -> JSON { + try RevokeDeviceSessionBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeDeviceSessionBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeDeviceSessionBatchError: \(error)" } } } @@ -11399,18 +12075,22 @@ public class Team { } /// The RevokeDeviceSessionBatchResult struct - public class RevokeDeviceSessionBatchResult: CustomStringConvertible { + public class RevokeDeviceSessionBatchResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let revokeDevicesStatus: [Team.RevokeDeviceSessionStatus] public init(revokeDevicesStatus: [Team.RevokeDeviceSessionStatus]) { self.revokeDevicesStatus = revokeDevicesStatus } + func json() throws -> JSON { + try RevokeDeviceSessionBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeDeviceSessionBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeDeviceSessionBatchResult: \(error)" } } } @@ -11437,7 +12117,7 @@ public class Team { } /// The RevokeDeviceSessionError union - public enum RevokeDeviceSessionError: CustomStringConvertible { + public enum RevokeDeviceSessionError: CustomStringConvertible, JSONRepresentable { /// Device session not found. case deviceSessionNotFound /// Member not found. @@ -11445,11 +12125,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try RevokeDeviceSessionErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeDeviceSessionErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeDeviceSessionError: \(error)" } } } @@ -11494,7 +12178,7 @@ public class Team { } /// The RevokeDeviceSessionStatus struct - public class RevokeDeviceSessionStatus: CustomStringConvertible { + public class RevokeDeviceSessionStatus: CustomStringConvertible, JSONRepresentable { /// Result of the revoking request. public let success: Bool /// The error cause in case of a failure. @@ -11504,11 +12188,15 @@ public class Team { self.errorType = errorType } + func json() throws -> JSON { + try RevokeDeviceSessionStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeDeviceSessionStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeDeviceSessionStatus: \(error)" } } } @@ -11536,7 +12224,7 @@ public class Team { } /// The RevokeLinkedApiAppArg struct - public class RevokeLinkedApiAppArg: CustomStringConvertible { + public class RevokeLinkedApiAppArg: CustomStringConvertible, JSONRepresentable { /// The application's unique id. public let appId: String /// The unique id of the member owning the device. @@ -11552,11 +12240,15 @@ public class Team { self.keepAppFolder = keepAppFolder } + func json() throws -> JSON { + try RevokeLinkedApiAppArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeLinkedApiAppArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeLinkedApiAppArg: \(error)" } } } @@ -11586,18 +12278,22 @@ public class Team { } /// The RevokeLinkedApiAppBatchArg struct - public class RevokeLinkedApiAppBatchArg: CustomStringConvertible { + public class RevokeLinkedApiAppBatchArg: CustomStringConvertible, JSONRepresentable { /// (no description) public let revokeLinkedApp: [Team.RevokeLinkedApiAppArg] public init(revokeLinkedApp: [Team.RevokeLinkedApiAppArg]) { self.revokeLinkedApp = revokeLinkedApp } + func json() throws -> JSON { + try RevokeLinkedApiAppBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeLinkedApiAppBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeLinkedApiAppBatchArg: \(error)" } } } @@ -11623,15 +12319,19 @@ public class Team { } /// Error returned by linkedAppsRevokeLinkedAppBatch. - public enum RevokeLinkedAppBatchError: CustomStringConvertible { + public enum RevokeLinkedAppBatchError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case other + func json() throws -> JSON { + try RevokeLinkedAppBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeLinkedAppBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeLinkedAppBatchError: \(error)" } } } @@ -11664,18 +12364,22 @@ public class Team { } /// The RevokeLinkedAppBatchResult struct - public class RevokeLinkedAppBatchResult: CustomStringConvertible { + public class RevokeLinkedAppBatchResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let revokeLinkedAppStatus: [Team.RevokeLinkedAppStatus] public init(revokeLinkedAppStatus: [Team.RevokeLinkedAppStatus]) { self.revokeLinkedAppStatus = revokeLinkedAppStatus } + func json() throws -> JSON { + try RevokeLinkedAppBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeLinkedAppBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeLinkedAppBatchResult: \(error)" } } } @@ -11702,7 +12406,7 @@ public class Team { } /// Error returned by linkedAppsRevokeLinkedApp. - public enum RevokeLinkedAppError: CustomStringConvertible { + public enum RevokeLinkedAppError: CustomStringConvertible, JSONRepresentable { /// Application not found. case appNotFound /// Member not found. @@ -11712,11 +12416,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try RevokeLinkedAppErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeLinkedAppErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeLinkedAppError: \(error)" } } } @@ -11767,7 +12475,7 @@ public class Team { } /// The RevokeLinkedAppStatus struct - public class RevokeLinkedAppStatus: CustomStringConvertible { + public class RevokeLinkedAppStatus: CustomStringConvertible, JSONRepresentable { /// Result of the revoking request. public let success: Bool /// The error cause in case of a failure. @@ -11777,11 +12485,15 @@ public class Team { self.errorType = errorType } + func json() throws -> JSON { + try RevokeLinkedAppStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RevokeLinkedAppStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RevokeLinkedAppStatus: \(error)" } } } @@ -11809,18 +12521,22 @@ public class Team { } /// The SetCustomQuotaArg struct - public class SetCustomQuotaArg: CustomStringConvertible { + public class SetCustomQuotaArg: CustomStringConvertible, JSONRepresentable { /// List of users and their custom quotas. public let usersAndQuotas: [Team.UserCustomQuotaArg] public init(usersAndQuotas: [Team.UserCustomQuotaArg]) { self.usersAndQuotas = usersAndQuotas } + func json() throws -> JSON { + try SetCustomQuotaArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SetCustomQuotaArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SetCustomQuotaArg: \(error)" } } } @@ -11846,7 +12562,7 @@ public class Team { } /// Error returned when setting member custom quota. - public enum SetCustomQuotaError: CustomStringConvertible { + public enum SetCustomQuotaError: CustomStringConvertible, JSONRepresentable { /// A maximum of 1000 users can be set for a single call. case tooManyUsers /// An unspecified error. @@ -11854,11 +12570,15 @@ public class Team { /// Some of the users are on the excluded users list and can't have custom quota set. case someUsersAreExcluded + func json() throws -> JSON { + try SetCustomQuotaErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SetCustomQuotaErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SetCustomQuotaError: \(error)" } } } @@ -11904,7 +12624,7 @@ public class Team { /// Structure representing Approve List entries. Domain and emails are supported. At least one entry of any /// supported type is required. - public class SharingAllowlistAddArgs: CustomStringConvertible { + public class SharingAllowlistAddArgs: CustomStringConvertible, JSONRepresentable { /// List of domains represented by valid string representation (RFC-1034/5). public let domains: [String]? /// List of emails represented by valid string representation (RFC-5322/822). @@ -11916,11 +12636,15 @@ public class Team { self.emails = emails } + func json() throws -> JSON { + try SharingAllowlistAddArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistAddArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistAddArgs: \(error)" } } } @@ -11948,7 +12672,7 @@ public class Team { } /// The SharingAllowlistAddError union - public enum SharingAllowlistAddError: CustomStringConvertible { + public enum SharingAllowlistAddError: CustomStringConvertible, JSONRepresentable { /// One of provided values is not valid. case malformedEntry(String) /// Neither single domain nor email provided. @@ -11964,11 +12688,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try SharingAllowlistAddErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistAddErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistAddError: \(error)" } } } @@ -12039,12 +12767,16 @@ public class Team { } /// This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone. - public class SharingAllowlistAddResponse: CustomStringConvertible { + public class SharingAllowlistAddResponse: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharingAllowlistAddResponseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistAddResponseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistAddResponse: \(error)" } } } @@ -12067,7 +12799,7 @@ public class Team { } /// The SharingAllowlistListArg struct - public class SharingAllowlistListArg: CustomStringConvertible { + public class SharingAllowlistListArg: CustomStringConvertible, JSONRepresentable { /// The number of entries to fetch at one time. public let limit: UInt32 public init(limit: UInt32 = 1_000) { @@ -12075,11 +12807,15 @@ public class Team { self.limit = limit } + func json() throws -> JSON { + try SharingAllowlistListArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistListArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistListArg: \(error)" } } } @@ -12105,7 +12841,7 @@ public class Team { } /// The SharingAllowlistListContinueArg struct - public class SharingAllowlistListContinueArg: CustomStringConvertible { + public class SharingAllowlistListContinueArg: CustomStringConvertible, JSONRepresentable { /// The cursor returned from a previous call to sharingAllowlistList or sharingAllowlistListContinue. public let cursor: String public init(cursor: String) { @@ -12113,11 +12849,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try SharingAllowlistListContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistListContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistListContinueArg: \(error)" } } } @@ -12143,17 +12883,21 @@ public class Team { } /// The SharingAllowlistListContinueError union - public enum SharingAllowlistListContinueError: CustomStringConvertible { + public enum SharingAllowlistListContinueError: CustomStringConvertible, JSONRepresentable { /// Provided cursor is not valid. case invalidCursor /// An unspecified error. case other + func json() throws -> JSON { + try SharingAllowlistListContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistListContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistListContinueError: \(error)" } } } @@ -12192,12 +12936,16 @@ public class Team { } /// This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone. - public class SharingAllowlistListError: CustomStringConvertible { + public class SharingAllowlistListError: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharingAllowlistListErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistListErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistListError: \(error)" } } } @@ -12220,7 +12968,7 @@ public class Team { } /// The SharingAllowlistListResponse struct - public class SharingAllowlistListResponse: CustomStringConvertible { + public class SharingAllowlistListResponse: CustomStringConvertible, JSONRepresentable { /// List of domains represented by valid string representation (RFC-1034/5). public let domains: [String] /// List of emails represented by valid string representation (RFC-5322/822). @@ -12239,11 +12987,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try SharingAllowlistListResponseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistListResponseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistListResponse: \(error)" } } } @@ -12275,7 +13027,7 @@ public class Team { } /// The SharingAllowlistRemoveArgs struct - public class SharingAllowlistRemoveArgs: CustomStringConvertible { + public class SharingAllowlistRemoveArgs: CustomStringConvertible, JSONRepresentable { /// List of domains represented by valid string representation (RFC-1034/5). public let domains: [String]? /// List of emails represented by valid string representation (RFC-5322/822). @@ -12287,11 +13039,15 @@ public class Team { self.emails = emails } + func json() throws -> JSON { + try SharingAllowlistRemoveArgsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistRemoveArgsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistRemoveArgs: \(error)" } } } @@ -12319,7 +13075,7 @@ public class Team { } /// The SharingAllowlistRemoveError union - public enum SharingAllowlistRemoveError: CustomStringConvertible { + public enum SharingAllowlistRemoveError: CustomStringConvertible, JSONRepresentable { /// One of provided values is not valid. case malformedEntry(String) /// One or more provided values do not exist. @@ -12333,11 +13089,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try SharingAllowlistRemoveErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistRemoveErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistRemoveError: \(error)" } } } @@ -12402,12 +13162,16 @@ public class Team { } /// This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone. - public class SharingAllowlistRemoveResponse: CustomStringConvertible { + public class SharingAllowlistRemoveResponse: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharingAllowlistRemoveResponseSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingAllowlistRemoveResponseSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingAllowlistRemoveResponse: \(error)" } } } @@ -12430,7 +13194,7 @@ public class Team { } /// Describes the number of users in a specific storage bucket. - public class StorageBucket: CustomStringConvertible { + public class StorageBucket: CustomStringConvertible, JSONRepresentable { /// The name of the storage bucket. For example, '1G' is a bucket of users with storage size up to 1 Giga. public let bucket: String /// The number of people whose storage is in the range of this storage bucket. @@ -12442,11 +13206,15 @@ public class Team { self.users = users } + func json() throws -> JSON { + try StorageBucketSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try StorageBucketSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for StorageBucket: \(error)" } } } @@ -12474,7 +13242,7 @@ public class Team { } /// The TeamFolderAccessError union - public enum TeamFolderAccessError: CustomStringConvertible { + public enum TeamFolderAccessError: CustomStringConvertible, JSONRepresentable { /// The team folder ID is invalid. case invalidTeamFolderId /// The authenticated app does not have permission to manage that team folder. @@ -12482,11 +13250,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderAccessErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderAccessErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderAccessError: \(error)" } } } @@ -12531,7 +13303,7 @@ public class Team { } /// The TeamFolderActivateError union - public enum TeamFolderActivateError: CustomStringConvertible { + public enum TeamFolderActivateError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Team.TeamFolderAccessError) /// An unspecified error. @@ -12541,11 +13313,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderActivateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderActivateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderActivateError: \(error)" } } } @@ -12599,7 +13375,7 @@ public class Team { } /// The TeamFolderIdArg struct - public class TeamFolderIdArg: CustomStringConvertible { + public class TeamFolderIdArg: CustomStringConvertible, JSONRepresentable { /// The ID of the team folder. public let teamFolderId: String public init(teamFolderId: String) { @@ -12607,11 +13383,15 @@ public class Team { self.teamFolderId = teamFolderId } + func json() throws -> JSON { + try TeamFolderIdArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderIdArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderIdArg: \(error)" } } } @@ -12649,7 +13429,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderArchiveArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderArchiveArg: \(error)" } } } @@ -12677,7 +13457,7 @@ public class Team { } /// The TeamFolderArchiveError union - public enum TeamFolderArchiveError: CustomStringConvertible { + public enum TeamFolderArchiveError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Team.TeamFolderAccessError) /// An unspecified error. @@ -12687,11 +13467,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderArchiveErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderArchiveErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderArchiveError: \(error)" } } } @@ -12745,7 +13529,7 @@ public class Team { } /// The TeamFolderArchiveJobStatus union - public enum TeamFolderArchiveJobStatus: CustomStringConvertible { + public enum TeamFolderArchiveJobStatus: CustomStringConvertible, JSONRepresentable { /// The asynchronous job is still in progress. case inProgress /// The archive job has finished. The value is the metadata for the resulting team folder. @@ -12753,11 +13537,15 @@ public class Team { /// Error occurred while performing an asynchronous job from teamFolderArchive. case failed(Team.TeamFolderArchiveError) + func json() throws -> JSON { + try TeamFolderArchiveJobStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderArchiveJobStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderArchiveJobStatus: \(error)" } } } @@ -12804,18 +13592,22 @@ public class Team { } /// The TeamFolderArchiveLaunch union - public enum TeamFolderArchiveLaunch: CustomStringConvertible { + public enum TeamFolderArchiveLaunch: CustomStringConvertible, JSONRepresentable { /// This response indicates that the processing is asynchronous. The string is an id that can be used to obtain /// the status of the asynchronous job. case asyncJobId(String) /// An unspecified error. case complete(Team.TeamFolderMetadata) + func json() throws -> JSON { + try TeamFolderArchiveLaunchSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderArchiveLaunchSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderArchiveLaunch: \(error)" } } } @@ -12856,7 +13648,7 @@ public class Team { } /// The TeamFolderCreateArg struct - public class TeamFolderCreateArg: CustomStringConvertible { + public class TeamFolderCreateArg: CustomStringConvertible, JSONRepresentable { /// Name for the new team folder. public let name: String /// The sync setting to apply to this team folder. Only permitted if the team has team selective sync enabled. @@ -12867,11 +13659,15 @@ public class Team { self.syncSetting = syncSetting } + func json() throws -> JSON { + try TeamFolderCreateArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderCreateArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderCreateArg: \(error)" } } } @@ -12899,7 +13695,7 @@ public class Team { } /// The TeamFolderCreateError union - public enum TeamFolderCreateError: CustomStringConvertible { + public enum TeamFolderCreateError: CustomStringConvertible, JSONRepresentable { /// The provided name cannot be used. case invalidFolderName /// There is already a team folder with the provided name. @@ -12911,11 +13707,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderCreateErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderCreateErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderCreateError: \(error)" } } } @@ -12973,17 +13773,21 @@ public class Team { } /// The TeamFolderGetInfoItem union - public enum TeamFolderGetInfoItem: CustomStringConvertible { + public enum TeamFolderGetInfoItem: CustomStringConvertible, JSONRepresentable { /// An ID that was provided as a parameter to teamFolderGetInfo did not match any of the team's team folders. case idNotFound(String) /// Properties of a team folder. case teamFolderMetadata(Team.TeamFolderMetadata) + func json() throws -> JSON { + try TeamFolderGetInfoItemSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderGetInfoItemSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderGetInfoItem: \(error)" } } } @@ -13024,7 +13828,7 @@ public class Team { } /// The TeamFolderIdListArg struct - public class TeamFolderIdListArg: CustomStringConvertible { + public class TeamFolderIdListArg: CustomStringConvertible, JSONRepresentable { /// The list of team folder IDs. public let teamFolderIds: [String] public init(teamFolderIds: [String]) { @@ -13032,11 +13836,15 @@ public class Team { self.teamFolderIds = teamFolderIds } + func json() throws -> JSON { + try TeamFolderIdListArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderIdListArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderIdListArg: \(error)" } } } @@ -13062,7 +13870,7 @@ public class Team { } /// The TeamFolderInvalidStatusError union - public enum TeamFolderInvalidStatusError: CustomStringConvertible { + public enum TeamFolderInvalidStatusError: CustomStringConvertible, JSONRepresentable { /// The folder is active and the operation did not succeed. case active /// The folder is archived and the operation did not succeed. @@ -13072,11 +13880,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderInvalidStatusErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderInvalidStatusErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderInvalidStatusError: \(error)" } } } @@ -13127,7 +13939,7 @@ public class Team { } /// The TeamFolderListArg struct - public class TeamFolderListArg: CustomStringConvertible { + public class TeamFolderListArg: CustomStringConvertible, JSONRepresentable { /// The maximum number of results to return per request. public let limit: UInt32 public init(limit: UInt32 = 1_000) { @@ -13135,11 +13947,15 @@ public class Team { self.limit = limit } + func json() throws -> JSON { + try TeamFolderListArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderListArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderListArg: \(error)" } } } @@ -13165,7 +13981,7 @@ public class Team { } /// The TeamFolderListContinueArg struct - public class TeamFolderListContinueArg: CustomStringConvertible { + public class TeamFolderListContinueArg: CustomStringConvertible, JSONRepresentable { /// Indicates from what point to get the next set of team folders. public let cursor: String public init(cursor: String) { @@ -13173,11 +13989,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try TeamFolderListContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderListContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderListContinueArg: \(error)" } } } @@ -13203,17 +14023,21 @@ public class Team { } /// The TeamFolderListContinueError union - public enum TeamFolderListContinueError: CustomStringConvertible { + public enum TeamFolderListContinueError: CustomStringConvertible, JSONRepresentable { /// The cursor is invalid. case invalidCursor /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderListContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderListContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderListContinueError: \(error)" } } } @@ -13252,18 +14076,22 @@ public class Team { } /// The TeamFolderListError struct - public class TeamFolderListError: CustomStringConvertible { + public class TeamFolderListError: CustomStringConvertible, JSONRepresentable { /// (no description) public let accessError: Team.TeamFolderAccessError public init(accessError: Team.TeamFolderAccessError) { self.accessError = accessError } + func json() throws -> JSON { + try TeamFolderListErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderListErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderListError: \(error)" } } } @@ -13289,7 +14117,7 @@ public class Team { } /// Result for teamFolderList and teamFolderListContinue. - public class TeamFolderListResult: CustomStringConvertible { + public class TeamFolderListResult: CustomStringConvertible, JSONRepresentable { /// List of all team folders in the authenticated team. public let teamFolders: [Team.TeamFolderMetadata] /// Pass the cursor into teamFolderListContinue to obtain additional team folders. @@ -13304,11 +14132,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try TeamFolderListResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderListResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderListResult: \(error)" } } } @@ -13338,7 +14170,7 @@ public class Team { } /// Properties of a team folder. - public class TeamFolderMetadata: CustomStringConvertible { + public class TeamFolderMetadata: CustomStringConvertible, JSONRepresentable { /// The ID of the team folder. public let teamFolderId: String /// The name of the team folder. @@ -13369,11 +14201,15 @@ public class Team { self.contentSyncSettings = contentSyncSettings } + func json() throws -> JSON { + try TeamFolderMetadataSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderMetadataSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderMetadata: \(error)" } } } @@ -13416,7 +14252,7 @@ public class Team { } /// The TeamFolderPermanentlyDeleteError union - public enum TeamFolderPermanentlyDeleteError: CustomStringConvertible { + public enum TeamFolderPermanentlyDeleteError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Team.TeamFolderAccessError) /// An unspecified error. @@ -13426,11 +14262,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderPermanentlyDeleteErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderPermanentlyDeleteErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderPermanentlyDeleteError: \(error)" } } } @@ -13497,7 +14337,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderRenameArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderRenameArg: \(error)" } } } @@ -13525,7 +14365,7 @@ public class Team { } /// The TeamFolderRenameError union - public enum TeamFolderRenameError: CustomStringConvertible { + public enum TeamFolderRenameError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Team.TeamFolderAccessError) /// An unspecified error. @@ -13541,11 +14381,15 @@ public class Team { /// The provided name cannot be used because it is reserved. case folderNameReserved + func json() throws -> JSON { + try TeamFolderRenameErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderRenameErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderRenameError: \(error)" } } } @@ -13617,7 +14461,7 @@ public class Team { } /// The TeamFolderStatus union - public enum TeamFolderStatus: CustomStringConvertible { + public enum TeamFolderStatus: CustomStringConvertible, JSONRepresentable { /// The team folder and sub-folders are available to all members. case active /// The team folder is not accessible outside of the team folder manager. @@ -13627,11 +14471,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderStatus: \(error)" } } } @@ -13682,17 +14530,21 @@ public class Team { } /// The TeamFolderTeamSharedDropboxError union - public enum TeamFolderTeamSharedDropboxError: CustomStringConvertible { + public enum TeamFolderTeamSharedDropboxError: CustomStringConvertible, JSONRepresentable { /// This action is not allowed for a shared team root. case disallowed /// An unspecified error. case other + func json() throws -> JSON { + try TeamFolderTeamSharedDropboxErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderTeamSharedDropboxErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderTeamSharedDropboxError: \(error)" } } } @@ -13747,7 +14599,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderUpdateSyncSettingsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderUpdateSyncSettingsArg: \(error)" } } } @@ -13778,7 +14630,7 @@ public class Team { } /// The TeamFolderUpdateSyncSettingsError union - public enum TeamFolderUpdateSyncSettingsError: CustomStringConvertible { + public enum TeamFolderUpdateSyncSettingsError: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accessError(Team.TeamFolderAccessError) /// An unspecified error. @@ -13790,11 +14642,15 @@ public class Team { /// An error occurred setting the sync settings. case syncSettingsError(Files.SyncSettingsError) + func json() throws -> JSON { + try TeamFolderUpdateSyncSettingsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderUpdateSyncSettingsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderUpdateSyncSettingsError: \(error)" } } } @@ -13855,7 +14711,7 @@ public class Team { } /// The TeamGetInfoResult struct - public class TeamGetInfoResult: CustomStringConvertible { + public class TeamGetInfoResult: CustomStringConvertible, JSONRepresentable { /// The name of the team. public let name: String /// The ID of the team. @@ -13889,11 +14745,15 @@ public class Team { self.policies = policies } + func json() throws -> JSON { + try TeamGetInfoResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamGetInfoResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamGetInfoResult: \(error)" } } } @@ -13936,7 +14796,7 @@ public class Team { } /// Information about a team member. - public class TeamMemberInfo: CustomStringConvertible { + public class TeamMemberInfo: CustomStringConvertible, JSONRepresentable { /// Profile of a user as a member of a team. public let profile: Team.TeamMemberProfile /// The user's role in the team. @@ -13946,11 +14806,15 @@ public class Team { self.role = role } + func json() throws -> JSON { + try TeamMemberInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberInfo: \(error)" } } } @@ -13978,7 +14842,7 @@ public class Team { } /// Information about a team member. - public class TeamMemberInfoV2: CustomStringConvertible { + public class TeamMemberInfoV2: CustomStringConvertible, JSONRepresentable { /// Profile of a user as a member of a team. public let profile: Team.TeamMemberProfile /// The user's roles in the team. @@ -13988,11 +14852,15 @@ public class Team { self.roles = roles } + func json() throws -> JSON { + try TeamMemberInfoV2Serializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberInfoV2Serializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberInfoV2: \(error)" } } } @@ -14020,18 +14888,22 @@ public class Team { } /// Information about a team member, after the change, like at membersSetProfileV2. - public class TeamMemberInfoV2Result: CustomStringConvertible { + public class TeamMemberInfoV2Result: CustomStringConvertible, JSONRepresentable { /// Member info, after the change. public let memberInfo: Team.TeamMemberInfoV2 public init(memberInfo: Team.TeamMemberInfoV2) { self.memberInfo = memberInfo } + func json() throws -> JSON { + try TeamMemberInfoV2ResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberInfoV2ResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberInfoV2Result: \(error)" } } } @@ -14108,7 +14980,7 @@ public class Team { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberProfileSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberProfile: \(error)" } } } @@ -14186,7 +15058,7 @@ public class Team { /// A role which can be attached to a team member. This replaces AdminTier; each AdminTier corresponds to a new /// TeamMemberRole with a matching name. - public class TeamMemberRole: CustomStringConvertible { + public class TeamMemberRole: CustomStringConvertible, JSONRepresentable { /// A string containing encoded role ID. For roles defined by Dropbox, this is the same across all teams. public let roleId: String /// The role display name. @@ -14202,11 +15074,15 @@ public class Team { self.description_ = description_ } + func json() throws -> JSON { + try TeamMemberRoleSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberRoleSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberRole: \(error)" } } } @@ -14236,7 +15112,7 @@ public class Team { } /// The user's status as a member of a specific team. - public enum TeamMemberStatus: CustomStringConvertible { + public enum TeamMemberStatus: CustomStringConvertible, JSONRepresentable { /// User has successfully joined the team. case active /// User has been invited to a team, but has not joined the team yet. @@ -14248,11 +15124,15 @@ public class Team { /// members/list. case removed(Team.RemovedStatus) + func json() throws -> JSON { + try TeamMemberStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberStatus: \(error)" } } } @@ -14304,17 +15184,21 @@ public class Team { } /// The TeamMembershipType union - public enum TeamMembershipType: CustomStringConvertible { + public enum TeamMembershipType: CustomStringConvertible, JSONRepresentable { /// User uses a license and has full access to team resources like the shared quota. case full /// User does not have access to the shared quota and team admins have restricted administrative control. case limited + func json() throws -> JSON { + try TeamMembershipTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMembershipTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMembershipType: \(error)" } } } @@ -14353,7 +15237,7 @@ public class Team { } /// The TeamNamespacesListArg struct - public class TeamNamespacesListArg: CustomStringConvertible { + public class TeamNamespacesListArg: CustomStringConvertible, JSONRepresentable { /// Specifying a value here has no effect. public let limit: UInt32 public init(limit: UInt32 = 1_000) { @@ -14361,11 +15245,15 @@ public class Team { self.limit = limit } + func json() throws -> JSON { + try TeamNamespacesListArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamNamespacesListArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamNamespacesListArg: \(error)" } } } @@ -14391,7 +15279,7 @@ public class Team { } /// The TeamNamespacesListContinueArg struct - public class TeamNamespacesListContinueArg: CustomStringConvertible { + public class TeamNamespacesListContinueArg: CustomStringConvertible, JSONRepresentable { /// Indicates from what point to get the next set of team-accessible namespaces. public let cursor: String public init(cursor: String) { @@ -14399,11 +15287,15 @@ public class Team { self.cursor = cursor } + func json() throws -> JSON { + try TeamNamespacesListContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamNamespacesListContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamNamespacesListContinueArg: \(error)" } } } @@ -14429,17 +15321,21 @@ public class Team { } /// The TeamNamespacesListError union - public enum TeamNamespacesListError: CustomStringConvertible { + public enum TeamNamespacesListError: CustomStringConvertible, JSONRepresentable { /// Argument passed in is invalid. case invalidArg /// An unspecified error. case other + func json() throws -> JSON { + try TeamNamespacesListErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamNamespacesListErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamNamespacesListError: \(error)" } } } @@ -14478,7 +15374,7 @@ public class Team { } /// The TeamNamespacesListContinueError union - public enum TeamNamespacesListContinueError: CustomStringConvertible { + public enum TeamNamespacesListContinueError: CustomStringConvertible, JSONRepresentable { /// Argument passed in is invalid. case invalidArg /// An unspecified error. @@ -14486,11 +15382,15 @@ public class Team { /// The cursor is invalid. case invalidCursor + func json() throws -> JSON { + try TeamNamespacesListContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamNamespacesListContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamNamespacesListContinueError: \(error)" } } } @@ -14535,7 +15435,7 @@ public class Team { } /// Result for namespacesList. - public class TeamNamespacesListResult: CustomStringConvertible { + public class TeamNamespacesListResult: CustomStringConvertible, JSONRepresentable { /// List of all namespaces the team can access. public let namespaces: [Team.NamespaceMetadata] /// Pass the cursor into namespacesListContinue to obtain additional namespaces. Note that duplicate namespaces @@ -14550,11 +15450,15 @@ public class Team { self.hasMore = hasMore } + func json() throws -> JSON { + try TeamNamespacesListResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamNamespacesListResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamNamespacesListResult: \(error)" } } } @@ -14584,7 +15488,7 @@ public class Team { } /// The TeamReportFailureReason union - public enum TeamReportFailureReason: CustomStringConvertible { + public enum TeamReportFailureReason: CustomStringConvertible, JSONRepresentable { /// We couldn't create the report, but we think this was a fluke. Everything should work if you try it again. case temporaryError /// Too many other reports are being created right now. Try creating this report again once the others finish. @@ -14594,11 +15498,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TeamReportFailureReasonSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamReportFailureReasonSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamReportFailureReason: \(error)" } } } @@ -14649,7 +15557,7 @@ public class Team { } /// Error returned by tokenGetAuthenticatedAdmin. - public enum TokenGetAuthenticatedAdminError: CustomStringConvertible { + public enum TokenGetAuthenticatedAdminError: CustomStringConvertible, JSONRepresentable { /// The current token is not associated with a team admin, because mappings were not recorded when the token was /// created. Consider re-authorizing a new access token to record its authenticating admin. case mappingNotFound @@ -14659,11 +15567,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try TokenGetAuthenticatedAdminErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TokenGetAuthenticatedAdminErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TokenGetAuthenticatedAdminError: \(error)" } } } @@ -14708,18 +15620,22 @@ public class Team { } /// Results for tokenGetAuthenticatedAdmin. - public class TokenGetAuthenticatedAdminResult: CustomStringConvertible { + public class TokenGetAuthenticatedAdminResult: CustomStringConvertible, JSONRepresentable { /// The admin who authorized the token. public let adminProfile: Team.TeamMemberProfile public init(adminProfile: Team.TeamMemberProfile) { self.adminProfile = adminProfile } + func json() throws -> JSON { + try TokenGetAuthenticatedAdminResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TokenGetAuthenticatedAdminResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TokenGetAuthenticatedAdminResult: \(error)" } } } @@ -14745,7 +15661,7 @@ public class Team { } /// The value for uploadApiRateLimit in Feature. - public enum UploadApiRateLimitValue: CustomStringConvertible { + public enum UploadApiRateLimitValue: CustomStringConvertible, JSONRepresentable { /// This team has unlimited upload API quota. So far both server version account and legacy account type have /// unlimited monthly upload api quota. case unlimited @@ -14754,11 +15670,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try UploadApiRateLimitValueSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UploadApiRateLimitValueSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UploadApiRateLimitValue: \(error)" } } } @@ -14806,7 +15726,7 @@ public class Team { /// Result of trying to add secondary emails to a user. 'success' is the only value indicating that a user was /// successfully retrieved for adding secondary emails. The other values explain the type of error that /// occurred, and include the user for which the error occurred. - public enum UserAddResult: CustomStringConvertible { + public enum UserAddResult: CustomStringConvertible, JSONRepresentable { /// Describes a user and the results for each attempt to add a secondary email. case success(Team.UserSecondaryEmailsResult) /// Specified user is not a valid target for adding secondary emails. @@ -14818,11 +15738,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try UserAddResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserAddResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserAddResult: \(error)" } } } @@ -14883,7 +15807,7 @@ public class Team { } /// User and their required custom quota in GB (1 TB = 1024 GB). - public class UserCustomQuotaArg: CustomStringConvertible { + public class UserCustomQuotaArg: CustomStringConvertible, JSONRepresentable { /// (no description) public let user: Team.UserSelectorArg /// (no description) @@ -14894,11 +15818,15 @@ public class Team { self.quotaGb = quotaGb } + func json() throws -> JSON { + try UserCustomQuotaArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserCustomQuotaArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserCustomQuotaArg: \(error)" } } } @@ -14926,7 +15854,7 @@ public class Team { } /// User and their custom quota in GB (1 TB = 1024 GB). No quota returns if the user has no custom quota set. - public class UserCustomQuotaResult: CustomStringConvertible { + public class UserCustomQuotaResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let user: Team.UserSelectorArg /// (no description) @@ -14937,11 +15865,15 @@ public class Team { self.quotaGb = quotaGb } + func json() throws -> JSON { + try UserCustomQuotaResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserCustomQuotaResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserCustomQuotaResult: \(error)" } } } @@ -14969,7 +15901,7 @@ public class Team { } /// The UserDeleteEmailsResult struct - public class UserDeleteEmailsResult: CustomStringConvertible { + public class UserDeleteEmailsResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let user: Team.UserSelectorArg /// (no description) @@ -14979,11 +15911,15 @@ public class Team { self.results = results } + func json() throws -> JSON { + try UserDeleteEmailsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserDeleteEmailsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserDeleteEmailsResult: \(error)" } } } @@ -15013,7 +15949,7 @@ public class Team { /// Result of trying to delete a user's secondary emails. 'success' is the only value indicating that a user was /// successfully retrieved for deleting secondary emails. The other values explain the type of error that /// occurred, and include the user for which the error occurred. - public enum UserDeleteResult: CustomStringConvertible { + public enum UserDeleteResult: CustomStringConvertible, JSONRepresentable { /// Describes a user and the results for each attempt to delete a secondary email. case success(Team.UserDeleteEmailsResult) /// Specified user is not a valid target for deleting secondary emails. @@ -15021,11 +15957,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try UserDeleteResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserDeleteResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserDeleteResult: \(error)" } } } @@ -15072,7 +16012,7 @@ public class Team { } /// The UserResendEmailsResult struct - public class UserResendEmailsResult: CustomStringConvertible { + public class UserResendEmailsResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let user: Team.UserSelectorArg /// (no description) @@ -15082,11 +16022,15 @@ public class Team { self.results = results } + func json() throws -> JSON { + try UserResendEmailsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserResendEmailsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserResendEmailsResult: \(error)" } } } @@ -15116,7 +16060,7 @@ public class Team { /// Result of trying to resend verification emails to a user. 'success' is the only value indicating that a user was /// successfully retrieved for sending verification emails. The other values explain the type of error that /// occurred, and include the user for which the error occurred. - public enum UserResendResult: CustomStringConvertible { + public enum UserResendResult: CustomStringConvertible, JSONRepresentable { /// Describes a user and the results for each attempt to resend verification emails. case success(Team.UserResendEmailsResult) /// Specified user is not a valid target for resending verification emails. @@ -15124,11 +16068,15 @@ public class Team { /// An unspecified error. case other + func json() throws -> JSON { + try UserResendResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserResendResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserResendResult: \(error)" } } } @@ -15175,7 +16123,7 @@ public class Team { } /// User and a list of secondary emails. - public class UserSecondaryEmailsArg: CustomStringConvertible { + public class UserSecondaryEmailsArg: CustomStringConvertible, JSONRepresentable { /// (no description) public let user: Team.UserSelectorArg /// (no description) @@ -15189,11 +16137,15 @@ public class Team { self.secondaryEmails = secondaryEmails } + func json() throws -> JSON { + try UserSecondaryEmailsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserSecondaryEmailsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserSecondaryEmailsArg: \(error)" } } } @@ -15221,7 +16173,7 @@ public class Team { } /// The UserSecondaryEmailsResult struct - public class UserSecondaryEmailsResult: CustomStringConvertible { + public class UserSecondaryEmailsResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let user: Team.UserSelectorArg /// (no description) @@ -15231,11 +16183,15 @@ public class Team { self.results = results } + func json() throws -> JSON { + try UserSecondaryEmailsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserSecondaryEmailsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserSecondaryEmailsResult: \(error)" } } } @@ -15263,7 +16219,7 @@ public class Team { } /// Argument for selecting a single user, either by team_member_id, external_id or email. - public enum UserSelectorArg: CustomStringConvertible { + public enum UserSelectorArg: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case teamMemberId(String) /// An unspecified error. @@ -15271,11 +16227,15 @@ public class Team { /// An unspecified error. case email(String) + func json() throws -> JSON { + try UserSelectorArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserSelectorArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserSelectorArg: \(error)" } } } @@ -15323,7 +16283,7 @@ public class Team { } /// Argument for selecting a list of users, either by team_member_ids, external_ids or emails. - public enum UsersSelectorArg: CustomStringConvertible { + public enum UsersSelectorArg: CustomStringConvertible, JSONRepresentable { /// List of member IDs. case teamMemberIds([String]) /// List of external user IDs. @@ -15331,11 +16291,15 @@ public class Team { /// List of email addresses. case emails([String]) + func json() throws -> JSON { + try UsersSelectorArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UsersSelectorArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UsersSelectorArg: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/TeamCommon.swift b/Source/SwiftyDropbox/Shared/Generated/TeamCommon.swift index b9fee893..bbb3fd68 100644 --- a/Source/SwiftyDropbox/Shared/Generated/TeamCommon.swift +++ b/Source/SwiftyDropbox/Shared/Generated/TeamCommon.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the team_common namespace public class TeamCommon { /// The group type determines how a group is managed. - public enum GroupManagementType: CustomStringConvertible { + public enum GroupManagementType: CustomStringConvertible, JSONRepresentable { /// A group which is managed by selected users. case userManaged /// A group which is managed by team admins only. @@ -19,11 +19,15 @@ public class TeamCommon { /// An unspecified error. case other + func json() throws -> JSON { + try GroupManagementTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupManagementTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupManagementType: \(error)" } } } @@ -74,7 +78,7 @@ public class TeamCommon { } /// Information about a group. - public class GroupSummary: CustomStringConvertible { + public class GroupSummary: CustomStringConvertible, JSONRepresentable { /// (no description) public let groupName: String /// (no description) @@ -103,11 +107,15 @@ public class TeamCommon { self.groupManagementType = groupManagementType } + func json() throws -> JSON { + try GroupSummarySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupSummarySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupSummary: \(error)" } } } @@ -147,7 +155,7 @@ public class TeamCommon { } /// The group type determines how a group is created and managed. - public enum GroupType: CustomStringConvertible { + public enum GroupType: CustomStringConvertible, JSONRepresentable { /// A group to which team members are automatically added. Applicable to team folders /// https://www.dropbox.com/help/986 only. case team @@ -156,11 +164,15 @@ public class TeamCommon { /// An unspecified error. case other + func json() throws -> JSON { + try GroupTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupType: \(error)" } } } @@ -205,7 +217,7 @@ public class TeamCommon { } /// The type of the space limit imposed on a team member. - public enum MemberSpaceLimitType: CustomStringConvertible { + public enum MemberSpaceLimitType: CustomStringConvertible, JSONRepresentable { /// The team member does not have imposed space limit. case off /// The team member has soft imposed space limit - the limit is used for display and for notifications. @@ -215,11 +227,15 @@ public class TeamCommon { /// An unspecified error. case other + func json() throws -> JSON { + try MemberSpaceLimitTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitType: \(error)" } } } @@ -270,7 +286,7 @@ public class TeamCommon { } /// Time range. - public class TimeRange: CustomStringConvertible { + public class TimeRange: CustomStringConvertible, JSONRepresentable { /// Optional starting time (inclusive). public let startTime: Date? /// Optional ending time (exclusive). @@ -280,11 +296,15 @@ public class TeamCommon { self.endTime = endTime } + func json() throws -> JSON { + try TimeRangeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TimeRangeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TimeRange: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/TeamLog.swift b/Source/SwiftyDropbox/Shared/Generated/TeamLog.swift index ab3ac863..afa2dd05 100644 --- a/Source/SwiftyDropbox/Shared/Generated/TeamLog.swift +++ b/Source/SwiftyDropbox/Shared/Generated/TeamLog.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the team_log namespace public class TeamLog { /// Indicates the method in which the action was performed. - public enum AccessMethodLogInfo: CustomStringConvertible { + public enum AccessMethodLogInfo: CustomStringConvertible, JSONRepresentable { /// Admin console session details. case adminConsole(TeamLog.WebSessionLogInfo) /// Api session details. @@ -25,11 +25,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AccessMethodLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccessMethodLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccessMethodLogInfo: \(error)" } } } @@ -104,7 +108,7 @@ public class TeamLog { } /// The AccountCaptureAvailability union - public enum AccountCaptureAvailability: CustomStringConvertible { + public enum AccountCaptureAvailability: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case available /// An unspecified error. @@ -112,11 +116,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AccountCaptureAvailabilitySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureAvailabilitySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureAvailability: \(error)" } } } @@ -161,7 +169,7 @@ public class TeamLog { } /// Granted/revoked option to enable account capture on team domains. - public class AccountCaptureChangeAvailabilityDetails: CustomStringConvertible { + public class AccountCaptureChangeAvailabilityDetails: CustomStringConvertible, JSONRepresentable { /// New account capture availabilty value. public let newValue: TeamLog.AccountCaptureAvailability /// Previous account capture availabilty value. Might be missing due to historical data gap. @@ -171,11 +179,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try AccountCaptureChangeAvailabilityDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureChangeAvailabilityDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureChangeAvailabilityDetails: \(error)" } } } @@ -203,7 +215,7 @@ public class TeamLog { } /// The AccountCaptureChangeAvailabilityType struct - public class AccountCaptureChangeAvailabilityType: CustomStringConvertible { + public class AccountCaptureChangeAvailabilityType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -211,11 +223,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AccountCaptureChangeAvailabilityTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureChangeAvailabilityTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureChangeAvailabilityType: \(error)" } } } @@ -241,7 +257,7 @@ public class TeamLog { } /// Changed account capture setting on team domain. - public class AccountCaptureChangePolicyDetails: CustomStringConvertible { + public class AccountCaptureChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New account capture policy. public let newValue: TeamLog.AccountCapturePolicy /// Previous account capture policy. Might be missing due to historical data gap. @@ -251,11 +267,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try AccountCaptureChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureChangePolicyDetails: \(error)" } } } @@ -283,7 +303,7 @@ public class TeamLog { } /// The AccountCaptureChangePolicyType struct - public class AccountCaptureChangePolicyType: CustomStringConvertible { + public class AccountCaptureChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -291,11 +311,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AccountCaptureChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureChangePolicyType: \(error)" } } } @@ -321,7 +345,7 @@ public class TeamLog { } /// Account-captured user migrated account to team. - public class AccountCaptureMigrateAccountDetails: CustomStringConvertible { + public class AccountCaptureMigrateAccountDetails: CustomStringConvertible, JSONRepresentable { /// Domain name. public let domainName: String public init(domainName: String) { @@ -329,11 +353,15 @@ public class TeamLog { self.domainName = domainName } + func json() throws -> JSON { + try AccountCaptureMigrateAccountDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureMigrateAccountDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureMigrateAccountDetails: \(error)" } } } @@ -359,7 +387,7 @@ public class TeamLog { } /// The AccountCaptureMigrateAccountType struct - public class AccountCaptureMigrateAccountType: CustomStringConvertible { + public class AccountCaptureMigrateAccountType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -367,11 +395,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AccountCaptureMigrateAccountTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureMigrateAccountTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureMigrateAccountType: \(error)" } } } @@ -397,7 +429,7 @@ public class TeamLog { } /// Sent account capture email to all unmanaged members. - public class AccountCaptureNotificationEmailsSentDetails: CustomStringConvertible { + public class AccountCaptureNotificationEmailsSentDetails: CustomStringConvertible, JSONRepresentable { /// Domain name. public let domainName: String /// Account-capture email notification type. @@ -408,11 +440,15 @@ public class TeamLog { self.notificationType = notificationType } + func json() throws -> JSON { + try AccountCaptureNotificationEmailsSentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureNotificationEmailsSentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureNotificationEmailsSentDetails: \(error)" } } } @@ -441,7 +477,7 @@ public class TeamLog { } /// The AccountCaptureNotificationEmailsSentType struct - public class AccountCaptureNotificationEmailsSentType: CustomStringConvertible { + public class AccountCaptureNotificationEmailsSentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -449,11 +485,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AccountCaptureNotificationEmailsSentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureNotificationEmailsSentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureNotificationEmailsSentType: \(error)" } } } @@ -479,7 +519,7 @@ public class TeamLog { } /// The AccountCaptureNotificationType union - public enum AccountCaptureNotificationType: CustomStringConvertible { + public enum AccountCaptureNotificationType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case actionableNotification /// An unspecified error. @@ -487,11 +527,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AccountCaptureNotificationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureNotificationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureNotificationType: \(error)" } } } @@ -536,7 +580,7 @@ public class TeamLog { } /// The AccountCapturePolicy union - public enum AccountCapturePolicy: CustomStringConvertible { + public enum AccountCapturePolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case allUsers /// An unspecified error. @@ -548,11 +592,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AccountCapturePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCapturePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCapturePolicy: \(error)" } } } @@ -609,7 +657,7 @@ public class TeamLog { } /// Account-captured user changed account email to personal email. - public class AccountCaptureRelinquishAccountDetails: CustomStringConvertible { + public class AccountCaptureRelinquishAccountDetails: CustomStringConvertible, JSONRepresentable { /// Domain name. public let domainName: String public init(domainName: String) { @@ -617,11 +665,15 @@ public class TeamLog { self.domainName = domainName } + func json() throws -> JSON { + try AccountCaptureRelinquishAccountDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureRelinquishAccountDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureRelinquishAccountDetails: \(error)" } } } @@ -647,7 +699,7 @@ public class TeamLog { } /// The AccountCaptureRelinquishAccountType struct - public class AccountCaptureRelinquishAccountType: CustomStringConvertible { + public class AccountCaptureRelinquishAccountType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -655,11 +707,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AccountCaptureRelinquishAccountTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountCaptureRelinquishAccountTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountCaptureRelinquishAccountType: \(error)" } } } @@ -685,7 +741,7 @@ public class TeamLog { } /// Unlocked/locked account after failed sign in attempts. - public class AccountLockOrUnlockedDetails: CustomStringConvertible { + public class AccountLockOrUnlockedDetails: CustomStringConvertible, JSONRepresentable { /// The previous account status. public let previousValue: TeamLog.AccountState /// The new account status. @@ -695,11 +751,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try AccountLockOrUnlockedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountLockOrUnlockedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountLockOrUnlockedDetails: \(error)" } } } @@ -727,7 +787,7 @@ public class TeamLog { } /// The AccountLockOrUnlockedType struct - public class AccountLockOrUnlockedType: CustomStringConvertible { + public class AccountLockOrUnlockedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -735,11 +795,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AccountLockOrUnlockedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountLockOrUnlockedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountLockOrUnlockedType: \(error)" } } } @@ -765,7 +829,7 @@ public class TeamLog { } /// The AccountState union - public enum AccountState: CustomStringConvertible { + public enum AccountState: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case locked /// An unspecified error. @@ -773,11 +837,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AccountStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountState: \(error)" } } } @@ -822,7 +890,7 @@ public class TeamLog { } /// Additional information indicating the action taken that caused status change. - public enum ActionDetails: CustomStringConvertible { + public enum ActionDetails: CustomStringConvertible, JSONRepresentable { /// Define how the user was removed from the team. case removeAction(TeamLog.MemberRemoveActionType) /// Additional information relevant when someone is invited to the team. @@ -832,11 +900,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ActionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ActionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ActionDetails: \(error)" } } } @@ -890,7 +962,7 @@ public class TeamLog { } /// The entity who performed the action. - public enum ActorLogInfo: CustomStringConvertible { + public enum ActorLogInfo: CustomStringConvertible, JSONRepresentable { /// The admin who did the action. case admin(TeamLog.UserLogInfo) /// Anonymous actor. @@ -906,11 +978,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ActorLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ActorLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ActorLogInfo: \(error)" } } } @@ -983,7 +1059,7 @@ public class TeamLog { } /// Alert category - public enum AdminAlertCategoryEnum: CustomStringConvertible { + public enum AdminAlertCategoryEnum: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accountTakeover /// An unspecified error. @@ -1001,11 +1077,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminAlertCategoryEnumSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertCategoryEnumSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertCategoryEnum: \(error)" } } } @@ -1080,7 +1160,7 @@ public class TeamLog { } /// Alert state - public enum AdminAlertGeneralStateEnum: CustomStringConvertible { + public enum AdminAlertGeneralStateEnum: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case active /// An unspecified error. @@ -1094,11 +1174,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminAlertGeneralStateEnumSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertGeneralStateEnumSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertGeneralStateEnum: \(error)" } } } @@ -1161,7 +1245,7 @@ public class TeamLog { } /// Alert severity - public enum AdminAlertSeverityEnum: CustomStringConvertible { + public enum AdminAlertSeverityEnum: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case high /// An unspecified error. @@ -1175,11 +1259,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminAlertSeverityEnumSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertSeverityEnumSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertSeverityEnum: \(error)" } } } @@ -1242,7 +1330,7 @@ public class TeamLog { } /// Alert configurations - public class AdminAlertingAlertConfiguration: CustomStringConvertible { + public class AdminAlertingAlertConfiguration: CustomStringConvertible, JSONRepresentable { /// Alert state. public let alertState: TeamLog.AdminAlertingAlertStatePolicy? /// Sensitivity level. @@ -1269,11 +1357,15 @@ public class TeamLog { self.excludedFileExtensions = excludedFileExtensions } + func json() throws -> JSON { + try AdminAlertingAlertConfigurationSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingAlertConfigurationSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingAlertConfiguration: \(error)" } } } @@ -1315,7 +1407,7 @@ public class TeamLog { } /// Alert sensitivity - public enum AdminAlertingAlertSensitivity: CustomStringConvertible { + public enum AdminAlertingAlertSensitivity: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case high /// An unspecified error. @@ -1331,11 +1423,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminAlertingAlertSensitivitySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingAlertSensitivitySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingAlertSensitivity: \(error)" } } } @@ -1404,7 +1500,7 @@ public class TeamLog { } /// Changed an alert state. - public class AdminAlertingAlertStateChangedDetails: CustomStringConvertible { + public class AdminAlertingAlertStateChangedDetails: CustomStringConvertible, JSONRepresentable { /// Alert name. public let alertName: String /// Alert severity. @@ -1435,11 +1531,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try AdminAlertingAlertStateChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingAlertStateChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingAlertStateChangedDetails: \(error)" } } } @@ -1482,7 +1582,7 @@ public class TeamLog { } /// The AdminAlertingAlertStateChangedType struct - public class AdminAlertingAlertStateChangedType: CustomStringConvertible { + public class AdminAlertingAlertStateChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -1490,11 +1590,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AdminAlertingAlertStateChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingAlertStateChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingAlertStateChangedType: \(error)" } } } @@ -1520,7 +1624,7 @@ public class TeamLog { } /// Policy for controlling whether an alert can be triggered or not - public enum AdminAlertingAlertStatePolicy: CustomStringConvertible { + public enum AdminAlertingAlertStatePolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case off /// An unspecified error. @@ -1528,11 +1632,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminAlertingAlertStatePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingAlertStatePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingAlertStatePolicy: \(error)" } } } @@ -1577,7 +1685,7 @@ public class TeamLog { } /// Changed an alert setting. - public class AdminAlertingChangedAlertConfigDetails: CustomStringConvertible { + public class AdminAlertingChangedAlertConfigDetails: CustomStringConvertible, JSONRepresentable { /// Alert Name. public let alertName: String /// Previous alert configuration. @@ -1591,11 +1699,15 @@ public class TeamLog { self.newAlertConfig = newAlertConfig } + func json() throws -> JSON { + try AdminAlertingChangedAlertConfigDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingChangedAlertConfigDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingChangedAlertConfigDetails: \(error)" } } } @@ -1629,7 +1741,7 @@ public class TeamLog { } /// The AdminAlertingChangedAlertConfigType struct - public class AdminAlertingChangedAlertConfigType: CustomStringConvertible { + public class AdminAlertingChangedAlertConfigType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -1637,11 +1749,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AdminAlertingChangedAlertConfigTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingChangedAlertConfigTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingChangedAlertConfigType: \(error)" } } } @@ -1667,7 +1783,7 @@ public class TeamLog { } /// Triggered security alert. - public class AdminAlertingTriggeredAlertDetails: CustomStringConvertible { + public class AdminAlertingTriggeredAlertDetails: CustomStringConvertible, JSONRepresentable { /// Alert name. public let alertName: String /// Alert severity. @@ -1685,11 +1801,15 @@ public class TeamLog { self.alertInstanceId = alertInstanceId } + func json() throws -> JSON { + try AdminAlertingTriggeredAlertDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingTriggeredAlertDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingTriggeredAlertDetails: \(error)" } } } @@ -1726,7 +1846,7 @@ public class TeamLog { } /// The AdminAlertingTriggeredAlertType struct - public class AdminAlertingTriggeredAlertType: CustomStringConvertible { + public class AdminAlertingTriggeredAlertType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -1734,11 +1854,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AdminAlertingTriggeredAlertTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminAlertingTriggeredAlertTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminAlertingTriggeredAlertType: \(error)" } } } @@ -1764,7 +1888,7 @@ public class TeamLog { } /// The AdminConsoleAppPermission union - public enum AdminConsoleAppPermission: CustomStringConvertible { + public enum AdminConsoleAppPermission: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case defaultForListedApps /// An unspecified error. @@ -1772,11 +1896,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminConsoleAppPermissionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminConsoleAppPermissionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminConsoleAppPermission: \(error)" } } } @@ -1821,7 +1949,7 @@ public class TeamLog { } /// The AdminConsoleAppPolicy union - public enum AdminConsoleAppPolicy: CustomStringConvertible { + public enum AdminConsoleAppPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case allow /// An unspecified error. @@ -1831,11 +1959,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminConsoleAppPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminConsoleAppPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminConsoleAppPolicy: \(error)" } } } @@ -1886,7 +2018,7 @@ public class TeamLog { } /// Changed admin reminder settings for requests to join the team. - public class AdminEmailRemindersChangedDetails: CustomStringConvertible { + public class AdminEmailRemindersChangedDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.AdminEmailRemindersPolicy /// From. @@ -1896,11 +2028,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try AdminEmailRemindersChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminEmailRemindersChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminEmailRemindersChangedDetails: \(error)" } } } @@ -1928,7 +2064,7 @@ public class TeamLog { } /// The AdminEmailRemindersChangedType struct - public class AdminEmailRemindersChangedType: CustomStringConvertible { + public class AdminEmailRemindersChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -1936,11 +2072,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AdminEmailRemindersChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminEmailRemindersChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminEmailRemindersChangedType: \(error)" } } } @@ -1966,7 +2106,7 @@ public class TeamLog { } /// Policy for deciding whether team admins receive reminder emails for requests to join the team - public enum AdminEmailRemindersPolicy: CustomStringConvertible { + public enum AdminEmailRemindersPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case default_ /// An unspecified error. @@ -1976,11 +2116,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminEmailRemindersPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminEmailRemindersPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminEmailRemindersPolicy: \(error)" } } } @@ -2031,7 +2175,7 @@ public class TeamLog { } /// The AdminRole union - public enum AdminRole: CustomStringConvertible { + public enum AdminRole: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case billingAdmin /// An unspecified error. @@ -2055,11 +2199,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AdminRoleSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AdminRoleSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AdminRole: \(error)" } } } @@ -2152,7 +2300,7 @@ public class TeamLog { } /// Alert recipients setting type - public enum AlertRecipientsSettingType: CustomStringConvertible { + public enum AlertRecipientsSettingType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case customList /// An unspecified error. @@ -2164,11 +2312,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AlertRecipientsSettingTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AlertRecipientsSettingTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AlertRecipientsSettingType: \(error)" } } } @@ -2225,12 +2377,16 @@ public class TeamLog { } /// Disabled downloads. - public class AllowDownloadDisabledDetails: CustomStringConvertible { + public class AllowDownloadDisabledDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try AllowDownloadDisabledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AllowDownloadDisabledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AllowDownloadDisabledDetails: \(error)" } } } @@ -2253,7 +2409,7 @@ public class TeamLog { } /// The AllowDownloadDisabledType struct - public class AllowDownloadDisabledType: CustomStringConvertible { + public class AllowDownloadDisabledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2261,11 +2417,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AllowDownloadDisabledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AllowDownloadDisabledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AllowDownloadDisabledType: \(error)" } } } @@ -2291,12 +2451,16 @@ public class TeamLog { } /// Enabled downloads. - public class AllowDownloadEnabledDetails: CustomStringConvertible { + public class AllowDownloadEnabledDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try AllowDownloadEnabledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AllowDownloadEnabledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AllowDownloadEnabledDetails: \(error)" } } } @@ -2319,7 +2483,7 @@ public class TeamLog { } /// The AllowDownloadEnabledType struct - public class AllowDownloadEnabledType: CustomStringConvertible { + public class AllowDownloadEnabledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2327,11 +2491,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AllowDownloadEnabledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AllowDownloadEnabledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AllowDownloadEnabledType: \(error)" } } } @@ -2357,7 +2525,7 @@ public class TeamLog { } /// Api session. - public class ApiSessionLogInfo: CustomStringConvertible { + public class ApiSessionLogInfo: CustomStringConvertible, JSONRepresentable { /// Api request ID. public let requestId: String public init(requestId: String) { @@ -2365,11 +2533,15 @@ public class TeamLog { self.requestId = requestId } + func json() throws -> JSON { + try ApiSessionLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ApiSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ApiSessionLogInfo: \(error)" } } } @@ -2395,18 +2567,22 @@ public class TeamLog { } /// Failed to connect app for member. - public class AppBlockedByPermissionsDetails: CustomStringConvertible { + public class AppBlockedByPermissionsDetails: CustomStringConvertible, JSONRepresentable { /// Relevant application details. public let appInfo: TeamLog.AppLogInfo public init(appInfo: TeamLog.AppLogInfo) { self.appInfo = appInfo } + func json() throws -> JSON { + try AppBlockedByPermissionsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppBlockedByPermissionsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppBlockedByPermissionsDetails: \(error)" } } } @@ -2432,7 +2608,7 @@ public class TeamLog { } /// The AppBlockedByPermissionsType struct - public class AppBlockedByPermissionsType: CustomStringConvertible { + public class AppBlockedByPermissionsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2440,11 +2616,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AppBlockedByPermissionsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppBlockedByPermissionsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppBlockedByPermissionsType: \(error)" } } } @@ -2470,18 +2650,22 @@ public class TeamLog { } /// Linked app for team. - public class AppLinkTeamDetails: CustomStringConvertible { + public class AppLinkTeamDetails: CustomStringConvertible, JSONRepresentable { /// Relevant application details. public let appInfo: TeamLog.AppLogInfo public init(appInfo: TeamLog.AppLogInfo) { self.appInfo = appInfo } + func json() throws -> JSON { + try AppLinkTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppLinkTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppLinkTeamDetails: \(error)" } } } @@ -2507,7 +2691,7 @@ public class TeamLog { } /// The AppLinkTeamType struct - public class AppLinkTeamType: CustomStringConvertible { + public class AppLinkTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2515,11 +2699,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AppLinkTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppLinkTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppLinkTeamType: \(error)" } } } @@ -2545,18 +2733,22 @@ public class TeamLog { } /// Linked app for member. - public class AppLinkUserDetails: CustomStringConvertible { + public class AppLinkUserDetails: CustomStringConvertible, JSONRepresentable { /// Relevant application details. public let appInfo: TeamLog.AppLogInfo public init(appInfo: TeamLog.AppLogInfo) { self.appInfo = appInfo } + func json() throws -> JSON { + try AppLinkUserDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppLinkUserDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppLinkUserDetails: \(error)" } } } @@ -2582,7 +2774,7 @@ public class TeamLog { } /// The AppLinkUserType struct - public class AppLinkUserType: CustomStringConvertible { + public class AppLinkUserType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2590,11 +2782,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AppLinkUserTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppLinkUserTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppLinkUserType: \(error)" } } } @@ -2620,7 +2816,7 @@ public class TeamLog { } /// App's logged information. - public class AppLogInfo: CustomStringConvertible { + public class AppLogInfo: CustomStringConvertible, JSONRepresentable { /// App unique ID. public let appId: String? /// App display name. @@ -2632,11 +2828,15 @@ public class TeamLog { self.displayName = displayName } + func json() throws -> JSON { + try AppLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppLogInfo: \(error)" } } } @@ -2693,7 +2893,7 @@ public class TeamLog { } /// Changed app permissions. - public class AppPermissionsChangedDetails: CustomStringConvertible { + public class AppPermissionsChangedDetails: CustomStringConvertible, JSONRepresentable { /// Name of the app. public let appName: String? /// Permission that was changed. @@ -2715,11 +2915,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try AppPermissionsChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppPermissionsChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppPermissionsChangedDetails: \(error)" } } } @@ -2751,7 +2955,7 @@ public class TeamLog { } /// The AppPermissionsChangedType struct - public class AppPermissionsChangedType: CustomStringConvertible { + public class AppPermissionsChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2759,11 +2963,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AppPermissionsChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppPermissionsChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppPermissionsChangedType: \(error)" } } } @@ -2789,18 +2997,22 @@ public class TeamLog { } /// Unlinked app for team. - public class AppUnlinkTeamDetails: CustomStringConvertible { + public class AppUnlinkTeamDetails: CustomStringConvertible, JSONRepresentable { /// Relevant application details. public let appInfo: TeamLog.AppLogInfo public init(appInfo: TeamLog.AppLogInfo) { self.appInfo = appInfo } + func json() throws -> JSON { + try AppUnlinkTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppUnlinkTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppUnlinkTeamDetails: \(error)" } } } @@ -2826,7 +3038,7 @@ public class TeamLog { } /// The AppUnlinkTeamType struct - public class AppUnlinkTeamType: CustomStringConvertible { + public class AppUnlinkTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2834,11 +3046,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AppUnlinkTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppUnlinkTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppUnlinkTeamType: \(error)" } } } @@ -2864,18 +3080,22 @@ public class TeamLog { } /// Unlinked app for member. - public class AppUnlinkUserDetails: CustomStringConvertible { + public class AppUnlinkUserDetails: CustomStringConvertible, JSONRepresentable { /// Relevant application details. public let appInfo: TeamLog.AppLogInfo public init(appInfo: TeamLog.AppLogInfo) { self.appInfo = appInfo } + func json() throws -> JSON { + try AppUnlinkUserDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppUnlinkUserDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppUnlinkUserDetails: \(error)" } } } @@ -2901,7 +3121,7 @@ public class TeamLog { } /// The AppUnlinkUserType struct - public class AppUnlinkUserType: CustomStringConvertible { + public class AppUnlinkUserType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2909,11 +3129,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try AppUnlinkUserTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AppUnlinkUserTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AppUnlinkUserType: \(error)" } } } @@ -2939,12 +3163,16 @@ public class TeamLog { } /// Applied naming convention. - public class ApplyNamingConventionDetails: CustomStringConvertible { + public class ApplyNamingConventionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ApplyNamingConventionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ApplyNamingConventionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ApplyNamingConventionDetails: \(error)" } } } @@ -2967,7 +3195,7 @@ public class TeamLog { } /// The ApplyNamingConventionType struct - public class ApplyNamingConventionType: CustomStringConvertible { + public class ApplyNamingConventionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -2975,11 +3203,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ApplyNamingConventionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ApplyNamingConventionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ApplyNamingConventionType: \(error)" } } } @@ -3005,7 +3237,7 @@ public class TeamLog { } /// Asset details. - public enum AssetLogInfo: CustomStringConvertible { + public enum AssetLogInfo: CustomStringConvertible, JSONRepresentable { /// File's details. case file(TeamLog.FileLogInfo) /// Folder's details. @@ -3019,11 +3251,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try AssetLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AssetLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AssetLogInfo: \(error)" } } } @@ -3091,12 +3327,16 @@ public class TeamLog { } /// Invited members to activate Backup. - public class BackupAdminInvitationSentDetails: CustomStringConvertible { + public class BackupAdminInvitationSentDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try BackupAdminInvitationSentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BackupAdminInvitationSentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BackupAdminInvitationSentDetails: \(error)" } } } @@ -3119,7 +3359,7 @@ public class TeamLog { } /// The BackupAdminInvitationSentType struct - public class BackupAdminInvitationSentType: CustomStringConvertible { + public class BackupAdminInvitationSentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3127,11 +3367,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BackupAdminInvitationSentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BackupAdminInvitationSentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BackupAdminInvitationSentType: \(error)" } } } @@ -3157,12 +3401,16 @@ public class TeamLog { } /// Opened Backup invite. - public class BackupInvitationOpenedDetails: CustomStringConvertible { + public class BackupInvitationOpenedDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try BackupInvitationOpenedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BackupInvitationOpenedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BackupInvitationOpenedDetails: \(error)" } } } @@ -3185,7 +3433,7 @@ public class TeamLog { } /// The BackupInvitationOpenedType struct - public class BackupInvitationOpenedType: CustomStringConvertible { + public class BackupInvitationOpenedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3193,11 +3441,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BackupInvitationOpenedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BackupInvitationOpenedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BackupInvitationOpenedType: \(error)" } } } @@ -3223,7 +3475,7 @@ public class TeamLog { } /// Backup status - public enum BackupStatus: CustomStringConvertible { + public enum BackupStatus: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -3231,11 +3483,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try BackupStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BackupStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BackupStatus: \(error)" } } } @@ -3280,7 +3536,7 @@ public class TeamLog { } /// Added Binder page. - public class BinderAddPageDetails: CustomStringConvertible { + public class BinderAddPageDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Title of the Binder doc. @@ -3296,11 +3552,15 @@ public class TeamLog { self.binderItemName = binderItemName } + func json() throws -> JSON { + try BinderAddPageDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderAddPageDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderAddPageDetails: \(error)" } } } @@ -3330,7 +3590,7 @@ public class TeamLog { } /// The BinderAddPageType struct - public class BinderAddPageType: CustomStringConvertible { + public class BinderAddPageType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3338,11 +3598,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BinderAddPageTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderAddPageTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderAddPageType: \(error)" } } } @@ -3368,7 +3632,7 @@ public class TeamLog { } /// Added Binder section. - public class BinderAddSectionDetails: CustomStringConvertible { + public class BinderAddSectionDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Title of the Binder doc. @@ -3384,11 +3648,15 @@ public class TeamLog { self.binderItemName = binderItemName } + func json() throws -> JSON { + try BinderAddSectionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderAddSectionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderAddSectionDetails: \(error)" } } } @@ -3418,7 +3686,7 @@ public class TeamLog { } /// The BinderAddSectionType struct - public class BinderAddSectionType: CustomStringConvertible { + public class BinderAddSectionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3426,11 +3694,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BinderAddSectionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderAddSectionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderAddSectionType: \(error)" } } } @@ -3456,7 +3728,7 @@ public class TeamLog { } /// Removed Binder page. - public class BinderRemovePageDetails: CustomStringConvertible { + public class BinderRemovePageDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Title of the Binder doc. @@ -3472,11 +3744,15 @@ public class TeamLog { self.binderItemName = binderItemName } + func json() throws -> JSON { + try BinderRemovePageDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderRemovePageDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderRemovePageDetails: \(error)" } } } @@ -3506,7 +3782,7 @@ public class TeamLog { } /// The BinderRemovePageType struct - public class BinderRemovePageType: CustomStringConvertible { + public class BinderRemovePageType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3514,11 +3790,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BinderRemovePageTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderRemovePageTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderRemovePageType: \(error)" } } } @@ -3544,7 +3824,7 @@ public class TeamLog { } /// Removed Binder section. - public class BinderRemoveSectionDetails: CustomStringConvertible { + public class BinderRemoveSectionDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Title of the Binder doc. @@ -3560,11 +3840,15 @@ public class TeamLog { self.binderItemName = binderItemName } + func json() throws -> JSON { + try BinderRemoveSectionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderRemoveSectionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderRemoveSectionDetails: \(error)" } } } @@ -3594,7 +3878,7 @@ public class TeamLog { } /// The BinderRemoveSectionType struct - public class BinderRemoveSectionType: CustomStringConvertible { + public class BinderRemoveSectionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3602,11 +3886,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BinderRemoveSectionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderRemoveSectionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderRemoveSectionType: \(error)" } } } @@ -3632,7 +3920,7 @@ public class TeamLog { } /// Renamed Binder page. - public class BinderRenamePageDetails: CustomStringConvertible { + public class BinderRenamePageDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Title of the Binder doc. @@ -3652,11 +3940,15 @@ public class TeamLog { self.previousBinderItemName = previousBinderItemName } + func json() throws -> JSON { + try BinderRenamePageDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderRenamePageDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderRenamePageDetails: \(error)" } } } @@ -3693,7 +3985,7 @@ public class TeamLog { } /// The BinderRenamePageType struct - public class BinderRenamePageType: CustomStringConvertible { + public class BinderRenamePageType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3701,11 +3993,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BinderRenamePageTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderRenamePageTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderRenamePageType: \(error)" } } } @@ -3731,7 +4027,7 @@ public class TeamLog { } /// Renamed Binder section. - public class BinderRenameSectionDetails: CustomStringConvertible { + public class BinderRenameSectionDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Title of the Binder doc. @@ -3751,11 +4047,15 @@ public class TeamLog { self.previousBinderItemName = previousBinderItemName } + func json() throws -> JSON { + try BinderRenameSectionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderRenameSectionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderRenameSectionDetails: \(error)" } } } @@ -3792,7 +4092,7 @@ public class TeamLog { } /// The BinderRenameSectionType struct - public class BinderRenameSectionType: CustomStringConvertible { + public class BinderRenameSectionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3800,11 +4100,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BinderRenameSectionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderRenameSectionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderRenameSectionType: \(error)" } } } @@ -3830,7 +4134,7 @@ public class TeamLog { } /// Reordered Binder page. - public class BinderReorderPageDetails: CustomStringConvertible { + public class BinderReorderPageDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Title of the Binder doc. @@ -3846,11 +4150,15 @@ public class TeamLog { self.binderItemName = binderItemName } + func json() throws -> JSON { + try BinderReorderPageDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderReorderPageDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderReorderPageDetails: \(error)" } } } @@ -3880,7 +4188,7 @@ public class TeamLog { } /// The BinderReorderPageType struct - public class BinderReorderPageType: CustomStringConvertible { + public class BinderReorderPageType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3888,11 +4196,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BinderReorderPageTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderReorderPageTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderReorderPageType: \(error)" } } } @@ -3918,7 +4230,7 @@ public class TeamLog { } /// Reordered Binder section. - public class BinderReorderSectionDetails: CustomStringConvertible { + public class BinderReorderSectionDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Title of the Binder doc. @@ -3934,11 +4246,15 @@ public class TeamLog { self.binderItemName = binderItemName } + func json() throws -> JSON { + try BinderReorderSectionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderReorderSectionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderReorderSectionDetails: \(error)" } } } @@ -3968,7 +4284,7 @@ public class TeamLog { } /// The BinderReorderSectionType struct - public class BinderReorderSectionType: CustomStringConvertible { + public class BinderReorderSectionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -3976,11 +4292,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try BinderReorderSectionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try BinderReorderSectionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BinderReorderSectionType: \(error)" } } } @@ -4006,7 +4326,7 @@ public class TeamLog { } /// Policy for controlling if team members can activate camera uploads - public enum CameraUploadsPolicy: CustomStringConvertible { + public enum CameraUploadsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -4014,11 +4334,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try CameraUploadsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CameraUploadsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CameraUploadsPolicy: \(error)" } } } @@ -4063,7 +4387,7 @@ public class TeamLog { } /// Changed camera uploads setting for team. - public class CameraUploadsPolicyChangedDetails: CustomStringConvertible { + public class CameraUploadsPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New camera uploads setting. public let newValue: TeamLog.CameraUploadsPolicy /// Previous camera uploads setting. @@ -4073,11 +4397,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try CameraUploadsPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CameraUploadsPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CameraUploadsPolicyChangedDetails: \(error)" } } } @@ -4105,7 +4433,7 @@ public class TeamLog { } /// The CameraUploadsPolicyChangedType struct - public class CameraUploadsPolicyChangedType: CustomStringConvertible { + public class CameraUploadsPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -4113,11 +4441,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try CameraUploadsPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CameraUploadsPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CameraUploadsPolicyChangedType: \(error)" } } } @@ -4143,7 +4475,7 @@ public class TeamLog { } /// Policy for deciding whether team users can transcription in Capture - public enum CaptureTranscriptPolicy: CustomStringConvertible { + public enum CaptureTranscriptPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case default_ /// An unspecified error. @@ -4153,11 +4485,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try CaptureTranscriptPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CaptureTranscriptPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CaptureTranscriptPolicy: \(error)" } } } @@ -4208,7 +4544,7 @@ public class TeamLog { } /// Changed Capture transcription policy for team. - public class CaptureTranscriptPolicyChangedDetails: CustomStringConvertible { + public class CaptureTranscriptPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.CaptureTranscriptPolicy /// From. @@ -4218,11 +4554,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try CaptureTranscriptPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CaptureTranscriptPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CaptureTranscriptPolicyChangedDetails: \(error)" } } } @@ -4250,7 +4590,7 @@ public class TeamLog { } /// The CaptureTranscriptPolicyChangedType struct - public class CaptureTranscriptPolicyChangedType: CustomStringConvertible { + public class CaptureTranscriptPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -4258,11 +4598,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try CaptureTranscriptPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CaptureTranscriptPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CaptureTranscriptPolicyChangedType: \(error)" } } } @@ -4288,7 +4632,7 @@ public class TeamLog { } /// Certificate details. - public class Certificate: CustomStringConvertible { + public class Certificate: CustomStringConvertible, JSONRepresentable { /// Certificate subject. public let subject: String /// Certificate issuer. @@ -4328,11 +4672,15 @@ public class TeamLog { self.commonName = commonName } + func json() throws -> JSON { + try CertificateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CertificateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Certificate: \(error)" } } } @@ -4379,7 +4727,7 @@ public class TeamLog { /// Policy for deciding whether the team's default expiration days policy must be enforced when an externally shared /// link is updated - public enum ChangeLinkExpirationPolicy: CustomStringConvertible { + public enum ChangeLinkExpirationPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case allowed /// An unspecified error. @@ -4387,11 +4735,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ChangeLinkExpirationPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ChangeLinkExpirationPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ChangeLinkExpirationPolicy: \(error)" } } } @@ -4436,7 +4788,7 @@ public class TeamLog { } /// Changed enterprise admin role. - public class ChangedEnterpriseAdminRoleDetails: CustomStringConvertible { + public class ChangedEnterpriseAdminRoleDetails: CustomStringConvertible, JSONRepresentable { /// The member’s previous enterprise admin role. public let previousValue: TeamLog.FedAdminRole /// The member’s new enterprise admin role. @@ -4450,11 +4802,15 @@ public class TeamLog { self.teamName = teamName } + func json() throws -> JSON { + try ChangedEnterpriseAdminRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ChangedEnterpriseAdminRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ChangedEnterpriseAdminRoleDetails: \(error)" } } } @@ -4484,7 +4840,7 @@ public class TeamLog { } /// The ChangedEnterpriseAdminRoleType struct - public class ChangedEnterpriseAdminRoleType: CustomStringConvertible { + public class ChangedEnterpriseAdminRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -4492,11 +4848,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ChangedEnterpriseAdminRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ChangedEnterpriseAdminRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ChangedEnterpriseAdminRoleType: \(error)" } } } @@ -4522,7 +4882,7 @@ public class TeamLog { } /// Changed enterprise-connected team status. - public class ChangedEnterpriseConnectedTeamStatusDetails: CustomStringConvertible { + public class ChangedEnterpriseConnectedTeamStatusDetails: CustomStringConvertible, JSONRepresentable { /// The preformed change in the team’s connection status. public let action: TeamLog.FedHandshakeAction /// Additional information about the organization or team. @@ -4543,11 +4903,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try ChangedEnterpriseConnectedTeamStatusDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ChangedEnterpriseConnectedTeamStatusDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ChangedEnterpriseConnectedTeamStatusDetails: \(error)" } } } @@ -4584,7 +4948,7 @@ public class TeamLog { } /// The ChangedEnterpriseConnectedTeamStatusType struct - public class ChangedEnterpriseConnectedTeamStatusType: CustomStringConvertible { + public class ChangedEnterpriseConnectedTeamStatusType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -4592,11 +4956,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ChangedEnterpriseConnectedTeamStatusTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ChangedEnterpriseConnectedTeamStatusTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ChangedEnterpriseConnectedTeamStatusType: \(error)" } } } @@ -4622,7 +4990,7 @@ public class TeamLog { } /// Changed classification policy for team. - public class ClassificationChangePolicyDetails: CustomStringConvertible { + public class ClassificationChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// Previous classification policy. public let previousValue: TeamLog.ClassificationPolicyEnumWrapper /// New classification policy. @@ -4639,11 +5007,15 @@ public class TeamLog { self.classificationType = classificationType } + func json() throws -> JSON { + try ClassificationChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ClassificationChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ClassificationChangePolicyDetails: \(error)" } } } @@ -4673,7 +5045,7 @@ public class TeamLog { } /// The ClassificationChangePolicyType struct - public class ClassificationChangePolicyType: CustomStringConvertible { + public class ClassificationChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -4681,11 +5053,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ClassificationChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ClassificationChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ClassificationChangePolicyType: \(error)" } } } @@ -4711,12 +5087,16 @@ public class TeamLog { } /// Created Classification report. - public class ClassificationCreateReportDetails: CustomStringConvertible { + public class ClassificationCreateReportDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ClassificationCreateReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ClassificationCreateReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ClassificationCreateReportDetails: \(error)" } } } @@ -4739,18 +5119,22 @@ public class TeamLog { } /// Couldn't create Classification report. - public class ClassificationCreateReportFailDetails: CustomStringConvertible { + public class ClassificationCreateReportFailDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try ClassificationCreateReportFailDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ClassificationCreateReportFailDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ClassificationCreateReportFailDetails: \(error)" } } } @@ -4776,7 +5160,7 @@ public class TeamLog { } /// The ClassificationCreateReportFailType struct - public class ClassificationCreateReportFailType: CustomStringConvertible { + public class ClassificationCreateReportFailType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -4784,11 +5168,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ClassificationCreateReportFailTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ClassificationCreateReportFailTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ClassificationCreateReportFailType: \(error)" } } } @@ -4814,7 +5202,7 @@ public class TeamLog { } /// The ClassificationCreateReportType struct - public class ClassificationCreateReportType: CustomStringConvertible { + public class ClassificationCreateReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -4822,11 +5210,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ClassificationCreateReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ClassificationCreateReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ClassificationCreateReportType: \(error)" } } } @@ -4852,7 +5244,7 @@ public class TeamLog { } /// Policy for controlling team access to the classification feature - public enum ClassificationPolicyEnumWrapper: CustomStringConvertible { + public enum ClassificationPolicyEnumWrapper: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -4864,11 +5256,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ClassificationPolicyEnumWrapperSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ClassificationPolicyEnumWrapperSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ClassificationPolicyEnumWrapper: \(error)" } } } @@ -4925,7 +5321,7 @@ public class TeamLog { } /// The type of classification (currently only personal information) - public enum ClassificationType: CustomStringConvertible { + public enum ClassificationType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case personalInformation /// An unspecified error. @@ -4933,11 +5329,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ClassificationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ClassificationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ClassificationType: \(error)" } } } @@ -4982,7 +5382,7 @@ public class TeamLog { } /// Shared album. - public class CollectionShareDetails: CustomStringConvertible { + public class CollectionShareDetails: CustomStringConvertible, JSONRepresentable { /// Album name. public let albumName: String public init(albumName: String) { @@ -4990,11 +5390,15 @@ public class TeamLog { self.albumName = albumName } + func json() throws -> JSON { + try CollectionShareDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CollectionShareDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CollectionShareDetails: \(error)" } } } @@ -5020,7 +5424,7 @@ public class TeamLog { } /// The CollectionShareType struct - public class CollectionShareType: CustomStringConvertible { + public class CollectionShareType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5028,11 +5432,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try CollectionShareTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CollectionShareTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CollectionShareType: \(error)" } } } @@ -5058,7 +5466,7 @@ public class TeamLog { } /// Policy for controlling team access to computer backup feature - public enum ComputerBackupPolicy: CustomStringConvertible { + public enum ComputerBackupPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case default_ /// An unspecified error. @@ -5068,11 +5476,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ComputerBackupPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ComputerBackupPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ComputerBackupPolicy: \(error)" } } } @@ -5123,7 +5535,7 @@ public class TeamLog { } /// Changed computer backup policy for team. - public class ComputerBackupPolicyChangedDetails: CustomStringConvertible { + public class ComputerBackupPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New computer backup policy. public let newValue: TeamLog.ComputerBackupPolicy /// Previous computer backup policy. @@ -5133,11 +5545,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try ComputerBackupPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ComputerBackupPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ComputerBackupPolicyChangedDetails: \(error)" } } } @@ -5165,7 +5581,7 @@ public class TeamLog { } /// The ComputerBackupPolicyChangedType struct - public class ComputerBackupPolicyChangedType: CustomStringConvertible { + public class ComputerBackupPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5173,11 +5589,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ComputerBackupPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ComputerBackupPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ComputerBackupPolicyChangedType: \(error)" } } } @@ -5203,7 +5623,7 @@ public class TeamLog { } /// The name of the team - public class ConnectedTeamName: CustomStringConvertible { + public class ConnectedTeamName: CustomStringConvertible, JSONRepresentable { /// The name of the team. public let team: String public init(team: String) { @@ -5211,11 +5631,15 @@ public class TeamLog { self.team = team } + func json() throws -> JSON { + try ConnectedTeamNameSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ConnectedTeamNameSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ConnectedTeamName: \(error)" } } } @@ -5241,7 +5665,7 @@ public class TeamLog { } /// Changed content management setting. - public class ContentAdministrationPolicyChangedDetails: CustomStringConvertible { + public class ContentAdministrationPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New content administration policy. public let newValue: String /// Previous content administration policy. @@ -5253,11 +5677,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try ContentAdministrationPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ContentAdministrationPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ContentAdministrationPolicyChangedDetails: \(error)" } } } @@ -5285,7 +5713,7 @@ public class TeamLog { } /// The ContentAdministrationPolicyChangedType struct - public class ContentAdministrationPolicyChangedType: CustomStringConvertible { + public class ContentAdministrationPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5293,11 +5721,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ContentAdministrationPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ContentAdministrationPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ContentAdministrationPolicyChangedType: \(error)" } } } @@ -5323,7 +5755,7 @@ public class TeamLog { } /// Policy for pemanent content deletion - public enum ContentPermanentDeletePolicy: CustomStringConvertible { + public enum ContentPermanentDeletePolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -5331,11 +5763,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ContentPermanentDeletePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ContentPermanentDeletePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ContentPermanentDeletePolicy: \(error)" } } } @@ -5380,7 +5816,7 @@ public class TeamLog { } /// The primary entity on which the action was done. - public enum ContextLogInfo: CustomStringConvertible { + public enum ContextLogInfo: CustomStringConvertible, JSONRepresentable { /// Anonymous context. case anonymous /// Action was done on behalf of a non team member. @@ -5396,11 +5832,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ContextLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ContextLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ContextLogInfo: \(error)" } } } @@ -5473,12 +5913,16 @@ public class TeamLog { } /// Created folders. - public class CreateFolderDetails: CustomStringConvertible { + public class CreateFolderDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try CreateFolderDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderDetails: \(error)" } } } @@ -5501,7 +5945,7 @@ public class TeamLog { } /// The CreateFolderType struct - public class CreateFolderType: CustomStringConvertible { + public class CreateFolderType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5509,11 +5953,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try CreateFolderTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateFolderTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateFolderType: \(error)" } } } @@ -5539,7 +5987,7 @@ public class TeamLog { } /// Created team invite link. - public class CreateTeamInviteLinkDetails: CustomStringConvertible { + public class CreateTeamInviteLinkDetails: CustomStringConvertible, JSONRepresentable { /// The invite link url that was created. public let linkUrl: String /// The expiration date of the invite link. @@ -5551,11 +5999,15 @@ public class TeamLog { self.expiryDate = expiryDate } + func json() throws -> JSON { + try CreateTeamInviteLinkDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateTeamInviteLinkDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateTeamInviteLinkDetails: \(error)" } } } @@ -5583,7 +6035,7 @@ public class TeamLog { } /// The CreateTeamInviteLinkType struct - public class CreateTeamInviteLinkType: CustomStringConvertible { + public class CreateTeamInviteLinkType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5591,11 +6043,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try CreateTeamInviteLinkTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CreateTeamInviteLinkTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CreateTeamInviteLinkType: \(error)" } } } @@ -5621,7 +6077,7 @@ public class TeamLog { } /// Set restrictions on data center locations where team data resides. - public class DataPlacementRestrictionChangePolicyDetails: CustomStringConvertible { + public class DataPlacementRestrictionChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// Previous placement restriction. public let previousValue: TeamLog.PlacementRestriction /// New placement restriction. @@ -5631,11 +6087,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try DataPlacementRestrictionChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DataPlacementRestrictionChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DataPlacementRestrictionChangePolicyDetails: \(error)" } } } @@ -5663,7 +6123,7 @@ public class TeamLog { } /// The DataPlacementRestrictionChangePolicyType struct - public class DataPlacementRestrictionChangePolicyType: CustomStringConvertible { + public class DataPlacementRestrictionChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5671,11 +6131,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DataPlacementRestrictionChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DataPlacementRestrictionChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DataPlacementRestrictionChangePolicyType: \(error)" } } } @@ -5701,18 +6165,22 @@ public class TeamLog { } /// Completed restrictions on data center locations where team data resides. - public class DataPlacementRestrictionSatisfyPolicyDetails: CustomStringConvertible { + public class DataPlacementRestrictionSatisfyPolicyDetails: CustomStringConvertible, JSONRepresentable { /// Placement restriction. public let placementRestriction: TeamLog.PlacementRestriction public init(placementRestriction: TeamLog.PlacementRestriction) { self.placementRestriction = placementRestriction } + func json() throws -> JSON { + try DataPlacementRestrictionSatisfyPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DataPlacementRestrictionSatisfyPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DataPlacementRestrictionSatisfyPolicyDetails: \(error)" } } } @@ -5738,7 +6206,7 @@ public class TeamLog { } /// The DataPlacementRestrictionSatisfyPolicyType struct - public class DataPlacementRestrictionSatisfyPolicyType: CustomStringConvertible { + public class DataPlacementRestrictionSatisfyPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5746,11 +6214,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DataPlacementRestrictionSatisfyPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DataPlacementRestrictionSatisfyPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DataPlacementRestrictionSatisfyPolicyType: \(error)" } } } @@ -5776,12 +6248,16 @@ public class TeamLog { } /// Requested data residency migration for team data. - public class DataResidencyMigrationRequestSuccessfulDetails: CustomStringConvertible { + public class DataResidencyMigrationRequestSuccessfulDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DataResidencyMigrationRequestSuccessfulDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DataResidencyMigrationRequestSuccessfulDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DataResidencyMigrationRequestSuccessfulDetails: \(error)" } } } @@ -5804,7 +6280,7 @@ public class TeamLog { } /// The DataResidencyMigrationRequestSuccessfulType struct - public class DataResidencyMigrationRequestSuccessfulType: CustomStringConvertible { + public class DataResidencyMigrationRequestSuccessfulType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5812,11 +6288,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DataResidencyMigrationRequestSuccessfulTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DataResidencyMigrationRequestSuccessfulTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DataResidencyMigrationRequestSuccessfulType: \(error)" } } } @@ -5842,12 +6322,16 @@ public class TeamLog { } /// Request for data residency migration for team data has failed. - public class DataResidencyMigrationRequestUnsuccessfulDetails: CustomStringConvertible { + public class DataResidencyMigrationRequestUnsuccessfulDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DataResidencyMigrationRequestUnsuccessfulDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DataResidencyMigrationRequestUnsuccessfulDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DataResidencyMigrationRequestUnsuccessfulDetails: \(error)" } } } @@ -5870,7 +6354,7 @@ public class TeamLog { } /// The DataResidencyMigrationRequestUnsuccessfulType struct - public class DataResidencyMigrationRequestUnsuccessfulType: CustomStringConvertible { + public class DataResidencyMigrationRequestUnsuccessfulType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -5878,11 +6362,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DataResidencyMigrationRequestUnsuccessfulTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DataResidencyMigrationRequestUnsuccessfulTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DataResidencyMigrationRequestUnsuccessfulType: \(error)" } } } @@ -5908,7 +6396,7 @@ public class TeamLog { } /// Policy for the default number of days until an externally shared link expires - public enum DefaultLinkExpirationDaysPolicy: CustomStringConvertible { + public enum DefaultLinkExpirationDaysPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case day1 /// An unspecified error. @@ -5928,11 +6416,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try DefaultLinkExpirationDaysPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DefaultLinkExpirationDaysPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DefaultLinkExpirationDaysPolicy: \(error)" } } } @@ -6013,7 +6505,7 @@ public class TeamLog { } /// Deleted team invite link. - public class DeleteTeamInviteLinkDetails: CustomStringConvertible { + public class DeleteTeamInviteLinkDetails: CustomStringConvertible, JSONRepresentable { /// The invite link url that was deleted. public let linkUrl: String public init(linkUrl: String) { @@ -6021,11 +6513,15 @@ public class TeamLog { self.linkUrl = linkUrl } + func json() throws -> JSON { + try DeleteTeamInviteLinkDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteTeamInviteLinkDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteTeamInviteLinkDetails: \(error)" } } } @@ -6051,7 +6547,7 @@ public class TeamLog { } /// The DeleteTeamInviteLinkType struct - public class DeleteTeamInviteLinkType: CustomStringConvertible { + public class DeleteTeamInviteLinkType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6059,11 +6555,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeleteTeamInviteLinkTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeleteTeamInviteLinkTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeleteTeamInviteLinkType: \(error)" } } } @@ -6089,7 +6589,7 @@ public class TeamLog { } /// Device's session logged information. - public class DeviceSessionLogInfo: CustomStringConvertible { + public class DeviceSessionLogInfo: CustomStringConvertible, JSONRepresentable { /// The IP address of the last activity from this session. public let ipAddress: String? /// The time this session was created. @@ -6103,11 +6603,15 @@ public class TeamLog { self.updated = updated } + func json() throws -> JSON { + try DeviceSessionLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceSessionLogInfo: \(error)" } } } @@ -6213,7 +6717,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try DesktopDeviceSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DesktopDeviceSessionLogInfo: \(error)" } } } @@ -6265,7 +6769,7 @@ public class TeamLog { } /// Session's logged information. - public class SessionLogInfo: CustomStringConvertible { + public class SessionLogInfo: CustomStringConvertible, JSONRepresentable { /// Session ID. public let sessionId: String? public init(sessionId: String? = nil) { @@ -6273,11 +6777,15 @@ public class TeamLog { self.sessionId = sessionId } + func json() throws -> JSON { + try SessionLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SessionLogInfo: \(error)" } } } @@ -6337,7 +6845,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try DesktopSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DesktopSessionLogInfo: \(error)" } } } @@ -6363,12 +6871,16 @@ public class TeamLog { } /// Added members to device approvals exception list. - public class DeviceApprovalsAddExceptionDetails: CustomStringConvertible { + public class DeviceApprovalsAddExceptionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DeviceApprovalsAddExceptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsAddExceptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsAddExceptionDetails: \(error)" } } } @@ -6391,7 +6903,7 @@ public class TeamLog { } /// The DeviceApprovalsAddExceptionType struct - public class DeviceApprovalsAddExceptionType: CustomStringConvertible { + public class DeviceApprovalsAddExceptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6399,11 +6911,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceApprovalsAddExceptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsAddExceptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsAddExceptionType: \(error)" } } } @@ -6429,7 +6945,7 @@ public class TeamLog { } /// Set/removed limit on number of computers member can link to team Dropbox account. - public class DeviceApprovalsChangeDesktopPolicyDetails: CustomStringConvertible { + public class DeviceApprovalsChangeDesktopPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New desktop device approvals policy. Might be missing due to historical data gap. public let newValue: TeamLog.DeviceApprovalsPolicy? /// Previous desktop device approvals policy. Might be missing due to historical data gap. @@ -6439,11 +6955,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try DeviceApprovalsChangeDesktopPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsChangeDesktopPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsChangeDesktopPolicyDetails: \(error)" } } } @@ -6471,7 +6991,7 @@ public class TeamLog { } /// The DeviceApprovalsChangeDesktopPolicyType struct - public class DeviceApprovalsChangeDesktopPolicyType: CustomStringConvertible { + public class DeviceApprovalsChangeDesktopPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6479,11 +6999,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceApprovalsChangeDesktopPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsChangeDesktopPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsChangeDesktopPolicyType: \(error)" } } } @@ -6509,7 +7033,7 @@ public class TeamLog { } /// Set/removed limit on number of mobile devices member can link to team Dropbox account. - public class DeviceApprovalsChangeMobilePolicyDetails: CustomStringConvertible { + public class DeviceApprovalsChangeMobilePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New mobile device approvals policy. Might be missing due to historical data gap. public let newValue: TeamLog.DeviceApprovalsPolicy? /// Previous mobile device approvals policy. Might be missing due to historical data gap. @@ -6519,11 +7043,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try DeviceApprovalsChangeMobilePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsChangeMobilePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsChangeMobilePolicyDetails: \(error)" } } } @@ -6551,7 +7079,7 @@ public class TeamLog { } /// The DeviceApprovalsChangeMobilePolicyType struct - public class DeviceApprovalsChangeMobilePolicyType: CustomStringConvertible { + public class DeviceApprovalsChangeMobilePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6559,11 +7087,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceApprovalsChangeMobilePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsChangeMobilePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsChangeMobilePolicyType: \(error)" } } } @@ -6589,7 +7121,7 @@ public class TeamLog { } /// Changed device approvals setting when member is over limit. - public class DeviceApprovalsChangeOverageActionDetails: CustomStringConvertible { + public class DeviceApprovalsChangeOverageActionDetails: CustomStringConvertible, JSONRepresentable { /// New over the limits policy. Might be missing due to historical data gap. public let newValue: TeamPolicies.RolloutMethod? /// Previous over the limit policy. Might be missing due to historical data gap. @@ -6599,11 +7131,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try DeviceApprovalsChangeOverageActionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsChangeOverageActionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsChangeOverageActionDetails: \(error)" } } } @@ -6631,7 +7167,7 @@ public class TeamLog { } /// The DeviceApprovalsChangeOverageActionType struct - public class DeviceApprovalsChangeOverageActionType: CustomStringConvertible { + public class DeviceApprovalsChangeOverageActionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6639,11 +7175,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceApprovalsChangeOverageActionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsChangeOverageActionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsChangeOverageActionType: \(error)" } } } @@ -6669,7 +7209,7 @@ public class TeamLog { } /// Changed device approvals setting when member unlinks approved device. - public class DeviceApprovalsChangeUnlinkActionDetails: CustomStringConvertible { + public class DeviceApprovalsChangeUnlinkActionDetails: CustomStringConvertible, JSONRepresentable { /// New device unlink policy. Might be missing due to historical data gap. public let newValue: TeamLog.DeviceUnlinkPolicy? /// Previous device unlink policy. Might be missing due to historical data gap. @@ -6679,11 +7219,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try DeviceApprovalsChangeUnlinkActionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsChangeUnlinkActionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsChangeUnlinkActionDetails: \(error)" } } } @@ -6711,7 +7255,7 @@ public class TeamLog { } /// The DeviceApprovalsChangeUnlinkActionType struct - public class DeviceApprovalsChangeUnlinkActionType: CustomStringConvertible { + public class DeviceApprovalsChangeUnlinkActionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6719,11 +7263,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceApprovalsChangeUnlinkActionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsChangeUnlinkActionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsChangeUnlinkActionType: \(error)" } } } @@ -6749,7 +7297,7 @@ public class TeamLog { } /// The DeviceApprovalsPolicy union - public enum DeviceApprovalsPolicy: CustomStringConvertible { + public enum DeviceApprovalsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case limited /// An unspecified error. @@ -6757,11 +7305,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try DeviceApprovalsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsPolicy: \(error)" } } } @@ -6806,12 +7358,16 @@ public class TeamLog { } /// Removed members from device approvals exception list. - public class DeviceApprovalsRemoveExceptionDetails: CustomStringConvertible { + public class DeviceApprovalsRemoveExceptionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DeviceApprovalsRemoveExceptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsRemoveExceptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsRemoveExceptionDetails: \(error)" } } } @@ -6834,7 +7390,7 @@ public class TeamLog { } /// The DeviceApprovalsRemoveExceptionType struct - public class DeviceApprovalsRemoveExceptionType: CustomStringConvertible { + public class DeviceApprovalsRemoveExceptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6842,11 +7398,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceApprovalsRemoveExceptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceApprovalsRemoveExceptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceApprovalsRemoveExceptionType: \(error)" } } } @@ -6872,18 +7432,22 @@ public class TeamLog { } /// Changed IP address associated with active desktop session. - public class DeviceChangeIpDesktopDetails: CustomStringConvertible { + public class DeviceChangeIpDesktopDetails: CustomStringConvertible, JSONRepresentable { /// Device's session logged information. public let deviceSessionInfo: TeamLog.DeviceSessionLogInfo public init(deviceSessionInfo: TeamLog.DeviceSessionLogInfo) { self.deviceSessionInfo = deviceSessionInfo } + func json() throws -> JSON { + try DeviceChangeIpDesktopDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceChangeIpDesktopDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceChangeIpDesktopDetails: \(error)" } } } @@ -6909,7 +7473,7 @@ public class TeamLog { } /// The DeviceChangeIpDesktopType struct - public class DeviceChangeIpDesktopType: CustomStringConvertible { + public class DeviceChangeIpDesktopType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6917,11 +7481,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceChangeIpDesktopTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceChangeIpDesktopTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceChangeIpDesktopType: \(error)" } } } @@ -6947,18 +7515,22 @@ public class TeamLog { } /// Changed IP address associated with active mobile session. - public class DeviceChangeIpMobileDetails: CustomStringConvertible { + public class DeviceChangeIpMobileDetails: CustomStringConvertible, JSONRepresentable { /// Device's session logged information. public let deviceSessionInfo: TeamLog.DeviceSessionLogInfo? public init(deviceSessionInfo: TeamLog.DeviceSessionLogInfo? = nil) { self.deviceSessionInfo = deviceSessionInfo } + func json() throws -> JSON { + try DeviceChangeIpMobileDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceChangeIpMobileDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceChangeIpMobileDetails: \(error)" } } } @@ -6984,7 +7556,7 @@ public class TeamLog { } /// The DeviceChangeIpMobileType struct - public class DeviceChangeIpMobileType: CustomStringConvertible { + public class DeviceChangeIpMobileType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -6992,11 +7564,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceChangeIpMobileTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceChangeIpMobileTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceChangeIpMobileType: \(error)" } } } @@ -7022,7 +7598,7 @@ public class TeamLog { } /// Changed IP address associated with active web session. - public class DeviceChangeIpWebDetails: CustomStringConvertible { + public class DeviceChangeIpWebDetails: CustomStringConvertible, JSONRepresentable { /// Web browser name. public let userAgent: String public init(userAgent: String) { @@ -7030,11 +7606,15 @@ public class TeamLog { self.userAgent = userAgent } + func json() throws -> JSON { + try DeviceChangeIpWebDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceChangeIpWebDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceChangeIpWebDetails: \(error)" } } } @@ -7060,7 +7640,7 @@ public class TeamLog { } /// The DeviceChangeIpWebType struct - public class DeviceChangeIpWebType: CustomStringConvertible { + public class DeviceChangeIpWebType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7068,11 +7648,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceChangeIpWebTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceChangeIpWebTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceChangeIpWebType: \(error)" } } } @@ -7098,7 +7682,7 @@ public class TeamLog { } /// Failed to delete all files from unlinked device. - public class DeviceDeleteOnUnlinkFailDetails: CustomStringConvertible { + public class DeviceDeleteOnUnlinkFailDetails: CustomStringConvertible, JSONRepresentable { /// Session unique id. public let sessionInfo: TeamLog.SessionLogInfo? /// The device name. Might be missing due to historical data gap. @@ -7113,11 +7697,15 @@ public class TeamLog { self.numFailures = numFailures } + func json() throws -> JSON { + try DeviceDeleteOnUnlinkFailDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceDeleteOnUnlinkFailDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceDeleteOnUnlinkFailDetails: \(error)" } } } @@ -7147,7 +7735,7 @@ public class TeamLog { } /// The DeviceDeleteOnUnlinkFailType struct - public class DeviceDeleteOnUnlinkFailType: CustomStringConvertible { + public class DeviceDeleteOnUnlinkFailType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7155,11 +7743,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceDeleteOnUnlinkFailTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceDeleteOnUnlinkFailTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceDeleteOnUnlinkFailType: \(error)" } } } @@ -7185,7 +7777,7 @@ public class TeamLog { } /// Deleted all files from unlinked device. - public class DeviceDeleteOnUnlinkSuccessDetails: CustomStringConvertible { + public class DeviceDeleteOnUnlinkSuccessDetails: CustomStringConvertible, JSONRepresentable { /// Session unique id. public let sessionInfo: TeamLog.SessionLogInfo? /// The device name. Might be missing due to historical data gap. @@ -7196,11 +7788,15 @@ public class TeamLog { self.displayName = displayName } + func json() throws -> JSON { + try DeviceDeleteOnUnlinkSuccessDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceDeleteOnUnlinkSuccessDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceDeleteOnUnlinkSuccessDetails: \(error)" } } } @@ -7228,7 +7824,7 @@ public class TeamLog { } /// The DeviceDeleteOnUnlinkSuccessType struct - public class DeviceDeleteOnUnlinkSuccessType: CustomStringConvertible { + public class DeviceDeleteOnUnlinkSuccessType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7236,11 +7832,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceDeleteOnUnlinkSuccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceDeleteOnUnlinkSuccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceDeleteOnUnlinkSuccessType: \(error)" } } } @@ -7266,7 +7866,7 @@ public class TeamLog { } /// Failed to link device. - public class DeviceLinkFailDetails: CustomStringConvertible { + public class DeviceLinkFailDetails: CustomStringConvertible, JSONRepresentable { /// IP address. Might be missing due to historical data gap. public let ipAddress: String? /// A description of the device used while user approval blocked. @@ -7277,11 +7877,15 @@ public class TeamLog { self.deviceType = deviceType } + func json() throws -> JSON { + try DeviceLinkFailDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceLinkFailDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceLinkFailDetails: \(error)" } } } @@ -7309,7 +7913,7 @@ public class TeamLog { } /// The DeviceLinkFailType struct - public class DeviceLinkFailType: CustomStringConvertible { + public class DeviceLinkFailType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7317,11 +7921,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceLinkFailTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceLinkFailTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceLinkFailType: \(error)" } } } @@ -7347,18 +7955,22 @@ public class TeamLog { } /// Linked device. - public class DeviceLinkSuccessDetails: CustomStringConvertible { + public class DeviceLinkSuccessDetails: CustomStringConvertible, JSONRepresentable { /// Device's session logged information. public let deviceSessionInfo: TeamLog.DeviceSessionLogInfo? public init(deviceSessionInfo: TeamLog.DeviceSessionLogInfo? = nil) { self.deviceSessionInfo = deviceSessionInfo } + func json() throws -> JSON { + try DeviceLinkSuccessDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceLinkSuccessDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceLinkSuccessDetails: \(error)" } } } @@ -7384,7 +7996,7 @@ public class TeamLog { } /// The DeviceLinkSuccessType struct - public class DeviceLinkSuccessType: CustomStringConvertible { + public class DeviceLinkSuccessType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7392,11 +8004,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceLinkSuccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceLinkSuccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceLinkSuccessType: \(error)" } } } @@ -7422,12 +8038,16 @@ public class TeamLog { } /// Disabled device management. - public class DeviceManagementDisabledDetails: CustomStringConvertible { + public class DeviceManagementDisabledDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DeviceManagementDisabledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceManagementDisabledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceManagementDisabledDetails: \(error)" } } } @@ -7450,7 +8070,7 @@ public class TeamLog { } /// The DeviceManagementDisabledType struct - public class DeviceManagementDisabledType: CustomStringConvertible { + public class DeviceManagementDisabledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7458,11 +8078,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceManagementDisabledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceManagementDisabledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceManagementDisabledType: \(error)" } } } @@ -7488,12 +8112,16 @@ public class TeamLog { } /// Enabled device management. - public class DeviceManagementEnabledDetails: CustomStringConvertible { + public class DeviceManagementEnabledDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DeviceManagementEnabledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceManagementEnabledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceManagementEnabledDetails: \(error)" } } } @@ -7516,7 +8144,7 @@ public class TeamLog { } /// The DeviceManagementEnabledType struct - public class DeviceManagementEnabledType: CustomStringConvertible { + public class DeviceManagementEnabledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7524,11 +8152,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceManagementEnabledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceManagementEnabledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceManagementEnabledType: \(error)" } } } @@ -7554,7 +8186,7 @@ public class TeamLog { } /// Enabled/disabled backup for computer. - public class DeviceSyncBackupStatusChangedDetails: CustomStringConvertible { + public class DeviceSyncBackupStatusChangedDetails: CustomStringConvertible, JSONRepresentable { /// Device's session logged information. public let desktopDeviceSessionInfo: TeamLog.DesktopDeviceSessionLogInfo /// Previous status of computer backup on the device. @@ -7567,11 +8199,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try DeviceSyncBackupStatusChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceSyncBackupStatusChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceSyncBackupStatusChangedDetails: \(error)" } } } @@ -7605,7 +8241,7 @@ public class TeamLog { } /// The DeviceSyncBackupStatusChangedType struct - public class DeviceSyncBackupStatusChangedType: CustomStringConvertible { + public class DeviceSyncBackupStatusChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7613,11 +8249,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceSyncBackupStatusChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceSyncBackupStatusChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceSyncBackupStatusChangedType: \(error)" } } } @@ -7643,7 +8283,7 @@ public class TeamLog { } /// The DeviceType union - public enum DeviceType: CustomStringConvertible { + public enum DeviceType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case desktop /// An unspecified error. @@ -7651,11 +8291,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try DeviceTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceType: \(error)" } } } @@ -7700,7 +8344,7 @@ public class TeamLog { } /// Disconnected device. - public class DeviceUnlinkDetails: CustomStringConvertible { + public class DeviceUnlinkDetails: CustomStringConvertible, JSONRepresentable { /// Session unique id. public let sessionInfo: TeamLog.SessionLogInfo? /// The device name. Might be missing due to historical data gap. @@ -7714,11 +8358,15 @@ public class TeamLog { self.deleteData = deleteData } + func json() throws -> JSON { + try DeviceUnlinkDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceUnlinkDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceUnlinkDetails: \(error)" } } } @@ -7748,7 +8396,7 @@ public class TeamLog { } /// The DeviceUnlinkPolicy union - public enum DeviceUnlinkPolicy: CustomStringConvertible { + public enum DeviceUnlinkPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case keep /// An unspecified error. @@ -7756,11 +8404,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try DeviceUnlinkPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceUnlinkPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceUnlinkPolicy: \(error)" } } } @@ -7805,7 +8457,7 @@ public class TeamLog { } /// The DeviceUnlinkType struct - public class DeviceUnlinkType: CustomStringConvertible { + public class DeviceUnlinkType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7813,11 +8465,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DeviceUnlinkTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DeviceUnlinkTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DeviceUnlinkType: \(error)" } } } @@ -7843,12 +8499,16 @@ public class TeamLog { } /// Added members to directory restrictions list. - public class DirectoryRestrictionsAddMembersDetails: CustomStringConvertible { + public class DirectoryRestrictionsAddMembersDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DirectoryRestrictionsAddMembersDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DirectoryRestrictionsAddMembersDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DirectoryRestrictionsAddMembersDetails: \(error)" } } } @@ -7871,7 +8531,7 @@ public class TeamLog { } /// The DirectoryRestrictionsAddMembersType struct - public class DirectoryRestrictionsAddMembersType: CustomStringConvertible { + public class DirectoryRestrictionsAddMembersType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7879,11 +8539,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DirectoryRestrictionsAddMembersTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DirectoryRestrictionsAddMembersTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DirectoryRestrictionsAddMembersType: \(error)" } } } @@ -7909,12 +8573,16 @@ public class TeamLog { } /// Removed members from directory restrictions list. - public class DirectoryRestrictionsRemoveMembersDetails: CustomStringConvertible { + public class DirectoryRestrictionsRemoveMembersDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DirectoryRestrictionsRemoveMembersDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DirectoryRestrictionsRemoveMembersDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DirectoryRestrictionsRemoveMembersDetails: \(error)" } } } @@ -7937,7 +8605,7 @@ public class TeamLog { } /// The DirectoryRestrictionsRemoveMembersType struct - public class DirectoryRestrictionsRemoveMembersType: CustomStringConvertible { + public class DirectoryRestrictionsRemoveMembersType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -7945,11 +8613,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DirectoryRestrictionsRemoveMembersTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DirectoryRestrictionsRemoveMembersTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DirectoryRestrictionsRemoveMembersType: \(error)" } } } @@ -7975,12 +8647,16 @@ public class TeamLog { } /// Disabled domain invites. - public class DisabledDomainInvitesDetails: CustomStringConvertible { + public class DisabledDomainInvitesDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DisabledDomainInvitesDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DisabledDomainInvitesDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DisabledDomainInvitesDetails: \(error)" } } } @@ -8003,7 +8679,7 @@ public class TeamLog { } /// The DisabledDomainInvitesType struct - public class DisabledDomainInvitesType: CustomStringConvertible { + public class DisabledDomainInvitesType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8011,11 +8687,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DisabledDomainInvitesTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DisabledDomainInvitesTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DisabledDomainInvitesType: \(error)" } } } @@ -8041,7 +8721,7 @@ public class TeamLog { } /// The DispositionActionType union - public enum DispositionActionType: CustomStringConvertible { + public enum DispositionActionType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case automaticDelete /// An unspecified error. @@ -8049,11 +8729,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try DispositionActionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DispositionActionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DispositionActionType: \(error)" } } } @@ -8098,12 +8782,16 @@ public class TeamLog { } /// Approved user's request to join team. - public class DomainInvitesApproveRequestToJoinTeamDetails: CustomStringConvertible { + public class DomainInvitesApproveRequestToJoinTeamDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DomainInvitesApproveRequestToJoinTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesApproveRequestToJoinTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesApproveRequestToJoinTeamDetails: \(error)" } } } @@ -8126,7 +8814,7 @@ public class TeamLog { } /// The DomainInvitesApproveRequestToJoinTeamType struct - public class DomainInvitesApproveRequestToJoinTeamType: CustomStringConvertible { + public class DomainInvitesApproveRequestToJoinTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8134,11 +8822,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainInvitesApproveRequestToJoinTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesApproveRequestToJoinTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesApproveRequestToJoinTeamType: \(error)" } } } @@ -8164,12 +8856,16 @@ public class TeamLog { } /// Declined user's request to join team. - public class DomainInvitesDeclineRequestToJoinTeamDetails: CustomStringConvertible { + public class DomainInvitesDeclineRequestToJoinTeamDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DomainInvitesDeclineRequestToJoinTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesDeclineRequestToJoinTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesDeclineRequestToJoinTeamDetails: \(error)" } } } @@ -8192,7 +8888,7 @@ public class TeamLog { } /// The DomainInvitesDeclineRequestToJoinTeamType struct - public class DomainInvitesDeclineRequestToJoinTeamType: CustomStringConvertible { + public class DomainInvitesDeclineRequestToJoinTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8200,11 +8896,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainInvitesDeclineRequestToJoinTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesDeclineRequestToJoinTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesDeclineRequestToJoinTeamType: \(error)" } } } @@ -8230,7 +8930,7 @@ public class TeamLog { } /// Sent domain invites to existing domain accounts. - public class DomainInvitesEmailExistingUsersDetails: CustomStringConvertible { + public class DomainInvitesEmailExistingUsersDetails: CustomStringConvertible, JSONRepresentable { /// Domain names. public let domainName: String /// Number of recipients. @@ -8242,11 +8942,15 @@ public class TeamLog { self.numRecipients = numRecipients } + func json() throws -> JSON { + try DomainInvitesEmailExistingUsersDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesEmailExistingUsersDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesEmailExistingUsersDetails: \(error)" } } } @@ -8274,7 +8978,7 @@ public class TeamLog { } /// The DomainInvitesEmailExistingUsersType struct - public class DomainInvitesEmailExistingUsersType: CustomStringConvertible { + public class DomainInvitesEmailExistingUsersType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8282,11 +8986,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainInvitesEmailExistingUsersTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesEmailExistingUsersTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesEmailExistingUsersType: \(error)" } } } @@ -8312,12 +9020,16 @@ public class TeamLog { } /// Requested to join team. - public class DomainInvitesRequestToJoinTeamDetails: CustomStringConvertible { + public class DomainInvitesRequestToJoinTeamDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DomainInvitesRequestToJoinTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesRequestToJoinTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesRequestToJoinTeamDetails: \(error)" } } } @@ -8340,7 +9052,7 @@ public class TeamLog { } /// The DomainInvitesRequestToJoinTeamType struct - public class DomainInvitesRequestToJoinTeamType: CustomStringConvertible { + public class DomainInvitesRequestToJoinTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8348,11 +9060,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainInvitesRequestToJoinTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesRequestToJoinTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesRequestToJoinTeamType: \(error)" } } } @@ -8378,12 +9094,16 @@ public class TeamLog { } /// Disabled "Automatically invite new users". - public class DomainInvitesSetInviteNewUserPrefToNoDetails: CustomStringConvertible { + public class DomainInvitesSetInviteNewUserPrefToNoDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DomainInvitesSetInviteNewUserPrefToNoDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesSetInviteNewUserPrefToNoDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesSetInviteNewUserPrefToNoDetails: \(error)" } } } @@ -8406,7 +9126,7 @@ public class TeamLog { } /// The DomainInvitesSetInviteNewUserPrefToNoType struct - public class DomainInvitesSetInviteNewUserPrefToNoType: CustomStringConvertible { + public class DomainInvitesSetInviteNewUserPrefToNoType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8414,11 +9134,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainInvitesSetInviteNewUserPrefToNoTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesSetInviteNewUserPrefToNoTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesSetInviteNewUserPrefToNoType: \(error)" } } } @@ -8444,12 +9168,16 @@ public class TeamLog { } /// Enabled "Automatically invite new users". - public class DomainInvitesSetInviteNewUserPrefToYesDetails: CustomStringConvertible { + public class DomainInvitesSetInviteNewUserPrefToYesDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try DomainInvitesSetInviteNewUserPrefToYesDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesSetInviteNewUserPrefToYesDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesSetInviteNewUserPrefToYesDetails: \(error)" } } } @@ -8472,7 +9200,7 @@ public class TeamLog { } /// The DomainInvitesSetInviteNewUserPrefToYesType struct - public class DomainInvitesSetInviteNewUserPrefToYesType: CustomStringConvertible { + public class DomainInvitesSetInviteNewUserPrefToYesType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8480,11 +9208,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainInvitesSetInviteNewUserPrefToYesTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainInvitesSetInviteNewUserPrefToYesTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainInvitesSetInviteNewUserPrefToYesType: \(error)" } } } @@ -8510,7 +9242,7 @@ public class TeamLog { } /// Failed to verify team domain. - public class DomainVerificationAddDomainFailDetails: CustomStringConvertible { + public class DomainVerificationAddDomainFailDetails: CustomStringConvertible, JSONRepresentable { /// Domain name. public let domainName: String /// Domain name verification method. Might be missing due to historical data gap. @@ -8522,11 +9254,15 @@ public class TeamLog { self.verificationMethod = verificationMethod } + func json() throws -> JSON { + try DomainVerificationAddDomainFailDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainVerificationAddDomainFailDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainVerificationAddDomainFailDetails: \(error)" } } } @@ -8554,7 +9290,7 @@ public class TeamLog { } /// The DomainVerificationAddDomainFailType struct - public class DomainVerificationAddDomainFailType: CustomStringConvertible { + public class DomainVerificationAddDomainFailType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8562,11 +9298,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainVerificationAddDomainFailTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainVerificationAddDomainFailTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainVerificationAddDomainFailType: \(error)" } } } @@ -8592,7 +9332,7 @@ public class TeamLog { } /// Verified team domain. - public class DomainVerificationAddDomainSuccessDetails: CustomStringConvertible { + public class DomainVerificationAddDomainSuccessDetails: CustomStringConvertible, JSONRepresentable { /// Domain names. public let domainNames: [String] /// Domain name verification method. Might be missing due to historical data gap. @@ -8604,11 +9344,15 @@ public class TeamLog { self.verificationMethod = verificationMethod } + func json() throws -> JSON { + try DomainVerificationAddDomainSuccessDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainVerificationAddDomainSuccessDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainVerificationAddDomainSuccessDetails: \(error)" } } } @@ -8636,7 +9380,7 @@ public class TeamLog { } /// The DomainVerificationAddDomainSuccessType struct - public class DomainVerificationAddDomainSuccessType: CustomStringConvertible { + public class DomainVerificationAddDomainSuccessType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8644,11 +9388,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainVerificationAddDomainSuccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainVerificationAddDomainSuccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainVerificationAddDomainSuccessType: \(error)" } } } @@ -8674,7 +9422,7 @@ public class TeamLog { } /// Removed domain from list of verified team domains. - public class DomainVerificationRemoveDomainDetails: CustomStringConvertible { + public class DomainVerificationRemoveDomainDetails: CustomStringConvertible, JSONRepresentable { /// Domain names. public let domainNames: [String] public init(domainNames: [String]) { @@ -8682,11 +9430,15 @@ public class TeamLog { self.domainNames = domainNames } + func json() throws -> JSON { + try DomainVerificationRemoveDomainDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainVerificationRemoveDomainDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainVerificationRemoveDomainDetails: \(error)" } } } @@ -8712,7 +9464,7 @@ public class TeamLog { } /// The DomainVerificationRemoveDomainType struct - public class DomainVerificationRemoveDomainType: CustomStringConvertible { + public class DomainVerificationRemoveDomainType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8720,11 +9472,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DomainVerificationRemoveDomainTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DomainVerificationRemoveDomainTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DomainVerificationRemoveDomainType: \(error)" } } } @@ -8750,7 +9506,7 @@ public class TeamLog { } /// Shared content downloads policy - public enum DownloadPolicyType: CustomStringConvertible { + public enum DownloadPolicyType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case allow /// An unspecified error. @@ -8758,11 +9514,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try DownloadPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DownloadPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DownloadPolicyType: \(error)" } } } @@ -8807,7 +9567,7 @@ public class TeamLog { } /// Exported passwords. - public class DropboxPasswordsExportedDetails: CustomStringConvertible { + public class DropboxPasswordsExportedDetails: CustomStringConvertible, JSONRepresentable { /// The platform the device runs export. public let platform: String public init(platform: String) { @@ -8815,11 +9575,15 @@ public class TeamLog { self.platform = platform } + func json() throws -> JSON { + try DropboxPasswordsExportedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DropboxPasswordsExportedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DropboxPasswordsExportedDetails: \(error)" } } } @@ -8845,7 +9609,7 @@ public class TeamLog { } /// The DropboxPasswordsExportedType struct - public class DropboxPasswordsExportedType: CustomStringConvertible { + public class DropboxPasswordsExportedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8853,11 +9617,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DropboxPasswordsExportedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DropboxPasswordsExportedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DropboxPasswordsExportedType: \(error)" } } } @@ -8883,7 +9651,7 @@ public class TeamLog { } /// Enrolled new Dropbox Passwords device. - public class DropboxPasswordsNewDeviceEnrolledDetails: CustomStringConvertible { + public class DropboxPasswordsNewDeviceEnrolledDetails: CustomStringConvertible, JSONRepresentable { /// Whether it's a first device enrolled. public let isFirstDevice: Bool /// The platform the device is enrolled. @@ -8894,11 +9662,15 @@ public class TeamLog { self.platform = platform } + func json() throws -> JSON { + try DropboxPasswordsNewDeviceEnrolledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DropboxPasswordsNewDeviceEnrolledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DropboxPasswordsNewDeviceEnrolledDetails: \(error)" } } } @@ -8926,7 +9698,7 @@ public class TeamLog { } /// The DropboxPasswordsNewDeviceEnrolledType struct - public class DropboxPasswordsNewDeviceEnrolledType: CustomStringConvertible { + public class DropboxPasswordsNewDeviceEnrolledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -8934,11 +9706,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DropboxPasswordsNewDeviceEnrolledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DropboxPasswordsNewDeviceEnrolledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DropboxPasswordsNewDeviceEnrolledType: \(error)" } } } @@ -8964,7 +9740,7 @@ public class TeamLog { } /// Policy for deciding whether team users can use Dropbox Passwords - public enum DropboxPasswordsPolicy: CustomStringConvertible { + public enum DropboxPasswordsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case default_ /// An unspecified error. @@ -8974,11 +9750,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try DropboxPasswordsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DropboxPasswordsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DropboxPasswordsPolicy: \(error)" } } } @@ -9029,7 +9809,7 @@ public class TeamLog { } /// Changed Dropbox Passwords policy for team. - public class DropboxPasswordsPolicyChangedDetails: CustomStringConvertible { + public class DropboxPasswordsPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.DropboxPasswordsPolicy /// From. @@ -9039,11 +9819,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try DropboxPasswordsPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DropboxPasswordsPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DropboxPasswordsPolicyChangedDetails: \(error)" } } } @@ -9071,7 +9855,7 @@ public class TeamLog { } /// The DropboxPasswordsPolicyChangedType struct - public class DropboxPasswordsPolicyChangedType: CustomStringConvertible { + public class DropboxPasswordsPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9079,11 +9863,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try DropboxPasswordsPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DropboxPasswordsPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DropboxPasswordsPolicyChangedType: \(error)" } } } @@ -9109,7 +9897,7 @@ public class TeamLog { } /// Represents a time duration: unit and amount - public class DurationLogInfo: CustomStringConvertible { + public class DurationLogInfo: CustomStringConvertible, JSONRepresentable { /// Time unit. public let unit: TeamLog.TimeUnit /// Amount of time. @@ -9120,11 +9908,15 @@ public class TeamLog { self.amount = amount } + func json() throws -> JSON { + try DurationLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try DurationLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for DurationLogInfo: \(error)" } } } @@ -9152,7 +9944,7 @@ public class TeamLog { } /// Policy for deciding whether a team can use Email to Dropbox feature - public enum EmailIngestPolicy: CustomStringConvertible { + public enum EmailIngestPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -9160,11 +9952,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try EmailIngestPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmailIngestPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmailIngestPolicy: \(error)" } } } @@ -9209,7 +10005,7 @@ public class TeamLog { } /// Changed email to Dropbox policy for team. - public class EmailIngestPolicyChangedDetails: CustomStringConvertible { + public class EmailIngestPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.EmailIngestPolicy /// From. @@ -9219,11 +10015,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try EmailIngestPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmailIngestPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmailIngestPolicyChangedDetails: \(error)" } } } @@ -9251,7 +10051,7 @@ public class TeamLog { } /// The EmailIngestPolicyChangedType struct - public class EmailIngestPolicyChangedType: CustomStringConvertible { + public class EmailIngestPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9259,11 +10059,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmailIngestPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmailIngestPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmailIngestPolicyChangedType: \(error)" } } } @@ -9289,7 +10093,7 @@ public class TeamLog { } /// Received files via Email to Dropbox. - public class EmailIngestReceiveFileDetails: CustomStringConvertible { + public class EmailIngestReceiveFileDetails: CustomStringConvertible, JSONRepresentable { /// Inbox name. public let inboxName: String /// Submitted file names. @@ -9313,11 +10117,15 @@ public class TeamLog { self.fromEmail = fromEmail } + func json() throws -> JSON { + try EmailIngestReceiveFileDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmailIngestReceiveFileDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmailIngestReceiveFileDetails: \(error)" } } } @@ -9357,7 +10165,7 @@ public class TeamLog { } /// The EmailIngestReceiveFileType struct - public class EmailIngestReceiveFileType: CustomStringConvertible { + public class EmailIngestReceiveFileType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9365,11 +10173,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmailIngestReceiveFileTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmailIngestReceiveFileTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmailIngestReceiveFileType: \(error)" } } } @@ -9395,12 +10207,16 @@ public class TeamLog { } /// Added members to EMM exception list. - public class EmmAddExceptionDetails: CustomStringConvertible { + public class EmmAddExceptionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try EmmAddExceptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmAddExceptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmAddExceptionDetails: \(error)" } } } @@ -9423,7 +10239,7 @@ public class TeamLog { } /// The EmmAddExceptionType struct - public class EmmAddExceptionType: CustomStringConvertible { + public class EmmAddExceptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9431,11 +10247,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmmAddExceptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmAddExceptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmAddExceptionType: \(error)" } } } @@ -9461,7 +10281,7 @@ public class TeamLog { } /// Enabled/disabled enterprise mobility management for members. - public class EmmChangePolicyDetails: CustomStringConvertible { + public class EmmChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New enterprise mobility management policy. public let newValue: TeamPolicies.EmmState /// Previous enterprise mobility management policy. Might be missing due to historical data gap. @@ -9471,11 +10291,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try EmmChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmChangePolicyDetails: \(error)" } } } @@ -9503,7 +10327,7 @@ public class TeamLog { } /// The EmmChangePolicyType struct - public class EmmChangePolicyType: CustomStringConvertible { + public class EmmChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9511,11 +10335,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmmChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmChangePolicyType: \(error)" } } } @@ -9541,12 +10369,16 @@ public class TeamLog { } /// Created EMM-excluded users report. - public class EmmCreateExceptionsReportDetails: CustomStringConvertible { + public class EmmCreateExceptionsReportDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try EmmCreateExceptionsReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmCreateExceptionsReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmCreateExceptionsReportDetails: \(error)" } } } @@ -9569,7 +10401,7 @@ public class TeamLog { } /// The EmmCreateExceptionsReportType struct - public class EmmCreateExceptionsReportType: CustomStringConvertible { + public class EmmCreateExceptionsReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9577,11 +10409,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmmCreateExceptionsReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmCreateExceptionsReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmCreateExceptionsReportType: \(error)" } } } @@ -9607,12 +10443,16 @@ public class TeamLog { } /// Created EMM mobile app usage report. - public class EmmCreateUsageReportDetails: CustomStringConvertible { + public class EmmCreateUsageReportDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try EmmCreateUsageReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmCreateUsageReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmCreateUsageReportDetails: \(error)" } } } @@ -9635,7 +10475,7 @@ public class TeamLog { } /// The EmmCreateUsageReportType struct - public class EmmCreateUsageReportType: CustomStringConvertible { + public class EmmCreateUsageReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9643,11 +10483,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmmCreateUsageReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmCreateUsageReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmCreateUsageReportType: \(error)" } } } @@ -9673,18 +10517,22 @@ public class TeamLog { } /// Failed to sign in via EMM. - public class EmmErrorDetails: CustomStringConvertible { + public class EmmErrorDetails: CustomStringConvertible, JSONRepresentable { /// Error details. public let errorDetails: TeamLog.FailureDetailsLogInfo public init(errorDetails: TeamLog.FailureDetailsLogInfo) { self.errorDetails = errorDetails } + func json() throws -> JSON { + try EmmErrorDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmErrorDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmErrorDetails: \(error)" } } } @@ -9710,7 +10558,7 @@ public class TeamLog { } /// The EmmErrorType struct - public class EmmErrorType: CustomStringConvertible { + public class EmmErrorType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9718,11 +10566,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmmErrorTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmErrorTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmErrorType: \(error)" } } } @@ -9748,12 +10600,16 @@ public class TeamLog { } /// Refreshed auth token used for setting up EMM. - public class EmmRefreshAuthTokenDetails: CustomStringConvertible { + public class EmmRefreshAuthTokenDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try EmmRefreshAuthTokenDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmRefreshAuthTokenDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmRefreshAuthTokenDetails: \(error)" } } } @@ -9776,7 +10632,7 @@ public class TeamLog { } /// The EmmRefreshAuthTokenType struct - public class EmmRefreshAuthTokenType: CustomStringConvertible { + public class EmmRefreshAuthTokenType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9784,11 +10640,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmmRefreshAuthTokenTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmRefreshAuthTokenTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmRefreshAuthTokenType: \(error)" } } } @@ -9814,12 +10674,16 @@ public class TeamLog { } /// Removed members from EMM exception list. - public class EmmRemoveExceptionDetails: CustomStringConvertible { + public class EmmRemoveExceptionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try EmmRemoveExceptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmRemoveExceptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmRemoveExceptionDetails: \(error)" } } } @@ -9842,7 +10706,7 @@ public class TeamLog { } /// The EmmRemoveExceptionType struct - public class EmmRemoveExceptionType: CustomStringConvertible { + public class EmmRemoveExceptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9850,11 +10714,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EmmRemoveExceptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmRemoveExceptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmRemoveExceptionType: \(error)" } } } @@ -9880,12 +10748,16 @@ public class TeamLog { } /// Enabled domain invites. - public class EnabledDomainInvitesDetails: CustomStringConvertible { + public class EnabledDomainInvitesDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try EnabledDomainInvitesDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EnabledDomainInvitesDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EnabledDomainInvitesDetails: \(error)" } } } @@ -9908,7 +10780,7 @@ public class TeamLog { } /// The EnabledDomainInvitesType struct - public class EnabledDomainInvitesType: CustomStringConvertible { + public class EnabledDomainInvitesType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9916,11 +10788,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EnabledDomainInvitesTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EnabledDomainInvitesTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EnabledDomainInvitesType: \(error)" } } } @@ -9946,18 +10822,22 @@ public class TeamLog { } /// Ended enterprise admin session. - public class EndedEnterpriseAdminSessionDeprecatedDetails: CustomStringConvertible { + public class EndedEnterpriseAdminSessionDeprecatedDetails: CustomStringConvertible, JSONRepresentable { /// More information about the organization or team. public let federationExtraDetails: TeamLog.FedExtraDetails public init(federationExtraDetails: TeamLog.FedExtraDetails) { self.federationExtraDetails = federationExtraDetails } + func json() throws -> JSON { + try EndedEnterpriseAdminSessionDeprecatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EndedEnterpriseAdminSessionDeprecatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EndedEnterpriseAdminSessionDeprecatedDetails: \(error)" } } } @@ -9983,7 +10863,7 @@ public class TeamLog { } /// The EndedEnterpriseAdminSessionDeprecatedType struct - public class EndedEnterpriseAdminSessionDeprecatedType: CustomStringConvertible { + public class EndedEnterpriseAdminSessionDeprecatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -9991,11 +10871,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EndedEnterpriseAdminSessionDeprecatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EndedEnterpriseAdminSessionDeprecatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EndedEnterpriseAdminSessionDeprecatedType: \(error)" } } } @@ -10021,12 +10905,16 @@ public class TeamLog { } /// Ended enterprise admin session. - public class EndedEnterpriseAdminSessionDetails: CustomStringConvertible { + public class EndedEnterpriseAdminSessionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try EndedEnterpriseAdminSessionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EndedEnterpriseAdminSessionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EndedEnterpriseAdminSessionDetails: \(error)" } } } @@ -10049,7 +10937,7 @@ public class TeamLog { } /// The EndedEnterpriseAdminSessionType struct - public class EndedEnterpriseAdminSessionType: CustomStringConvertible { + public class EndedEnterpriseAdminSessionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -10057,11 +10945,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EndedEnterpriseAdminSessionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EndedEnterpriseAdminSessionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EndedEnterpriseAdminSessionType: \(error)" } } } @@ -10087,7 +10979,7 @@ public class TeamLog { } /// Policy for deciding whether password must be enforced when an externally shared link is updated - public enum EnforceLinkPasswordPolicy: CustomStringConvertible { + public enum EnforceLinkPasswordPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case optional /// An unspecified error. @@ -10095,11 +10987,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try EnforceLinkPasswordPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EnforceLinkPasswordPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EnforceLinkPasswordPolicy: \(error)" } } } @@ -10144,7 +11040,7 @@ public class TeamLog { } /// Changed who can update a setting. - public class EnterpriseSettingsLockingDetails: CustomStringConvertible { + public class EnterpriseSettingsLockingDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let teamName: String /// Settings page name. @@ -10164,11 +11060,15 @@ public class TeamLog { self.newSettingsPageLockingState = newSettingsPageLockingState } + func json() throws -> JSON { + try EnterpriseSettingsLockingDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EnterpriseSettingsLockingDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EnterpriseSettingsLockingDetails: \(error)" } } } @@ -10206,7 +11106,7 @@ public class TeamLog { } /// The EnterpriseSettingsLockingType struct - public class EnterpriseSettingsLockingType: CustomStringConvertible { + public class EnterpriseSettingsLockingType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -10214,11 +11114,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try EnterpriseSettingsLockingTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EnterpriseSettingsLockingTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EnterpriseSettingsLockingType: \(error)" } } } @@ -10244,7 +11148,7 @@ public class TeamLog { } /// Category of events in event audit log. - public enum EventCategory: CustomStringConvertible { + public enum EventCategory: CustomStringConvertible, JSONRepresentable { /// Events that involve team related alerts. case adminAlerting /// Events that apply to management of linked apps. @@ -10296,11 +11200,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try EventCategorySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EventCategorySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EventCategory: \(error)" } } } @@ -10471,7 +11379,7 @@ public class TeamLog { } /// Additional fields depending on the event type. - public enum EventDetails: CustomStringConvertible { + public enum EventDetails: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case adminAlertingAlertStateChangedDetails(TeamLog.AdminAlertingAlertStateChangedDetails) /// An unspecified error. @@ -11483,11 +12391,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try EventDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EventDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EventDetails: \(error)" } } } @@ -15048,7 +15960,7 @@ public class TeamLog { } /// The type of the event with description. - public enum EventType: CustomStringConvertible { + public enum EventType: CustomStringConvertible, JSONRepresentable { /// (admin_alerting) Changed an alert state case adminAlertingAlertStateChanged(TeamLog.AdminAlertingAlertStateChangedType) /// (admin_alerting) Changed an alert setting @@ -16067,11 +16979,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try EventTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EventTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EventType: \(error)" } } } @@ -19625,7 +20541,7 @@ public class TeamLog { } /// The type of the event. - public enum EventTypeArg: CustomStringConvertible { + public enum EventTypeArg: CustomStringConvertible, JSONRepresentable { /// (admin_alerting) Changed an alert state case adminAlertingAlertStateChanged /// (admin_alerting) Changed an alert setting @@ -20644,11 +21560,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try EventTypeArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EventTypeArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EventTypeArg: \(error)" } } } @@ -23699,12 +24619,16 @@ public class TeamLog { } /// Created member data report. - public class ExportMembersReportDetails: CustomStringConvertible { + public class ExportMembersReportDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ExportMembersReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportMembersReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportMembersReportDetails: \(error)" } } } @@ -23727,18 +24651,22 @@ public class TeamLog { } /// Failed to create members data report. - public class ExportMembersReportFailDetails: CustomStringConvertible { + public class ExportMembersReportFailDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try ExportMembersReportFailDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportMembersReportFailDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportMembersReportFailDetails: \(error)" } } } @@ -23764,7 +24692,7 @@ public class TeamLog { } /// The ExportMembersReportFailType struct - public class ExportMembersReportFailType: CustomStringConvertible { + public class ExportMembersReportFailType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -23772,11 +24700,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ExportMembersReportFailTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportMembersReportFailTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportMembersReportFailType: \(error)" } } } @@ -23802,7 +24734,7 @@ public class TeamLog { } /// The ExportMembersReportType struct - public class ExportMembersReportType: CustomStringConvertible { + public class ExportMembersReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -23810,11 +24742,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ExportMembersReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExportMembersReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExportMembersReportType: \(error)" } } } @@ -23840,7 +24776,7 @@ public class TeamLog { } /// Accepted/opted out of extended version history. - public class ExtendedVersionHistoryChangePolicyDetails: CustomStringConvertible { + public class ExtendedVersionHistoryChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New extended version history policy. public let newValue: TeamLog.ExtendedVersionHistoryPolicy /// Previous extended version history policy. Might be missing due to historical data gap. @@ -23850,11 +24786,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try ExtendedVersionHistoryChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExtendedVersionHistoryChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExtendedVersionHistoryChangePolicyDetails: \(error)" } } } @@ -23882,7 +24822,7 @@ public class TeamLog { } /// The ExtendedVersionHistoryChangePolicyType struct - public class ExtendedVersionHistoryChangePolicyType: CustomStringConvertible { + public class ExtendedVersionHistoryChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -23890,11 +24830,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ExtendedVersionHistoryChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExtendedVersionHistoryChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExtendedVersionHistoryChangePolicyType: \(error)" } } } @@ -23920,7 +24864,7 @@ public class TeamLog { } /// The ExtendedVersionHistoryPolicy union - public enum ExtendedVersionHistoryPolicy: CustomStringConvertible { + public enum ExtendedVersionHistoryPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case explicitlyLimited /// An unspecified error. @@ -23932,11 +24876,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ExtendedVersionHistoryPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExtendedVersionHistoryPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExtendedVersionHistoryPolicy: \(error)" } } } @@ -23993,7 +24941,7 @@ public class TeamLog { } /// External Drive Backup eligibility status - public enum ExternalDriveBackupEligibilityStatus: CustomStringConvertible { + public enum ExternalDriveBackupEligibilityStatus: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case exceedLicenseCap /// An unspecified error. @@ -24001,11 +24949,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ExternalDriveBackupEligibilityStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupEligibilityStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupEligibilityStatus: \(error)" } } } @@ -24050,7 +25002,7 @@ public class TeamLog { } /// Checked external drive backup eligibility status. - public class ExternalDriveBackupEligibilityStatusCheckedDetails: CustomStringConvertible { + public class ExternalDriveBackupEligibilityStatusCheckedDetails: CustomStringConvertible, JSONRepresentable { /// Device's session logged information. public let desktopDeviceSessionInfo: TeamLog.DesktopDeviceSessionLogInfo /// Current eligibility status of external drive backup. @@ -24068,11 +25020,15 @@ public class TeamLog { self.numberOfExternalDriveBackup = numberOfExternalDriveBackup } + func json() throws -> JSON { + try ExternalDriveBackupEligibilityStatusCheckedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupEligibilityStatusCheckedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupEligibilityStatusCheckedDetails: \(error)" } } } @@ -24106,7 +25062,7 @@ public class TeamLog { } /// The ExternalDriveBackupEligibilityStatusCheckedType struct - public class ExternalDriveBackupEligibilityStatusCheckedType: CustomStringConvertible { + public class ExternalDriveBackupEligibilityStatusCheckedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -24114,11 +25070,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ExternalDriveBackupEligibilityStatusCheckedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupEligibilityStatusCheckedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupEligibilityStatusCheckedType: \(error)" } } } @@ -24144,7 +25104,7 @@ public class TeamLog { } /// Policy for controlling team access to external drive backup feature - public enum ExternalDriveBackupPolicy: CustomStringConvertible { + public enum ExternalDriveBackupPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case default_ /// An unspecified error. @@ -24154,11 +25114,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ExternalDriveBackupPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupPolicy: \(error)" } } } @@ -24209,7 +25173,7 @@ public class TeamLog { } /// Changed external drive backup policy for team. - public class ExternalDriveBackupPolicyChangedDetails: CustomStringConvertible { + public class ExternalDriveBackupPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New external drive backup policy. public let newValue: TeamLog.ExternalDriveBackupPolicy /// Previous external drive backup policy. @@ -24219,11 +25183,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try ExternalDriveBackupPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupPolicyChangedDetails: \(error)" } } } @@ -24251,7 +25219,7 @@ public class TeamLog { } /// The ExternalDriveBackupPolicyChangedType struct - public class ExternalDriveBackupPolicyChangedType: CustomStringConvertible { + public class ExternalDriveBackupPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -24259,11 +25227,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ExternalDriveBackupPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupPolicyChangedType: \(error)" } } } @@ -24289,7 +25261,7 @@ public class TeamLog { } /// External Drive Backup status - public enum ExternalDriveBackupStatus: CustomStringConvertible { + public enum ExternalDriveBackupStatus: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case broken /// An unspecified error. @@ -24305,11 +25277,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ExternalDriveBackupStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupStatus: \(error)" } } } @@ -24378,7 +25354,7 @@ public class TeamLog { } /// Modified external drive backup. - public class ExternalDriveBackupStatusChangedDetails: CustomStringConvertible { + public class ExternalDriveBackupStatusChangedDetails: CustomStringConvertible, JSONRepresentable { /// Device's session logged information. public let desktopDeviceSessionInfo: TeamLog.DesktopDeviceSessionLogInfo /// Previous status of this external drive backup. @@ -24395,11 +25371,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try ExternalDriveBackupStatusChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupStatusChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupStatusChangedDetails: \(error)" } } } @@ -24433,7 +25413,7 @@ public class TeamLog { } /// The ExternalDriveBackupStatusChangedType struct - public class ExternalDriveBackupStatusChangedType: CustomStringConvertible { + public class ExternalDriveBackupStatusChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -24441,11 +25421,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ExternalDriveBackupStatusChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupStatusChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupStatusChangedType: \(error)" } } } @@ -24471,12 +25455,16 @@ public class TeamLog { } /// Created External sharing report. - public class ExternalSharingCreateReportDetails: CustomStringConvertible { + public class ExternalSharingCreateReportDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ExternalSharingCreateReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalSharingCreateReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalSharingCreateReportDetails: \(error)" } } } @@ -24499,7 +25487,7 @@ public class TeamLog { } /// The ExternalSharingCreateReportType struct - public class ExternalSharingCreateReportType: CustomStringConvertible { + public class ExternalSharingCreateReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -24507,11 +25495,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ExternalSharingCreateReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalSharingCreateReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalSharingCreateReportType: \(error)" } } } @@ -24537,18 +25529,22 @@ public class TeamLog { } /// Couldn't create External sharing report. - public class ExternalSharingReportFailedDetails: CustomStringConvertible { + public class ExternalSharingReportFailedDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try ExternalSharingReportFailedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalSharingReportFailedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalSharingReportFailedDetails: \(error)" } } } @@ -24574,7 +25570,7 @@ public class TeamLog { } /// The ExternalSharingReportFailedType struct - public class ExternalSharingReportFailedType: CustomStringConvertible { + public class ExternalSharingReportFailedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -24582,11 +25578,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ExternalSharingReportFailedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalSharingReportFailedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalSharingReportFailedType: \(error)" } } } @@ -24612,7 +25612,7 @@ public class TeamLog { } /// A user without a Dropbox account. - public class ExternalUserLogInfo: CustomStringConvertible { + public class ExternalUserLogInfo: CustomStringConvertible, JSONRepresentable { /// An external user identifier. public let userIdentifier: String /// Identifier type. @@ -24623,11 +25623,15 @@ public class TeamLog { self.identifierType = identifierType } + func json() throws -> JSON { + try ExternalUserLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalUserLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalUserLogInfo: \(error)" } } } @@ -24655,7 +25659,7 @@ public class TeamLog { } /// Provides details about a failure - public class FailureDetailsLogInfo: CustomStringConvertible { + public class FailureDetailsLogInfo: CustomStringConvertible, JSONRepresentable { /// A user friendly explanation of the error. public let userFriendlyMessage: String? /// A technical explanation of the error. This is relevant for some errors. @@ -24667,11 +25671,15 @@ public class TeamLog { self.technicalErrorMessage = technicalErrorMessage } + func json() throws -> JSON { + try FailureDetailsLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FailureDetailsLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FailureDetailsLogInfo: \(error)" } } } @@ -24699,7 +25707,7 @@ public class TeamLog { } /// The FedAdminRole union - public enum FedAdminRole: CustomStringConvertible { + public enum FedAdminRole: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case enterpriseAdmin /// An unspecified error. @@ -24707,11 +25715,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FedAdminRoleSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FedAdminRoleSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FedAdminRole: \(error)" } } } @@ -24756,7 +25768,7 @@ public class TeamLog { } /// More details about the organization or team. - public enum FedExtraDetails: CustomStringConvertible { + public enum FedExtraDetails: CustomStringConvertible, JSONRepresentable { /// More details about the organization. case organization(TeamLog.OrganizationDetails) /// More details about the team. @@ -24764,11 +25776,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FedExtraDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FedExtraDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FedExtraDetails: \(error)" } } } @@ -24815,7 +25831,7 @@ public class TeamLog { } /// The FedHandshakeAction union - public enum FedHandshakeAction: CustomStringConvertible { + public enum FedHandshakeAction: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case acceptedInvite /// An unspecified error. @@ -24831,11 +25847,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FedHandshakeActionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FedHandshakeActionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FedHandshakeAction: \(error)" } } } @@ -24904,7 +25924,7 @@ public class TeamLog { } /// Additional information about the organization or connected team - public enum FederationStatusChangeAdditionalInfo: CustomStringConvertible { + public enum FederationStatusChangeAdditionalInfo: CustomStringConvertible, JSONRepresentable { /// The name of the team. case connectedTeamName(TeamLog.ConnectedTeamName) /// The email to which the request was sent. @@ -24914,11 +25934,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FederationStatusChangeAdditionalInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FederationStatusChangeAdditionalInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FederationStatusChangeAdditionalInfo: \(error)" } } } @@ -24972,7 +25996,7 @@ public class TeamLog { } /// Added file comment. - public class FileAddCommentDetails: CustomStringConvertible { + public class FileAddCommentDetails: CustomStringConvertible, JSONRepresentable { /// Comment text. public let commentText: String? public init(commentText: String? = nil) { @@ -24980,11 +26004,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try FileAddCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileAddCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileAddCommentDetails: \(error)" } } } @@ -25010,7 +26038,7 @@ public class TeamLog { } /// The FileAddCommentType struct - public class FileAddCommentType: CustomStringConvertible { + public class FileAddCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25018,11 +26046,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileAddCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileAddCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileAddCommentType: \(error)" } } } @@ -25048,12 +26080,16 @@ public class TeamLog { } /// Added files and/or folders. - public class FileAddDetails: CustomStringConvertible { + public class FileAddDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileAddDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileAddDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileAddDetails: \(error)" } } } @@ -25076,12 +26112,16 @@ public class TeamLog { } /// Added files and/or folders from automation. - public class FileAddFromAutomationDetails: CustomStringConvertible { + public class FileAddFromAutomationDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileAddFromAutomationDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileAddFromAutomationDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileAddFromAutomationDetails: \(error)" } } } @@ -25104,7 +26144,7 @@ public class TeamLog { } /// The FileAddFromAutomationType struct - public class FileAddFromAutomationType: CustomStringConvertible { + public class FileAddFromAutomationType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25112,11 +26152,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileAddFromAutomationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileAddFromAutomationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileAddFromAutomationType: \(error)" } } } @@ -25142,7 +26186,7 @@ public class TeamLog { } /// The FileAddType struct - public class FileAddType: CustomStringConvertible { + public class FileAddType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25150,11 +26194,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileAddTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileAddTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileAddType: \(error)" } } } @@ -25180,7 +26228,7 @@ public class TeamLog { } /// Subscribed to or unsubscribed from comment notifications for file. - public class FileChangeCommentSubscriptionDetails: CustomStringConvertible { + public class FileChangeCommentSubscriptionDetails: CustomStringConvertible, JSONRepresentable { /// New file comment subscription. public let newValue: TeamLog.FileCommentNotificationPolicy /// Previous file comment subscription. Might be missing due to historical data gap. @@ -25190,11 +26238,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try FileChangeCommentSubscriptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileChangeCommentSubscriptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileChangeCommentSubscriptionDetails: \(error)" } } } @@ -25222,7 +26274,7 @@ public class TeamLog { } /// The FileChangeCommentSubscriptionType struct - public class FileChangeCommentSubscriptionType: CustomStringConvertible { + public class FileChangeCommentSubscriptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25230,11 +26282,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileChangeCommentSubscriptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileChangeCommentSubscriptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileChangeCommentSubscriptionType: \(error)" } } } @@ -25260,7 +26316,7 @@ public class TeamLog { } /// Enable or disable file comments notifications - public enum FileCommentNotificationPolicy: CustomStringConvertible { + public enum FileCommentNotificationPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -25268,11 +26324,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FileCommentNotificationPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileCommentNotificationPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileCommentNotificationPolicy: \(error)" } } } @@ -25317,7 +26377,7 @@ public class TeamLog { } /// Enabled/disabled commenting on team files. - public class FileCommentsChangePolicyDetails: CustomStringConvertible { + public class FileCommentsChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New commenting on team files policy. public let newValue: TeamLog.FileCommentsPolicy /// Previous commenting on team files policy. Might be missing due to historical data gap. @@ -25327,11 +26387,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try FileCommentsChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileCommentsChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileCommentsChangePolicyDetails: \(error)" } } } @@ -25359,7 +26423,7 @@ public class TeamLog { } /// The FileCommentsChangePolicyType struct - public class FileCommentsChangePolicyType: CustomStringConvertible { + public class FileCommentsChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25367,11 +26431,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileCommentsChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileCommentsChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileCommentsChangePolicyType: \(error)" } } } @@ -25397,7 +26465,7 @@ public class TeamLog { } /// File comments policy - public enum FileCommentsPolicy: CustomStringConvertible { + public enum FileCommentsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -25405,11 +26473,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FileCommentsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileCommentsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileCommentsPolicy: \(error)" } } } @@ -25454,18 +26526,22 @@ public class TeamLog { } /// Copied files and/or folders. - public class FileCopyDetails: CustomStringConvertible { + public class FileCopyDetails: CustomStringConvertible, JSONRepresentable { /// Relocate action details. public let relocateActionDetails: [TeamLog.RelocateAssetReferencesLogInfo] public init(relocateActionDetails: [TeamLog.RelocateAssetReferencesLogInfo]) { self.relocateActionDetails = relocateActionDetails } + func json() throws -> JSON { + try FileCopyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileCopyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileCopyDetails: \(error)" } } } @@ -25492,7 +26568,7 @@ public class TeamLog { } /// The FileCopyType struct - public class FileCopyType: CustomStringConvertible { + public class FileCopyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25500,11 +26576,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileCopyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileCopyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileCopyType: \(error)" } } } @@ -25530,7 +26610,7 @@ public class TeamLog { } /// Deleted file comment. - public class FileDeleteCommentDetails: CustomStringConvertible { + public class FileDeleteCommentDetails: CustomStringConvertible, JSONRepresentable { /// Comment text. public let commentText: String? public init(commentText: String? = nil) { @@ -25538,11 +26618,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try FileDeleteCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileDeleteCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileDeleteCommentDetails: \(error)" } } } @@ -25568,7 +26652,7 @@ public class TeamLog { } /// The FileDeleteCommentType struct - public class FileDeleteCommentType: CustomStringConvertible { + public class FileDeleteCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25576,11 +26660,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileDeleteCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileDeleteCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileDeleteCommentType: \(error)" } } } @@ -25606,12 +26694,16 @@ public class TeamLog { } /// Deleted files and/or folders. - public class FileDeleteDetails: CustomStringConvertible { + public class FileDeleteDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileDeleteDetails: \(error)" } } } @@ -25634,7 +26726,7 @@ public class TeamLog { } /// The FileDeleteType struct - public class FileDeleteType: CustomStringConvertible { + public class FileDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25642,11 +26734,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileDeleteType: \(error)" } } } @@ -25672,12 +26768,16 @@ public class TeamLog { } /// Downloaded files and/or folders. - public class FileDownloadDetails: CustomStringConvertible { + public class FileDownloadDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileDownloadDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileDownloadDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileDownloadDetails: \(error)" } } } @@ -25700,7 +26800,7 @@ public class TeamLog { } /// The FileDownloadType struct - public class FileDownloadType: CustomStringConvertible { + public class FileDownloadType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25708,11 +26808,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileDownloadTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileDownloadTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileDownloadType: \(error)" } } } @@ -25738,7 +26842,7 @@ public class TeamLog { } /// Edited file comment. - public class FileEditCommentDetails: CustomStringConvertible { + public class FileEditCommentDetails: CustomStringConvertible, JSONRepresentable { /// Comment text. public let commentText: String? /// Previous comment text. @@ -25750,11 +26854,15 @@ public class TeamLog { self.previousCommentText = previousCommentText } + func json() throws -> JSON { + try FileEditCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileEditCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileEditCommentDetails: \(error)" } } } @@ -25782,7 +26890,7 @@ public class TeamLog { } /// The FileEditCommentType struct - public class FileEditCommentType: CustomStringConvertible { + public class FileEditCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25790,11 +26898,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileEditCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileEditCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileEditCommentType: \(error)" } } } @@ -25820,12 +26932,16 @@ public class TeamLog { } /// Edited files. - public class FileEditDetails: CustomStringConvertible { + public class FileEditDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileEditDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileEditDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileEditDetails: \(error)" } } } @@ -25848,7 +26964,7 @@ public class TeamLog { } /// The FileEditType struct - public class FileEditType: CustomStringConvertible { + public class FileEditType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25856,11 +26972,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileEditTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileEditTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileEditType: \(error)" } } } @@ -25886,12 +27006,16 @@ public class TeamLog { } /// Created copy reference to file/folder. - public class FileGetCopyReferenceDetails: CustomStringConvertible { + public class FileGetCopyReferenceDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileGetCopyReferenceDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileGetCopyReferenceDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileGetCopyReferenceDetails: \(error)" } } } @@ -25914,7 +27038,7 @@ public class TeamLog { } /// The FileGetCopyReferenceType struct - public class FileGetCopyReferenceType: CustomStringConvertible { + public class FileGetCopyReferenceType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25922,11 +27046,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileGetCopyReferenceTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileGetCopyReferenceTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileGetCopyReferenceType: \(error)" } } } @@ -25952,7 +27080,7 @@ public class TeamLog { } /// Liked file comment. - public class FileLikeCommentDetails: CustomStringConvertible { + public class FileLikeCommentDetails: CustomStringConvertible, JSONRepresentable { /// Comment text. public let commentText: String? public init(commentText: String? = nil) { @@ -25960,11 +27088,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try FileLikeCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLikeCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLikeCommentDetails: \(error)" } } } @@ -25990,7 +27122,7 @@ public class TeamLog { } /// The FileLikeCommentType struct - public class FileLikeCommentType: CustomStringConvertible { + public class FileLikeCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -25998,11 +27130,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileLikeCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLikeCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLikeCommentType: \(error)" } } } @@ -26028,7 +27164,7 @@ public class TeamLog { } /// Locked/unlocked editing for a file. - public class FileLockingLockStatusChangedDetails: CustomStringConvertible { + public class FileLockingLockStatusChangedDetails: CustomStringConvertible, JSONRepresentable { /// Previous lock status of the file. public let previousValue: TeamLog.LockStatus /// New lock status of the file. @@ -26038,11 +27174,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try FileLockingLockStatusChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockingLockStatusChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLockingLockStatusChangedDetails: \(error)" } } } @@ -26070,7 +27210,7 @@ public class TeamLog { } /// The FileLockingLockStatusChangedType struct - public class FileLockingLockStatusChangedType: CustomStringConvertible { + public class FileLockingLockStatusChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26078,11 +27218,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileLockingLockStatusChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockingLockStatusChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLockingLockStatusChangedType: \(error)" } } } @@ -26108,7 +27252,7 @@ public class TeamLog { } /// Changed file locking policy for team. - public class FileLockingPolicyChangedDetails: CustomStringConvertible { + public class FileLockingPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New file locking policy. public let newValue: TeamPolicies.FileLockingPolicyState /// Previous file locking policy. @@ -26118,11 +27262,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try FileLockingPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockingPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLockingPolicyChangedDetails: \(error)" } } } @@ -26150,7 +27298,7 @@ public class TeamLog { } /// The FileLockingPolicyChangedType struct - public class FileLockingPolicyChangedType: CustomStringConvertible { + public class FileLockingPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26158,11 +27306,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileLockingPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockingPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLockingPolicyChangedType: \(error)" } } } @@ -26188,7 +27340,7 @@ public class TeamLog { } /// Generic information relevant both for files and folders - public class FileOrFolderLogInfo: CustomStringConvertible { + public class FileOrFolderLogInfo: CustomStringConvertible, JSONRepresentable { /// Path relative to event context. public let path: TeamLog.PathLogInfo /// Display name. @@ -26207,11 +27359,15 @@ public class TeamLog { self.fileSize = fileSize } + func json() throws -> JSON { + try FileOrFolderLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileOrFolderLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileOrFolderLogInfo: \(error)" } } } @@ -26248,7 +27404,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLogInfo: \(error)" } } } @@ -26280,18 +27436,22 @@ public class TeamLog { } /// Moved files and/or folders. - public class FileMoveDetails: CustomStringConvertible { + public class FileMoveDetails: CustomStringConvertible, JSONRepresentable { /// Relocate action details. public let relocateActionDetails: [TeamLog.RelocateAssetReferencesLogInfo] public init(relocateActionDetails: [TeamLog.RelocateAssetReferencesLogInfo]) { self.relocateActionDetails = relocateActionDetails } + func json() throws -> JSON { + try FileMoveDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileMoveDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileMoveDetails: \(error)" } } } @@ -26318,7 +27478,7 @@ public class TeamLog { } /// The FileMoveType struct - public class FileMoveType: CustomStringConvertible { + public class FileMoveType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26326,11 +27486,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileMoveTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileMoveTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileMoveType: \(error)" } } } @@ -26356,12 +27520,16 @@ public class TeamLog { } /// Permanently deleted files and/or folders. - public class FilePermanentlyDeleteDetails: CustomStringConvertible { + public class FilePermanentlyDeleteDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FilePermanentlyDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FilePermanentlyDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FilePermanentlyDeleteDetails: \(error)" } } } @@ -26384,7 +27552,7 @@ public class TeamLog { } /// The FilePermanentlyDeleteType struct - public class FilePermanentlyDeleteType: CustomStringConvertible { + public class FilePermanentlyDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26392,11 +27560,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FilePermanentlyDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FilePermanentlyDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FilePermanentlyDeleteType: \(error)" } } } @@ -26422,12 +27594,16 @@ public class TeamLog { } /// Previewed files and/or folders. - public class FilePreviewDetails: CustomStringConvertible { + public class FilePreviewDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FilePreviewDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FilePreviewDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FilePreviewDetails: \(error)" } } } @@ -26450,7 +27626,7 @@ public class TeamLog { } /// The FilePreviewType struct - public class FilePreviewType: CustomStringConvertible { + public class FilePreviewType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26458,11 +27634,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FilePreviewTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FilePreviewTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FilePreviewType: \(error)" } } } @@ -26488,7 +27668,7 @@ public class TeamLog { } /// Changed File Provider Migration policy for team. - public class FileProviderMigrationPolicyChangedDetails: CustomStringConvertible { + public class FileProviderMigrationPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamPolicies.FileProviderMigrationPolicyState /// From. @@ -26498,11 +27678,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try FileProviderMigrationPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileProviderMigrationPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileProviderMigrationPolicyChangedDetails: \(error)" } } } @@ -26530,7 +27714,7 @@ public class TeamLog { } /// The FileProviderMigrationPolicyChangedType struct - public class FileProviderMigrationPolicyChangedType: CustomStringConvertible { + public class FileProviderMigrationPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26538,11 +27722,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileProviderMigrationPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileProviderMigrationPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileProviderMigrationPolicyChangedType: \(error)" } } } @@ -26568,18 +27756,22 @@ public class TeamLog { } /// Renamed files and/or folders. - public class FileRenameDetails: CustomStringConvertible { + public class FileRenameDetails: CustomStringConvertible, JSONRepresentable { /// Relocate action details. public let relocateActionDetails: [TeamLog.RelocateAssetReferencesLogInfo] public init(relocateActionDetails: [TeamLog.RelocateAssetReferencesLogInfo]) { self.relocateActionDetails = relocateActionDetails } + func json() throws -> JSON { + try FileRenameDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRenameDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRenameDetails: \(error)" } } } @@ -26606,7 +27798,7 @@ public class TeamLog { } /// The FileRenameType struct - public class FileRenameType: CustomStringConvertible { + public class FileRenameType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26614,11 +27806,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRenameTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRenameTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRenameType: \(error)" } } } @@ -26644,7 +27840,7 @@ public class TeamLog { } /// Changed file request. - public class FileRequestChangeDetails: CustomStringConvertible { + public class FileRequestChangeDetails: CustomStringConvertible, JSONRepresentable { /// File request id. Might be missing due to historical data gap. public let fileRequestId: String? /// Previous file request details. Might be missing due to historical data gap. @@ -26658,11 +27854,15 @@ public class TeamLog { self.newDetails = newDetails } + func json() throws -> JSON { + try FileRequestChangeDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestChangeDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestChangeDetails: \(error)" } } } @@ -26692,7 +27892,7 @@ public class TeamLog { } /// The FileRequestChangeType struct - public class FileRequestChangeType: CustomStringConvertible { + public class FileRequestChangeType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26700,11 +27900,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestChangeTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestChangeTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestChangeType: \(error)" } } } @@ -26730,7 +27934,7 @@ public class TeamLog { } /// Closed file request. - public class FileRequestCloseDetails: CustomStringConvertible { + public class FileRequestCloseDetails: CustomStringConvertible, JSONRepresentable { /// File request id. Might be missing due to historical data gap. public let fileRequestId: String? /// Previous file request details. Might be missing due to historical data gap. @@ -26741,11 +27945,15 @@ public class TeamLog { self.previousDetails = previousDetails } + func json() throws -> JSON { + try FileRequestCloseDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestCloseDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestCloseDetails: \(error)" } } } @@ -26773,7 +27981,7 @@ public class TeamLog { } /// The FileRequestCloseType struct - public class FileRequestCloseType: CustomStringConvertible { + public class FileRequestCloseType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26781,11 +27989,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestCloseTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestCloseTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestCloseType: \(error)" } } } @@ -26811,7 +28023,7 @@ public class TeamLog { } /// Created file request. - public class FileRequestCreateDetails: CustomStringConvertible { + public class FileRequestCreateDetails: CustomStringConvertible, JSONRepresentable { /// File request id. Might be missing due to historical data gap. public let fileRequestId: String? /// File request details. Might be missing due to historical data gap. @@ -26822,11 +28034,15 @@ public class TeamLog { self.requestDetails = requestDetails } + func json() throws -> JSON { + try FileRequestCreateDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestCreateDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestCreateDetails: \(error)" } } } @@ -26854,7 +28070,7 @@ public class TeamLog { } /// The FileRequestCreateType struct - public class FileRequestCreateType: CustomStringConvertible { + public class FileRequestCreateType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26862,11 +28078,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestCreateTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestCreateTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestCreateType: \(error)" } } } @@ -26892,7 +28112,7 @@ public class TeamLog { } /// File request deadline - public class FileRequestDeadline: CustomStringConvertible { + public class FileRequestDeadline: CustomStringConvertible, JSONRepresentable { /// The deadline for this file request. Might be missing due to historical data gap. public let deadline: Date? /// If set, allow uploads after the deadline has passed. @@ -26903,11 +28123,15 @@ public class TeamLog { self.allowLateUploads = allowLateUploads } + func json() throws -> JSON { + try FileRequestDeadlineSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestDeadlineSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestDeadline: \(error)" } } } @@ -26935,7 +28159,7 @@ public class TeamLog { } /// Delete file request. - public class FileRequestDeleteDetails: CustomStringConvertible { + public class FileRequestDeleteDetails: CustomStringConvertible, JSONRepresentable { /// File request id. Might be missing due to historical data gap. public let fileRequestId: String? /// Previous file request details. Might be missing due to historical data gap. @@ -26946,11 +28170,15 @@ public class TeamLog { self.previousDetails = previousDetails } + func json() throws -> JSON { + try FileRequestDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestDeleteDetails: \(error)" } } } @@ -26978,7 +28206,7 @@ public class TeamLog { } /// The FileRequestDeleteType struct - public class FileRequestDeleteType: CustomStringConvertible { + public class FileRequestDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -26986,11 +28214,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestDeleteType: \(error)" } } } @@ -27016,7 +28248,7 @@ public class TeamLog { } /// File request details - public class FileRequestDetails: CustomStringConvertible { + public class FileRequestDetails: CustomStringConvertible, JSONRepresentable { /// Asset position in the Assets list. public let assetIndex: UInt64 /// File request deadline. @@ -27027,11 +28259,15 @@ public class TeamLog { self.deadline = deadline } + func json() throws -> JSON { + try FileRequestDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestDetails: \(error)" } } } @@ -27059,7 +28295,7 @@ public class TeamLog { } /// Received files for file request. - public class FileRequestReceiveFileDetails: CustomStringConvertible { + public class FileRequestReceiveFileDetails: CustomStringConvertible, JSONRepresentable { /// File request id. Might be missing due to historical data gap. public let fileRequestId: String? /// File request details. Might be missing due to historical data gap. @@ -27088,11 +28324,15 @@ public class TeamLog { self.submitterEmail = submitterEmail } + func json() throws -> JSON { + try FileRequestReceiveFileDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestReceiveFileDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestReceiveFileDetails: \(error)" } } } @@ -27132,7 +28372,7 @@ public class TeamLog { } /// The FileRequestReceiveFileType struct - public class FileRequestReceiveFileType: CustomStringConvertible { + public class FileRequestReceiveFileType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27140,11 +28380,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestReceiveFileTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestReceiveFileTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestReceiveFileType: \(error)" } } } @@ -27170,7 +28414,7 @@ public class TeamLog { } /// Enabled/disabled file requests. - public class FileRequestsChangePolicyDetails: CustomStringConvertible { + public class FileRequestsChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New file requests policy. public let newValue: TeamLog.FileRequestsPolicy /// Previous file requests policy. Might be missing due to historical data gap. @@ -27180,11 +28424,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try FileRequestsChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestsChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestsChangePolicyDetails: \(error)" } } } @@ -27212,7 +28460,7 @@ public class TeamLog { } /// The FileRequestsChangePolicyType struct - public class FileRequestsChangePolicyType: CustomStringConvertible { + public class FileRequestsChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27220,11 +28468,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestsChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestsChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestsChangePolicyType: \(error)" } } } @@ -27250,12 +28502,16 @@ public class TeamLog { } /// Enabled file request emails for everyone. - public class FileRequestsEmailsEnabledDetails: CustomStringConvertible { + public class FileRequestsEmailsEnabledDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileRequestsEmailsEnabledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestsEmailsEnabledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestsEmailsEnabledDetails: \(error)" } } } @@ -27278,7 +28534,7 @@ public class TeamLog { } /// The FileRequestsEmailsEnabledType struct - public class FileRequestsEmailsEnabledType: CustomStringConvertible { + public class FileRequestsEmailsEnabledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27286,11 +28542,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestsEmailsEnabledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestsEmailsEnabledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestsEmailsEnabledType: \(error)" } } } @@ -27316,12 +28576,16 @@ public class TeamLog { } /// Enabled file request emails for team. - public class FileRequestsEmailsRestrictedToTeamOnlyDetails: CustomStringConvertible { + public class FileRequestsEmailsRestrictedToTeamOnlyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileRequestsEmailsRestrictedToTeamOnlyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestsEmailsRestrictedToTeamOnlyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestsEmailsRestrictedToTeamOnlyDetails: \(error)" } } } @@ -27344,7 +28608,7 @@ public class TeamLog { } /// The FileRequestsEmailsRestrictedToTeamOnlyType struct - public class FileRequestsEmailsRestrictedToTeamOnlyType: CustomStringConvertible { + public class FileRequestsEmailsRestrictedToTeamOnlyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27352,11 +28616,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRequestsEmailsRestrictedToTeamOnlyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestsEmailsRestrictedToTeamOnlyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestsEmailsRestrictedToTeamOnlyType: \(error)" } } } @@ -27382,7 +28650,7 @@ public class TeamLog { } /// File requests policy - public enum FileRequestsPolicy: CustomStringConvertible { + public enum FileRequestsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -27390,11 +28658,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FileRequestsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRequestsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRequestsPolicy: \(error)" } } } @@ -27439,7 +28711,7 @@ public class TeamLog { } /// Resolved file comment. - public class FileResolveCommentDetails: CustomStringConvertible { + public class FileResolveCommentDetails: CustomStringConvertible, JSONRepresentable { /// Comment text. public let commentText: String? public init(commentText: String? = nil) { @@ -27447,11 +28719,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try FileResolveCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileResolveCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileResolveCommentDetails: \(error)" } } } @@ -27477,7 +28753,7 @@ public class TeamLog { } /// The FileResolveCommentType struct - public class FileResolveCommentType: CustomStringConvertible { + public class FileResolveCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27485,11 +28761,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileResolveCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileResolveCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileResolveCommentType: \(error)" } } } @@ -27515,12 +28795,16 @@ public class TeamLog { } /// Restored deleted files and/or folders. - public class FileRestoreDetails: CustomStringConvertible { + public class FileRestoreDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileRestoreDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRestoreDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRestoreDetails: \(error)" } } } @@ -27543,7 +28827,7 @@ public class TeamLog { } /// The FileRestoreType struct - public class FileRestoreType: CustomStringConvertible { + public class FileRestoreType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27551,11 +28835,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRestoreTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRestoreTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRestoreType: \(error)" } } } @@ -27581,12 +28869,16 @@ public class TeamLog { } /// Reverted files to previous version. - public class FileRevertDetails: CustomStringConvertible { + public class FileRevertDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileRevertDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRevertDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRevertDetails: \(error)" } } } @@ -27609,7 +28901,7 @@ public class TeamLog { } /// The FileRevertType struct - public class FileRevertType: CustomStringConvertible { + public class FileRevertType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27617,11 +28909,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRevertTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRevertTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRevertType: \(error)" } } } @@ -27647,12 +28943,16 @@ public class TeamLog { } /// Rolled back file actions. - public class FileRollbackChangesDetails: CustomStringConvertible { + public class FileRollbackChangesDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try FileRollbackChangesDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRollbackChangesDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRollbackChangesDetails: \(error)" } } } @@ -27675,7 +28975,7 @@ public class TeamLog { } /// The FileRollbackChangesType struct - public class FileRollbackChangesType: CustomStringConvertible { + public class FileRollbackChangesType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27683,11 +28983,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileRollbackChangesTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileRollbackChangesTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileRollbackChangesType: \(error)" } } } @@ -27713,18 +29017,22 @@ public class TeamLog { } /// Saved file/folder using copy reference. - public class FileSaveCopyReferenceDetails: CustomStringConvertible { + public class FileSaveCopyReferenceDetails: CustomStringConvertible, JSONRepresentable { /// Relocate action details. public let relocateActionDetails: [TeamLog.RelocateAssetReferencesLogInfo] public init(relocateActionDetails: [TeamLog.RelocateAssetReferencesLogInfo]) { self.relocateActionDetails = relocateActionDetails } + func json() throws -> JSON { + try FileSaveCopyReferenceDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileSaveCopyReferenceDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileSaveCopyReferenceDetails: \(error)" } } } @@ -27751,7 +29059,7 @@ public class TeamLog { } /// The FileSaveCopyReferenceType struct - public class FileSaveCopyReferenceType: CustomStringConvertible { + public class FileSaveCopyReferenceType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27759,11 +29067,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileSaveCopyReferenceTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileSaveCopyReferenceTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileSaveCopyReferenceType: \(error)" } } } @@ -27789,7 +29101,7 @@ public class TeamLog { } /// Transfer files added. - public class FileTransfersFileAddDetails: CustomStringConvertible { + public class FileTransfersFileAddDetails: CustomStringConvertible, JSONRepresentable { /// Transfer id. public let fileTransferId: String public init(fileTransferId: String) { @@ -27797,11 +29109,15 @@ public class TeamLog { self.fileTransferId = fileTransferId } + func json() throws -> JSON { + try FileTransfersFileAddDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersFileAddDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersFileAddDetails: \(error)" } } } @@ -27827,7 +29143,7 @@ public class TeamLog { } /// The FileTransfersFileAddType struct - public class FileTransfersFileAddType: CustomStringConvertible { + public class FileTransfersFileAddType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27835,11 +29151,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileTransfersFileAddTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersFileAddTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersFileAddType: \(error)" } } } @@ -27865,7 +29185,7 @@ public class TeamLog { } /// File transfers policy - public enum FileTransfersPolicy: CustomStringConvertible { + public enum FileTransfersPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -27873,11 +29193,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FileTransfersPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersPolicy: \(error)" } } } @@ -27922,7 +29246,7 @@ public class TeamLog { } /// Changed file transfers policy for team. - public class FileTransfersPolicyChangedDetails: CustomStringConvertible { + public class FileTransfersPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New file transfers policy. public let newValue: TeamLog.FileTransfersPolicy /// Previous file transfers policy. @@ -27932,11 +29256,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try FileTransfersPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersPolicyChangedDetails: \(error)" } } } @@ -27964,7 +29292,7 @@ public class TeamLog { } /// The FileTransfersPolicyChangedType struct - public class FileTransfersPolicyChangedType: CustomStringConvertible { + public class FileTransfersPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -27972,11 +29300,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileTransfersPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersPolicyChangedType: \(error)" } } } @@ -28002,7 +29334,7 @@ public class TeamLog { } /// Deleted transfer. - public class FileTransfersTransferDeleteDetails: CustomStringConvertible { + public class FileTransfersTransferDeleteDetails: CustomStringConvertible, JSONRepresentable { /// Transfer id. public let fileTransferId: String public init(fileTransferId: String) { @@ -28010,11 +29342,15 @@ public class TeamLog { self.fileTransferId = fileTransferId } + func json() throws -> JSON { + try FileTransfersTransferDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersTransferDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersTransferDeleteDetails: \(error)" } } } @@ -28040,7 +29376,7 @@ public class TeamLog { } /// The FileTransfersTransferDeleteType struct - public class FileTransfersTransferDeleteType: CustomStringConvertible { + public class FileTransfersTransferDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28048,11 +29384,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileTransfersTransferDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersTransferDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersTransferDeleteType: \(error)" } } } @@ -28078,7 +29418,7 @@ public class TeamLog { } /// Transfer downloaded. - public class FileTransfersTransferDownloadDetails: CustomStringConvertible { + public class FileTransfersTransferDownloadDetails: CustomStringConvertible, JSONRepresentable { /// Transfer id. public let fileTransferId: String public init(fileTransferId: String) { @@ -28086,11 +29426,15 @@ public class TeamLog { self.fileTransferId = fileTransferId } + func json() throws -> JSON { + try FileTransfersTransferDownloadDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersTransferDownloadDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersTransferDownloadDetails: \(error)" } } } @@ -28116,7 +29460,7 @@ public class TeamLog { } /// The FileTransfersTransferDownloadType struct - public class FileTransfersTransferDownloadType: CustomStringConvertible { + public class FileTransfersTransferDownloadType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28124,11 +29468,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileTransfersTransferDownloadTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersTransferDownloadTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersTransferDownloadType: \(error)" } } } @@ -28154,7 +29502,7 @@ public class TeamLog { } /// Sent transfer. - public class FileTransfersTransferSendDetails: CustomStringConvertible { + public class FileTransfersTransferSendDetails: CustomStringConvertible, JSONRepresentable { /// Transfer id. public let fileTransferId: String public init(fileTransferId: String) { @@ -28162,11 +29510,15 @@ public class TeamLog { self.fileTransferId = fileTransferId } + func json() throws -> JSON { + try FileTransfersTransferSendDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersTransferSendDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersTransferSendDetails: \(error)" } } } @@ -28192,7 +29544,7 @@ public class TeamLog { } /// The FileTransfersTransferSendType struct - public class FileTransfersTransferSendType: CustomStringConvertible { + public class FileTransfersTransferSendType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28200,11 +29552,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileTransfersTransferSendTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersTransferSendTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersTransferSendType: \(error)" } } } @@ -28230,7 +29586,7 @@ public class TeamLog { } /// Viewed transfer. - public class FileTransfersTransferViewDetails: CustomStringConvertible { + public class FileTransfersTransferViewDetails: CustomStringConvertible, JSONRepresentable { /// Transfer id. public let fileTransferId: String public init(fileTransferId: String) { @@ -28238,11 +29594,15 @@ public class TeamLog { self.fileTransferId = fileTransferId } + func json() throws -> JSON { + try FileTransfersTransferViewDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersTransferViewDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersTransferViewDetails: \(error)" } } } @@ -28268,7 +29628,7 @@ public class TeamLog { } /// The FileTransfersTransferViewType struct - public class FileTransfersTransferViewType: CustomStringConvertible { + public class FileTransfersTransferViewType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28276,11 +29636,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileTransfersTransferViewTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileTransfersTransferViewTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileTransfersTransferViewType: \(error)" } } } @@ -28306,7 +29670,7 @@ public class TeamLog { } /// Unliked file comment. - public class FileUnlikeCommentDetails: CustomStringConvertible { + public class FileUnlikeCommentDetails: CustomStringConvertible, JSONRepresentable { /// Comment text. public let commentText: String? public init(commentText: String? = nil) { @@ -28314,11 +29678,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try FileUnlikeCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileUnlikeCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileUnlikeCommentDetails: \(error)" } } } @@ -28344,7 +29712,7 @@ public class TeamLog { } /// The FileUnlikeCommentType struct - public class FileUnlikeCommentType: CustomStringConvertible { + public class FileUnlikeCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28352,11 +29720,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileUnlikeCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileUnlikeCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileUnlikeCommentType: \(error)" } } } @@ -28382,7 +29754,7 @@ public class TeamLog { } /// Unresolved file comment. - public class FileUnresolveCommentDetails: CustomStringConvertible { + public class FileUnresolveCommentDetails: CustomStringConvertible, JSONRepresentable { /// Comment text. public let commentText: String? public init(commentText: String? = nil) { @@ -28390,11 +29762,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try FileUnresolveCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileUnresolveCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileUnresolveCommentDetails: \(error)" } } } @@ -28420,7 +29796,7 @@ public class TeamLog { } /// The FileUnresolveCommentType struct - public class FileUnresolveCommentType: CustomStringConvertible { + public class FileUnresolveCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28428,11 +29804,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FileUnresolveCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileUnresolveCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileUnresolveCommentType: \(error)" } } } @@ -28458,7 +29838,7 @@ public class TeamLog { } /// Policy for deciding whether applying link restrictions on all team owned folders - public enum FolderLinkRestrictionPolicy: CustomStringConvertible { + public enum FolderLinkRestrictionPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -28466,11 +29846,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try FolderLinkRestrictionPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderLinkRestrictionPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderLinkRestrictionPolicy: \(error)" } } } @@ -28515,7 +29899,7 @@ public class TeamLog { } /// Changed folder link restrictions policy for team. - public class FolderLinkRestrictionPolicyChangedDetails: CustomStringConvertible { + public class FolderLinkRestrictionPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.FolderLinkRestrictionPolicy /// From. @@ -28525,11 +29909,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try FolderLinkRestrictionPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderLinkRestrictionPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderLinkRestrictionPolicyChangedDetails: \(error)" } } } @@ -28557,7 +29945,7 @@ public class TeamLog { } /// The FolderLinkRestrictionPolicyChangedType struct - public class FolderLinkRestrictionPolicyChangedType: CustomStringConvertible { + public class FolderLinkRestrictionPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28565,11 +29953,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FolderLinkRestrictionPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderLinkRestrictionPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderLinkRestrictionPolicyChangedType: \(error)" } } } @@ -28608,7 +30000,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderLogInfo: \(error)" } } } @@ -28642,7 +30034,7 @@ public class TeamLog { } /// Updated folder overview. - public class FolderOverviewDescriptionChangedDetails: CustomStringConvertible { + public class FolderOverviewDescriptionChangedDetails: CustomStringConvertible, JSONRepresentable { /// Folder Overview location position in the Assets list. public let folderOverviewLocationAsset: UInt64 public init(folderOverviewLocationAsset: UInt64) { @@ -28650,11 +30042,15 @@ public class TeamLog { self.folderOverviewLocationAsset = folderOverviewLocationAsset } + func json() throws -> JSON { + try FolderOverviewDescriptionChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderOverviewDescriptionChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderOverviewDescriptionChangedDetails: \(error)" } } } @@ -28680,7 +30076,7 @@ public class TeamLog { } /// The FolderOverviewDescriptionChangedType struct - public class FolderOverviewDescriptionChangedType: CustomStringConvertible { + public class FolderOverviewDescriptionChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28688,11 +30084,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FolderOverviewDescriptionChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderOverviewDescriptionChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderOverviewDescriptionChangedType: \(error)" } } } @@ -28718,7 +30118,7 @@ public class TeamLog { } /// Pinned item to folder overview. - public class FolderOverviewItemPinnedDetails: CustomStringConvertible { + public class FolderOverviewItemPinnedDetails: CustomStringConvertible, JSONRepresentable { /// Folder Overview location position in the Assets list. public let folderOverviewLocationAsset: UInt64 /// Pinned items positions in the Assets list. @@ -28730,11 +30130,15 @@ public class TeamLog { self.pinnedItemsAssetIndices = pinnedItemsAssetIndices } + func json() throws -> JSON { + try FolderOverviewItemPinnedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderOverviewItemPinnedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderOverviewItemPinnedDetails: \(error)" } } } @@ -28765,7 +30169,7 @@ public class TeamLog { } /// The FolderOverviewItemPinnedType struct - public class FolderOverviewItemPinnedType: CustomStringConvertible { + public class FolderOverviewItemPinnedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28773,11 +30177,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FolderOverviewItemPinnedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderOverviewItemPinnedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderOverviewItemPinnedType: \(error)" } } } @@ -28803,7 +30211,7 @@ public class TeamLog { } /// Unpinned item from folder overview. - public class FolderOverviewItemUnpinnedDetails: CustomStringConvertible { + public class FolderOverviewItemUnpinnedDetails: CustomStringConvertible, JSONRepresentable { /// Folder Overview location position in the Assets list. public let folderOverviewLocationAsset: UInt64 /// Pinned items positions in the Assets list. @@ -28815,11 +30223,15 @@ public class TeamLog { self.pinnedItemsAssetIndices = pinnedItemsAssetIndices } + func json() throws -> JSON { + try FolderOverviewItemUnpinnedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderOverviewItemUnpinnedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderOverviewItemUnpinnedDetails: \(error)" } } } @@ -28850,7 +30262,7 @@ public class TeamLog { } /// The FolderOverviewItemUnpinnedType struct - public class FolderOverviewItemUnpinnedType: CustomStringConvertible { + public class FolderOverviewItemUnpinnedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -28858,11 +30270,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try FolderOverviewItemUnpinnedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FolderOverviewItemUnpinnedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FolderOverviewItemUnpinnedType: \(error)" } } } @@ -28888,7 +30304,7 @@ public class TeamLog { } /// Geographic location details. - public class GeoLocationLogInfo: CustomStringConvertible { + public class GeoLocationLogInfo: CustomStringConvertible, JSONRepresentable { /// City name. public let city: String? /// Region name. @@ -28908,11 +30324,15 @@ public class TeamLog { self.ipAddress = ipAddress } + func json() throws -> JSON { + try GeoLocationLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GeoLocationLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GeoLocationLogInfo: \(error)" } } } @@ -28944,7 +30364,7 @@ public class TeamLog { } /// The GetTeamEventsArg struct - public class GetTeamEventsArg: CustomStringConvertible { + public class GetTeamEventsArg: CustomStringConvertible, JSONRepresentable { /// The maximal number of results to return per call. Note that some calls may not return limit number of /// events, and may even return no events, even with `has_more` set to true. In this case, callers /// should fetch again using getEventsContinue. @@ -28976,11 +30396,15 @@ public class TeamLog { self.eventType = eventType } + func json() throws -> JSON { + try GetTeamEventsArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTeamEventsArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTeamEventsArg: \(error)" } } } @@ -29014,7 +30438,7 @@ public class TeamLog { } /// The GetTeamEventsContinueArg struct - public class GetTeamEventsContinueArg: CustomStringConvertible { + public class GetTeamEventsContinueArg: CustomStringConvertible, JSONRepresentable { /// Indicates from what point to get the next set of events. public let cursor: String public init(cursor: String) { @@ -29022,11 +30446,15 @@ public class TeamLog { self.cursor = cursor } + func json() throws -> JSON { + try GetTeamEventsContinueArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTeamEventsContinueArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTeamEventsContinueArg: \(error)" } } } @@ -29052,7 +30480,7 @@ public class TeamLog { } /// Errors that can be raised when calling getEventsContinue. - public enum GetTeamEventsContinueError: CustomStringConvertible { + public enum GetTeamEventsContinueError: CustomStringConvertible, JSONRepresentable { /// Bad cursor. case badCursor /// Cursors are intended to be used quickly. Individual cursor values are normally valid for days, but in rare @@ -29063,11 +30491,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try GetTeamEventsContinueErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTeamEventsContinueErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTeamEventsContinueError: \(error)" } } } @@ -29113,7 +30545,7 @@ public class TeamLog { } /// Errors that can be raised when calling getEvents. - public enum GetTeamEventsError: CustomStringConvertible { + public enum GetTeamEventsError: CustomStringConvertible, JSONRepresentable { /// No user found matching the provided account_id. case accountIdNotFound /// Invalid time range. @@ -29123,11 +30555,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try GetTeamEventsErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTeamEventsErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTeamEventsError: \(error)" } } } @@ -29178,7 +30614,7 @@ public class TeamLog { } /// The GetTeamEventsResult struct - public class GetTeamEventsResult: CustomStringConvertible { + public class GetTeamEventsResult: CustomStringConvertible, JSONRepresentable { /// List of events. Note that events are not guaranteed to be sorted by their timestamp value. public let events: [TeamLog.TeamEvent] /// Pass the cursor into getEventsContinue to obtain additional events. The value of cursor may change for each @@ -29197,11 +30633,15 @@ public class TeamLog { self.hasMore = hasMore } + func json() throws -> JSON { + try GetTeamEventsResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetTeamEventsResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetTeamEventsResult: \(error)" } } } @@ -29231,7 +30671,7 @@ public class TeamLog { } /// Enabled/disabled Google single sign-on for team. - public class GoogleSsoChangePolicyDetails: CustomStringConvertible { + public class GoogleSsoChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New Google single sign-on policy. public let newValue: TeamLog.GoogleSsoPolicy /// Previous Google single sign-on policy. Might be missing due to historical data gap. @@ -29241,11 +30681,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try GoogleSsoChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GoogleSsoChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GoogleSsoChangePolicyDetails: \(error)" } } } @@ -29273,7 +30717,7 @@ public class TeamLog { } /// The GoogleSsoChangePolicyType struct - public class GoogleSsoChangePolicyType: CustomStringConvertible { + public class GoogleSsoChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -29281,11 +30725,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GoogleSsoChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GoogleSsoChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GoogleSsoChangePolicyType: \(error)" } } } @@ -29311,7 +30759,7 @@ public class TeamLog { } /// Google SSO policy - public enum GoogleSsoPolicy: CustomStringConvertible { + public enum GoogleSsoPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -29319,11 +30767,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try GoogleSsoPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GoogleSsoPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GoogleSsoPolicy: \(error)" } } } @@ -29368,7 +30820,7 @@ public class TeamLog { } /// Couldn't add a folder to a policy. - public class GovernancePolicyAddFolderFailedDetails: CustomStringConvertible { + public class GovernancePolicyAddFolderFailedDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -29391,11 +30843,15 @@ public class TeamLog { self.reason = reason } + func json() throws -> JSON { + try GovernancePolicyAddFolderFailedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyAddFolderFailedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyAddFolderFailedDetails: \(error)" } } } @@ -29435,7 +30891,7 @@ public class TeamLog { } /// The GovernancePolicyAddFolderFailedType struct - public class GovernancePolicyAddFolderFailedType: CustomStringConvertible { + public class GovernancePolicyAddFolderFailedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -29443,11 +30899,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyAddFolderFailedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyAddFolderFailedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyAddFolderFailedType: \(error)" } } } @@ -29473,7 +30933,7 @@ public class TeamLog { } /// Added folders to policy. - public class GovernancePolicyAddFoldersDetails: CustomStringConvertible { + public class GovernancePolicyAddFoldersDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -29492,11 +30952,15 @@ public class TeamLog { self.folders = folders } + func json() throws -> JSON { + try GovernancePolicyAddFoldersDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyAddFoldersDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyAddFoldersDetails: \(error)" } } } @@ -29528,7 +30992,7 @@ public class TeamLog { } /// The GovernancePolicyAddFoldersType struct - public class GovernancePolicyAddFoldersType: CustomStringConvertible { + public class GovernancePolicyAddFoldersType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -29536,11 +31000,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyAddFoldersTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyAddFoldersTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyAddFoldersType: \(error)" } } } @@ -29566,7 +31034,7 @@ public class TeamLog { } /// Content disposed. - public class GovernancePolicyContentDisposedDetails: CustomStringConvertible { + public class GovernancePolicyContentDisposedDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -29584,11 +31052,15 @@ public class TeamLog { self.dispositionType = dispositionType } + func json() throws -> JSON { + try GovernancePolicyContentDisposedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyContentDisposedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyContentDisposedDetails: \(error)" } } } @@ -29625,7 +31097,7 @@ public class TeamLog { } /// The GovernancePolicyContentDisposedType struct - public class GovernancePolicyContentDisposedType: CustomStringConvertible { + public class GovernancePolicyContentDisposedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -29633,11 +31105,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyContentDisposedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyContentDisposedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyContentDisposedType: \(error)" } } } @@ -29663,7 +31139,7 @@ public class TeamLog { } /// Activated a new policy. - public class GovernancePolicyCreateDetails: CustomStringConvertible { + public class GovernancePolicyCreateDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -29691,11 +31167,15 @@ public class TeamLog { self.folders = folders } + func json() throws -> JSON { + try GovernancePolicyCreateDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyCreateDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyCreateDetails: \(error)" } } } @@ -29735,7 +31215,7 @@ public class TeamLog { } /// The GovernancePolicyCreateType struct - public class GovernancePolicyCreateType: CustomStringConvertible { + public class GovernancePolicyCreateType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -29743,11 +31223,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyCreateTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyCreateTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyCreateType: \(error)" } } } @@ -29773,7 +31257,7 @@ public class TeamLog { } /// Deleted a policy. - public class GovernancePolicyDeleteDetails: CustomStringConvertible { + public class GovernancePolicyDeleteDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -29788,11 +31272,15 @@ public class TeamLog { self.policyType = policyType } + func json() throws -> JSON { + try GovernancePolicyDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyDeleteDetails: \(error)" } } } @@ -29822,7 +31310,7 @@ public class TeamLog { } /// The GovernancePolicyDeleteType struct - public class GovernancePolicyDeleteType: CustomStringConvertible { + public class GovernancePolicyDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -29830,11 +31318,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyDeleteType: \(error)" } } } @@ -29860,7 +31352,7 @@ public class TeamLog { } /// Edited policy. - public class GovernancePolicyEditDetailsDetails: CustomStringConvertible { + public class GovernancePolicyEditDetailsDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -29894,11 +31386,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try GovernancePolicyEditDetailsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyEditDetailsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyEditDetailsDetails: \(error)" } } } @@ -29941,7 +31437,7 @@ public class TeamLog { } /// The GovernancePolicyEditDetailsType struct - public class GovernancePolicyEditDetailsType: CustomStringConvertible { + public class GovernancePolicyEditDetailsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -29949,11 +31445,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyEditDetailsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyEditDetailsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyEditDetailsType: \(error)" } } } @@ -29979,7 +31479,7 @@ public class TeamLog { } /// Changed policy duration. - public class GovernancePolicyEditDurationDetails: CustomStringConvertible { + public class GovernancePolicyEditDurationDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -30006,11 +31506,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try GovernancePolicyEditDurationDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyEditDurationDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyEditDurationDetails: \(error)" } } } @@ -30050,7 +31554,7 @@ public class TeamLog { } /// The GovernancePolicyEditDurationType struct - public class GovernancePolicyEditDurationType: CustomStringConvertible { + public class GovernancePolicyEditDurationType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30058,11 +31562,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyEditDurationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyEditDurationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyEditDurationType: \(error)" } } } @@ -30088,7 +31596,7 @@ public class TeamLog { } /// Created a policy download. - public class GovernancePolicyExportCreatedDetails: CustomStringConvertible { + public class GovernancePolicyExportCreatedDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -30107,11 +31615,15 @@ public class TeamLog { self.exportName = exportName } + func json() throws -> JSON { + try GovernancePolicyExportCreatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyExportCreatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyExportCreatedDetails: \(error)" } } } @@ -30148,7 +31660,7 @@ public class TeamLog { } /// The GovernancePolicyExportCreatedType struct - public class GovernancePolicyExportCreatedType: CustomStringConvertible { + public class GovernancePolicyExportCreatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30156,11 +31668,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyExportCreatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyExportCreatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyExportCreatedType: \(error)" } } } @@ -30186,7 +31702,7 @@ public class TeamLog { } /// Removed a policy download. - public class GovernancePolicyExportRemovedDetails: CustomStringConvertible { + public class GovernancePolicyExportRemovedDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -30205,11 +31721,15 @@ public class TeamLog { self.exportName = exportName } + func json() throws -> JSON { + try GovernancePolicyExportRemovedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyExportRemovedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyExportRemovedDetails: \(error)" } } } @@ -30246,7 +31766,7 @@ public class TeamLog { } /// The GovernancePolicyExportRemovedType struct - public class GovernancePolicyExportRemovedType: CustomStringConvertible { + public class GovernancePolicyExportRemovedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30254,11 +31774,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyExportRemovedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyExportRemovedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyExportRemovedType: \(error)" } } } @@ -30284,7 +31808,7 @@ public class TeamLog { } /// Removed folders from policy. - public class GovernancePolicyRemoveFoldersDetails: CustomStringConvertible { + public class GovernancePolicyRemoveFoldersDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -30307,11 +31831,15 @@ public class TeamLog { self.reason = reason } + func json() throws -> JSON { + try GovernancePolicyRemoveFoldersDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyRemoveFoldersDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyRemoveFoldersDetails: \(error)" } } } @@ -30351,7 +31879,7 @@ public class TeamLog { } /// The GovernancePolicyRemoveFoldersType struct - public class GovernancePolicyRemoveFoldersType: CustomStringConvertible { + public class GovernancePolicyRemoveFoldersType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30359,11 +31887,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyRemoveFoldersTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyRemoveFoldersTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyRemoveFoldersType: \(error)" } } } @@ -30389,7 +31921,7 @@ public class TeamLog { } /// Created a summary report for a policy. - public class GovernancePolicyReportCreatedDetails: CustomStringConvertible { + public class GovernancePolicyReportCreatedDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -30404,11 +31936,15 @@ public class TeamLog { self.policyType = policyType } + func json() throws -> JSON { + try GovernancePolicyReportCreatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyReportCreatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyReportCreatedDetails: \(error)" } } } @@ -30438,7 +31974,7 @@ public class TeamLog { } /// The GovernancePolicyReportCreatedType struct - public class GovernancePolicyReportCreatedType: CustomStringConvertible { + public class GovernancePolicyReportCreatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30446,11 +31982,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyReportCreatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyReportCreatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyReportCreatedType: \(error)" } } } @@ -30476,7 +32016,7 @@ public class TeamLog { } /// Downloaded content from a policy. - public class GovernancePolicyZipPartDownloadedDetails: CustomStringConvertible { + public class GovernancePolicyZipPartDownloadedDetails: CustomStringConvertible, JSONRepresentable { /// Policy ID. public let governancePolicyId: String /// Policy name. @@ -30499,11 +32039,15 @@ public class TeamLog { self.part = part } + func json() throws -> JSON { + try GovernancePolicyZipPartDownloadedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyZipPartDownloadedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyZipPartDownloadedDetails: \(error)" } } } @@ -30543,7 +32087,7 @@ public class TeamLog { } /// The GovernancePolicyZipPartDownloadedType struct - public class GovernancePolicyZipPartDownloadedType: CustomStringConvertible { + public class GovernancePolicyZipPartDownloadedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30551,11 +32095,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GovernancePolicyZipPartDownloadedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GovernancePolicyZipPartDownloadedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GovernancePolicyZipPartDownloadedType: \(error)" } } } @@ -30581,7 +32129,7 @@ public class TeamLog { } /// Added external ID for group. - public class GroupAddExternalIdDetails: CustomStringConvertible { + public class GroupAddExternalIdDetails: CustomStringConvertible, JSONRepresentable { /// Current external id. public let newValue: String public init(newValue: String) { @@ -30589,11 +32137,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try GroupAddExternalIdDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupAddExternalIdDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupAddExternalIdDetails: \(error)" } } } @@ -30619,7 +32171,7 @@ public class TeamLog { } /// The GroupAddExternalIdType struct - public class GroupAddExternalIdType: CustomStringConvertible { + public class GroupAddExternalIdType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30627,11 +32179,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupAddExternalIdTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupAddExternalIdTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupAddExternalIdType: \(error)" } } } @@ -30657,18 +32213,22 @@ public class TeamLog { } /// Added team members to group. - public class GroupAddMemberDetails: CustomStringConvertible { + public class GroupAddMemberDetails: CustomStringConvertible, JSONRepresentable { /// Is group owner. public let isGroupOwner: Bool public init(isGroupOwner: Bool) { self.isGroupOwner = isGroupOwner } + func json() throws -> JSON { + try GroupAddMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupAddMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupAddMemberDetails: \(error)" } } } @@ -30694,7 +32254,7 @@ public class TeamLog { } /// The GroupAddMemberType struct - public class GroupAddMemberType: CustomStringConvertible { + public class GroupAddMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30702,11 +32262,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupAddMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupAddMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupAddMemberType: \(error)" } } } @@ -30732,7 +32296,7 @@ public class TeamLog { } /// Changed external ID for group. - public class GroupChangeExternalIdDetails: CustomStringConvertible { + public class GroupChangeExternalIdDetails: CustomStringConvertible, JSONRepresentable { /// Current external id. public let newValue: String /// Old external id. @@ -30744,11 +32308,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try GroupChangeExternalIdDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupChangeExternalIdDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupChangeExternalIdDetails: \(error)" } } } @@ -30776,7 +32344,7 @@ public class TeamLog { } /// The GroupChangeExternalIdType struct - public class GroupChangeExternalIdType: CustomStringConvertible { + public class GroupChangeExternalIdType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30784,11 +32352,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupChangeExternalIdTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupChangeExternalIdTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupChangeExternalIdType: \(error)" } } } @@ -30814,7 +32386,7 @@ public class TeamLog { } /// Changed group management type. - public class GroupChangeManagementTypeDetails: CustomStringConvertible { + public class GroupChangeManagementTypeDetails: CustomStringConvertible, JSONRepresentable { /// New group management type. public let newValue: TeamCommon.GroupManagementType /// Previous group management type. Might be missing due to historical data gap. @@ -30824,11 +32396,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try GroupChangeManagementTypeDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupChangeManagementTypeDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupChangeManagementTypeDetails: \(error)" } } } @@ -30856,7 +32432,7 @@ public class TeamLog { } /// The GroupChangeManagementTypeType struct - public class GroupChangeManagementTypeType: CustomStringConvertible { + public class GroupChangeManagementTypeType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30864,11 +32440,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupChangeManagementTypeTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupChangeManagementTypeTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupChangeManagementTypeType: \(error)" } } } @@ -30894,18 +32474,22 @@ public class TeamLog { } /// Changed manager permissions of group member. - public class GroupChangeMemberRoleDetails: CustomStringConvertible { + public class GroupChangeMemberRoleDetails: CustomStringConvertible, JSONRepresentable { /// Is group owner. public let isGroupOwner: Bool public init(isGroupOwner: Bool) { self.isGroupOwner = isGroupOwner } + func json() throws -> JSON { + try GroupChangeMemberRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupChangeMemberRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupChangeMemberRoleDetails: \(error)" } } } @@ -30931,7 +32515,7 @@ public class TeamLog { } /// The GroupChangeMemberRoleType struct - public class GroupChangeMemberRoleType: CustomStringConvertible { + public class GroupChangeMemberRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -30939,11 +32523,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupChangeMemberRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupChangeMemberRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupChangeMemberRoleType: \(error)" } } } @@ -30969,7 +32557,7 @@ public class TeamLog { } /// Created group. - public class GroupCreateDetails: CustomStringConvertible { + public class GroupCreateDetails: CustomStringConvertible, JSONRepresentable { /// Is company managed group. public let isCompanyManaged: Bool? /// Group join policy. @@ -30979,11 +32567,15 @@ public class TeamLog { self.joinPolicy = joinPolicy } + func json() throws -> JSON { + try GroupCreateDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupCreateDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupCreateDetails: \(error)" } } } @@ -31011,7 +32603,7 @@ public class TeamLog { } /// The GroupCreateType struct - public class GroupCreateType: CustomStringConvertible { + public class GroupCreateType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31019,11 +32611,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupCreateTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupCreateTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupCreateType: \(error)" } } } @@ -31049,18 +32645,22 @@ public class TeamLog { } /// Deleted group. - public class GroupDeleteDetails: CustomStringConvertible { + public class GroupDeleteDetails: CustomStringConvertible, JSONRepresentable { /// Is company managed group. public let isCompanyManaged: Bool? public init(isCompanyManaged: Bool? = nil) { self.isCompanyManaged = isCompanyManaged } + func json() throws -> JSON { + try GroupDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupDeleteDetails: \(error)" } } } @@ -31086,7 +32686,7 @@ public class TeamLog { } /// The GroupDeleteType struct - public class GroupDeleteType: CustomStringConvertible { + public class GroupDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31094,11 +32694,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupDeleteType: \(error)" } } } @@ -31124,12 +32728,16 @@ public class TeamLog { } /// Updated group. - public class GroupDescriptionUpdatedDetails: CustomStringConvertible { + public class GroupDescriptionUpdatedDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try GroupDescriptionUpdatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupDescriptionUpdatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupDescriptionUpdatedDetails: \(error)" } } } @@ -31152,7 +32760,7 @@ public class TeamLog { } /// The GroupDescriptionUpdatedType struct - public class GroupDescriptionUpdatedType: CustomStringConvertible { + public class GroupDescriptionUpdatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31160,11 +32768,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupDescriptionUpdatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupDescriptionUpdatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupDescriptionUpdatedType: \(error)" } } } @@ -31190,7 +32802,7 @@ public class TeamLog { } /// The GroupJoinPolicy union - public enum GroupJoinPolicy: CustomStringConvertible { + public enum GroupJoinPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case open /// An unspecified error. @@ -31198,11 +32810,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try GroupJoinPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupJoinPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupJoinPolicy: \(error)" } } } @@ -31247,7 +32863,7 @@ public class TeamLog { } /// Updated group join policy. - public class GroupJoinPolicyUpdatedDetails: CustomStringConvertible { + public class GroupJoinPolicyUpdatedDetails: CustomStringConvertible, JSONRepresentable { /// Is company managed group. public let isCompanyManaged: Bool? /// Group join policy. @@ -31257,11 +32873,15 @@ public class TeamLog { self.joinPolicy = joinPolicy } + func json() throws -> JSON { + try GroupJoinPolicyUpdatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupJoinPolicyUpdatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupJoinPolicyUpdatedDetails: \(error)" } } } @@ -31289,7 +32909,7 @@ public class TeamLog { } /// The GroupJoinPolicyUpdatedType struct - public class GroupJoinPolicyUpdatedType: CustomStringConvertible { + public class GroupJoinPolicyUpdatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31297,11 +32917,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupJoinPolicyUpdatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupJoinPolicyUpdatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupJoinPolicyUpdatedType: \(error)" } } } @@ -31327,7 +32951,7 @@ public class TeamLog { } /// Group's logged information. - public class GroupLogInfo: CustomStringConvertible { + public class GroupLogInfo: CustomStringConvertible, JSONRepresentable { /// The unique id of this group. public let groupId: String? /// The name of this group. @@ -31343,11 +32967,15 @@ public class TeamLog { self.externalId = externalId } + func json() throws -> JSON { + try GroupLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupLogInfo: \(error)" } } } @@ -31377,12 +33005,16 @@ public class TeamLog { } /// Moved group. - public class GroupMovedDetails: CustomStringConvertible { + public class GroupMovedDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try GroupMovedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMovedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMovedDetails: \(error)" } } } @@ -31405,7 +33037,7 @@ public class TeamLog { } /// The GroupMovedType struct - public class GroupMovedType: CustomStringConvertible { + public class GroupMovedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31413,11 +33045,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupMovedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupMovedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupMovedType: \(error)" } } } @@ -31443,7 +33079,7 @@ public class TeamLog { } /// Removed external ID for group. - public class GroupRemoveExternalIdDetails: CustomStringConvertible { + public class GroupRemoveExternalIdDetails: CustomStringConvertible, JSONRepresentable { /// Old external id. public let previousValue: String public init(previousValue: String) { @@ -31451,11 +33087,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try GroupRemoveExternalIdDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupRemoveExternalIdDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupRemoveExternalIdDetails: \(error)" } } } @@ -31481,7 +33121,7 @@ public class TeamLog { } /// The GroupRemoveExternalIdType struct - public class GroupRemoveExternalIdType: CustomStringConvertible { + public class GroupRemoveExternalIdType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31489,11 +33129,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupRemoveExternalIdTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupRemoveExternalIdTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupRemoveExternalIdType: \(error)" } } } @@ -31519,12 +33163,16 @@ public class TeamLog { } /// Removed team members from group. - public class GroupRemoveMemberDetails: CustomStringConvertible { + public class GroupRemoveMemberDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try GroupRemoveMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupRemoveMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupRemoveMemberDetails: \(error)" } } } @@ -31547,7 +33195,7 @@ public class TeamLog { } /// The GroupRemoveMemberType struct - public class GroupRemoveMemberType: CustomStringConvertible { + public class GroupRemoveMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31555,11 +33203,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupRemoveMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupRemoveMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupRemoveMemberType: \(error)" } } } @@ -31585,7 +33237,7 @@ public class TeamLog { } /// Renamed group. - public class GroupRenameDetails: CustomStringConvertible { + public class GroupRenameDetails: CustomStringConvertible, JSONRepresentable { /// Previous display name. public let previousValue: String /// New display name. @@ -31597,11 +33249,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try GroupRenameDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupRenameDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupRenameDetails: \(error)" } } } @@ -31629,7 +33285,7 @@ public class TeamLog { } /// The GroupRenameType struct - public class GroupRenameType: CustomStringConvertible { + public class GroupRenameType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31637,11 +33293,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupRenameTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupRenameTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupRenameType: \(error)" } } } @@ -31667,7 +33327,7 @@ public class TeamLog { } /// Changed who can create groups. - public class GroupUserManagementChangePolicyDetails: CustomStringConvertible { + public class GroupUserManagementChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New group users management policy. public let newValue: TeamPolicies.GroupCreation /// Previous group users management policy. Might be missing due to historical data gap. @@ -31677,11 +33337,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try GroupUserManagementChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupUserManagementChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupUserManagementChangePolicyDetails: \(error)" } } } @@ -31709,7 +33373,7 @@ public class TeamLog { } /// The GroupUserManagementChangePolicyType struct - public class GroupUserManagementChangePolicyType: CustomStringConvertible { + public class GroupUserManagementChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31717,11 +33381,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GroupUserManagementChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupUserManagementChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupUserManagementChangePolicyType: \(error)" } } } @@ -31747,7 +33415,7 @@ public class TeamLog { } /// Changed guest team admin status. - public class GuestAdminChangeStatusDetails: CustomStringConvertible { + public class GuestAdminChangeStatusDetails: CustomStringConvertible, JSONRepresentable { /// True for guest, false for host. public let isGuest: Bool /// The name of the guest team. @@ -31778,11 +33446,15 @@ public class TeamLog { self.actionDetails = actionDetails } + func json() throws -> JSON { + try GuestAdminChangeStatusDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GuestAdminChangeStatusDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GuestAdminChangeStatusDetails: \(error)" } } } @@ -31825,7 +33497,7 @@ public class TeamLog { } /// The GuestAdminChangeStatusType struct - public class GuestAdminChangeStatusType: CustomStringConvertible { + public class GuestAdminChangeStatusType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31833,11 +33505,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GuestAdminChangeStatusTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GuestAdminChangeStatusTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GuestAdminChangeStatusType: \(error)" } } } @@ -31863,7 +33539,7 @@ public class TeamLog { } /// Started trusted team admin session. - public class GuestAdminSignedInViaTrustedTeamsDetails: CustomStringConvertible { + public class GuestAdminSignedInViaTrustedTeamsDetails: CustomStringConvertible, JSONRepresentable { /// Host team name. public let teamName: String? /// Trusted team name. @@ -31875,11 +33551,15 @@ public class TeamLog { self.trustedTeamName = trustedTeamName } + func json() throws -> JSON { + try GuestAdminSignedInViaTrustedTeamsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GuestAdminSignedInViaTrustedTeamsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GuestAdminSignedInViaTrustedTeamsDetails: \(error)" } } } @@ -31907,7 +33587,7 @@ public class TeamLog { } /// The GuestAdminSignedInViaTrustedTeamsType struct - public class GuestAdminSignedInViaTrustedTeamsType: CustomStringConvertible { + public class GuestAdminSignedInViaTrustedTeamsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31915,11 +33595,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GuestAdminSignedInViaTrustedTeamsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GuestAdminSignedInViaTrustedTeamsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GuestAdminSignedInViaTrustedTeamsType: \(error)" } } } @@ -31945,7 +33629,7 @@ public class TeamLog { } /// Ended trusted team admin session. - public class GuestAdminSignedOutViaTrustedTeamsDetails: CustomStringConvertible { + public class GuestAdminSignedOutViaTrustedTeamsDetails: CustomStringConvertible, JSONRepresentable { /// Host team name. public let teamName: String? /// Trusted team name. @@ -31957,11 +33641,15 @@ public class TeamLog { self.trustedTeamName = trustedTeamName } + func json() throws -> JSON { + try GuestAdminSignedOutViaTrustedTeamsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GuestAdminSignedOutViaTrustedTeamsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GuestAdminSignedOutViaTrustedTeamsDetails: \(error)" } } } @@ -31989,7 +33677,7 @@ public class TeamLog { } /// The GuestAdminSignedOutViaTrustedTeamsType struct - public class GuestAdminSignedOutViaTrustedTeamsType: CustomStringConvertible { + public class GuestAdminSignedOutViaTrustedTeamsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -31997,11 +33685,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try GuestAdminSignedOutViaTrustedTeamsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GuestAdminSignedOutViaTrustedTeamsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GuestAdminSignedOutViaTrustedTeamsType: \(error)" } } } @@ -32027,7 +33719,7 @@ public class TeamLog { } /// The IdentifierType union - public enum IdentifierType: CustomStringConvertible { + public enum IdentifierType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case email /// An unspecified error. @@ -32035,11 +33727,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try IdentifierTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IdentifierTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IdentifierType: \(error)" } } } @@ -32084,7 +33780,7 @@ public class TeamLog { } /// Connected integration for member. - public class IntegrationConnectedDetails: CustomStringConvertible { + public class IntegrationConnectedDetails: CustomStringConvertible, JSONRepresentable { /// Name of the third-party integration. public let integrationName: String public init(integrationName: String) { @@ -32092,11 +33788,15 @@ public class TeamLog { self.integrationName = integrationName } + func json() throws -> JSON { + try IntegrationConnectedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IntegrationConnectedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IntegrationConnectedDetails: \(error)" } } } @@ -32122,7 +33822,7 @@ public class TeamLog { } /// The IntegrationConnectedType struct - public class IntegrationConnectedType: CustomStringConvertible { + public class IntegrationConnectedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -32130,11 +33830,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try IntegrationConnectedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IntegrationConnectedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IntegrationConnectedType: \(error)" } } } @@ -32160,7 +33864,7 @@ public class TeamLog { } /// Disconnected integration for member. - public class IntegrationDisconnectedDetails: CustomStringConvertible { + public class IntegrationDisconnectedDetails: CustomStringConvertible, JSONRepresentable { /// Name of the third-party integration. public let integrationName: String public init(integrationName: String) { @@ -32168,11 +33872,15 @@ public class TeamLog { self.integrationName = integrationName } + func json() throws -> JSON { + try IntegrationDisconnectedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IntegrationDisconnectedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IntegrationDisconnectedDetails: \(error)" } } } @@ -32198,7 +33906,7 @@ public class TeamLog { } /// The IntegrationDisconnectedType struct - public class IntegrationDisconnectedType: CustomStringConvertible { + public class IntegrationDisconnectedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -32206,11 +33914,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try IntegrationDisconnectedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IntegrationDisconnectedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IntegrationDisconnectedType: \(error)" } } } @@ -32236,7 +33948,7 @@ public class TeamLog { } /// Policy for controlling whether a service integration is enabled for the team. - public enum IntegrationPolicy: CustomStringConvertible { + public enum IntegrationPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -32244,11 +33956,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try IntegrationPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IntegrationPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IntegrationPolicy: \(error)" } } } @@ -32293,7 +34009,7 @@ public class TeamLog { } /// Changed integration policy for team. - public class IntegrationPolicyChangedDetails: CustomStringConvertible { + public class IntegrationPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// Name of the third-party integration. public let integrationName: String /// New integration policy. @@ -32307,11 +34023,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try IntegrationPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IntegrationPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IntegrationPolicyChangedDetails: \(error)" } } } @@ -32341,7 +34061,7 @@ public class TeamLog { } /// The IntegrationPolicyChangedType struct - public class IntegrationPolicyChangedType: CustomStringConvertible { + public class IntegrationPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -32349,11 +34069,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try IntegrationPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IntegrationPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IntegrationPolicyChangedType: \(error)" } } } @@ -32379,7 +34103,7 @@ public class TeamLog { } /// Policy for deciding whether team admins receive email when an invitation to join the team is accepted - public enum InviteAcceptanceEmailPolicy: CustomStringConvertible { + public enum InviteAcceptanceEmailPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -32387,11 +34111,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try InviteAcceptanceEmailPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InviteAcceptanceEmailPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InviteAcceptanceEmailPolicy: \(error)" } } } @@ -32436,7 +34164,7 @@ public class TeamLog { } /// Changed invite accept email policy for team. - public class InviteAcceptanceEmailPolicyChangedDetails: CustomStringConvertible { + public class InviteAcceptanceEmailPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.InviteAcceptanceEmailPolicy /// From. @@ -32446,11 +34174,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try InviteAcceptanceEmailPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InviteAcceptanceEmailPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InviteAcceptanceEmailPolicyChangedDetails: \(error)" } } } @@ -32478,7 +34210,7 @@ public class TeamLog { } /// The InviteAcceptanceEmailPolicyChangedType struct - public class InviteAcceptanceEmailPolicyChangedType: CustomStringConvertible { + public class InviteAcceptanceEmailPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -32486,11 +34218,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try InviteAcceptanceEmailPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InviteAcceptanceEmailPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InviteAcceptanceEmailPolicyChangedType: \(error)" } } } @@ -32516,7 +34252,7 @@ public class TeamLog { } /// The InviteMethod union - public enum InviteMethod: CustomStringConvertible { + public enum InviteMethod: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case autoApprove /// An unspecified error. @@ -32528,11 +34264,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try InviteMethodSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try InviteMethodSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for InviteMethod: \(error)" } } } @@ -32589,7 +34329,7 @@ public class TeamLog { } /// Additional information relevant when a new member joins the team. - public class JoinTeamDetails: CustomStringConvertible { + public class JoinTeamDetails: CustomStringConvertible, JSONRepresentable { /// Linked applications. (Deprecated) Please use has_linked_apps boolean field instead. public let linkedApps: [TeamLog.UserLinkedAppLogInfo] /// Linked devices. (Deprecated) Please use has_linked_devices boolean field instead. @@ -32630,11 +34370,15 @@ public class TeamLog { self.hasLinkedSharedFolders = hasLinkedSharedFolders } + func json() throws -> JSON { + try JoinTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try JoinTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for JoinTeamDetails: \(error)" } } } @@ -32688,7 +34432,7 @@ public class TeamLog { } /// Label type - public enum LabelType: CustomStringConvertible { + public enum LabelType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case personalInformation /// An unspecified error. @@ -32698,11 +34442,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try LabelTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LabelTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LabelType: \(error)" } } } @@ -32810,7 +34558,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegacyDeviceSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegacyDeviceSessionLogInfo: \(error)" } } } @@ -32871,7 +34619,7 @@ public class TeamLog { } /// Activated a hold. - public class LegalHoldsActivateAHoldDetails: CustomStringConvertible { + public class LegalHoldsActivateAHoldDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -32889,11 +34637,15 @@ public class TeamLog { self.endDate = endDate } + func json() throws -> JSON { + try LegalHoldsActivateAHoldDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsActivateAHoldDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsActivateAHoldDetails: \(error)" } } } @@ -32925,7 +34677,7 @@ public class TeamLog { } /// The LegalHoldsActivateAHoldType struct - public class LegalHoldsActivateAHoldType: CustomStringConvertible { + public class LegalHoldsActivateAHoldType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -32933,11 +34685,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsActivateAHoldTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsActivateAHoldTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsActivateAHoldType: \(error)" } } } @@ -32963,7 +34719,7 @@ public class TeamLog { } /// Added members to a hold. - public class LegalHoldsAddMembersDetails: CustomStringConvertible { + public class LegalHoldsAddMembersDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -32975,11 +34731,15 @@ public class TeamLog { self.name = name } + func json() throws -> JSON { + try LegalHoldsAddMembersDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsAddMembersDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsAddMembersDetails: \(error)" } } } @@ -33007,7 +34767,7 @@ public class TeamLog { } /// The LegalHoldsAddMembersType struct - public class LegalHoldsAddMembersType: CustomStringConvertible { + public class LegalHoldsAddMembersType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33015,11 +34775,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsAddMembersTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsAddMembersTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsAddMembersType: \(error)" } } } @@ -33045,7 +34809,7 @@ public class TeamLog { } /// Edited details for a hold. - public class LegalHoldsChangeHoldDetailsDetails: CustomStringConvertible { + public class LegalHoldsChangeHoldDetailsDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -33065,11 +34829,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try LegalHoldsChangeHoldDetailsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsChangeHoldDetailsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsChangeHoldDetailsDetails: \(error)" } } } @@ -33101,7 +34869,7 @@ public class TeamLog { } /// The LegalHoldsChangeHoldDetailsType struct - public class LegalHoldsChangeHoldDetailsType: CustomStringConvertible { + public class LegalHoldsChangeHoldDetailsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33109,11 +34877,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsChangeHoldDetailsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsChangeHoldDetailsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsChangeHoldDetailsType: \(error)" } } } @@ -33139,7 +34911,7 @@ public class TeamLog { } /// Renamed a hold. - public class LegalHoldsChangeHoldNameDetails: CustomStringConvertible { + public class LegalHoldsChangeHoldNameDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Previous Name. @@ -33155,11 +34927,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try LegalHoldsChangeHoldNameDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsChangeHoldNameDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsChangeHoldNameDetails: \(error)" } } } @@ -33189,7 +34965,7 @@ public class TeamLog { } /// The LegalHoldsChangeHoldNameType struct - public class LegalHoldsChangeHoldNameType: CustomStringConvertible { + public class LegalHoldsChangeHoldNameType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33197,11 +34973,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsChangeHoldNameTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsChangeHoldNameTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsChangeHoldNameType: \(error)" } } } @@ -33227,7 +35007,7 @@ public class TeamLog { } /// Exported hold. - public class LegalHoldsExportAHoldDetails: CustomStringConvertible { + public class LegalHoldsExportAHoldDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -33243,11 +35023,15 @@ public class TeamLog { self.exportName = exportName } + func json() throws -> JSON { + try LegalHoldsExportAHoldDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsExportAHoldDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsExportAHoldDetails: \(error)" } } } @@ -33277,7 +35061,7 @@ public class TeamLog { } /// The LegalHoldsExportAHoldType struct - public class LegalHoldsExportAHoldType: CustomStringConvertible { + public class LegalHoldsExportAHoldType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33285,11 +35069,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsExportAHoldTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsExportAHoldTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsExportAHoldType: \(error)" } } } @@ -33315,7 +35103,7 @@ public class TeamLog { } /// Canceled export for a hold. - public class LegalHoldsExportCancelledDetails: CustomStringConvertible { + public class LegalHoldsExportCancelledDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -33331,11 +35119,15 @@ public class TeamLog { self.exportName = exportName } + func json() throws -> JSON { + try LegalHoldsExportCancelledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsExportCancelledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsExportCancelledDetails: \(error)" } } } @@ -33365,7 +35157,7 @@ public class TeamLog { } /// The LegalHoldsExportCancelledType struct - public class LegalHoldsExportCancelledType: CustomStringConvertible { + public class LegalHoldsExportCancelledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33373,11 +35165,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsExportCancelledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsExportCancelledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsExportCancelledType: \(error)" } } } @@ -33403,7 +35199,7 @@ public class TeamLog { } /// Downloaded export for a hold. - public class LegalHoldsExportDownloadedDetails: CustomStringConvertible { + public class LegalHoldsExportDownloadedDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -33427,11 +35223,15 @@ public class TeamLog { self.fileName = fileName } + func json() throws -> JSON { + try LegalHoldsExportDownloadedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsExportDownloadedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsExportDownloadedDetails: \(error)" } } } @@ -33465,7 +35265,7 @@ public class TeamLog { } /// The LegalHoldsExportDownloadedType struct - public class LegalHoldsExportDownloadedType: CustomStringConvertible { + public class LegalHoldsExportDownloadedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33473,11 +35273,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsExportDownloadedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsExportDownloadedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsExportDownloadedType: \(error)" } } } @@ -33503,7 +35307,7 @@ public class TeamLog { } /// Removed export for a hold. - public class LegalHoldsExportRemovedDetails: CustomStringConvertible { + public class LegalHoldsExportRemovedDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -33519,11 +35323,15 @@ public class TeamLog { self.exportName = exportName } + func json() throws -> JSON { + try LegalHoldsExportRemovedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsExportRemovedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsExportRemovedDetails: \(error)" } } } @@ -33553,7 +35361,7 @@ public class TeamLog { } /// The LegalHoldsExportRemovedType struct - public class LegalHoldsExportRemovedType: CustomStringConvertible { + public class LegalHoldsExportRemovedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33561,11 +35369,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsExportRemovedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsExportRemovedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsExportRemovedType: \(error)" } } } @@ -33591,7 +35403,7 @@ public class TeamLog { } /// Released a hold. - public class LegalHoldsReleaseAHoldDetails: CustomStringConvertible { + public class LegalHoldsReleaseAHoldDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -33603,11 +35415,15 @@ public class TeamLog { self.name = name } + func json() throws -> JSON { + try LegalHoldsReleaseAHoldDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsReleaseAHoldDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsReleaseAHoldDetails: \(error)" } } } @@ -33635,7 +35451,7 @@ public class TeamLog { } /// The LegalHoldsReleaseAHoldType struct - public class LegalHoldsReleaseAHoldType: CustomStringConvertible { + public class LegalHoldsReleaseAHoldType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33643,11 +35459,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsReleaseAHoldTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsReleaseAHoldTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsReleaseAHoldType: \(error)" } } } @@ -33673,7 +35493,7 @@ public class TeamLog { } /// Removed members from a hold. - public class LegalHoldsRemoveMembersDetails: CustomStringConvertible { + public class LegalHoldsRemoveMembersDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -33685,11 +35505,15 @@ public class TeamLog { self.name = name } + func json() throws -> JSON { + try LegalHoldsRemoveMembersDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsRemoveMembersDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsRemoveMembersDetails: \(error)" } } } @@ -33717,7 +35541,7 @@ public class TeamLog { } /// The LegalHoldsRemoveMembersType struct - public class LegalHoldsRemoveMembersType: CustomStringConvertible { + public class LegalHoldsRemoveMembersType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33725,11 +35549,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsRemoveMembersTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsRemoveMembersTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsRemoveMembersType: \(error)" } } } @@ -33755,7 +35583,7 @@ public class TeamLog { } /// Created a summary report for a hold. - public class LegalHoldsReportAHoldDetails: CustomStringConvertible { + public class LegalHoldsReportAHoldDetails: CustomStringConvertible, JSONRepresentable { /// Hold ID. public let legalHoldId: String /// Hold name. @@ -33767,11 +35595,15 @@ public class TeamLog { self.name = name } + func json() throws -> JSON { + try LegalHoldsReportAHoldDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsReportAHoldDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsReportAHoldDetails: \(error)" } } } @@ -33799,7 +35631,7 @@ public class TeamLog { } /// The LegalHoldsReportAHoldType struct - public class LegalHoldsReportAHoldType: CustomStringConvertible { + public class LegalHoldsReportAHoldType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -33807,11 +35639,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LegalHoldsReportAHoldTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LegalHoldsReportAHoldTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LegalHoldsReportAHoldType: \(error)" } } } @@ -33837,7 +35673,7 @@ public class TeamLog { } /// The device sessions that user is linked to. - public enum LinkedDeviceLogInfo: CustomStringConvertible { + public enum LinkedDeviceLogInfo: CustomStringConvertible, JSONRepresentable { /// desktop device session's details. case desktopDeviceSession(TeamLog.DesktopDeviceSessionLogInfo) /// legacy device session's details. @@ -33849,11 +35685,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try LinkedDeviceLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LinkedDeviceLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LinkedDeviceLogInfo: \(error)" } } } @@ -33914,7 +35754,7 @@ public class TeamLog { } /// File lock status - public enum LockStatus: CustomStringConvertible { + public enum LockStatus: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case locked /// An unspecified error. @@ -33922,11 +35762,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try LockStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LockStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LockStatus: \(error)" } } } @@ -33971,7 +35815,7 @@ public class TeamLog { } /// Failed to sign in. - public class LoginFailDetails: CustomStringConvertible { + public class LoginFailDetails: CustomStringConvertible, JSONRepresentable { /// Tells if the login device is EMM managed. Might be missing due to historical data gap. public let isEmmManaged: Bool? /// Login method. @@ -33984,11 +35828,15 @@ public class TeamLog { self.errorDetails = errorDetails } + func json() throws -> JSON { + try LoginFailDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LoginFailDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LoginFailDetails: \(error)" } } } @@ -34018,7 +35866,7 @@ public class TeamLog { } /// The LoginFailType struct - public class LoginFailType: CustomStringConvertible { + public class LoginFailType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34026,11 +35874,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LoginFailTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LoginFailTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LoginFailType: \(error)" } } } @@ -34056,7 +35908,7 @@ public class TeamLog { } /// The LoginMethod union - public enum LoginMethod: CustomStringConvertible { + public enum LoginMethod: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case appleOauth /// An unspecified error. @@ -34078,11 +35930,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try LoginMethodSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LoginMethodSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LoginMethod: \(error)" } } } @@ -34169,7 +36025,7 @@ public class TeamLog { } /// Signed in. - public class LoginSuccessDetails: CustomStringConvertible { + public class LoginSuccessDetails: CustomStringConvertible, JSONRepresentable { /// Tells if the login device is EMM managed. Might be missing due to historical data gap. public let isEmmManaged: Bool? /// Login method. @@ -34179,11 +36035,15 @@ public class TeamLog { self.loginMethod = loginMethod } + func json() throws -> JSON { + try LoginSuccessDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LoginSuccessDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LoginSuccessDetails: \(error)" } } } @@ -34211,7 +36071,7 @@ public class TeamLog { } /// The LoginSuccessType struct - public class LoginSuccessType: CustomStringConvertible { + public class LoginSuccessType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34219,11 +36079,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LoginSuccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LoginSuccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LoginSuccessType: \(error)" } } } @@ -34249,7 +36113,7 @@ public class TeamLog { } /// Signed out. - public class LogoutDetails: CustomStringConvertible { + public class LogoutDetails: CustomStringConvertible, JSONRepresentable { /// Login session id. public let loginId: String? public init(loginId: String? = nil) { @@ -34257,11 +36121,15 @@ public class TeamLog { self.loginId = loginId } + func json() throws -> JSON { + try LogoutDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LogoutDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LogoutDetails: \(error)" } } } @@ -34287,7 +36155,7 @@ public class TeamLog { } /// The LogoutType struct - public class LogoutType: CustomStringConvertible { + public class LogoutType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34295,11 +36163,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try LogoutTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try LogoutTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for LogoutType: \(error)" } } } @@ -34325,7 +36197,7 @@ public class TeamLog { } /// Added an external ID for team member. - public class MemberAddExternalIdDetails: CustomStringConvertible { + public class MemberAddExternalIdDetails: CustomStringConvertible, JSONRepresentable { /// Current external id. public let newValue: String public init(newValue: String) { @@ -34333,11 +36205,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try MemberAddExternalIdDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddExternalIdDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddExternalIdDetails: \(error)" } } } @@ -34363,7 +36239,7 @@ public class TeamLog { } /// The MemberAddExternalIdType struct - public class MemberAddExternalIdType: CustomStringConvertible { + public class MemberAddExternalIdType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34371,11 +36247,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberAddExternalIdTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddExternalIdTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddExternalIdType: \(error)" } } } @@ -34401,18 +36281,22 @@ public class TeamLog { } /// Added team member name. - public class MemberAddNameDetails: CustomStringConvertible { + public class MemberAddNameDetails: CustomStringConvertible, JSONRepresentable { /// New user's name. public let newValue: TeamLog.UserNameLogInfo public init(newValue: TeamLog.UserNameLogInfo) { self.newValue = newValue } + func json() throws -> JSON { + try MemberAddNameDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddNameDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddNameDetails: \(error)" } } } @@ -34438,7 +36322,7 @@ public class TeamLog { } /// The MemberAddNameType struct - public class MemberAddNameType: CustomStringConvertible { + public class MemberAddNameType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34446,11 +36330,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberAddNameTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberAddNameTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberAddNameType: \(error)" } } } @@ -34476,7 +36364,7 @@ public class TeamLog { } /// Changed team member admin role. - public class MemberChangeAdminRoleDetails: CustomStringConvertible { + public class MemberChangeAdminRoleDetails: CustomStringConvertible, JSONRepresentable { /// New admin role. This field is relevant when the admin role is changed or whenthe user role changes from no /// admin rights to with admin rights. public let newValue: TeamLog.AdminRole? @@ -34488,11 +36376,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberChangeAdminRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeAdminRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeAdminRoleDetails: \(error)" } } } @@ -34520,7 +36412,7 @@ public class TeamLog { } /// The MemberChangeAdminRoleType struct - public class MemberChangeAdminRoleType: CustomStringConvertible { + public class MemberChangeAdminRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34528,11 +36420,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberChangeAdminRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeAdminRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeAdminRoleType: \(error)" } } } @@ -34558,7 +36454,7 @@ public class TeamLog { } /// Changed team member email. - public class MemberChangeEmailDetails: CustomStringConvertible { + public class MemberChangeEmailDetails: CustomStringConvertible, JSONRepresentable { /// New email. public let newValue: String /// Previous email. Might be missing due to historical data gap. @@ -34570,11 +36466,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberChangeEmailDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeEmailDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeEmailDetails: \(error)" } } } @@ -34602,7 +36502,7 @@ public class TeamLog { } /// The MemberChangeEmailType struct - public class MemberChangeEmailType: CustomStringConvertible { + public class MemberChangeEmailType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34610,11 +36510,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberChangeEmailTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeEmailTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeEmailType: \(error)" } } } @@ -34640,7 +36544,7 @@ public class TeamLog { } /// Changed the external ID for team member. - public class MemberChangeExternalIdDetails: CustomStringConvertible { + public class MemberChangeExternalIdDetails: CustomStringConvertible, JSONRepresentable { /// Current external id. public let newValue: String /// Old external id. @@ -34652,11 +36556,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberChangeExternalIdDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeExternalIdDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeExternalIdDetails: \(error)" } } } @@ -34684,7 +36592,7 @@ public class TeamLog { } /// The MemberChangeExternalIdType struct - public class MemberChangeExternalIdType: CustomStringConvertible { + public class MemberChangeExternalIdType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34692,11 +36600,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberChangeExternalIdTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeExternalIdTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeExternalIdType: \(error)" } } } @@ -34722,7 +36634,7 @@ public class TeamLog { } /// Changed membership type (limited/full) of member. - public class MemberChangeMembershipTypeDetails: CustomStringConvertible { + public class MemberChangeMembershipTypeDetails: CustomStringConvertible, JSONRepresentable { /// Previous membership type. public let prevValue: TeamLog.TeamMembershipType /// New membership type. @@ -34732,11 +36644,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try MemberChangeMembershipTypeDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeMembershipTypeDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeMembershipTypeDetails: \(error)" } } } @@ -34764,7 +36680,7 @@ public class TeamLog { } /// The MemberChangeMembershipTypeType struct - public class MemberChangeMembershipTypeType: CustomStringConvertible { + public class MemberChangeMembershipTypeType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34772,11 +36688,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberChangeMembershipTypeTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeMembershipTypeTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeMembershipTypeType: \(error)" } } } @@ -34802,7 +36722,7 @@ public class TeamLog { } /// Changed team member name. - public class MemberChangeNameDetails: CustomStringConvertible { + public class MemberChangeNameDetails: CustomStringConvertible, JSONRepresentable { /// New user's name. public let newValue: TeamLog.UserNameLogInfo /// Previous user's name. Might be missing due to historical data gap. @@ -34812,11 +36732,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberChangeNameDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeNameDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeNameDetails: \(error)" } } } @@ -34844,7 +36768,7 @@ public class TeamLog { } /// The MemberChangeNameType struct - public class MemberChangeNameType: CustomStringConvertible { + public class MemberChangeNameType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34852,11 +36776,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberChangeNameTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeNameTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeNameType: \(error)" } } } @@ -34882,7 +36810,7 @@ public class TeamLog { } /// Changed team member reseller role. - public class MemberChangeResellerRoleDetails: CustomStringConvertible { + public class MemberChangeResellerRoleDetails: CustomStringConvertible, JSONRepresentable { /// New reseller role. This field is relevant when the reseller role is changed. public let newValue: TeamLog.ResellerRole /// Previous reseller role. This field is relevant when the reseller role is changed or when the reseller role @@ -34893,11 +36821,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberChangeResellerRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeResellerRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeResellerRoleDetails: \(error)" } } } @@ -34925,7 +36857,7 @@ public class TeamLog { } /// The MemberChangeResellerRoleType struct - public class MemberChangeResellerRoleType: CustomStringConvertible { + public class MemberChangeResellerRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -34933,11 +36865,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberChangeResellerRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeResellerRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeResellerRoleType: \(error)" } } } @@ -34963,7 +36899,7 @@ public class TeamLog { } /// Changed member status (invited, joined, suspended, etc.). - public class MemberChangeStatusDetails: CustomStringConvertible { + public class MemberChangeStatusDetails: CustomStringConvertible, JSONRepresentable { /// Previous member status. Might be missing due to historical data gap. public let previousValue: TeamLog.MemberStatus? /// New member status. @@ -34990,11 +36926,15 @@ public class TeamLog { self.previousTeam = previousTeam } + func json() throws -> JSON { + try MemberChangeStatusDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeStatusDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeStatusDetails: \(error)" } } } @@ -35034,7 +36974,7 @@ public class TeamLog { } /// The MemberChangeStatusType struct - public class MemberChangeStatusType: CustomStringConvertible { + public class MemberChangeStatusType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35042,11 +36982,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberChangeStatusTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberChangeStatusTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberChangeStatusType: \(error)" } } } @@ -35072,12 +37016,16 @@ public class TeamLog { } /// Cleared manually added contacts. - public class MemberDeleteManualContactsDetails: CustomStringConvertible { + public class MemberDeleteManualContactsDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try MemberDeleteManualContactsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberDeleteManualContactsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberDeleteManualContactsDetails: \(error)" } } } @@ -35100,7 +37048,7 @@ public class TeamLog { } /// The MemberDeleteManualContactsType struct - public class MemberDeleteManualContactsType: CustomStringConvertible { + public class MemberDeleteManualContactsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35108,11 +37056,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberDeleteManualContactsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberDeleteManualContactsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberDeleteManualContactsType: \(error)" } } } @@ -35138,12 +37090,16 @@ public class TeamLog { } /// Deleted team member profile photo. - public class MemberDeleteProfilePhotoDetails: CustomStringConvertible { + public class MemberDeleteProfilePhotoDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try MemberDeleteProfilePhotoDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberDeleteProfilePhotoDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberDeleteProfilePhotoDetails: \(error)" } } } @@ -35166,7 +37122,7 @@ public class TeamLog { } /// The MemberDeleteProfilePhotoType struct - public class MemberDeleteProfilePhotoType: CustomStringConvertible { + public class MemberDeleteProfilePhotoType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35174,11 +37130,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberDeleteProfilePhotoTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberDeleteProfilePhotoTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberDeleteProfilePhotoType: \(error)" } } } @@ -35204,12 +37164,16 @@ public class TeamLog { } /// Permanently deleted contents of deleted team member account. - public class MemberPermanentlyDeleteAccountContentsDetails: CustomStringConvertible { + public class MemberPermanentlyDeleteAccountContentsDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try MemberPermanentlyDeleteAccountContentsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberPermanentlyDeleteAccountContentsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberPermanentlyDeleteAccountContentsDetails: \(error)" } } } @@ -35232,7 +37196,7 @@ public class TeamLog { } /// The MemberPermanentlyDeleteAccountContentsType struct - public class MemberPermanentlyDeleteAccountContentsType: CustomStringConvertible { + public class MemberPermanentlyDeleteAccountContentsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35240,11 +37204,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberPermanentlyDeleteAccountContentsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberPermanentlyDeleteAccountContentsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberPermanentlyDeleteAccountContentsType: \(error)" } } } @@ -35270,7 +37238,7 @@ public class TeamLog { } /// The MemberRemoveActionType union - public enum MemberRemoveActionType: CustomStringConvertible { + public enum MemberRemoveActionType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case delete /// An unspecified error. @@ -35282,11 +37250,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try MemberRemoveActionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberRemoveActionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberRemoveActionType: \(error)" } } } @@ -35343,7 +37315,7 @@ public class TeamLog { } /// Removed the external ID for team member. - public class MemberRemoveExternalIdDetails: CustomStringConvertible { + public class MemberRemoveExternalIdDetails: CustomStringConvertible, JSONRepresentable { /// Old external id. public let previousValue: String public init(previousValue: String) { @@ -35351,11 +37323,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberRemoveExternalIdDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberRemoveExternalIdDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberRemoveExternalIdDetails: \(error)" } } } @@ -35381,7 +37357,7 @@ public class TeamLog { } /// The MemberRemoveExternalIdType struct - public class MemberRemoveExternalIdType: CustomStringConvertible { + public class MemberRemoveExternalIdType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35389,11 +37365,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberRemoveExternalIdTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberRemoveExternalIdTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberRemoveExternalIdType: \(error)" } } } @@ -35419,7 +37399,7 @@ public class TeamLog { } /// Changed whether users can find team when not invited. - public class MemberRequestsChangePolicyDetails: CustomStringConvertible { + public class MemberRequestsChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New member change requests policy. public let newValue: TeamLog.MemberRequestsPolicy /// Previous member change requests policy. Might be missing due to historical data gap. @@ -35429,11 +37409,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberRequestsChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberRequestsChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberRequestsChangePolicyDetails: \(error)" } } } @@ -35461,7 +37445,7 @@ public class TeamLog { } /// The MemberRequestsChangePolicyType struct - public class MemberRequestsChangePolicyType: CustomStringConvertible { + public class MemberRequestsChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35469,11 +37453,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberRequestsChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberRequestsChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberRequestsChangePolicyType: \(error)" } } } @@ -35499,7 +37487,7 @@ public class TeamLog { } /// The MemberRequestsPolicy union - public enum MemberRequestsPolicy: CustomStringConvertible { + public enum MemberRequestsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case autoAccept /// An unspecified error. @@ -35509,11 +37497,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try MemberRequestsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberRequestsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberRequestsPolicy: \(error)" } } } @@ -35564,7 +37556,7 @@ public class TeamLog { } /// Policy for controlling whether team members can send team invites - public enum MemberSendInvitePolicy: CustomStringConvertible { + public enum MemberSendInvitePolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -35574,11 +37566,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try MemberSendInvitePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSendInvitePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSendInvitePolicy: \(error)" } } } @@ -35629,7 +37625,7 @@ public class TeamLog { } /// Changed member send invite policy for team. - public class MemberSendInvitePolicyChangedDetails: CustomStringConvertible { + public class MemberSendInvitePolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New team member send invite policy. public let newValue: TeamLog.MemberSendInvitePolicy /// Previous team member send invite policy. @@ -35639,11 +37635,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberSendInvitePolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSendInvitePolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSendInvitePolicyChangedDetails: \(error)" } } } @@ -35671,7 +37671,7 @@ public class TeamLog { } /// The MemberSendInvitePolicyChangedType struct - public class MemberSendInvitePolicyChangedType: CustomStringConvertible { + public class MemberSendInvitePolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35679,11 +37679,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSendInvitePolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSendInvitePolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSendInvitePolicyChangedType: \(error)" } } } @@ -35709,12 +37713,16 @@ public class TeamLog { } /// Set team member profile photo. - public class MemberSetProfilePhotoDetails: CustomStringConvertible { + public class MemberSetProfilePhotoDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try MemberSetProfilePhotoDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSetProfilePhotoDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSetProfilePhotoDetails: \(error)" } } } @@ -35737,7 +37745,7 @@ public class TeamLog { } /// The MemberSetProfilePhotoType struct - public class MemberSetProfilePhotoType: CustomStringConvertible { + public class MemberSetProfilePhotoType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35745,11 +37753,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSetProfilePhotoTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSetProfilePhotoTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSetProfilePhotoType: \(error)" } } } @@ -35775,7 +37787,7 @@ public class TeamLog { } /// Set custom member space limit. - public class MemberSpaceLimitsAddCustomQuotaDetails: CustomStringConvertible { + public class MemberSpaceLimitsAddCustomQuotaDetails: CustomStringConvertible, JSONRepresentable { /// New custom quota value in bytes. public let newValue: UInt64 public init(newValue: UInt64) { @@ -35783,11 +37795,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try MemberSpaceLimitsAddCustomQuotaDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsAddCustomQuotaDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsAddCustomQuotaDetails: \(error)" } } } @@ -35813,7 +37829,7 @@ public class TeamLog { } /// The MemberSpaceLimitsAddCustomQuotaType struct - public class MemberSpaceLimitsAddCustomQuotaType: CustomStringConvertible { + public class MemberSpaceLimitsAddCustomQuotaType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35821,11 +37837,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSpaceLimitsAddCustomQuotaTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsAddCustomQuotaTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsAddCustomQuotaType: \(error)" } } } @@ -35851,12 +37871,16 @@ public class TeamLog { } /// Added members to member space limit exception list. - public class MemberSpaceLimitsAddExceptionDetails: CustomStringConvertible { + public class MemberSpaceLimitsAddExceptionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try MemberSpaceLimitsAddExceptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsAddExceptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsAddExceptionDetails: \(error)" } } } @@ -35879,7 +37903,7 @@ public class TeamLog { } /// The MemberSpaceLimitsAddExceptionType struct - public class MemberSpaceLimitsAddExceptionType: CustomStringConvertible { + public class MemberSpaceLimitsAddExceptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35887,11 +37911,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSpaceLimitsAddExceptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsAddExceptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsAddExceptionType: \(error)" } } } @@ -35917,7 +37945,7 @@ public class TeamLog { } /// Changed member space limit type for team. - public class MemberSpaceLimitsChangeCapsTypePolicyDetails: CustomStringConvertible { + public class MemberSpaceLimitsChangeCapsTypePolicyDetails: CustomStringConvertible, JSONRepresentable { /// Previous space limit type. public let previousValue: TeamLog.SpaceCapsType /// New space limit type. @@ -35927,11 +37955,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try MemberSpaceLimitsChangeCapsTypePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsChangeCapsTypePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsChangeCapsTypePolicyDetails: \(error)" } } } @@ -35959,7 +37991,7 @@ public class TeamLog { } /// The MemberSpaceLimitsChangeCapsTypePolicyType struct - public class MemberSpaceLimitsChangeCapsTypePolicyType: CustomStringConvertible { + public class MemberSpaceLimitsChangeCapsTypePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -35967,11 +37999,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSpaceLimitsChangeCapsTypePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsChangeCapsTypePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsChangeCapsTypePolicyType: \(error)" } } } @@ -35997,7 +38033,7 @@ public class TeamLog { } /// Changed custom member space limit. - public class MemberSpaceLimitsChangeCustomQuotaDetails: CustomStringConvertible { + public class MemberSpaceLimitsChangeCustomQuotaDetails: CustomStringConvertible, JSONRepresentable { /// Previous custom quota value in bytes. public let previousValue: UInt64 /// New custom quota value in bytes. @@ -36009,11 +38045,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try MemberSpaceLimitsChangeCustomQuotaDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsChangeCustomQuotaDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsChangeCustomQuotaDetails: \(error)" } } } @@ -36041,7 +38081,7 @@ public class TeamLog { } /// The MemberSpaceLimitsChangeCustomQuotaType struct - public class MemberSpaceLimitsChangeCustomQuotaType: CustomStringConvertible { + public class MemberSpaceLimitsChangeCustomQuotaType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36049,11 +38089,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSpaceLimitsChangeCustomQuotaTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsChangeCustomQuotaTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsChangeCustomQuotaType: \(error)" } } } @@ -36079,7 +38123,7 @@ public class TeamLog { } /// Changed team default member space limit. - public class MemberSpaceLimitsChangePolicyDetails: CustomStringConvertible { + public class MemberSpaceLimitsChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// Previous team default limit value in bytes. Might be missing due to historical data gap. public let previousValue: UInt64? /// New team default limit value in bytes. Might be missing due to historical data gap. @@ -36091,11 +38135,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try MemberSpaceLimitsChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsChangePolicyDetails: \(error)" } } } @@ -36123,7 +38171,7 @@ public class TeamLog { } /// The MemberSpaceLimitsChangePolicyType struct - public class MemberSpaceLimitsChangePolicyType: CustomStringConvertible { + public class MemberSpaceLimitsChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36131,11 +38179,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSpaceLimitsChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsChangePolicyType: \(error)" } } } @@ -36161,7 +38213,7 @@ public class TeamLog { } /// Changed space limit status. - public class MemberSpaceLimitsChangeStatusDetails: CustomStringConvertible { + public class MemberSpaceLimitsChangeStatusDetails: CustomStringConvertible, JSONRepresentable { /// Previous storage quota status. public let previousValue: TeamLog.SpaceLimitsStatus /// New storage quota status. @@ -36171,11 +38223,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try MemberSpaceLimitsChangeStatusDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsChangeStatusDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsChangeStatusDetails: \(error)" } } } @@ -36203,7 +38259,7 @@ public class TeamLog { } /// The MemberSpaceLimitsChangeStatusType struct - public class MemberSpaceLimitsChangeStatusType: CustomStringConvertible { + public class MemberSpaceLimitsChangeStatusType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36211,11 +38267,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSpaceLimitsChangeStatusTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsChangeStatusTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsChangeStatusType: \(error)" } } } @@ -36241,12 +38301,16 @@ public class TeamLog { } /// Removed custom member space limit. - public class MemberSpaceLimitsRemoveCustomQuotaDetails: CustomStringConvertible { + public class MemberSpaceLimitsRemoveCustomQuotaDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try MemberSpaceLimitsRemoveCustomQuotaDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsRemoveCustomQuotaDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsRemoveCustomQuotaDetails: \(error)" } } } @@ -36269,7 +38333,7 @@ public class TeamLog { } /// The MemberSpaceLimitsRemoveCustomQuotaType struct - public class MemberSpaceLimitsRemoveCustomQuotaType: CustomStringConvertible { + public class MemberSpaceLimitsRemoveCustomQuotaType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36277,11 +38341,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSpaceLimitsRemoveCustomQuotaTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsRemoveCustomQuotaTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsRemoveCustomQuotaType: \(error)" } } } @@ -36307,12 +38375,16 @@ public class TeamLog { } /// Removed members from member space limit exception list. - public class MemberSpaceLimitsRemoveExceptionDetails: CustomStringConvertible { + public class MemberSpaceLimitsRemoveExceptionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try MemberSpaceLimitsRemoveExceptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsRemoveExceptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsRemoveExceptionDetails: \(error)" } } } @@ -36335,7 +38407,7 @@ public class TeamLog { } /// The MemberSpaceLimitsRemoveExceptionType struct - public class MemberSpaceLimitsRemoveExceptionType: CustomStringConvertible { + public class MemberSpaceLimitsRemoveExceptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36343,11 +38415,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSpaceLimitsRemoveExceptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSpaceLimitsRemoveExceptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSpaceLimitsRemoveExceptionType: \(error)" } } } @@ -36373,7 +38449,7 @@ public class TeamLog { } /// The MemberStatus union - public enum MemberStatus: CustomStringConvertible { + public enum MemberStatus: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case active /// An unspecified error. @@ -36389,11 +38465,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try MemberStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberStatus: \(error)" } } } @@ -36462,7 +38542,7 @@ public class TeamLog { } /// Suggested person to add to team. - public class MemberSuggestDetails: CustomStringConvertible { + public class MemberSuggestDetails: CustomStringConvertible, JSONRepresentable { /// suggested users emails. public let suggestedMembers: [String] public init(suggestedMembers: [String]) { @@ -36470,11 +38550,15 @@ public class TeamLog { self.suggestedMembers = suggestedMembers } + func json() throws -> JSON { + try MemberSuggestDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSuggestDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSuggestDetails: \(error)" } } } @@ -36500,7 +38584,7 @@ public class TeamLog { } /// The MemberSuggestType struct - public class MemberSuggestType: CustomStringConvertible { + public class MemberSuggestType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36508,11 +38592,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSuggestTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSuggestTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSuggestType: \(error)" } } } @@ -36538,7 +38626,7 @@ public class TeamLog { } /// Enabled/disabled option for team members to suggest people to add to team. - public class MemberSuggestionsChangePolicyDetails: CustomStringConvertible { + public class MemberSuggestionsChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New team member suggestions policy. public let newValue: TeamLog.MemberSuggestionsPolicy /// Previous team member suggestions policy. Might be missing due to historical data gap. @@ -36548,11 +38636,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MemberSuggestionsChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSuggestionsChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSuggestionsChangePolicyDetails: \(error)" } } } @@ -36580,7 +38672,7 @@ public class TeamLog { } /// The MemberSuggestionsChangePolicyType struct - public class MemberSuggestionsChangePolicyType: CustomStringConvertible { + public class MemberSuggestionsChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36588,11 +38680,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberSuggestionsChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSuggestionsChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSuggestionsChangePolicyType: \(error)" } } } @@ -36618,7 +38714,7 @@ public class TeamLog { } /// Member suggestions policy - public enum MemberSuggestionsPolicy: CustomStringConvertible { + public enum MemberSuggestionsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -36626,11 +38722,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try MemberSuggestionsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberSuggestionsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberSuggestionsPolicy: \(error)" } } } @@ -36675,12 +38775,16 @@ public class TeamLog { } /// Transferred contents of deleted member account to another member. - public class MemberTransferAccountContentsDetails: CustomStringConvertible { + public class MemberTransferAccountContentsDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try MemberTransferAccountContentsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberTransferAccountContentsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberTransferAccountContentsDetails: \(error)" } } } @@ -36703,7 +38807,7 @@ public class TeamLog { } /// The MemberTransferAccountContentsType struct - public class MemberTransferAccountContentsType: CustomStringConvertible { + public class MemberTransferAccountContentsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36711,11 +38815,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MemberTransferAccountContentsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberTransferAccountContentsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberTransferAccountContentsType: \(error)" } } } @@ -36741,7 +38849,7 @@ public class TeamLog { } /// Internal only - fields for target team computations - public class MemberTransferredInternalFields: CustomStringConvertible { + public class MemberTransferredInternalFields: CustomStringConvertible, JSONRepresentable { /// Internal only - team user was moved from. public let sourceTeamId: String /// Internal only - team user was moved to. @@ -36753,11 +38861,15 @@ public class TeamLog { self.targetTeamId = targetTeamId } + func json() throws -> JSON { + try MemberTransferredInternalFieldsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MemberTransferredInternalFieldsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MemberTransferredInternalFields: \(error)" } } } @@ -36785,7 +38897,7 @@ public class TeamLog { } /// Enabled/disabled Microsoft Office add-in. - public class MicrosoftOfficeAddinChangePolicyDetails: CustomStringConvertible { + public class MicrosoftOfficeAddinChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New Microsoft Office addin policy. public let newValue: TeamLog.MicrosoftOfficeAddinPolicy /// Previous Microsoft Office addin policy. Might be missing due to historical data gap. @@ -36795,11 +38907,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try MicrosoftOfficeAddinChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MicrosoftOfficeAddinChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MicrosoftOfficeAddinChangePolicyDetails: \(error)" } } } @@ -36827,7 +38943,7 @@ public class TeamLog { } /// The MicrosoftOfficeAddinChangePolicyType struct - public class MicrosoftOfficeAddinChangePolicyType: CustomStringConvertible { + public class MicrosoftOfficeAddinChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -36835,11 +38951,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try MicrosoftOfficeAddinChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MicrosoftOfficeAddinChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MicrosoftOfficeAddinChangePolicyType: \(error)" } } } @@ -36865,7 +38985,7 @@ public class TeamLog { } /// Microsoft Office addin policy - public enum MicrosoftOfficeAddinPolicy: CustomStringConvertible { + public enum MicrosoftOfficeAddinPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -36873,11 +38993,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try MicrosoftOfficeAddinPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MicrosoftOfficeAddinPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MicrosoftOfficeAddinPolicy: \(error)" } } } @@ -36923,7 +39047,7 @@ public class TeamLog { /// An indication that an error occurred while retrieving the event. Some attributes of the event may be omitted as /// a result. - public class MissingDetails: CustomStringConvertible { + public class MissingDetails: CustomStringConvertible, JSONRepresentable { /// All the data that could be retrieved and converted from the source event. public let sourceEventFields: String? public init(sourceEventFields: String? = nil) { @@ -36931,11 +39055,15 @@ public class TeamLog { self.sourceEventFields = sourceEventFields } + func json() throws -> JSON { + try MissingDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try MissingDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MissingDetails: \(error)" } } } @@ -37002,7 +39130,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try MobileDeviceSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MobileDeviceSessionLogInfo: \(error)" } } } @@ -37059,7 +39187,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try MobileSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for MobileSessionLogInfo: \(error)" } } } @@ -37085,7 +39213,7 @@ public class TeamLog { } /// Namespace relative path details. - public class NamespaceRelativePathLogInfo: CustomStringConvertible { + public class NamespaceRelativePathLogInfo: CustomStringConvertible, JSONRepresentable { /// Namespace ID. public let nsId: String? /// A path relative to the specified namespace ID. @@ -37100,11 +39228,15 @@ public class TeamLog { self.isSharedNamespace = isSharedNamespace } + func json() throws -> JSON { + try NamespaceRelativePathLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NamespaceRelativePathLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NamespaceRelativePathLogInfo: \(error)" } } } @@ -37134,7 +39266,7 @@ public class TeamLog { } /// Enabled/disabled network control. - public class NetworkControlChangePolicyDetails: CustomStringConvertible { + public class NetworkControlChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New network control policy. public let newValue: TeamLog.NetworkControlPolicy /// Previous network control policy. Might be missing due to historical data gap. @@ -37144,11 +39276,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try NetworkControlChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NetworkControlChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NetworkControlChangePolicyDetails: \(error)" } } } @@ -37176,7 +39312,7 @@ public class TeamLog { } /// The NetworkControlChangePolicyType struct - public class NetworkControlChangePolicyType: CustomStringConvertible { + public class NetworkControlChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37184,11 +39320,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NetworkControlChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NetworkControlChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NetworkControlChangePolicyType: \(error)" } } } @@ -37214,7 +39354,7 @@ public class TeamLog { } /// Network control policy - public enum NetworkControlPolicy: CustomStringConvertible { + public enum NetworkControlPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -37222,11 +39362,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try NetworkControlPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NetworkControlPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NetworkControlPolicy: \(error)" } } } @@ -37271,7 +39415,7 @@ public class TeamLog { } /// Report created: Links created with no expiration. - public class NoExpirationLinkGenCreateReportDetails: CustomStringConvertible { + public class NoExpirationLinkGenCreateReportDetails: CustomStringConvertible, JSONRepresentable { /// Report start date. public let startDate: Date /// Report end date. @@ -37281,11 +39425,15 @@ public class TeamLog { self.endDate = endDate } + func json() throws -> JSON { + try NoExpirationLinkGenCreateReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoExpirationLinkGenCreateReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoExpirationLinkGenCreateReportDetails: \(error)" } } } @@ -37313,7 +39461,7 @@ public class TeamLog { } /// The NoExpirationLinkGenCreateReportType struct - public class NoExpirationLinkGenCreateReportType: CustomStringConvertible { + public class NoExpirationLinkGenCreateReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37321,11 +39469,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoExpirationLinkGenCreateReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoExpirationLinkGenCreateReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoExpirationLinkGenCreateReportType: \(error)" } } } @@ -37351,18 +39503,22 @@ public class TeamLog { } /// Couldn't create report: Links created with no expiration. - public class NoExpirationLinkGenReportFailedDetails: CustomStringConvertible { + public class NoExpirationLinkGenReportFailedDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try NoExpirationLinkGenReportFailedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoExpirationLinkGenReportFailedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoExpirationLinkGenReportFailedDetails: \(error)" } } } @@ -37388,7 +39544,7 @@ public class TeamLog { } /// The NoExpirationLinkGenReportFailedType struct - public class NoExpirationLinkGenReportFailedType: CustomStringConvertible { + public class NoExpirationLinkGenReportFailedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37396,11 +39552,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoExpirationLinkGenReportFailedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoExpirationLinkGenReportFailedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoExpirationLinkGenReportFailedType: \(error)" } } } @@ -37426,7 +39586,7 @@ public class TeamLog { } /// Report created: Links created without passwords. - public class NoPasswordLinkGenCreateReportDetails: CustomStringConvertible { + public class NoPasswordLinkGenCreateReportDetails: CustomStringConvertible, JSONRepresentable { /// Report start date. public let startDate: Date /// Report end date. @@ -37436,11 +39596,15 @@ public class TeamLog { self.endDate = endDate } + func json() throws -> JSON { + try NoPasswordLinkGenCreateReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoPasswordLinkGenCreateReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoPasswordLinkGenCreateReportDetails: \(error)" } } } @@ -37468,7 +39632,7 @@ public class TeamLog { } /// The NoPasswordLinkGenCreateReportType struct - public class NoPasswordLinkGenCreateReportType: CustomStringConvertible { + public class NoPasswordLinkGenCreateReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37476,11 +39640,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoPasswordLinkGenCreateReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoPasswordLinkGenCreateReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoPasswordLinkGenCreateReportType: \(error)" } } } @@ -37506,18 +39674,22 @@ public class TeamLog { } /// Couldn't create report: Links created without passwords. - public class NoPasswordLinkGenReportFailedDetails: CustomStringConvertible { + public class NoPasswordLinkGenReportFailedDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try NoPasswordLinkGenReportFailedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoPasswordLinkGenReportFailedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoPasswordLinkGenReportFailedDetails: \(error)" } } } @@ -37543,7 +39715,7 @@ public class TeamLog { } /// The NoPasswordLinkGenReportFailedType struct - public class NoPasswordLinkGenReportFailedType: CustomStringConvertible { + public class NoPasswordLinkGenReportFailedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37551,11 +39723,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoPasswordLinkGenReportFailedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoPasswordLinkGenReportFailedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoPasswordLinkGenReportFailedType: \(error)" } } } @@ -37581,7 +39757,7 @@ public class TeamLog { } /// Report created: Views of links without passwords. - public class NoPasswordLinkViewCreateReportDetails: CustomStringConvertible { + public class NoPasswordLinkViewCreateReportDetails: CustomStringConvertible, JSONRepresentable { /// Report start date. public let startDate: Date /// Report end date. @@ -37591,11 +39767,15 @@ public class TeamLog { self.endDate = endDate } + func json() throws -> JSON { + try NoPasswordLinkViewCreateReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoPasswordLinkViewCreateReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoPasswordLinkViewCreateReportDetails: \(error)" } } } @@ -37623,7 +39803,7 @@ public class TeamLog { } /// The NoPasswordLinkViewCreateReportType struct - public class NoPasswordLinkViewCreateReportType: CustomStringConvertible { + public class NoPasswordLinkViewCreateReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37631,11 +39811,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoPasswordLinkViewCreateReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoPasswordLinkViewCreateReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoPasswordLinkViewCreateReportType: \(error)" } } } @@ -37661,18 +39845,22 @@ public class TeamLog { } /// Couldn't create report: Views of links without passwords. - public class NoPasswordLinkViewReportFailedDetails: CustomStringConvertible { + public class NoPasswordLinkViewReportFailedDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try NoPasswordLinkViewReportFailedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoPasswordLinkViewReportFailedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoPasswordLinkViewReportFailedDetails: \(error)" } } } @@ -37698,7 +39886,7 @@ public class TeamLog { } /// The NoPasswordLinkViewReportFailedType struct - public class NoPasswordLinkViewReportFailedType: CustomStringConvertible { + public class NoPasswordLinkViewReportFailedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37706,11 +39894,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoPasswordLinkViewReportFailedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoPasswordLinkViewReportFailedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoPasswordLinkViewReportFailedType: \(error)" } } } @@ -37736,7 +39928,7 @@ public class TeamLog { } /// User's logged information. - public class UserLogInfo: CustomStringConvertible { + public class UserLogInfo: CustomStringConvertible, JSONRepresentable { /// User unique ID. public let accountId: String? /// User display name. @@ -37752,11 +39944,15 @@ public class TeamLog { self.email = email } + func json() throws -> JSON { + try UserLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserLogInfo: \(error)" } } } @@ -37820,7 +40016,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try NonTeamMemberLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NonTeamMemberLogInfo: \(error)" } } } @@ -37850,7 +40046,7 @@ public class TeamLog { } /// The email to which the request was sent - public class NonTrustedTeamDetails: CustomStringConvertible { + public class NonTrustedTeamDetails: CustomStringConvertible, JSONRepresentable { /// The email to which the request was sent. public let team: String public init(team: String) { @@ -37858,11 +40054,15 @@ public class TeamLog { self.team = team } + func json() throws -> JSON { + try NonTrustedTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NonTrustedTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NonTrustedTeamDetails: \(error)" } } } @@ -37888,12 +40088,16 @@ public class TeamLog { } /// Changed Paper doc to invite-only. - public class NoteAclInviteOnlyDetails: CustomStringConvertible { + public class NoteAclInviteOnlyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try NoteAclInviteOnlyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteAclInviteOnlyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteAclInviteOnlyDetails: \(error)" } } } @@ -37916,7 +40120,7 @@ public class TeamLog { } /// The NoteAclInviteOnlyType struct - public class NoteAclInviteOnlyType: CustomStringConvertible { + public class NoteAclInviteOnlyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37924,11 +40128,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoteAclInviteOnlyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteAclInviteOnlyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteAclInviteOnlyType: \(error)" } } } @@ -37954,12 +40162,16 @@ public class TeamLog { } /// Changed Paper doc to link-accessible. - public class NoteAclLinkDetails: CustomStringConvertible { + public class NoteAclLinkDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try NoteAclLinkDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteAclLinkDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteAclLinkDetails: \(error)" } } } @@ -37982,7 +40194,7 @@ public class TeamLog { } /// The NoteAclLinkType struct - public class NoteAclLinkType: CustomStringConvertible { + public class NoteAclLinkType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -37990,11 +40202,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoteAclLinkTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteAclLinkTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteAclLinkType: \(error)" } } } @@ -38020,12 +40236,16 @@ public class TeamLog { } /// Changed Paper doc to link-accessible for team. - public class NoteAclTeamLinkDetails: CustomStringConvertible { + public class NoteAclTeamLinkDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try NoteAclTeamLinkDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteAclTeamLinkDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteAclTeamLinkDetails: \(error)" } } } @@ -38048,7 +40268,7 @@ public class TeamLog { } /// The NoteAclTeamLinkType struct - public class NoteAclTeamLinkType: CustomStringConvertible { + public class NoteAclTeamLinkType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38056,11 +40276,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoteAclTeamLinkTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteAclTeamLinkTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteAclTeamLinkType: \(error)" } } } @@ -38086,12 +40310,16 @@ public class TeamLog { } /// Shared received Paper doc. - public class NoteShareReceiveDetails: CustomStringConvertible { + public class NoteShareReceiveDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try NoteShareReceiveDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteShareReceiveDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteShareReceiveDetails: \(error)" } } } @@ -38114,7 +40342,7 @@ public class TeamLog { } /// The NoteShareReceiveType struct - public class NoteShareReceiveType: CustomStringConvertible { + public class NoteShareReceiveType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38122,11 +40350,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoteShareReceiveTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteShareReceiveTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteShareReceiveType: \(error)" } } } @@ -38152,12 +40384,16 @@ public class TeamLog { } /// Shared Paper doc. - public class NoteSharedDetails: CustomStringConvertible { + public class NoteSharedDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try NoteSharedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteSharedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteSharedDetails: \(error)" } } } @@ -38180,7 +40416,7 @@ public class TeamLog { } /// The NoteSharedType struct - public class NoteSharedType: CustomStringConvertible { + public class NoteSharedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38188,11 +40424,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try NoteSharedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NoteSharedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for NoteSharedType: \(error)" } } } @@ -38218,18 +40458,22 @@ public class TeamLog { } /// Added a label. - public class ObjectLabelAddedDetails: CustomStringConvertible { + public class ObjectLabelAddedDetails: CustomStringConvertible, JSONRepresentable { /// Labels mark a file or folder. public let labelType: TeamLog.LabelType public init(labelType: TeamLog.LabelType) { self.labelType = labelType } + func json() throws -> JSON { + try ObjectLabelAddedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ObjectLabelAddedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ObjectLabelAddedDetails: \(error)" } } } @@ -38255,7 +40499,7 @@ public class TeamLog { } /// The ObjectLabelAddedType struct - public class ObjectLabelAddedType: CustomStringConvertible { + public class ObjectLabelAddedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38263,11 +40507,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ObjectLabelAddedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ObjectLabelAddedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ObjectLabelAddedType: \(error)" } } } @@ -38293,18 +40541,22 @@ public class TeamLog { } /// Removed a label. - public class ObjectLabelRemovedDetails: CustomStringConvertible { + public class ObjectLabelRemovedDetails: CustomStringConvertible, JSONRepresentable { /// Labels mark a file or folder. public let labelType: TeamLog.LabelType public init(labelType: TeamLog.LabelType) { self.labelType = labelType } + func json() throws -> JSON { + try ObjectLabelRemovedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ObjectLabelRemovedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ObjectLabelRemovedDetails: \(error)" } } } @@ -38330,7 +40582,7 @@ public class TeamLog { } /// The ObjectLabelRemovedType struct - public class ObjectLabelRemovedType: CustomStringConvertible { + public class ObjectLabelRemovedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38338,11 +40590,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ObjectLabelRemovedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ObjectLabelRemovedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ObjectLabelRemovedType: \(error)" } } } @@ -38368,18 +40624,22 @@ public class TeamLog { } /// Updated a label's value. - public class ObjectLabelUpdatedValueDetails: CustomStringConvertible { + public class ObjectLabelUpdatedValueDetails: CustomStringConvertible, JSONRepresentable { /// Labels mark a file or folder. public let labelType: TeamLog.LabelType public init(labelType: TeamLog.LabelType) { self.labelType = labelType } + func json() throws -> JSON { + try ObjectLabelUpdatedValueDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ObjectLabelUpdatedValueDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ObjectLabelUpdatedValueDetails: \(error)" } } } @@ -38405,7 +40665,7 @@ public class TeamLog { } /// The ObjectLabelUpdatedValueType struct - public class ObjectLabelUpdatedValueType: CustomStringConvertible { + public class ObjectLabelUpdatedValueType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38413,11 +40673,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ObjectLabelUpdatedValueTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ObjectLabelUpdatedValueTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ObjectLabelUpdatedValueType: \(error)" } } } @@ -38443,12 +40707,16 @@ public class TeamLog { } /// Opened shared Paper doc. - public class OpenNoteSharedDetails: CustomStringConvertible { + public class OpenNoteSharedDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try OpenNoteSharedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OpenNoteSharedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OpenNoteSharedDetails: \(error)" } } } @@ -38471,7 +40739,7 @@ public class TeamLog { } /// The OpenNoteSharedType struct - public class OpenNoteSharedType: CustomStringConvertible { + public class OpenNoteSharedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38479,11 +40747,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try OpenNoteSharedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OpenNoteSharedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OpenNoteSharedType: \(error)" } } } @@ -38509,7 +40781,7 @@ public class TeamLog { } /// More details about the organization. - public class OrganizationDetails: CustomStringConvertible { + public class OrganizationDetails: CustomStringConvertible, JSONRepresentable { /// The name of the organization. public let organization: String public init(organization: String) { @@ -38517,11 +40789,15 @@ public class TeamLog { self.organization = organization } + func json() throws -> JSON { + try OrganizationDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OrganizationDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OrganizationDetails: \(error)" } } } @@ -38547,7 +40823,7 @@ public class TeamLog { } /// The name of the organization - public class OrganizationName: CustomStringConvertible { + public class OrganizationName: CustomStringConvertible, JSONRepresentable { /// The name of the organization. public let organization: String public init(organization: String) { @@ -38555,11 +40831,15 @@ public class TeamLog { self.organization = organization } + func json() throws -> JSON { + try OrganizationNameSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OrganizationNameSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OrganizationName: \(error)" } } } @@ -38585,12 +40865,16 @@ public class TeamLog { } /// Organized a folder with multi-file organize. - public class OrganizeFolderWithTidyDetails: CustomStringConvertible { + public class OrganizeFolderWithTidyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try OrganizeFolderWithTidyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OrganizeFolderWithTidyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OrganizeFolderWithTidyDetails: \(error)" } } } @@ -38613,7 +40897,7 @@ public class TeamLog { } /// The OrganizeFolderWithTidyType struct - public class OrganizeFolderWithTidyType: CustomStringConvertible { + public class OrganizeFolderWithTidyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38621,11 +40905,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try OrganizeFolderWithTidyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OrganizeFolderWithTidyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OrganizeFolderWithTidyType: \(error)" } } } @@ -38651,7 +40939,7 @@ public class TeamLog { } /// The origin from which the actor performed the action. - public class OriginLogInfo: CustomStringConvertible { + public class OriginLogInfo: CustomStringConvertible, JSONRepresentable { /// Geographic location details. public let geoLocation: TeamLog.GeoLocationLogInfo? /// The method that was used to perform the action. @@ -38661,11 +40949,15 @@ public class TeamLog { self.accessMethod = accessMethod } + func json() throws -> JSON { + try OriginLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OriginLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OriginLogInfo: \(error)" } } } @@ -38693,7 +40985,7 @@ public class TeamLog { } /// Report created: Views of old links. - public class OutdatedLinkViewCreateReportDetails: CustomStringConvertible { + public class OutdatedLinkViewCreateReportDetails: CustomStringConvertible, JSONRepresentable { /// Report start date. public let startDate: Date /// Report end date. @@ -38703,11 +40995,15 @@ public class TeamLog { self.endDate = endDate } + func json() throws -> JSON { + try OutdatedLinkViewCreateReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OutdatedLinkViewCreateReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OutdatedLinkViewCreateReportDetails: \(error)" } } } @@ -38735,7 +41031,7 @@ public class TeamLog { } /// The OutdatedLinkViewCreateReportType struct - public class OutdatedLinkViewCreateReportType: CustomStringConvertible { + public class OutdatedLinkViewCreateReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38743,11 +41039,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try OutdatedLinkViewCreateReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OutdatedLinkViewCreateReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OutdatedLinkViewCreateReportType: \(error)" } } } @@ -38773,18 +41073,22 @@ public class TeamLog { } /// Couldn't create report: Views of old links. - public class OutdatedLinkViewReportFailedDetails: CustomStringConvertible { + public class OutdatedLinkViewReportFailedDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try OutdatedLinkViewReportFailedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OutdatedLinkViewReportFailedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OutdatedLinkViewReportFailedDetails: \(error)" } } } @@ -38810,7 +41114,7 @@ public class TeamLog { } /// The OutdatedLinkViewReportFailedType struct - public class OutdatedLinkViewReportFailedType: CustomStringConvertible { + public class OutdatedLinkViewReportFailedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38818,11 +41122,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try OutdatedLinkViewReportFailedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OutdatedLinkViewReportFailedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OutdatedLinkViewReportFailedType: \(error)" } } } @@ -38848,7 +41156,7 @@ public class TeamLog { } /// The PaperAccessType union - public enum PaperAccessType: CustomStringConvertible { + public enum PaperAccessType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case commenter /// An unspecified error. @@ -38858,11 +41166,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try PaperAccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperAccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperAccessType: \(error)" } } } @@ -38913,12 +41225,16 @@ public class TeamLog { } /// Exported all team Paper docs. - public class PaperAdminExportStartDetails: CustomStringConvertible { + public class PaperAdminExportStartDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try PaperAdminExportStartDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperAdminExportStartDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperAdminExportStartDetails: \(error)" } } } @@ -38941,7 +41257,7 @@ public class TeamLog { } /// The PaperAdminExportStartType struct - public class PaperAdminExportStartType: CustomStringConvertible { + public class PaperAdminExportStartType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -38949,11 +41265,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperAdminExportStartTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperAdminExportStartTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperAdminExportStartType: \(error)" } } } @@ -38979,7 +41299,7 @@ public class TeamLog { } /// Changed whether Dropbox Paper, when enabled, is deployed to all members or to specific members. - public class PaperChangeDeploymentPolicyDetails: CustomStringConvertible { + public class PaperChangeDeploymentPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New Dropbox Paper deployment policy. public let newValue: TeamPolicies.PaperDeploymentPolicy /// Previous Dropbox Paper deployment policy. Might be missing due to historical data gap. @@ -38989,11 +41309,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try PaperChangeDeploymentPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperChangeDeploymentPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperChangeDeploymentPolicyDetails: \(error)" } } } @@ -39021,7 +41345,7 @@ public class TeamLog { } /// The PaperChangeDeploymentPolicyType struct - public class PaperChangeDeploymentPolicyType: CustomStringConvertible { + public class PaperChangeDeploymentPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39029,11 +41353,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperChangeDeploymentPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperChangeDeploymentPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperChangeDeploymentPolicyType: \(error)" } } } @@ -39059,18 +41387,22 @@ public class TeamLog { } /// Changed whether non-members can view Paper docs with link. - public class PaperChangeMemberLinkPolicyDetails: CustomStringConvertible { + public class PaperChangeMemberLinkPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New paper external link accessibility policy. public let newValue: TeamLog.PaperMemberPolicy public init(newValue: TeamLog.PaperMemberPolicy) { self.newValue = newValue } + func json() throws -> JSON { + try PaperChangeMemberLinkPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperChangeMemberLinkPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperChangeMemberLinkPolicyDetails: \(error)" } } } @@ -39096,7 +41428,7 @@ public class TeamLog { } /// The PaperChangeMemberLinkPolicyType struct - public class PaperChangeMemberLinkPolicyType: CustomStringConvertible { + public class PaperChangeMemberLinkPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39104,11 +41436,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperChangeMemberLinkPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperChangeMemberLinkPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperChangeMemberLinkPolicyType: \(error)" } } } @@ -39135,7 +41471,7 @@ public class TeamLog { /// Changed whether members can share Paper docs outside team, and if docs are accessible only by team members or /// anyone by default. - public class PaperChangeMemberPolicyDetails: CustomStringConvertible { + public class PaperChangeMemberPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New paper external accessibility policy. public let newValue: TeamLog.PaperMemberPolicy /// Previous paper external accessibility policy. Might be missing due to historical data gap. @@ -39145,11 +41481,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try PaperChangeMemberPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperChangeMemberPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperChangeMemberPolicyDetails: \(error)" } } } @@ -39177,7 +41517,7 @@ public class TeamLog { } /// The PaperChangeMemberPolicyType struct - public class PaperChangeMemberPolicyType: CustomStringConvertible { + public class PaperChangeMemberPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39185,11 +41525,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperChangeMemberPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperChangeMemberPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperChangeMemberPolicyType: \(error)" } } } @@ -39215,7 +41559,7 @@ public class TeamLog { } /// Enabled/disabled Dropbox Paper for team. - public class PaperChangePolicyDetails: CustomStringConvertible { + public class PaperChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New Dropbox Paper policy. public let newValue: TeamPolicies.PaperEnabledPolicy /// Previous Dropbox Paper policy. Might be missing due to historical data gap. @@ -39225,11 +41569,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try PaperChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperChangePolicyDetails: \(error)" } } } @@ -39257,7 +41605,7 @@ public class TeamLog { } /// The PaperChangePolicyType struct - public class PaperChangePolicyType: CustomStringConvertible { + public class PaperChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39265,11 +41613,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperChangePolicyType: \(error)" } } } @@ -39295,7 +41647,7 @@ public class TeamLog { } /// Added users and/or groups to Paper doc/folder. - public class PaperContentAddMemberDetails: CustomStringConvertible { + public class PaperContentAddMemberDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -39303,11 +41655,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperContentAddMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentAddMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentAddMemberDetails: \(error)" } } } @@ -39333,7 +41689,7 @@ public class TeamLog { } /// The PaperContentAddMemberType struct - public class PaperContentAddMemberType: CustomStringConvertible { + public class PaperContentAddMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39341,11 +41697,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentAddMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentAddMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentAddMemberType: \(error)" } } } @@ -39371,7 +41731,7 @@ public class TeamLog { } /// Added Paper doc/folder to folder. - public class PaperContentAddToFolderDetails: CustomStringConvertible { + public class PaperContentAddToFolderDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Target asset position in the Assets list. @@ -39387,11 +41747,15 @@ public class TeamLog { self.parentAssetIndex = parentAssetIndex } + func json() throws -> JSON { + try PaperContentAddToFolderDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentAddToFolderDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentAddToFolderDetails: \(error)" } } } @@ -39421,7 +41785,7 @@ public class TeamLog { } /// The PaperContentAddToFolderType struct - public class PaperContentAddToFolderType: CustomStringConvertible { + public class PaperContentAddToFolderType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39429,11 +41793,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentAddToFolderTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentAddToFolderTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentAddToFolderType: \(error)" } } } @@ -39459,7 +41827,7 @@ public class TeamLog { } /// Archived Paper doc/folder. - public class PaperContentArchiveDetails: CustomStringConvertible { + public class PaperContentArchiveDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -39467,11 +41835,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperContentArchiveDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentArchiveDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentArchiveDetails: \(error)" } } } @@ -39497,7 +41869,7 @@ public class TeamLog { } /// The PaperContentArchiveType struct - public class PaperContentArchiveType: CustomStringConvertible { + public class PaperContentArchiveType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39505,11 +41877,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentArchiveTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentArchiveTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentArchiveType: \(error)" } } } @@ -39535,7 +41911,7 @@ public class TeamLog { } /// Created Paper doc/folder. - public class PaperContentCreateDetails: CustomStringConvertible { + public class PaperContentCreateDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -39543,11 +41919,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperContentCreateDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentCreateDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentCreateDetails: \(error)" } } } @@ -39573,7 +41953,7 @@ public class TeamLog { } /// The PaperContentCreateType struct - public class PaperContentCreateType: CustomStringConvertible { + public class PaperContentCreateType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39581,11 +41961,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentCreateTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentCreateTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentCreateType: \(error)" } } } @@ -39611,7 +41995,7 @@ public class TeamLog { } /// Permanently deleted Paper doc/folder. - public class PaperContentPermanentlyDeleteDetails: CustomStringConvertible { + public class PaperContentPermanentlyDeleteDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -39619,11 +42003,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperContentPermanentlyDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentPermanentlyDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentPermanentlyDeleteDetails: \(error)" } } } @@ -39649,7 +42037,7 @@ public class TeamLog { } /// The PaperContentPermanentlyDeleteType struct - public class PaperContentPermanentlyDeleteType: CustomStringConvertible { + public class PaperContentPermanentlyDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39657,11 +42045,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentPermanentlyDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentPermanentlyDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentPermanentlyDeleteType: \(error)" } } } @@ -39687,7 +42079,7 @@ public class TeamLog { } /// Removed Paper doc/folder from folder. - public class PaperContentRemoveFromFolderDetails: CustomStringConvertible { + public class PaperContentRemoveFromFolderDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Target asset position in the Assets list. @@ -39703,11 +42095,15 @@ public class TeamLog { self.parentAssetIndex = parentAssetIndex } + func json() throws -> JSON { + try PaperContentRemoveFromFolderDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentRemoveFromFolderDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentRemoveFromFolderDetails: \(error)" } } } @@ -39737,7 +42133,7 @@ public class TeamLog { } /// The PaperContentRemoveFromFolderType struct - public class PaperContentRemoveFromFolderType: CustomStringConvertible { + public class PaperContentRemoveFromFolderType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39745,11 +42141,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentRemoveFromFolderTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentRemoveFromFolderTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentRemoveFromFolderType: \(error)" } } } @@ -39775,7 +42175,7 @@ public class TeamLog { } /// Removed users and/or groups from Paper doc/folder. - public class PaperContentRemoveMemberDetails: CustomStringConvertible { + public class PaperContentRemoveMemberDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -39783,11 +42183,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperContentRemoveMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentRemoveMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentRemoveMemberDetails: \(error)" } } } @@ -39813,7 +42217,7 @@ public class TeamLog { } /// The PaperContentRemoveMemberType struct - public class PaperContentRemoveMemberType: CustomStringConvertible { + public class PaperContentRemoveMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39821,11 +42225,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentRemoveMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentRemoveMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentRemoveMemberType: \(error)" } } } @@ -39851,7 +42259,7 @@ public class TeamLog { } /// Renamed Paper doc/folder. - public class PaperContentRenameDetails: CustomStringConvertible { + public class PaperContentRenameDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -39859,11 +42267,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperContentRenameDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentRenameDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentRenameDetails: \(error)" } } } @@ -39889,7 +42301,7 @@ public class TeamLog { } /// The PaperContentRenameType struct - public class PaperContentRenameType: CustomStringConvertible { + public class PaperContentRenameType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39897,11 +42309,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentRenameTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentRenameTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentRenameType: \(error)" } } } @@ -39927,7 +42343,7 @@ public class TeamLog { } /// Restored archived Paper doc/folder. - public class PaperContentRestoreDetails: CustomStringConvertible { + public class PaperContentRestoreDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -39935,11 +42351,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperContentRestoreDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentRestoreDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentRestoreDetails: \(error)" } } } @@ -39965,7 +42385,7 @@ public class TeamLog { } /// The PaperContentRestoreType struct - public class PaperContentRestoreType: CustomStringConvertible { + public class PaperContentRestoreType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -39973,11 +42393,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperContentRestoreTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperContentRestoreTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperContentRestoreType: \(error)" } } } @@ -40003,7 +42427,7 @@ public class TeamLog { } /// Policy to set default access for newly created Paper folders. - public enum PaperDefaultFolderPolicy: CustomStringConvertible { + public enum PaperDefaultFolderPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case everyoneInTeam /// An unspecified error. @@ -40011,11 +42435,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDefaultFolderPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDefaultFolderPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDefaultFolderPolicy: \(error)" } } } @@ -40060,7 +42488,7 @@ public class TeamLog { } /// Changed Paper Default Folder Policy setting for team. - public class PaperDefaultFolderPolicyChangedDetails: CustomStringConvertible { + public class PaperDefaultFolderPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New Paper Default Folder Policy. public let newValue: TeamLog.PaperDefaultFolderPolicy /// Previous Paper Default Folder Policy. @@ -40070,11 +42498,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try PaperDefaultFolderPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDefaultFolderPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDefaultFolderPolicyChangedDetails: \(error)" } } } @@ -40102,7 +42534,7 @@ public class TeamLog { } /// The PaperDefaultFolderPolicyChangedType struct - public class PaperDefaultFolderPolicyChangedType: CustomStringConvertible { + public class PaperDefaultFolderPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40110,11 +42542,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDefaultFolderPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDefaultFolderPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDefaultFolderPolicyChangedType: \(error)" } } } @@ -40140,7 +42576,7 @@ public class TeamLog { } /// Policy for controlling if team members can use Paper Desktop - public enum PaperDesktopPolicy: CustomStringConvertible { + public enum PaperDesktopPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -40148,11 +42584,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDesktopPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDesktopPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDesktopPolicy: \(error)" } } } @@ -40197,7 +42637,7 @@ public class TeamLog { } /// Enabled/disabled Paper Desktop for team. - public class PaperDesktopPolicyChangedDetails: CustomStringConvertible { + public class PaperDesktopPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New Paper Desktop policy. public let newValue: TeamLog.PaperDesktopPolicy /// Previous Paper Desktop policy. @@ -40207,11 +42647,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try PaperDesktopPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDesktopPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDesktopPolicyChangedDetails: \(error)" } } } @@ -40239,7 +42683,7 @@ public class TeamLog { } /// The PaperDesktopPolicyChangedType struct - public class PaperDesktopPolicyChangedType: CustomStringConvertible { + public class PaperDesktopPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40247,11 +42691,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDesktopPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDesktopPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDesktopPolicyChangedType: \(error)" } } } @@ -40277,7 +42725,7 @@ public class TeamLog { } /// Added Paper doc comment. - public class PaperDocAddCommentDetails: CustomStringConvertible { + public class PaperDocAddCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -40289,11 +42737,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try PaperDocAddCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocAddCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocAddCommentDetails: \(error)" } } } @@ -40321,7 +42773,7 @@ public class TeamLog { } /// The PaperDocAddCommentType struct - public class PaperDocAddCommentType: CustomStringConvertible { + public class PaperDocAddCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40329,11 +42781,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocAddCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocAddCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocAddCommentType: \(error)" } } } @@ -40359,7 +42815,7 @@ public class TeamLog { } /// Changed member permissions for Paper doc. - public class PaperDocChangeMemberRoleDetails: CustomStringConvertible { + public class PaperDocChangeMemberRoleDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Paper doc access type. @@ -40370,11 +42826,15 @@ public class TeamLog { self.accessType = accessType } + func json() throws -> JSON { + try PaperDocChangeMemberRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocChangeMemberRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocChangeMemberRoleDetails: \(error)" } } } @@ -40402,7 +42862,7 @@ public class TeamLog { } /// The PaperDocChangeMemberRoleType struct - public class PaperDocChangeMemberRoleType: CustomStringConvertible { + public class PaperDocChangeMemberRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40410,11 +42870,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocChangeMemberRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocChangeMemberRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocChangeMemberRoleType: \(error)" } } } @@ -40440,7 +42904,7 @@ public class TeamLog { } /// Changed sharing setting for Paper doc. - public class PaperDocChangeSharingPolicyDetails: CustomStringConvertible { + public class PaperDocChangeSharingPolicyDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Sharing policy with external users. @@ -40456,11 +42920,15 @@ public class TeamLog { self.teamSharingPolicy = teamSharingPolicy } + func json() throws -> JSON { + try PaperDocChangeSharingPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocChangeSharingPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocChangeSharingPolicyDetails: \(error)" } } } @@ -40494,7 +42962,7 @@ public class TeamLog { } /// The PaperDocChangeSharingPolicyType struct - public class PaperDocChangeSharingPolicyType: CustomStringConvertible { + public class PaperDocChangeSharingPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40502,11 +42970,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocChangeSharingPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocChangeSharingPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocChangeSharingPolicyType: \(error)" } } } @@ -40532,7 +43004,7 @@ public class TeamLog { } /// Followed/unfollowed Paper doc. - public class PaperDocChangeSubscriptionDetails: CustomStringConvertible { + public class PaperDocChangeSubscriptionDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// New doc subscription level. @@ -40548,11 +43020,15 @@ public class TeamLog { self.previousSubscriptionLevel = previousSubscriptionLevel } + func json() throws -> JSON { + try PaperDocChangeSubscriptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocChangeSubscriptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocChangeSubscriptionDetails: \(error)" } } } @@ -40587,7 +43063,7 @@ public class TeamLog { } /// The PaperDocChangeSubscriptionType struct - public class PaperDocChangeSubscriptionType: CustomStringConvertible { + public class PaperDocChangeSubscriptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40595,11 +43071,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocChangeSubscriptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocChangeSubscriptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocChangeSubscriptionType: \(error)" } } } @@ -40625,7 +43105,7 @@ public class TeamLog { } /// Deleted Paper doc comment. - public class PaperDocDeleteCommentDetails: CustomStringConvertible { + public class PaperDocDeleteCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -40637,11 +43117,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try PaperDocDeleteCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocDeleteCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocDeleteCommentDetails: \(error)" } } } @@ -40669,7 +43153,7 @@ public class TeamLog { } /// The PaperDocDeleteCommentType struct - public class PaperDocDeleteCommentType: CustomStringConvertible { + public class PaperDocDeleteCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40677,11 +43161,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocDeleteCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocDeleteCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocDeleteCommentType: \(error)" } } } @@ -40707,7 +43195,7 @@ public class TeamLog { } /// Archived Paper doc. - public class PaperDocDeletedDetails: CustomStringConvertible { + public class PaperDocDeletedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -40715,11 +43203,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocDeletedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocDeletedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocDeletedDetails: \(error)" } } } @@ -40745,7 +43237,7 @@ public class TeamLog { } /// The PaperDocDeletedType struct - public class PaperDocDeletedType: CustomStringConvertible { + public class PaperDocDeletedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40753,11 +43245,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocDeletedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocDeletedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocDeletedType: \(error)" } } } @@ -40783,7 +43279,7 @@ public class TeamLog { } /// Downloaded Paper doc in specific format. - public class PaperDocDownloadDetails: CustomStringConvertible { + public class PaperDocDownloadDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Export file format. @@ -40794,11 +43290,15 @@ public class TeamLog { self.exportFileFormat = exportFileFormat } + func json() throws -> JSON { + try PaperDocDownloadDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocDownloadDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocDownloadDetails: \(error)" } } } @@ -40826,7 +43326,7 @@ public class TeamLog { } /// The PaperDocDownloadType struct - public class PaperDocDownloadType: CustomStringConvertible { + public class PaperDocDownloadType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40834,11 +43334,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocDownloadTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocDownloadTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocDownloadType: \(error)" } } } @@ -40864,7 +43368,7 @@ public class TeamLog { } /// Edited Paper doc comment. - public class PaperDocEditCommentDetails: CustomStringConvertible { + public class PaperDocEditCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -40876,11 +43380,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try PaperDocEditCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocEditCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocEditCommentDetails: \(error)" } } } @@ -40908,7 +43416,7 @@ public class TeamLog { } /// The PaperDocEditCommentType struct - public class PaperDocEditCommentType: CustomStringConvertible { + public class PaperDocEditCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40916,11 +43424,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocEditCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocEditCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocEditCommentType: \(error)" } } } @@ -40946,7 +43458,7 @@ public class TeamLog { } /// Edited Paper doc. - public class PaperDocEditDetails: CustomStringConvertible { + public class PaperDocEditDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -40954,11 +43466,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocEditDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocEditDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocEditDetails: \(error)" } } } @@ -40984,7 +43500,7 @@ public class TeamLog { } /// The PaperDocEditType struct - public class PaperDocEditType: CustomStringConvertible { + public class PaperDocEditType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -40992,11 +43508,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocEditTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocEditTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocEditType: \(error)" } } } @@ -41022,7 +43542,7 @@ public class TeamLog { } /// Followed Paper doc. - public class PaperDocFollowedDetails: CustomStringConvertible { + public class PaperDocFollowedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41030,11 +43550,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocFollowedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocFollowedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocFollowedDetails: \(error)" } } } @@ -41060,7 +43584,7 @@ public class TeamLog { } /// The PaperDocFollowedType struct - public class PaperDocFollowedType: CustomStringConvertible { + public class PaperDocFollowedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41068,11 +43592,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocFollowedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocFollowedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocFollowedType: \(error)" } } } @@ -41098,7 +43626,7 @@ public class TeamLog { } /// Mentioned user in Paper doc. - public class PaperDocMentionDetails: CustomStringConvertible { + public class PaperDocMentionDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41106,11 +43634,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocMentionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocMentionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocMentionDetails: \(error)" } } } @@ -41136,7 +43668,7 @@ public class TeamLog { } /// The PaperDocMentionType struct - public class PaperDocMentionType: CustomStringConvertible { + public class PaperDocMentionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41144,11 +43676,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocMentionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocMentionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocMentionType: \(error)" } } } @@ -41174,7 +43710,7 @@ public class TeamLog { } /// Transferred ownership of Paper doc. - public class PaperDocOwnershipChangedDetails: CustomStringConvertible { + public class PaperDocOwnershipChangedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Previous owner. @@ -41190,11 +43726,15 @@ public class TeamLog { self.newOwnerUserId = newOwnerUserId } + func json() throws -> JSON { + try PaperDocOwnershipChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocOwnershipChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocOwnershipChangedDetails: \(error)" } } } @@ -41224,7 +43764,7 @@ public class TeamLog { } /// The PaperDocOwnershipChangedType struct - public class PaperDocOwnershipChangedType: CustomStringConvertible { + public class PaperDocOwnershipChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41232,11 +43772,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocOwnershipChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocOwnershipChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocOwnershipChangedType: \(error)" } } } @@ -41262,7 +43806,7 @@ public class TeamLog { } /// Requested access to Paper doc. - public class PaperDocRequestAccessDetails: CustomStringConvertible { + public class PaperDocRequestAccessDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41270,11 +43814,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocRequestAccessDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocRequestAccessDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocRequestAccessDetails: \(error)" } } } @@ -41300,7 +43848,7 @@ public class TeamLog { } /// The PaperDocRequestAccessType struct - public class PaperDocRequestAccessType: CustomStringConvertible { + public class PaperDocRequestAccessType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41308,11 +43856,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocRequestAccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocRequestAccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocRequestAccessType: \(error)" } } } @@ -41338,7 +43890,7 @@ public class TeamLog { } /// Resolved Paper doc comment. - public class PaperDocResolveCommentDetails: CustomStringConvertible { + public class PaperDocResolveCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -41350,11 +43902,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try PaperDocResolveCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocResolveCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocResolveCommentDetails: \(error)" } } } @@ -41382,7 +43938,7 @@ public class TeamLog { } /// The PaperDocResolveCommentType struct - public class PaperDocResolveCommentType: CustomStringConvertible { + public class PaperDocResolveCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41390,11 +43946,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocResolveCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocResolveCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocResolveCommentType: \(error)" } } } @@ -41420,7 +43980,7 @@ public class TeamLog { } /// Restored Paper doc to previous version. - public class PaperDocRevertDetails: CustomStringConvertible { + public class PaperDocRevertDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41428,11 +43988,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocRevertDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocRevertDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocRevertDetails: \(error)" } } } @@ -41458,7 +44022,7 @@ public class TeamLog { } /// The PaperDocRevertType struct - public class PaperDocRevertType: CustomStringConvertible { + public class PaperDocRevertType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41466,11 +44030,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocRevertTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocRevertTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocRevertType: \(error)" } } } @@ -41496,7 +44064,7 @@ public class TeamLog { } /// Shared Paper doc via Slack. - public class PaperDocSlackShareDetails: CustomStringConvertible { + public class PaperDocSlackShareDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41504,11 +44072,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocSlackShareDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocSlackShareDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocSlackShareDetails: \(error)" } } } @@ -41534,7 +44106,7 @@ public class TeamLog { } /// The PaperDocSlackShareType struct - public class PaperDocSlackShareType: CustomStringConvertible { + public class PaperDocSlackShareType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41542,11 +44114,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocSlackShareTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocSlackShareTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocSlackShareType: \(error)" } } } @@ -41572,7 +44148,7 @@ public class TeamLog { } /// Shared Paper doc with users and/or groups. - public class PaperDocTeamInviteDetails: CustomStringConvertible { + public class PaperDocTeamInviteDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41580,11 +44156,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocTeamInviteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocTeamInviteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocTeamInviteDetails: \(error)" } } } @@ -41610,7 +44190,7 @@ public class TeamLog { } /// The PaperDocTeamInviteType struct - public class PaperDocTeamInviteType: CustomStringConvertible { + public class PaperDocTeamInviteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41618,11 +44198,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocTeamInviteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocTeamInviteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocTeamInviteType: \(error)" } } } @@ -41648,7 +44232,7 @@ public class TeamLog { } /// Deleted Paper doc. - public class PaperDocTrashedDetails: CustomStringConvertible { + public class PaperDocTrashedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41656,11 +44240,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocTrashedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocTrashedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocTrashedDetails: \(error)" } } } @@ -41686,7 +44274,7 @@ public class TeamLog { } /// The PaperDocTrashedType struct - public class PaperDocTrashedType: CustomStringConvertible { + public class PaperDocTrashedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41694,11 +44282,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocTrashedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocTrashedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocTrashedType: \(error)" } } } @@ -41724,7 +44316,7 @@ public class TeamLog { } /// Unresolved Paper doc comment. - public class PaperDocUnresolveCommentDetails: CustomStringConvertible { + public class PaperDocUnresolveCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -41736,11 +44328,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try PaperDocUnresolveCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocUnresolveCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocUnresolveCommentDetails: \(error)" } } } @@ -41768,7 +44364,7 @@ public class TeamLog { } /// The PaperDocUnresolveCommentType struct - public class PaperDocUnresolveCommentType: CustomStringConvertible { + public class PaperDocUnresolveCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41776,11 +44372,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocUnresolveCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocUnresolveCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocUnresolveCommentType: \(error)" } } } @@ -41806,7 +44406,7 @@ public class TeamLog { } /// Restored Paper doc. - public class PaperDocUntrashedDetails: CustomStringConvertible { + public class PaperDocUntrashedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41814,11 +44414,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocUntrashedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocUntrashedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocUntrashedDetails: \(error)" } } } @@ -41844,7 +44448,7 @@ public class TeamLog { } /// The PaperDocUntrashedType struct - public class PaperDocUntrashedType: CustomStringConvertible { + public class PaperDocUntrashedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41852,11 +44456,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocUntrashedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocUntrashedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocUntrashedType: \(error)" } } } @@ -41882,7 +44490,7 @@ public class TeamLog { } /// Viewed Paper doc. - public class PaperDocViewDetails: CustomStringConvertible { + public class PaperDocViewDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -41890,11 +44498,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperDocViewDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocViewDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocViewDetails: \(error)" } } } @@ -41920,7 +44532,7 @@ public class TeamLog { } /// The PaperDocViewType struct - public class PaperDocViewType: CustomStringConvertible { + public class PaperDocViewType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -41928,11 +44540,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperDocViewTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocViewTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocViewType: \(error)" } } } @@ -41958,7 +44574,7 @@ public class TeamLog { } /// Paper document's logged information. - public class PaperDocumentLogInfo: CustomStringConvertible { + public class PaperDocumentLogInfo: CustomStringConvertible, JSONRepresentable { /// Papers document Id. public let docId: String /// Paper document title. @@ -41970,11 +44586,15 @@ public class TeamLog { self.docTitle = docTitle } + func json() throws -> JSON { + try PaperDocumentLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDocumentLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDocumentLogInfo: \(error)" } } } @@ -42002,7 +44622,7 @@ public class TeamLog { } /// The PaperDownloadFormat union - public enum PaperDownloadFormat: CustomStringConvertible { + public enum PaperDownloadFormat: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case docx /// An unspecified error. @@ -42014,11 +44634,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDownloadFormatSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDownloadFormatSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDownloadFormat: \(error)" } } } @@ -42075,12 +44699,16 @@ public class TeamLog { } /// Added users to Paper-enabled users list. - public class PaperEnabledUsersGroupAdditionDetails: CustomStringConvertible { + public class PaperEnabledUsersGroupAdditionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try PaperEnabledUsersGroupAdditionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperEnabledUsersGroupAdditionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperEnabledUsersGroupAdditionDetails: \(error)" } } } @@ -42103,7 +44731,7 @@ public class TeamLog { } /// The PaperEnabledUsersGroupAdditionType struct - public class PaperEnabledUsersGroupAdditionType: CustomStringConvertible { + public class PaperEnabledUsersGroupAdditionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42111,11 +44739,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperEnabledUsersGroupAdditionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperEnabledUsersGroupAdditionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperEnabledUsersGroupAdditionType: \(error)" } } } @@ -42141,12 +44773,16 @@ public class TeamLog { } /// Removed users from Paper-enabled users list. - public class PaperEnabledUsersGroupRemovalDetails: CustomStringConvertible { + public class PaperEnabledUsersGroupRemovalDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try PaperEnabledUsersGroupRemovalDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperEnabledUsersGroupRemovalDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperEnabledUsersGroupRemovalDetails: \(error)" } } } @@ -42169,7 +44805,7 @@ public class TeamLog { } /// The PaperEnabledUsersGroupRemovalType struct - public class PaperEnabledUsersGroupRemovalType: CustomStringConvertible { + public class PaperEnabledUsersGroupRemovalType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42177,11 +44813,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperEnabledUsersGroupRemovalTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperEnabledUsersGroupRemovalTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperEnabledUsersGroupRemovalType: \(error)" } } } @@ -42207,7 +44847,7 @@ public class TeamLog { } /// Changed Paper external sharing setting to anyone. - public class PaperExternalViewAllowDetails: CustomStringConvertible { + public class PaperExternalViewAllowDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -42215,11 +44855,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperExternalViewAllowDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperExternalViewAllowDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperExternalViewAllowDetails: \(error)" } } } @@ -42245,7 +44889,7 @@ public class TeamLog { } /// The PaperExternalViewAllowType struct - public class PaperExternalViewAllowType: CustomStringConvertible { + public class PaperExternalViewAllowType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42253,11 +44897,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperExternalViewAllowTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperExternalViewAllowTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperExternalViewAllowType: \(error)" } } } @@ -42283,7 +44931,7 @@ public class TeamLog { } /// Changed Paper external sharing setting to default team. - public class PaperExternalViewDefaultTeamDetails: CustomStringConvertible { + public class PaperExternalViewDefaultTeamDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -42291,11 +44939,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperExternalViewDefaultTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperExternalViewDefaultTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperExternalViewDefaultTeamDetails: \(error)" } } } @@ -42321,7 +44973,7 @@ public class TeamLog { } /// The PaperExternalViewDefaultTeamType struct - public class PaperExternalViewDefaultTeamType: CustomStringConvertible { + public class PaperExternalViewDefaultTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42329,11 +44981,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperExternalViewDefaultTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperExternalViewDefaultTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperExternalViewDefaultTeamType: \(error)" } } } @@ -42359,7 +45015,7 @@ public class TeamLog { } /// Changed Paper external sharing setting to team-only. - public class PaperExternalViewForbidDetails: CustomStringConvertible { + public class PaperExternalViewForbidDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -42367,11 +45023,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperExternalViewForbidDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperExternalViewForbidDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperExternalViewForbidDetails: \(error)" } } } @@ -42397,7 +45057,7 @@ public class TeamLog { } /// The PaperExternalViewForbidType struct - public class PaperExternalViewForbidType: CustomStringConvertible { + public class PaperExternalViewForbidType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42405,11 +45065,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperExternalViewForbidTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperExternalViewForbidTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperExternalViewForbidType: \(error)" } } } @@ -42435,7 +45099,7 @@ public class TeamLog { } /// Followed/unfollowed Paper folder. - public class PaperFolderChangeSubscriptionDetails: CustomStringConvertible { + public class PaperFolderChangeSubscriptionDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// New folder subscription level. @@ -42451,11 +45115,15 @@ public class TeamLog { self.previousSubscriptionLevel = previousSubscriptionLevel } + func json() throws -> JSON { + try PaperFolderChangeSubscriptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderChangeSubscriptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderChangeSubscriptionDetails: \(error)" } } } @@ -42490,7 +45158,7 @@ public class TeamLog { } /// The PaperFolderChangeSubscriptionType struct - public class PaperFolderChangeSubscriptionType: CustomStringConvertible { + public class PaperFolderChangeSubscriptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42498,11 +45166,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperFolderChangeSubscriptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderChangeSubscriptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderChangeSubscriptionType: \(error)" } } } @@ -42528,7 +45200,7 @@ public class TeamLog { } /// Archived Paper folder. - public class PaperFolderDeletedDetails: CustomStringConvertible { + public class PaperFolderDeletedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -42536,11 +45208,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperFolderDeletedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderDeletedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderDeletedDetails: \(error)" } } } @@ -42566,7 +45242,7 @@ public class TeamLog { } /// The PaperFolderDeletedType struct - public class PaperFolderDeletedType: CustomStringConvertible { + public class PaperFolderDeletedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42574,11 +45250,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperFolderDeletedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderDeletedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderDeletedType: \(error)" } } } @@ -42604,7 +45284,7 @@ public class TeamLog { } /// Followed Paper folder. - public class PaperFolderFollowedDetails: CustomStringConvertible { + public class PaperFolderFollowedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -42612,11 +45292,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperFolderFollowedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderFollowedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderFollowedDetails: \(error)" } } } @@ -42642,7 +45326,7 @@ public class TeamLog { } /// The PaperFolderFollowedType struct - public class PaperFolderFollowedType: CustomStringConvertible { + public class PaperFolderFollowedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42650,11 +45334,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperFolderFollowedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderFollowedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderFollowedType: \(error)" } } } @@ -42680,7 +45368,7 @@ public class TeamLog { } /// Paper folder's logged information. - public class PaperFolderLogInfo: CustomStringConvertible { + public class PaperFolderLogInfo: CustomStringConvertible, JSONRepresentable { /// Papers folder Id. public let folderId: String /// Paper folder name. @@ -42692,11 +45380,15 @@ public class TeamLog { self.folderName = folderName } + func json() throws -> JSON { + try PaperFolderLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderLogInfo: \(error)" } } } @@ -42724,7 +45416,7 @@ public class TeamLog { } /// Shared Paper folder with users and/or groups. - public class PaperFolderTeamInviteDetails: CustomStringConvertible { + public class PaperFolderTeamInviteDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -42732,11 +45424,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperFolderTeamInviteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderTeamInviteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderTeamInviteDetails: \(error)" } } } @@ -42762,7 +45458,7 @@ public class TeamLog { } /// The PaperFolderTeamInviteType struct - public class PaperFolderTeamInviteType: CustomStringConvertible { + public class PaperFolderTeamInviteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42770,11 +45466,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperFolderTeamInviteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperFolderTeamInviteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperFolderTeamInviteType: \(error)" } } } @@ -42800,7 +45500,7 @@ public class TeamLog { } /// Policy for controlling if team members can share Paper documents externally. - public enum PaperMemberPolicy: CustomStringConvertible { + public enum PaperMemberPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case anyoneWithLink /// An unspecified error. @@ -42810,11 +45510,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try PaperMemberPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperMemberPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperMemberPolicy: \(error)" } } } @@ -42865,7 +45569,7 @@ public class TeamLog { } /// Changed permissions for published doc. - public class PaperPublishedLinkChangePermissionDetails: CustomStringConvertible { + public class PaperPublishedLinkChangePermissionDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// New permission level. @@ -42881,11 +45585,15 @@ public class TeamLog { self.previousPermissionLevel = previousPermissionLevel } + func json() throws -> JSON { + try PaperPublishedLinkChangePermissionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperPublishedLinkChangePermissionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperPublishedLinkChangePermissionDetails: \(error)" } } } @@ -42919,7 +45627,7 @@ public class TeamLog { } /// The PaperPublishedLinkChangePermissionType struct - public class PaperPublishedLinkChangePermissionType: CustomStringConvertible { + public class PaperPublishedLinkChangePermissionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -42927,11 +45635,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperPublishedLinkChangePermissionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperPublishedLinkChangePermissionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperPublishedLinkChangePermissionType: \(error)" } } } @@ -42957,7 +45669,7 @@ public class TeamLog { } /// Published doc. - public class PaperPublishedLinkCreateDetails: CustomStringConvertible { + public class PaperPublishedLinkCreateDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -42965,11 +45677,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperPublishedLinkCreateDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperPublishedLinkCreateDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperPublishedLinkCreateDetails: \(error)" } } } @@ -42995,7 +45711,7 @@ public class TeamLog { } /// The PaperPublishedLinkCreateType struct - public class PaperPublishedLinkCreateType: CustomStringConvertible { + public class PaperPublishedLinkCreateType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43003,11 +45719,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperPublishedLinkCreateTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperPublishedLinkCreateTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperPublishedLinkCreateType: \(error)" } } } @@ -43033,7 +45753,7 @@ public class TeamLog { } /// Unpublished doc. - public class PaperPublishedLinkDisabledDetails: CustomStringConvertible { + public class PaperPublishedLinkDisabledDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -43041,11 +45761,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperPublishedLinkDisabledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperPublishedLinkDisabledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperPublishedLinkDisabledDetails: \(error)" } } } @@ -43071,7 +45795,7 @@ public class TeamLog { } /// The PaperPublishedLinkDisabledType struct - public class PaperPublishedLinkDisabledType: CustomStringConvertible { + public class PaperPublishedLinkDisabledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43079,11 +45803,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperPublishedLinkDisabledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperPublishedLinkDisabledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperPublishedLinkDisabledType: \(error)" } } } @@ -43109,7 +45837,7 @@ public class TeamLog { } /// Viewed published doc. - public class PaperPublishedLinkViewDetails: CustomStringConvertible { + public class PaperPublishedLinkViewDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -43117,11 +45845,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try PaperPublishedLinkViewDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperPublishedLinkViewDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperPublishedLinkViewDetails: \(error)" } } } @@ -43147,7 +45879,7 @@ public class TeamLog { } /// The PaperPublishedLinkViewType struct - public class PaperPublishedLinkViewType: CustomStringConvertible { + public class PaperPublishedLinkViewType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43155,11 +45887,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PaperPublishedLinkViewTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperPublishedLinkViewTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperPublishedLinkViewType: \(error)" } } } @@ -43185,7 +45921,7 @@ public class TeamLog { } /// A user or group - public enum ParticipantLogInfo: CustomStringConvertible { + public enum ParticipantLogInfo: CustomStringConvertible, JSONRepresentable { /// Group details. case group(TeamLog.GroupLogInfo) /// A user with a Dropbox account. @@ -43193,11 +45929,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ParticipantLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ParticipantLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ParticipantLogInfo: \(error)" } } } @@ -43244,7 +45984,7 @@ public class TeamLog { } /// The PassPolicy union - public enum PassPolicy: CustomStringConvertible { + public enum PassPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case allow /// An unspecified error. @@ -43254,11 +45994,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try PassPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PassPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PassPolicy: \(error)" } } } @@ -43309,12 +46053,16 @@ public class TeamLog { } /// Changed password. - public class PasswordChangeDetails: CustomStringConvertible { + public class PasswordChangeDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try PasswordChangeDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordChangeDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordChangeDetails: \(error)" } } } @@ -43337,7 +46085,7 @@ public class TeamLog { } /// The PasswordChangeType struct - public class PasswordChangeType: CustomStringConvertible { + public class PasswordChangeType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43345,11 +46093,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PasswordChangeTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordChangeTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordChangeType: \(error)" } } } @@ -43375,12 +46127,16 @@ public class TeamLog { } /// Reset all team member passwords. - public class PasswordResetAllDetails: CustomStringConvertible { + public class PasswordResetAllDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try PasswordResetAllDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordResetAllDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordResetAllDetails: \(error)" } } } @@ -43403,7 +46159,7 @@ public class TeamLog { } /// The PasswordResetAllType struct - public class PasswordResetAllType: CustomStringConvertible { + public class PasswordResetAllType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43411,11 +46167,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PasswordResetAllTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordResetAllTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordResetAllType: \(error)" } } } @@ -43441,12 +46201,16 @@ public class TeamLog { } /// Reset password. - public class PasswordResetDetails: CustomStringConvertible { + public class PasswordResetDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try PasswordResetDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordResetDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordResetDetails: \(error)" } } } @@ -43469,7 +46233,7 @@ public class TeamLog { } /// The PasswordResetType struct - public class PasswordResetType: CustomStringConvertible { + public class PasswordResetType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43477,11 +46241,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PasswordResetTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordResetTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordResetType: \(error)" } } } @@ -43507,7 +46275,7 @@ public class TeamLog { } /// Changed team password strength requirements. - public class PasswordStrengthRequirementsChangePolicyDetails: CustomStringConvertible { + public class PasswordStrengthRequirementsChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// Old password strength policy. public let previousValue: TeamPolicies.PasswordStrengthPolicy /// New password strength policy. @@ -43517,11 +46285,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try PasswordStrengthRequirementsChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordStrengthRequirementsChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordStrengthRequirementsChangePolicyDetails: \(error)" } } } @@ -43549,7 +46321,7 @@ public class TeamLog { } /// The PasswordStrengthRequirementsChangePolicyType struct - public class PasswordStrengthRequirementsChangePolicyType: CustomStringConvertible { + public class PasswordStrengthRequirementsChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43557,11 +46329,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PasswordStrengthRequirementsChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordStrengthRequirementsChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordStrengthRequirementsChangePolicyType: \(error)" } } } @@ -43587,7 +46363,7 @@ public class TeamLog { } /// Path's details. - public class PathLogInfo: CustomStringConvertible { + public class PathLogInfo: CustomStringConvertible, JSONRepresentable { /// Fully qualified path relative to event's context. public let contextual: String? /// Path relative to the namespace containing the content. @@ -43598,11 +46374,15 @@ public class TeamLog { self.namespaceRelative = namespaceRelative } + func json() throws -> JSON { + try PathLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PathLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PathLogInfo: \(error)" } } } @@ -43630,7 +46410,7 @@ public class TeamLog { } /// Added pending secondary email. - public class PendingSecondaryEmailAddedDetails: CustomStringConvertible { + public class PendingSecondaryEmailAddedDetails: CustomStringConvertible, JSONRepresentable { /// New pending secondary email. public let secondaryEmail: String public init(secondaryEmail: String) { @@ -43638,11 +46418,15 @@ public class TeamLog { self.secondaryEmail = secondaryEmail } + func json() throws -> JSON { + try PendingSecondaryEmailAddedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PendingSecondaryEmailAddedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PendingSecondaryEmailAddedDetails: \(error)" } } } @@ -43668,7 +46452,7 @@ public class TeamLog { } /// The PendingSecondaryEmailAddedType struct - public class PendingSecondaryEmailAddedType: CustomStringConvertible { + public class PendingSecondaryEmailAddedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43676,11 +46460,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PendingSecondaryEmailAddedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PendingSecondaryEmailAddedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PendingSecondaryEmailAddedType: \(error)" } } } @@ -43706,7 +46494,7 @@ public class TeamLog { } /// Enabled/disabled ability of team members to permanently delete content. - public class PermanentDeleteChangePolicyDetails: CustomStringConvertible { + public class PermanentDeleteChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New permanent delete content policy. public let newValue: TeamLog.ContentPermanentDeletePolicy /// Previous permanent delete content policy. Might be missing due to historical data gap. @@ -43716,11 +46504,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try PermanentDeleteChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PermanentDeleteChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PermanentDeleteChangePolicyDetails: \(error)" } } } @@ -43748,7 +46540,7 @@ public class TeamLog { } /// The PermanentDeleteChangePolicyType struct - public class PermanentDeleteChangePolicyType: CustomStringConvertible { + public class PermanentDeleteChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -43756,11 +46548,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try PermanentDeleteChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PermanentDeleteChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PermanentDeleteChangePolicyType: \(error)" } } } @@ -43786,7 +46582,7 @@ public class TeamLog { } /// The PlacementRestriction union - public enum PlacementRestriction: CustomStringConvertible { + public enum PlacementRestriction: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case australiaOnly /// An unspecified error. @@ -43802,11 +46598,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try PlacementRestrictionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PlacementRestrictionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PlacementRestriction: \(error)" } } } @@ -43875,7 +46675,7 @@ public class TeamLog { } /// The PolicyType union - public enum PolicyType: CustomStringConvertible { + public enum PolicyType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disposition /// An unspecified error. @@ -43883,11 +46683,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try PolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PolicyType: \(error)" } } } @@ -43932,7 +46736,7 @@ public class TeamLog { } /// Team merge request acceptance details shown to the primary team - public class PrimaryTeamRequestAcceptedDetails: CustomStringConvertible { + public class PrimaryTeamRequestAcceptedDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -43944,11 +46748,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try PrimaryTeamRequestAcceptedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PrimaryTeamRequestAcceptedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PrimaryTeamRequestAcceptedDetails: \(error)" } } } @@ -43976,7 +46784,7 @@ public class TeamLog { } /// Team merge request cancellation details shown to the primary team - public class PrimaryTeamRequestCanceledDetails: CustomStringConvertible { + public class PrimaryTeamRequestCanceledDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -43988,11 +46796,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try PrimaryTeamRequestCanceledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PrimaryTeamRequestCanceledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PrimaryTeamRequestCanceledDetails: \(error)" } } } @@ -44020,7 +46832,7 @@ public class TeamLog { } /// Team merge request expiration details shown to the primary team - public class PrimaryTeamRequestExpiredDetails: CustomStringConvertible { + public class PrimaryTeamRequestExpiredDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -44032,11 +46844,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try PrimaryTeamRequestExpiredDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PrimaryTeamRequestExpiredDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PrimaryTeamRequestExpiredDetails: \(error)" } } } @@ -44064,7 +46880,7 @@ public class TeamLog { } /// Team merge request reminder details shown to the primary team - public class PrimaryTeamRequestReminderDetails: CustomStringConvertible { + public class PrimaryTeamRequestReminderDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the primary team admin the request was sent to. @@ -44076,11 +46892,15 @@ public class TeamLog { self.sentTo = sentTo } + func json() throws -> JSON { + try PrimaryTeamRequestReminderDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PrimaryTeamRequestReminderDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PrimaryTeamRequestReminderDetails: \(error)" } } } @@ -44108,7 +46928,7 @@ public class TeamLog { } /// Quick action type. - public enum QuickActionType: CustomStringConvertible { + public enum QuickActionType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case deleteSharedLink /// An unspecified error. @@ -44124,11 +46944,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try QuickActionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try QuickActionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for QuickActionType: \(error)" } } } @@ -44197,12 +47021,16 @@ public class TeamLog { } /// Created ransomware report. - public class RansomwareAlertCreateReportDetails: CustomStringConvertible { + public class RansomwareAlertCreateReportDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try RansomwareAlertCreateReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RansomwareAlertCreateReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RansomwareAlertCreateReportDetails: \(error)" } } } @@ -44225,18 +47053,22 @@ public class TeamLog { } /// Couldn't generate ransomware report. - public class RansomwareAlertCreateReportFailedDetails: CustomStringConvertible { + public class RansomwareAlertCreateReportFailedDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try RansomwareAlertCreateReportFailedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RansomwareAlertCreateReportFailedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RansomwareAlertCreateReportFailedDetails: \(error)" } } } @@ -44262,7 +47094,7 @@ public class TeamLog { } /// The RansomwareAlertCreateReportFailedType struct - public class RansomwareAlertCreateReportFailedType: CustomStringConvertible { + public class RansomwareAlertCreateReportFailedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44270,11 +47102,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try RansomwareAlertCreateReportFailedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RansomwareAlertCreateReportFailedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RansomwareAlertCreateReportFailedType: \(error)" } } } @@ -44300,7 +47136,7 @@ public class TeamLog { } /// The RansomwareAlertCreateReportType struct - public class RansomwareAlertCreateReportType: CustomStringConvertible { + public class RansomwareAlertCreateReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44308,11 +47144,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try RansomwareAlertCreateReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RansomwareAlertCreateReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RansomwareAlertCreateReportType: \(error)" } } } @@ -44338,7 +47178,7 @@ public class TeamLog { } /// Completed ransomware restore process. - public class RansomwareRestoreProcessCompletedDetails: CustomStringConvertible { + public class RansomwareRestoreProcessCompletedDetails: CustomStringConvertible, JSONRepresentable { /// The status of the restore process. public let status: String /// Restored files count. @@ -44354,11 +47194,15 @@ public class TeamLog { self.restoredFilesFailedCount = restoredFilesFailedCount } + func json() throws -> JSON { + try RansomwareRestoreProcessCompletedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RansomwareRestoreProcessCompletedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RansomwareRestoreProcessCompletedDetails: \(error)" } } } @@ -44392,7 +47236,7 @@ public class TeamLog { } /// The RansomwareRestoreProcessCompletedType struct - public class RansomwareRestoreProcessCompletedType: CustomStringConvertible { + public class RansomwareRestoreProcessCompletedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44400,11 +47244,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try RansomwareRestoreProcessCompletedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RansomwareRestoreProcessCompletedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RansomwareRestoreProcessCompletedType: \(error)" } } } @@ -44430,7 +47278,7 @@ public class TeamLog { } /// Started ransomware restore process. - public class RansomwareRestoreProcessStartedDetails: CustomStringConvertible { + public class RansomwareRestoreProcessStartedDetails: CustomStringConvertible, JSONRepresentable { /// Ransomware filename extension. public let extension_: String public init(extension_: String) { @@ -44438,11 +47286,15 @@ public class TeamLog { self.extension_ = extension_ } + func json() throws -> JSON { + try RansomwareRestoreProcessStartedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RansomwareRestoreProcessStartedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RansomwareRestoreProcessStartedDetails: \(error)" } } } @@ -44468,7 +47320,7 @@ public class TeamLog { } /// The RansomwareRestoreProcessStartedType struct - public class RansomwareRestoreProcessStartedType: CustomStringConvertible { + public class RansomwareRestoreProcessStartedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44476,11 +47328,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try RansomwareRestoreProcessStartedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RansomwareRestoreProcessStartedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RansomwareRestoreProcessStartedType: \(error)" } } } @@ -44506,7 +47362,7 @@ public class TeamLog { } /// Recipients Configuration - public class RecipientsConfiguration: CustomStringConvertible { + public class RecipientsConfiguration: CustomStringConvertible, JSONRepresentable { /// Recipients setting type. public let recipientSettingType: TeamLog.AlertRecipientsSettingType? /// A list of user emails to notify. @@ -44521,11 +47377,15 @@ public class TeamLog { self.groups = groups } + func json() throws -> JSON { + try RecipientsConfigurationSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RecipientsConfigurationSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RecipientsConfiguration: \(error)" } } } @@ -44556,7 +47416,7 @@ public class TeamLog { } /// Provides the indices of the source asset and the destination asset for a relocate action. - public class RelocateAssetReferencesLogInfo: CustomStringConvertible { + public class RelocateAssetReferencesLogInfo: CustomStringConvertible, JSONRepresentable { /// Source asset position in the Assets list. public let srcAssetIndex: UInt64 /// Destination asset position in the Assets list. @@ -44568,11 +47428,15 @@ public class TeamLog { self.destAssetIndex = destAssetIndex } + func json() throws -> JSON { + try RelocateAssetReferencesLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RelocateAssetReferencesLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RelocateAssetReferencesLogInfo: \(error)" } } } @@ -44600,12 +47464,16 @@ public class TeamLog { } /// Deleted files in Replay. - public class ReplayFileDeleteDetails: CustomStringConvertible { + public class ReplayFileDeleteDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ReplayFileDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayFileDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayFileDeleteDetails: \(error)" } } } @@ -44628,7 +47496,7 @@ public class TeamLog { } /// The ReplayFileDeleteType struct - public class ReplayFileDeleteType: CustomStringConvertible { + public class ReplayFileDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44636,11 +47504,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ReplayFileDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayFileDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayFileDeleteType: \(error)" } } } @@ -44666,12 +47538,16 @@ public class TeamLog { } /// Created shared link in Replay. - public class ReplayFileSharedLinkCreatedDetails: CustomStringConvertible { + public class ReplayFileSharedLinkCreatedDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ReplayFileSharedLinkCreatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayFileSharedLinkCreatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayFileSharedLinkCreatedDetails: \(error)" } } } @@ -44694,7 +47570,7 @@ public class TeamLog { } /// The ReplayFileSharedLinkCreatedType struct - public class ReplayFileSharedLinkCreatedType: CustomStringConvertible { + public class ReplayFileSharedLinkCreatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44702,11 +47578,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ReplayFileSharedLinkCreatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayFileSharedLinkCreatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayFileSharedLinkCreatedType: \(error)" } } } @@ -44732,12 +47612,16 @@ public class TeamLog { } /// Modified shared link in Replay. - public class ReplayFileSharedLinkModifiedDetails: CustomStringConvertible { + public class ReplayFileSharedLinkModifiedDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ReplayFileSharedLinkModifiedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayFileSharedLinkModifiedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayFileSharedLinkModifiedDetails: \(error)" } } } @@ -44760,7 +47644,7 @@ public class TeamLog { } /// The ReplayFileSharedLinkModifiedType struct - public class ReplayFileSharedLinkModifiedType: CustomStringConvertible { + public class ReplayFileSharedLinkModifiedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44768,11 +47652,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ReplayFileSharedLinkModifiedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayFileSharedLinkModifiedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayFileSharedLinkModifiedType: \(error)" } } } @@ -44798,12 +47686,16 @@ public class TeamLog { } /// Added member to Replay Project. - public class ReplayProjectTeamAddDetails: CustomStringConvertible { + public class ReplayProjectTeamAddDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ReplayProjectTeamAddDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayProjectTeamAddDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayProjectTeamAddDetails: \(error)" } } } @@ -44826,7 +47718,7 @@ public class TeamLog { } /// The ReplayProjectTeamAddType struct - public class ReplayProjectTeamAddType: CustomStringConvertible { + public class ReplayProjectTeamAddType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44834,11 +47726,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ReplayProjectTeamAddTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayProjectTeamAddTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayProjectTeamAddType: \(error)" } } } @@ -44864,12 +47760,16 @@ public class TeamLog { } /// Removed member from Replay Project. - public class ReplayProjectTeamDeleteDetails: CustomStringConvertible { + public class ReplayProjectTeamDeleteDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ReplayProjectTeamDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayProjectTeamDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayProjectTeamDeleteDetails: \(error)" } } } @@ -44892,7 +47792,7 @@ public class TeamLog { } /// The ReplayProjectTeamDeleteType struct - public class ReplayProjectTeamDeleteType: CustomStringConvertible { + public class ReplayProjectTeamDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -44900,11 +47800,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ReplayProjectTeamDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ReplayProjectTeamDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ReplayProjectTeamDeleteType: \(error)" } } } @@ -44930,7 +47834,7 @@ public class TeamLog { } /// Reseller information. - public class ResellerLogInfo: CustomStringConvertible { + public class ResellerLogInfo: CustomStringConvertible, JSONRepresentable { /// Reseller name. public let resellerName: String /// Reseller email. @@ -44942,11 +47846,15 @@ public class TeamLog { self.resellerEmail = resellerEmail } + func json() throws -> JSON { + try ResellerLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerLogInfo: \(error)" } } } @@ -44974,7 +47882,7 @@ public class TeamLog { } /// The ResellerRole union - public enum ResellerRole: CustomStringConvertible { + public enum ResellerRole: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case notReseller /// An unspecified error. @@ -44982,11 +47890,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ResellerRoleSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerRoleSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerRole: \(error)" } } } @@ -45031,7 +47943,7 @@ public class TeamLog { } /// Enabled/disabled reseller support. - public class ResellerSupportChangePolicyDetails: CustomStringConvertible { + public class ResellerSupportChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New Reseller support policy. public let newValue: TeamLog.ResellerSupportPolicy /// Previous Reseller support policy. @@ -45041,11 +47953,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try ResellerSupportChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerSupportChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerSupportChangePolicyDetails: \(error)" } } } @@ -45073,7 +47989,7 @@ public class TeamLog { } /// The ResellerSupportChangePolicyType struct - public class ResellerSupportChangePolicyType: CustomStringConvertible { + public class ResellerSupportChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -45081,11 +47997,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ResellerSupportChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerSupportChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerSupportChangePolicyType: \(error)" } } } @@ -45111,7 +48031,7 @@ public class TeamLog { } /// Policy for controlling if reseller can access the admin console as administrator - public enum ResellerSupportPolicy: CustomStringConvertible { + public enum ResellerSupportPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -45119,11 +48039,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ResellerSupportPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerSupportPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerSupportPolicy: \(error)" } } } @@ -45168,12 +48092,16 @@ public class TeamLog { } /// Ended reseller support session. - public class ResellerSupportSessionEndDetails: CustomStringConvertible { + public class ResellerSupportSessionEndDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ResellerSupportSessionEndDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerSupportSessionEndDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerSupportSessionEndDetails: \(error)" } } } @@ -45196,7 +48124,7 @@ public class TeamLog { } /// The ResellerSupportSessionEndType struct - public class ResellerSupportSessionEndType: CustomStringConvertible { + public class ResellerSupportSessionEndType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -45204,11 +48132,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ResellerSupportSessionEndTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerSupportSessionEndTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerSupportSessionEndType: \(error)" } } } @@ -45234,12 +48166,16 @@ public class TeamLog { } /// Started reseller support session. - public class ResellerSupportSessionStartDetails: CustomStringConvertible { + public class ResellerSupportSessionStartDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ResellerSupportSessionStartDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerSupportSessionStartDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerSupportSessionStartDetails: \(error)" } } } @@ -45262,7 +48198,7 @@ public class TeamLog { } /// The ResellerSupportSessionStartType struct - public class ResellerSupportSessionStartType: CustomStringConvertible { + public class ResellerSupportSessionStartType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -45270,11 +48206,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ResellerSupportSessionStartTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ResellerSupportSessionStartTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ResellerSupportSessionStartType: \(error)" } } } @@ -45300,18 +48240,22 @@ public class TeamLog { } /// Rewound a folder. - public class RewindFolderDetails: CustomStringConvertible { + public class RewindFolderDetails: CustomStringConvertible, JSONRepresentable { /// Folder was Rewound to this date. public let rewindFolderTargetTsMs: Date public init(rewindFolderTargetTsMs: Date) { self.rewindFolderTargetTsMs = rewindFolderTargetTsMs } + func json() throws -> JSON { + try RewindFolderDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RewindFolderDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RewindFolderDetails: \(error)" } } } @@ -45337,7 +48281,7 @@ public class TeamLog { } /// The RewindFolderType struct - public class RewindFolderType: CustomStringConvertible { + public class RewindFolderType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -45345,11 +48289,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try RewindFolderTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RewindFolderTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RewindFolderType: \(error)" } } } @@ -45375,7 +48323,7 @@ public class TeamLog { } /// Policy for controlling whether team members can rewind - public enum RewindPolicy: CustomStringConvertible { + public enum RewindPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case adminsOnly /// An unspecified error. @@ -45383,11 +48331,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try RewindPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RewindPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RewindPolicy: \(error)" } } } @@ -45432,7 +48384,7 @@ public class TeamLog { } /// Changed Rewind policy for team. - public class RewindPolicyChangedDetails: CustomStringConvertible { + public class RewindPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New Dropbox Rewind policy. public let newValue: TeamLog.RewindPolicy /// Previous Dropbox Rewind policy. @@ -45442,11 +48394,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try RewindPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RewindPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RewindPolicyChangedDetails: \(error)" } } } @@ -45474,7 +48430,7 @@ public class TeamLog { } /// The RewindPolicyChangedType struct - public class RewindPolicyChangedType: CustomStringConvertible { + public class RewindPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -45482,11 +48438,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try RewindPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RewindPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RewindPolicyChangedType: \(error)" } } } @@ -45512,7 +48472,7 @@ public class TeamLog { } /// Deleted secondary email. - public class SecondaryEmailDeletedDetails: CustomStringConvertible { + public class SecondaryEmailDeletedDetails: CustomStringConvertible, JSONRepresentable { /// Deleted secondary email. public let secondaryEmail: String public init(secondaryEmail: String) { @@ -45520,11 +48480,15 @@ public class TeamLog { self.secondaryEmail = secondaryEmail } + func json() throws -> JSON { + try SecondaryEmailDeletedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryEmailDeletedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryEmailDeletedDetails: \(error)" } } } @@ -45550,7 +48514,7 @@ public class TeamLog { } /// The SecondaryEmailDeletedType struct - public class SecondaryEmailDeletedType: CustomStringConvertible { + public class SecondaryEmailDeletedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -45558,11 +48522,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SecondaryEmailDeletedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryEmailDeletedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryEmailDeletedType: \(error)" } } } @@ -45588,7 +48556,7 @@ public class TeamLog { } /// Verified secondary email. - public class SecondaryEmailVerifiedDetails: CustomStringConvertible { + public class SecondaryEmailVerifiedDetails: CustomStringConvertible, JSONRepresentable { /// Verified secondary email. public let secondaryEmail: String public init(secondaryEmail: String) { @@ -45596,11 +48564,15 @@ public class TeamLog { self.secondaryEmail = secondaryEmail } + func json() throws -> JSON { + try SecondaryEmailVerifiedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryEmailVerifiedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryEmailVerifiedDetails: \(error)" } } } @@ -45626,7 +48598,7 @@ public class TeamLog { } /// The SecondaryEmailVerifiedType struct - public class SecondaryEmailVerifiedType: CustomStringConvertible { + public class SecondaryEmailVerifiedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -45634,11 +48606,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SecondaryEmailVerifiedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryEmailVerifiedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryEmailVerifiedType: \(error)" } } } @@ -45664,7 +48640,7 @@ public class TeamLog { } /// The SecondaryMailsPolicy union - public enum SecondaryMailsPolicy: CustomStringConvertible { + public enum SecondaryMailsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -45672,11 +48648,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SecondaryMailsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryMailsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryMailsPolicy: \(error)" } } } @@ -45721,7 +48701,7 @@ public class TeamLog { } /// Secondary mails policy changed. - public class SecondaryMailsPolicyChangedDetails: CustomStringConvertible { + public class SecondaryMailsPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// Previous secondary mails policy. public let previousValue: TeamLog.SecondaryMailsPolicy /// New secondary mails policy. @@ -45731,11 +48711,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SecondaryMailsPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryMailsPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryMailsPolicyChangedDetails: \(error)" } } } @@ -45763,7 +48747,7 @@ public class TeamLog { } /// The SecondaryMailsPolicyChangedType struct - public class SecondaryMailsPolicyChangedType: CustomStringConvertible { + public class SecondaryMailsPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -45771,11 +48755,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SecondaryMailsPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryMailsPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryMailsPolicyChangedType: \(error)" } } } @@ -45801,7 +48789,7 @@ public class TeamLog { } /// Team merge request acceptance details shown to the secondary team - public class SecondaryTeamRequestAcceptedDetails: CustomStringConvertible { + public class SecondaryTeamRequestAcceptedDetails: CustomStringConvertible, JSONRepresentable { /// The primary team name. public let primaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -45813,11 +48801,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try SecondaryTeamRequestAcceptedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryTeamRequestAcceptedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryTeamRequestAcceptedDetails: \(error)" } } } @@ -45845,7 +48837,7 @@ public class TeamLog { } /// Team merge request cancellation details shown to the secondary team - public class SecondaryTeamRequestCanceledDetails: CustomStringConvertible { + public class SecondaryTeamRequestCanceledDetails: CustomStringConvertible, JSONRepresentable { /// The email of the primary team admin that the request was sent to. public let sentTo: String /// The name of the secondary team admin who sent the request originally. @@ -45857,11 +48849,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try SecondaryTeamRequestCanceledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryTeamRequestCanceledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryTeamRequestCanceledDetails: \(error)" } } } @@ -45889,7 +48885,7 @@ public class TeamLog { } /// Team merge request expiration details shown to the secondary team - public class SecondaryTeamRequestExpiredDetails: CustomStringConvertible { + public class SecondaryTeamRequestExpiredDetails: CustomStringConvertible, JSONRepresentable { /// The email of the primary team admin the request was sent to. public let sentTo: String public init(sentTo: String) { @@ -45897,11 +48893,15 @@ public class TeamLog { self.sentTo = sentTo } + func json() throws -> JSON { + try SecondaryTeamRequestExpiredDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryTeamRequestExpiredDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryTeamRequestExpiredDetails: \(error)" } } } @@ -45927,7 +48927,7 @@ public class TeamLog { } /// Team merge request reminder details shown to the secondary team - public class SecondaryTeamRequestReminderDetails: CustomStringConvertible { + public class SecondaryTeamRequestReminderDetails: CustomStringConvertible, JSONRepresentable { /// The email of the primary team admin the request was sent to. public let sentTo: String public init(sentTo: String) { @@ -45935,11 +48935,15 @@ public class TeamLog { self.sentTo = sentTo } + func json() throws -> JSON { + try SecondaryTeamRequestReminderDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SecondaryTeamRequestReminderDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SecondaryTeamRequestReminderDetails: \(error)" } } } @@ -45965,7 +48969,7 @@ public class TeamLog { } /// Policy for controlling team access to send for signature feature - public enum SendForSignaturePolicy: CustomStringConvertible { + public enum SendForSignaturePolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -45973,11 +48977,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SendForSignaturePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SendForSignaturePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SendForSignaturePolicy: \(error)" } } } @@ -46022,7 +49030,7 @@ public class TeamLog { } /// Changed send for signature policy for team. - public class SendForSignaturePolicyChangedDetails: CustomStringConvertible { + public class SendForSignaturePolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New send for signature policy. public let newValue: TeamLog.SendForSignaturePolicy /// Previous send for signature policy. @@ -46032,11 +49040,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SendForSignaturePolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SendForSignaturePolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SendForSignaturePolicyChangedDetails: \(error)" } } } @@ -46064,7 +49076,7 @@ public class TeamLog { } /// The SendForSignaturePolicyChangedType struct - public class SendForSignaturePolicyChangedType: CustomStringConvertible { + public class SendForSignaturePolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46072,11 +49084,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SendForSignaturePolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SendForSignaturePolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SendForSignaturePolicyChangedType: \(error)" } } } @@ -46102,7 +49118,7 @@ public class TeamLog { } /// Added team to shared folder. - public class SfAddGroupDetails: CustomStringConvertible { + public class SfAddGroupDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46122,11 +49138,15 @@ public class TeamLog { self.teamName = teamName } + func json() throws -> JSON { + try SfAddGroupDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfAddGroupDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfAddGroupDetails: \(error)" } } } @@ -46163,7 +49183,7 @@ public class TeamLog { } /// The SfAddGroupType struct - public class SfAddGroupType: CustomStringConvertible { + public class SfAddGroupType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46171,11 +49191,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfAddGroupTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfAddGroupTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfAddGroupType: \(error)" } } } @@ -46201,7 +49225,7 @@ public class TeamLog { } /// Allowed non-collaborators to view links to files in shared folder. - public class SfAllowNonMembersToViewSharedLinksDetails: CustomStringConvertible { + public class SfAllowNonMembersToViewSharedLinksDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46217,11 +49241,15 @@ public class TeamLog { self.sharedFolderType = sharedFolderType } + func json() throws -> JSON { + try SfAllowNonMembersToViewSharedLinksDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfAllowNonMembersToViewSharedLinksDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfAllowNonMembersToViewSharedLinksDetails: \(error)" } } } @@ -46255,7 +49283,7 @@ public class TeamLog { } /// The SfAllowNonMembersToViewSharedLinksType struct - public class SfAllowNonMembersToViewSharedLinksType: CustomStringConvertible { + public class SfAllowNonMembersToViewSharedLinksType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46263,11 +49291,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfAllowNonMembersToViewSharedLinksTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfAllowNonMembersToViewSharedLinksTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfAllowNonMembersToViewSharedLinksType: \(error)" } } } @@ -46293,7 +49325,7 @@ public class TeamLog { } /// Set team members to see warning before sharing folders outside team. - public class SfExternalInviteWarnDetails: CustomStringConvertible { + public class SfExternalInviteWarnDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46313,11 +49345,15 @@ public class TeamLog { self.previousSharingPermission = previousSharingPermission } + func json() throws -> JSON { + try SfExternalInviteWarnDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfExternalInviteWarnDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfExternalInviteWarnDetails: \(error)" } } } @@ -46355,7 +49391,7 @@ public class TeamLog { } /// The SfExternalInviteWarnType struct - public class SfExternalInviteWarnType: CustomStringConvertible { + public class SfExternalInviteWarnType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46363,11 +49399,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfExternalInviteWarnTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfExternalInviteWarnTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfExternalInviteWarnType: \(error)" } } } @@ -46393,7 +49433,7 @@ public class TeamLog { } /// Changed Facebook user's role in shared folder. - public class SfFbInviteChangeRoleDetails: CustomStringConvertible { + public class SfFbInviteChangeRoleDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46413,11 +49453,15 @@ public class TeamLog { self.newSharingPermission = newSharingPermission } + func json() throws -> JSON { + try SfFbInviteChangeRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfFbInviteChangeRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfFbInviteChangeRoleDetails: \(error)" } } } @@ -46455,7 +49499,7 @@ public class TeamLog { } /// The SfFbInviteChangeRoleType struct - public class SfFbInviteChangeRoleType: CustomStringConvertible { + public class SfFbInviteChangeRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46463,11 +49507,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfFbInviteChangeRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfFbInviteChangeRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfFbInviteChangeRoleType: \(error)" } } } @@ -46493,7 +49541,7 @@ public class TeamLog { } /// Invited Facebook users to shared folder. - public class SfFbInviteDetails: CustomStringConvertible { + public class SfFbInviteDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46509,11 +49557,15 @@ public class TeamLog { self.sharingPermission = sharingPermission } + func json() throws -> JSON { + try SfFbInviteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfFbInviteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfFbInviteDetails: \(error)" } } } @@ -46543,7 +49595,7 @@ public class TeamLog { } /// The SfFbInviteType struct - public class SfFbInviteType: CustomStringConvertible { + public class SfFbInviteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46551,11 +49603,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfFbInviteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfFbInviteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfFbInviteType: \(error)" } } } @@ -46581,7 +49637,7 @@ public class TeamLog { } /// Uninvited Facebook user from shared folder. - public class SfFbUninviteDetails: CustomStringConvertible { + public class SfFbUninviteDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46593,11 +49649,15 @@ public class TeamLog { self.originalFolderName = originalFolderName } + func json() throws -> JSON { + try SfFbUninviteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfFbUninviteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfFbUninviteDetails: \(error)" } } } @@ -46625,7 +49685,7 @@ public class TeamLog { } /// The SfFbUninviteType struct - public class SfFbUninviteType: CustomStringConvertible { + public class SfFbUninviteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46633,11 +49693,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfFbUninviteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfFbUninviteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfFbUninviteType: \(error)" } } } @@ -46663,7 +49727,7 @@ public class TeamLog { } /// Invited group to shared folder. - public class SfInviteGroupDetails: CustomStringConvertible { + public class SfInviteGroupDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 public init(targetAssetIndex: UInt64) { @@ -46671,11 +49735,15 @@ public class TeamLog { self.targetAssetIndex = targetAssetIndex } + func json() throws -> JSON { + try SfInviteGroupDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfInviteGroupDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfInviteGroupDetails: \(error)" } } } @@ -46701,7 +49769,7 @@ public class TeamLog { } /// The SfInviteGroupType struct - public class SfInviteGroupType: CustomStringConvertible { + public class SfInviteGroupType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46709,11 +49777,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfInviteGroupTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfInviteGroupTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfInviteGroupType: \(error)" } } } @@ -46739,7 +49811,7 @@ public class TeamLog { } /// Granted access to shared folder. - public class SfTeamGrantAccessDetails: CustomStringConvertible { + public class SfTeamGrantAccessDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46751,11 +49823,15 @@ public class TeamLog { self.originalFolderName = originalFolderName } + func json() throws -> JSON { + try SfTeamGrantAccessDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamGrantAccessDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamGrantAccessDetails: \(error)" } } } @@ -46783,7 +49859,7 @@ public class TeamLog { } /// The SfTeamGrantAccessType struct - public class SfTeamGrantAccessType: CustomStringConvertible { + public class SfTeamGrantAccessType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46791,11 +49867,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfTeamGrantAccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamGrantAccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamGrantAccessType: \(error)" } } } @@ -46821,7 +49901,7 @@ public class TeamLog { } /// Changed team member's role in shared folder. - public class SfTeamInviteChangeRoleDetails: CustomStringConvertible { + public class SfTeamInviteChangeRoleDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46841,11 +49921,15 @@ public class TeamLog { self.previousSharingPermission = previousSharingPermission } + func json() throws -> JSON { + try SfTeamInviteChangeRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamInviteChangeRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamInviteChangeRoleDetails: \(error)" } } } @@ -46883,7 +49967,7 @@ public class TeamLog { } /// The SfTeamInviteChangeRoleType struct - public class SfTeamInviteChangeRoleType: CustomStringConvertible { + public class SfTeamInviteChangeRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46891,11 +49975,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfTeamInviteChangeRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamInviteChangeRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamInviteChangeRoleType: \(error)" } } } @@ -46921,7 +50009,7 @@ public class TeamLog { } /// Invited team members to shared folder. - public class SfTeamInviteDetails: CustomStringConvertible { + public class SfTeamInviteDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -46937,11 +50025,15 @@ public class TeamLog { self.sharingPermission = sharingPermission } + func json() throws -> JSON { + try SfTeamInviteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamInviteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamInviteDetails: \(error)" } } } @@ -46971,7 +50063,7 @@ public class TeamLog { } /// The SfTeamInviteType struct - public class SfTeamInviteType: CustomStringConvertible { + public class SfTeamInviteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -46979,11 +50071,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfTeamInviteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamInviteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamInviteType: \(error)" } } } @@ -47009,7 +50105,7 @@ public class TeamLog { } /// Joined team member's shared folder. - public class SfTeamJoinDetails: CustomStringConvertible { + public class SfTeamJoinDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -47021,11 +50117,15 @@ public class TeamLog { self.originalFolderName = originalFolderName } + func json() throws -> JSON { + try SfTeamJoinDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamJoinDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamJoinDetails: \(error)" } } } @@ -47053,7 +50153,7 @@ public class TeamLog { } /// Joined team member's shared folder from link. - public class SfTeamJoinFromOobLinkDetails: CustomStringConvertible { + public class SfTeamJoinFromOobLinkDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -47073,11 +50173,15 @@ public class TeamLog { self.sharingPermission = sharingPermission } + func json() throws -> JSON { + try SfTeamJoinFromOobLinkDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamJoinFromOobLinkDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamJoinFromOobLinkDetails: \(error)" } } } @@ -47114,7 +50218,7 @@ public class TeamLog { } /// The SfTeamJoinFromOobLinkType struct - public class SfTeamJoinFromOobLinkType: CustomStringConvertible { + public class SfTeamJoinFromOobLinkType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47122,11 +50226,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfTeamJoinFromOobLinkTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamJoinFromOobLinkTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamJoinFromOobLinkType: \(error)" } } } @@ -47152,7 +50260,7 @@ public class TeamLog { } /// The SfTeamJoinType struct - public class SfTeamJoinType: CustomStringConvertible { + public class SfTeamJoinType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47160,11 +50268,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfTeamJoinTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamJoinTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamJoinType: \(error)" } } } @@ -47190,7 +50302,7 @@ public class TeamLog { } /// Unshared folder with team member. - public class SfTeamUninviteDetails: CustomStringConvertible { + public class SfTeamUninviteDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 /// Original shared folder name. @@ -47202,11 +50314,15 @@ public class TeamLog { self.originalFolderName = originalFolderName } + func json() throws -> JSON { + try SfTeamUninviteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamUninviteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamUninviteDetails: \(error)" } } } @@ -47234,7 +50350,7 @@ public class TeamLog { } /// The SfTeamUninviteType struct - public class SfTeamUninviteType: CustomStringConvertible { + public class SfTeamUninviteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47242,11 +50358,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SfTeamUninviteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SfTeamUninviteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SfTeamUninviteType: \(error)" } } } @@ -47272,7 +50392,7 @@ public class TeamLog { } /// Invited user to Dropbox and added them to shared file/folder. - public class SharedContentAddInviteesDetails: CustomStringConvertible { + public class SharedContentAddInviteesDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// A list of invitees. @@ -47283,11 +50403,15 @@ public class TeamLog { self.invitees = invitees } + func json() throws -> JSON { + try SharedContentAddInviteesDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentAddInviteesDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentAddInviteesDetails: \(error)" } } } @@ -47315,7 +50439,7 @@ public class TeamLog { } /// The SharedContentAddInviteesType struct - public class SharedContentAddInviteesType: CustomStringConvertible { + public class SharedContentAddInviteesType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47323,11 +50447,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentAddInviteesTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentAddInviteesTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentAddInviteesType: \(error)" } } } @@ -47353,18 +50481,22 @@ public class TeamLog { } /// Added expiration date to link for shared file/folder. - public class SharedContentAddLinkExpiryDetails: CustomStringConvertible { + public class SharedContentAddLinkExpiryDetails: CustomStringConvertible, JSONRepresentable { /// New shared content link expiration date. Might be missing due to historical data gap. public let newValue: Date? public init(newValue: Date? = nil) { self.newValue = newValue } + func json() throws -> JSON { + try SharedContentAddLinkExpiryDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentAddLinkExpiryDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentAddLinkExpiryDetails: \(error)" } } } @@ -47390,7 +50522,7 @@ public class TeamLog { } /// The SharedContentAddLinkExpiryType struct - public class SharedContentAddLinkExpiryType: CustomStringConvertible { + public class SharedContentAddLinkExpiryType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47398,11 +50530,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentAddLinkExpiryTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentAddLinkExpiryTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentAddLinkExpiryType: \(error)" } } } @@ -47428,12 +50564,16 @@ public class TeamLog { } /// Added password to link for shared file/folder. - public class SharedContentAddLinkPasswordDetails: CustomStringConvertible { + public class SharedContentAddLinkPasswordDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedContentAddLinkPasswordDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentAddLinkPasswordDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentAddLinkPasswordDetails: \(error)" } } } @@ -47456,7 +50596,7 @@ public class TeamLog { } /// The SharedContentAddLinkPasswordType struct - public class SharedContentAddLinkPasswordType: CustomStringConvertible { + public class SharedContentAddLinkPasswordType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47464,11 +50604,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentAddLinkPasswordTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentAddLinkPasswordTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentAddLinkPasswordType: \(error)" } } } @@ -47494,18 +50638,22 @@ public class TeamLog { } /// Added users and/or groups to shared file/folder. - public class SharedContentAddMemberDetails: CustomStringConvertible { + public class SharedContentAddMemberDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel public init(sharedContentAccessLevel: Sharing.AccessLevel) { self.sharedContentAccessLevel = sharedContentAccessLevel } + func json() throws -> JSON { + try SharedContentAddMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentAddMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentAddMemberDetails: \(error)" } } } @@ -47531,7 +50679,7 @@ public class TeamLog { } /// The SharedContentAddMemberType struct - public class SharedContentAddMemberType: CustomStringConvertible { + public class SharedContentAddMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47539,11 +50687,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentAddMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentAddMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentAddMemberType: \(error)" } } } @@ -47569,7 +50721,7 @@ public class TeamLog { } /// Changed whether members can download shared file/folder. - public class SharedContentChangeDownloadsPolicyDetails: CustomStringConvertible { + public class SharedContentChangeDownloadsPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New downloads policy. public let newValue: TeamLog.DownloadPolicyType /// Previous downloads policy. Might be missing due to historical data gap. @@ -47579,11 +50731,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedContentChangeDownloadsPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeDownloadsPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeDownloadsPolicyDetails: \(error)" } } } @@ -47611,7 +50767,7 @@ public class TeamLog { } /// The SharedContentChangeDownloadsPolicyType struct - public class SharedContentChangeDownloadsPolicyType: CustomStringConvertible { + public class SharedContentChangeDownloadsPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47619,11 +50775,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentChangeDownloadsPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeDownloadsPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeDownloadsPolicyType: \(error)" } } } @@ -47649,7 +50809,7 @@ public class TeamLog { } /// Changed access type of invitee to shared file/folder before invite was accepted. - public class SharedContentChangeInviteeRoleDetails: CustomStringConvertible { + public class SharedContentChangeInviteeRoleDetails: CustomStringConvertible, JSONRepresentable { /// Previous access level. Might be missing due to historical data gap. public let previousAccessLevel: Sharing.AccessLevel? /// New access level. @@ -47663,11 +50823,15 @@ public class TeamLog { self.invitee = invitee } + func json() throws -> JSON { + try SharedContentChangeInviteeRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeInviteeRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeInviteeRoleDetails: \(error)" } } } @@ -47697,7 +50861,7 @@ public class TeamLog { } /// The SharedContentChangeInviteeRoleType struct - public class SharedContentChangeInviteeRoleType: CustomStringConvertible { + public class SharedContentChangeInviteeRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47705,11 +50869,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentChangeInviteeRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeInviteeRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeInviteeRoleType: \(error)" } } } @@ -47735,7 +50903,7 @@ public class TeamLog { } /// Changed link audience of shared file/folder. - public class SharedContentChangeLinkAudienceDetails: CustomStringConvertible { + public class SharedContentChangeLinkAudienceDetails: CustomStringConvertible, JSONRepresentable { /// New link audience value. public let newValue: Sharing.LinkAudience /// Previous link audience value. @@ -47745,11 +50913,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedContentChangeLinkAudienceDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeLinkAudienceDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeLinkAudienceDetails: \(error)" } } } @@ -47777,7 +50949,7 @@ public class TeamLog { } /// The SharedContentChangeLinkAudienceType struct - public class SharedContentChangeLinkAudienceType: CustomStringConvertible { + public class SharedContentChangeLinkAudienceType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47785,11 +50957,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentChangeLinkAudienceTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeLinkAudienceTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeLinkAudienceType: \(error)" } } } @@ -47815,7 +50991,7 @@ public class TeamLog { } /// Changed link expiration of shared file/folder. - public class SharedContentChangeLinkExpiryDetails: CustomStringConvertible { + public class SharedContentChangeLinkExpiryDetails: CustomStringConvertible, JSONRepresentable { /// New shared content link expiration date. Might be missing due to historical data gap. public let newValue: Date? /// Previous shared content link expiration date. Might be missing due to historical data gap. @@ -47825,11 +51001,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedContentChangeLinkExpiryDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeLinkExpiryDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeLinkExpiryDetails: \(error)" } } } @@ -47857,7 +51037,7 @@ public class TeamLog { } /// The SharedContentChangeLinkExpiryType struct - public class SharedContentChangeLinkExpiryType: CustomStringConvertible { + public class SharedContentChangeLinkExpiryType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47865,11 +51045,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentChangeLinkExpiryTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeLinkExpiryTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeLinkExpiryType: \(error)" } } } @@ -47895,12 +51079,16 @@ public class TeamLog { } /// Changed link password of shared file/folder. - public class SharedContentChangeLinkPasswordDetails: CustomStringConvertible { + public class SharedContentChangeLinkPasswordDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedContentChangeLinkPasswordDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeLinkPasswordDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeLinkPasswordDetails: \(error)" } } } @@ -47923,7 +51111,7 @@ public class TeamLog { } /// The SharedContentChangeLinkPasswordType struct - public class SharedContentChangeLinkPasswordType: CustomStringConvertible { + public class SharedContentChangeLinkPasswordType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -47931,11 +51119,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentChangeLinkPasswordTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeLinkPasswordTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeLinkPasswordType: \(error)" } } } @@ -47961,7 +51153,7 @@ public class TeamLog { } /// Changed access type of shared file/folder member. - public class SharedContentChangeMemberRoleDetails: CustomStringConvertible { + public class SharedContentChangeMemberRoleDetails: CustomStringConvertible, JSONRepresentable { /// Previous access level. Might be missing due to historical data gap. public let previousAccessLevel: Sharing.AccessLevel? /// New access level. @@ -47971,11 +51163,15 @@ public class TeamLog { self.newAccessLevel = newAccessLevel } + func json() throws -> JSON { + try SharedContentChangeMemberRoleDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeMemberRoleDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeMemberRoleDetails: \(error)" } } } @@ -48003,7 +51199,7 @@ public class TeamLog { } /// The SharedContentChangeMemberRoleType struct - public class SharedContentChangeMemberRoleType: CustomStringConvertible { + public class SharedContentChangeMemberRoleType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48011,11 +51207,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentChangeMemberRoleTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeMemberRoleTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeMemberRoleType: \(error)" } } } @@ -48041,7 +51241,7 @@ public class TeamLog { } /// Changed whether members can see who viewed shared file/folder. - public class SharedContentChangeViewerInfoPolicyDetails: CustomStringConvertible { + public class SharedContentChangeViewerInfoPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New viewer info policy. public let newValue: Sharing.ViewerInfoPolicy /// Previous view info policy. @@ -48051,11 +51251,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedContentChangeViewerInfoPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeViewerInfoPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeViewerInfoPolicyDetails: \(error)" } } } @@ -48083,7 +51287,7 @@ public class TeamLog { } /// The SharedContentChangeViewerInfoPolicyType struct - public class SharedContentChangeViewerInfoPolicyType: CustomStringConvertible { + public class SharedContentChangeViewerInfoPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48091,11 +51295,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentChangeViewerInfoPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentChangeViewerInfoPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentChangeViewerInfoPolicyType: \(error)" } } } @@ -48121,7 +51329,7 @@ public class TeamLog { } /// Acquired membership of shared file/folder by accepting invite. - public class SharedContentClaimInvitationDetails: CustomStringConvertible { + public class SharedContentClaimInvitationDetails: CustomStringConvertible, JSONRepresentable { /// Shared content link. public let sharedContentLink: String? public init(sharedContentLink: String? = nil) { @@ -48129,11 +51337,15 @@ public class TeamLog { self.sharedContentLink = sharedContentLink } + func json() throws -> JSON { + try SharedContentClaimInvitationDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentClaimInvitationDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentClaimInvitationDetails: \(error)" } } } @@ -48159,7 +51371,7 @@ public class TeamLog { } /// The SharedContentClaimInvitationType struct - public class SharedContentClaimInvitationType: CustomStringConvertible { + public class SharedContentClaimInvitationType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48167,11 +51379,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentClaimInvitationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentClaimInvitationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentClaimInvitationType: \(error)" } } } @@ -48197,7 +51413,7 @@ public class TeamLog { } /// Copied shared file/folder to own Dropbox. - public class SharedContentCopyDetails: CustomStringConvertible { + public class SharedContentCopyDetails: CustomStringConvertible, JSONRepresentable { /// Shared content link. public let sharedContentLink: String /// The shared content owner. @@ -48220,11 +51436,15 @@ public class TeamLog { self.destinationPath = destinationPath } + func json() throws -> JSON { + try SharedContentCopyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentCopyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentCopyDetails: \(error)" } } } @@ -48261,7 +51481,7 @@ public class TeamLog { } /// The SharedContentCopyType struct - public class SharedContentCopyType: CustomStringConvertible { + public class SharedContentCopyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48269,11 +51489,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentCopyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentCopyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentCopyType: \(error)" } } } @@ -48299,7 +51523,7 @@ public class TeamLog { } /// Downloaded shared file/folder. - public class SharedContentDownloadDetails: CustomStringConvertible { + public class SharedContentDownloadDetails: CustomStringConvertible, JSONRepresentable { /// Shared content link. public let sharedContentLink: String /// The shared content owner. @@ -48313,11 +51537,15 @@ public class TeamLog { self.sharedContentAccessLevel = sharedContentAccessLevel } + func json() throws -> JSON { + try SharedContentDownloadDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentDownloadDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentDownloadDetails: \(error)" } } } @@ -48351,7 +51579,7 @@ public class TeamLog { } /// The SharedContentDownloadType struct - public class SharedContentDownloadType: CustomStringConvertible { + public class SharedContentDownloadType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48359,11 +51587,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentDownloadTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentDownloadTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentDownloadType: \(error)" } } } @@ -48389,12 +51621,16 @@ public class TeamLog { } /// Left shared file/folder. - public class SharedContentRelinquishMembershipDetails: CustomStringConvertible { + public class SharedContentRelinquishMembershipDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedContentRelinquishMembershipDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRelinquishMembershipDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRelinquishMembershipDetails: \(error)" } } } @@ -48417,7 +51653,7 @@ public class TeamLog { } /// The SharedContentRelinquishMembershipType struct - public class SharedContentRelinquishMembershipType: CustomStringConvertible { + public class SharedContentRelinquishMembershipType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48425,11 +51661,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentRelinquishMembershipTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRelinquishMembershipTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRelinquishMembershipType: \(error)" } } } @@ -48455,7 +51695,7 @@ public class TeamLog { } /// Removed invitee from shared file/folder before invite was accepted. - public class SharedContentRemoveInviteesDetails: CustomStringConvertible { + public class SharedContentRemoveInviteesDetails: CustomStringConvertible, JSONRepresentable { /// A list of invitees. public let invitees: [String] public init(invitees: [String]) { @@ -48463,11 +51703,15 @@ public class TeamLog { self.invitees = invitees } + func json() throws -> JSON { + try SharedContentRemoveInviteesDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRemoveInviteesDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRemoveInviteesDetails: \(error)" } } } @@ -48493,7 +51737,7 @@ public class TeamLog { } /// The SharedContentRemoveInviteesType struct - public class SharedContentRemoveInviteesType: CustomStringConvertible { + public class SharedContentRemoveInviteesType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48501,11 +51745,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentRemoveInviteesTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRemoveInviteesTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRemoveInviteesType: \(error)" } } } @@ -48531,18 +51779,22 @@ public class TeamLog { } /// Removed link expiration date of shared file/folder. - public class SharedContentRemoveLinkExpiryDetails: CustomStringConvertible { + public class SharedContentRemoveLinkExpiryDetails: CustomStringConvertible, JSONRepresentable { /// Previous shared content link expiration date. Might be missing due to historical data gap. public let previousValue: Date? public init(previousValue: Date? = nil) { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedContentRemoveLinkExpiryDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRemoveLinkExpiryDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRemoveLinkExpiryDetails: \(error)" } } } @@ -48568,7 +51820,7 @@ public class TeamLog { } /// The SharedContentRemoveLinkExpiryType struct - public class SharedContentRemoveLinkExpiryType: CustomStringConvertible { + public class SharedContentRemoveLinkExpiryType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48576,11 +51828,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentRemoveLinkExpiryTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRemoveLinkExpiryTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRemoveLinkExpiryType: \(error)" } } } @@ -48606,12 +51862,16 @@ public class TeamLog { } /// Removed link password of shared file/folder. - public class SharedContentRemoveLinkPasswordDetails: CustomStringConvertible { + public class SharedContentRemoveLinkPasswordDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedContentRemoveLinkPasswordDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRemoveLinkPasswordDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRemoveLinkPasswordDetails: \(error)" } } } @@ -48634,7 +51894,7 @@ public class TeamLog { } /// The SharedContentRemoveLinkPasswordType struct - public class SharedContentRemoveLinkPasswordType: CustomStringConvertible { + public class SharedContentRemoveLinkPasswordType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48642,11 +51902,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentRemoveLinkPasswordTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRemoveLinkPasswordTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRemoveLinkPasswordType: \(error)" } } } @@ -48672,18 +51936,22 @@ public class TeamLog { } /// Removed user/group from shared file/folder. - public class SharedContentRemoveMemberDetails: CustomStringConvertible { + public class SharedContentRemoveMemberDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel? public init(sharedContentAccessLevel: Sharing.AccessLevel? = nil) { self.sharedContentAccessLevel = sharedContentAccessLevel } + func json() throws -> JSON { + try SharedContentRemoveMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRemoveMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRemoveMemberDetails: \(error)" } } } @@ -48710,7 +51978,7 @@ public class TeamLog { } /// The SharedContentRemoveMemberType struct - public class SharedContentRemoveMemberType: CustomStringConvertible { + public class SharedContentRemoveMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48718,11 +51986,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentRemoveMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRemoveMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRemoveMemberType: \(error)" } } } @@ -48748,7 +52020,7 @@ public class TeamLog { } /// Requested access to shared file/folder. - public class SharedContentRequestAccessDetails: CustomStringConvertible { + public class SharedContentRequestAccessDetails: CustomStringConvertible, JSONRepresentable { /// Shared content link. public let sharedContentLink: String? public init(sharedContentLink: String? = nil) { @@ -48756,11 +52028,15 @@ public class TeamLog { self.sharedContentLink = sharedContentLink } + func json() throws -> JSON { + try SharedContentRequestAccessDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRequestAccessDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRequestAccessDetails: \(error)" } } } @@ -48786,7 +52062,7 @@ public class TeamLog { } /// The SharedContentRequestAccessType struct - public class SharedContentRequestAccessType: CustomStringConvertible { + public class SharedContentRequestAccessType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48794,11 +52070,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentRequestAccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRequestAccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRequestAccessType: \(error)" } } } @@ -48824,7 +52104,7 @@ public class TeamLog { } /// Restored shared file/folder invitees. - public class SharedContentRestoreInviteesDetails: CustomStringConvertible { + public class SharedContentRestoreInviteesDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// A list of invitees. @@ -48835,11 +52115,15 @@ public class TeamLog { self.invitees = invitees } + func json() throws -> JSON { + try SharedContentRestoreInviteesDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRestoreInviteesDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRestoreInviteesDetails: \(error)" } } } @@ -48867,7 +52151,7 @@ public class TeamLog { } /// The SharedContentRestoreInviteesType struct - public class SharedContentRestoreInviteesType: CustomStringConvertible { + public class SharedContentRestoreInviteesType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48875,11 +52159,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentRestoreInviteesTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRestoreInviteesTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRestoreInviteesType: \(error)" } } } @@ -48905,18 +52193,22 @@ public class TeamLog { } /// Restored users and/or groups to membership of shared file/folder. - public class SharedContentRestoreMemberDetails: CustomStringConvertible { + public class SharedContentRestoreMemberDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel public init(sharedContentAccessLevel: Sharing.AccessLevel) { self.sharedContentAccessLevel = sharedContentAccessLevel } + func json() throws -> JSON { + try SharedContentRestoreMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRestoreMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRestoreMemberDetails: \(error)" } } } @@ -48942,7 +52234,7 @@ public class TeamLog { } /// The SharedContentRestoreMemberType struct - public class SharedContentRestoreMemberType: CustomStringConvertible { + public class SharedContentRestoreMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -48950,11 +52242,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentRestoreMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentRestoreMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentRestoreMemberType: \(error)" } } } @@ -48980,12 +52276,16 @@ public class TeamLog { } /// Unshared file/folder by clearing membership. - public class SharedContentUnshareDetails: CustomStringConvertible { + public class SharedContentUnshareDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedContentUnshareDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentUnshareDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentUnshareDetails: \(error)" } } } @@ -49008,7 +52308,7 @@ public class TeamLog { } /// The SharedContentUnshareType struct - public class SharedContentUnshareType: CustomStringConvertible { + public class SharedContentUnshareType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49016,11 +52316,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentUnshareTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentUnshareTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentUnshareType: \(error)" } } } @@ -49046,7 +52350,7 @@ public class TeamLog { } /// Previewed shared file/folder. - public class SharedContentViewDetails: CustomStringConvertible { + public class SharedContentViewDetails: CustomStringConvertible, JSONRepresentable { /// Shared content link. public let sharedContentLink: String /// The shared content owner. @@ -49060,11 +52364,15 @@ public class TeamLog { self.sharedContentAccessLevel = sharedContentAccessLevel } + func json() throws -> JSON { + try SharedContentViewDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentViewDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentViewDetails: \(error)" } } } @@ -49098,7 +52406,7 @@ public class TeamLog { } /// The SharedContentViewType struct - public class SharedContentViewType: CustomStringConvertible { + public class SharedContentViewType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49106,11 +52414,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedContentViewTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedContentViewTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedContentViewType: \(error)" } } } @@ -49136,7 +52448,7 @@ public class TeamLog { } /// Changed who can access shared folder via link. - public class SharedFolderChangeLinkPolicyDetails: CustomStringConvertible { + public class SharedFolderChangeLinkPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New shared folder link policy. public let newValue: Sharing.SharedLinkPolicy /// Previous shared folder link policy. Might be missing due to historical data gap. @@ -49146,11 +52458,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedFolderChangeLinkPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderChangeLinkPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderChangeLinkPolicyDetails: \(error)" } } } @@ -49178,7 +52494,7 @@ public class TeamLog { } /// The SharedFolderChangeLinkPolicyType struct - public class SharedFolderChangeLinkPolicyType: CustomStringConvertible { + public class SharedFolderChangeLinkPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49186,11 +52502,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderChangeLinkPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderChangeLinkPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderChangeLinkPolicyType: \(error)" } } } @@ -49216,7 +52536,7 @@ public class TeamLog { } /// Changed whether shared folder inherits members from parent folder. - public class SharedFolderChangeMembersInheritancePolicyDetails: CustomStringConvertible { + public class SharedFolderChangeMembersInheritancePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New member inheritance policy. public let newValue: TeamLog.SharedFolderMembersInheritancePolicy /// Previous member inheritance policy. Might be missing due to historical data gap. @@ -49226,11 +52546,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedFolderChangeMembersInheritancePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderChangeMembersInheritancePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderChangeMembersInheritancePolicyDetails: \(error)" } } } @@ -49259,7 +52583,7 @@ public class TeamLog { } /// The SharedFolderChangeMembersInheritancePolicyType struct - public class SharedFolderChangeMembersInheritancePolicyType: CustomStringConvertible { + public class SharedFolderChangeMembersInheritancePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49267,11 +52591,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderChangeMembersInheritancePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderChangeMembersInheritancePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderChangeMembersInheritancePolicyType: \(error)" } } } @@ -49297,7 +52625,7 @@ public class TeamLog { } /// Changed who can add/remove members of shared folder. - public class SharedFolderChangeMembersManagementPolicyDetails: CustomStringConvertible { + public class SharedFolderChangeMembersManagementPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New members management policy. public let newValue: Sharing.AclUpdatePolicy /// Previous members management policy. Might be missing due to historical data gap. @@ -49307,11 +52635,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedFolderChangeMembersManagementPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderChangeMembersManagementPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderChangeMembersManagementPolicyDetails: \(error)" } } } @@ -49339,7 +52671,7 @@ public class TeamLog { } /// The SharedFolderChangeMembersManagementPolicyType struct - public class SharedFolderChangeMembersManagementPolicyType: CustomStringConvertible { + public class SharedFolderChangeMembersManagementPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49347,11 +52679,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderChangeMembersManagementPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderChangeMembersManagementPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderChangeMembersManagementPolicyType: \(error)" } } } @@ -49377,7 +52713,7 @@ public class TeamLog { } /// Changed who can become member of shared folder. - public class SharedFolderChangeMembersPolicyDetails: CustomStringConvertible { + public class SharedFolderChangeMembersPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New external invite policy. public let newValue: Sharing.MemberPolicy /// Previous external invite policy. Might be missing due to historical data gap. @@ -49387,11 +52723,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedFolderChangeMembersPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderChangeMembersPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderChangeMembersPolicyDetails: \(error)" } } } @@ -49419,7 +52759,7 @@ public class TeamLog { } /// The SharedFolderChangeMembersPolicyType struct - public class SharedFolderChangeMembersPolicyType: CustomStringConvertible { + public class SharedFolderChangeMembersPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49427,11 +52767,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderChangeMembersPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderChangeMembersPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderChangeMembersPolicyType: \(error)" } } } @@ -49457,7 +52801,7 @@ public class TeamLog { } /// Created shared folder. - public class SharedFolderCreateDetails: CustomStringConvertible { + public class SharedFolderCreateDetails: CustomStringConvertible, JSONRepresentable { /// Target namespace ID. public let targetNsId: String? public init(targetNsId: String? = nil) { @@ -49465,11 +52809,15 @@ public class TeamLog { self.targetNsId = targetNsId } + func json() throws -> JSON { + try SharedFolderCreateDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderCreateDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderCreateDetails: \(error)" } } } @@ -49495,7 +52843,7 @@ public class TeamLog { } /// The SharedFolderCreateType struct - public class SharedFolderCreateType: CustomStringConvertible { + public class SharedFolderCreateType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49503,11 +52851,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderCreateTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderCreateTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderCreateType: \(error)" } } } @@ -49533,12 +52885,16 @@ public class TeamLog { } /// Declined team member's invite to shared folder. - public class SharedFolderDeclineInvitationDetails: CustomStringConvertible { + public class SharedFolderDeclineInvitationDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedFolderDeclineInvitationDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderDeclineInvitationDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderDeclineInvitationDetails: \(error)" } } } @@ -49561,7 +52917,7 @@ public class TeamLog { } /// The SharedFolderDeclineInvitationType struct - public class SharedFolderDeclineInvitationType: CustomStringConvertible { + public class SharedFolderDeclineInvitationType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49569,11 +52925,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderDeclineInvitationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderDeclineInvitationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderDeclineInvitationType: \(error)" } } } @@ -49599,7 +52959,7 @@ public class TeamLog { } /// Specifies if a shared folder inherits its members from the parent folder. - public enum SharedFolderMembersInheritancePolicy: CustomStringConvertible { + public enum SharedFolderMembersInheritancePolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case dontInheritMembers /// An unspecified error. @@ -49607,11 +52967,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SharedFolderMembersInheritancePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderMembersInheritancePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderMembersInheritancePolicy: \(error)" } } } @@ -49656,12 +53020,16 @@ public class TeamLog { } /// Added shared folder to own Dropbox. - public class SharedFolderMountDetails: CustomStringConvertible { + public class SharedFolderMountDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedFolderMountDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderMountDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderMountDetails: \(error)" } } } @@ -49684,7 +53052,7 @@ public class TeamLog { } /// The SharedFolderMountType struct - public class SharedFolderMountType: CustomStringConvertible { + public class SharedFolderMountType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49692,11 +53060,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderMountTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderMountTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderMountType: \(error)" } } } @@ -49722,7 +53094,7 @@ public class TeamLog { } /// Changed parent of shared folder. - public class SharedFolderNestDetails: CustomStringConvertible { + public class SharedFolderNestDetails: CustomStringConvertible, JSONRepresentable { /// Previous parent namespace ID. public let previousParentNsId: String? /// New parent namespace ID. @@ -49742,11 +53114,15 @@ public class TeamLog { self.newNsPath = newNsPath } + func json() throws -> JSON { + try SharedFolderNestDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderNestDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderNestDetails: \(error)" } } } @@ -49783,7 +53159,7 @@ public class TeamLog { } /// The SharedFolderNestType struct - public class SharedFolderNestType: CustomStringConvertible { + public class SharedFolderNestType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49791,11 +53167,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderNestTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderNestTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderNestType: \(error)" } } } @@ -49821,7 +53201,7 @@ public class TeamLog { } /// Transferred ownership of shared folder to another member. - public class SharedFolderTransferOwnershipDetails: CustomStringConvertible { + public class SharedFolderTransferOwnershipDetails: CustomStringConvertible, JSONRepresentable { /// The email address of the previous shared folder owner. public let previousOwnerEmail: String? /// The email address of the new shared folder owner. @@ -49833,11 +53213,15 @@ public class TeamLog { self.newOwnerEmail = newOwnerEmail } + func json() throws -> JSON { + try SharedFolderTransferOwnershipDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderTransferOwnershipDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderTransferOwnershipDetails: \(error)" } } } @@ -49865,7 +53249,7 @@ public class TeamLog { } /// The SharedFolderTransferOwnershipType struct - public class SharedFolderTransferOwnershipType: CustomStringConvertible { + public class SharedFolderTransferOwnershipType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49873,11 +53257,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderTransferOwnershipTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderTransferOwnershipTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderTransferOwnershipType: \(error)" } } } @@ -49903,12 +53291,16 @@ public class TeamLog { } /// Deleted shared folder from Dropbox. - public class SharedFolderUnmountDetails: CustomStringConvertible { + public class SharedFolderUnmountDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedFolderUnmountDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderUnmountDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderUnmountDetails: \(error)" } } } @@ -49931,7 +53323,7 @@ public class TeamLog { } /// The SharedFolderUnmountType struct - public class SharedFolderUnmountType: CustomStringConvertible { + public class SharedFolderUnmountType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -49939,11 +53331,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedFolderUnmountTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderUnmountTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderUnmountType: \(error)" } } } @@ -49969,7 +53365,7 @@ public class TeamLog { } /// Shared link access level. - public enum SharedLinkAccessLevel: CustomStringConvertible { + public enum SharedLinkAccessLevel: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case none /// An unspecified error. @@ -49979,11 +53375,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SharedLinkAccessLevelSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkAccessLevelSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkAccessLevel: \(error)" } } } @@ -50034,18 +53434,22 @@ public class TeamLog { } /// Added shared link expiration date. - public class SharedLinkAddExpiryDetails: CustomStringConvertible { + public class SharedLinkAddExpiryDetails: CustomStringConvertible, JSONRepresentable { /// New shared link expiration date. public let newValue: Date public init(newValue: Date) { self.newValue = newValue } + func json() throws -> JSON { + try SharedLinkAddExpiryDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkAddExpiryDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkAddExpiryDetails: \(error)" } } } @@ -50071,7 +53475,7 @@ public class TeamLog { } /// The SharedLinkAddExpiryType struct - public class SharedLinkAddExpiryType: CustomStringConvertible { + public class SharedLinkAddExpiryType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50079,11 +53483,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkAddExpiryTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkAddExpiryTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkAddExpiryType: \(error)" } } } @@ -50109,7 +53517,7 @@ public class TeamLog { } /// Changed shared link expiration date. - public class SharedLinkChangeExpiryDetails: CustomStringConvertible { + public class SharedLinkChangeExpiryDetails: CustomStringConvertible, JSONRepresentable { /// New shared link expiration date. Might be missing due to historical data gap. public let newValue: Date? /// Previous shared link expiration date. Might be missing due to historical data gap. @@ -50119,11 +53527,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedLinkChangeExpiryDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkChangeExpiryDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkChangeExpiryDetails: \(error)" } } } @@ -50151,7 +53563,7 @@ public class TeamLog { } /// The SharedLinkChangeExpiryType struct - public class SharedLinkChangeExpiryType: CustomStringConvertible { + public class SharedLinkChangeExpiryType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50159,11 +53571,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkChangeExpiryTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkChangeExpiryTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkChangeExpiryType: \(error)" } } } @@ -50189,7 +53605,7 @@ public class TeamLog { } /// Changed visibility of shared link. - public class SharedLinkChangeVisibilityDetails: CustomStringConvertible { + public class SharedLinkChangeVisibilityDetails: CustomStringConvertible, JSONRepresentable { /// New shared link visibility. public let newValue: TeamLog.SharedLinkVisibility /// Previous shared link visibility. Might be missing due to historical data gap. @@ -50199,11 +53615,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedLinkChangeVisibilityDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkChangeVisibilityDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkChangeVisibilityDetails: \(error)" } } } @@ -50231,7 +53651,7 @@ public class TeamLog { } /// The SharedLinkChangeVisibilityType struct - public class SharedLinkChangeVisibilityType: CustomStringConvertible { + public class SharedLinkChangeVisibilityType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50239,11 +53659,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkChangeVisibilityTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkChangeVisibilityTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkChangeVisibilityType: \(error)" } } } @@ -50269,18 +53693,22 @@ public class TeamLog { } /// Added file/folder to Dropbox from shared link. - public class SharedLinkCopyDetails: CustomStringConvertible { + public class SharedLinkCopyDetails: CustomStringConvertible, JSONRepresentable { /// Shared link owner details. Might be missing due to historical data gap. public let sharedLinkOwner: TeamLog.UserLogInfo? public init(sharedLinkOwner: TeamLog.UserLogInfo? = nil) { self.sharedLinkOwner = sharedLinkOwner } + func json() throws -> JSON { + try SharedLinkCopyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkCopyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkCopyDetails: \(error)" } } } @@ -50306,7 +53734,7 @@ public class TeamLog { } /// The SharedLinkCopyType struct - public class SharedLinkCopyType: CustomStringConvertible { + public class SharedLinkCopyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50314,11 +53742,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkCopyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkCopyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkCopyType: \(error)" } } } @@ -50344,18 +53776,22 @@ public class TeamLog { } /// Created shared link. - public class SharedLinkCreateDetails: CustomStringConvertible { + public class SharedLinkCreateDetails: CustomStringConvertible, JSONRepresentable { /// Defines who can access the shared link. Might be missing due to historical data gap. public let sharedLinkAccessLevel: TeamLog.SharedLinkAccessLevel? public init(sharedLinkAccessLevel: TeamLog.SharedLinkAccessLevel? = nil) { self.sharedLinkAccessLevel = sharedLinkAccessLevel } + func json() throws -> JSON { + try SharedLinkCreateDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkCreateDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkCreateDetails: \(error)" } } } @@ -50382,7 +53818,7 @@ public class TeamLog { } /// The SharedLinkCreateType struct - public class SharedLinkCreateType: CustomStringConvertible { + public class SharedLinkCreateType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50390,11 +53826,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkCreateTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkCreateTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkCreateType: \(error)" } } } @@ -50420,18 +53860,22 @@ public class TeamLog { } /// Removed shared link. - public class SharedLinkDisableDetails: CustomStringConvertible { + public class SharedLinkDisableDetails: CustomStringConvertible, JSONRepresentable { /// Shared link owner details. Might be missing due to historical data gap. public let sharedLinkOwner: TeamLog.UserLogInfo? public init(sharedLinkOwner: TeamLog.UserLogInfo? = nil) { self.sharedLinkOwner = sharedLinkOwner } + func json() throws -> JSON { + try SharedLinkDisableDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkDisableDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkDisableDetails: \(error)" } } } @@ -50457,7 +53901,7 @@ public class TeamLog { } /// The SharedLinkDisableType struct - public class SharedLinkDisableType: CustomStringConvertible { + public class SharedLinkDisableType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50465,11 +53909,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkDisableTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkDisableTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkDisableType: \(error)" } } } @@ -50495,18 +53943,22 @@ public class TeamLog { } /// Downloaded file/folder from shared link. - public class SharedLinkDownloadDetails: CustomStringConvertible { + public class SharedLinkDownloadDetails: CustomStringConvertible, JSONRepresentable { /// Shared link owner details. Might be missing due to historical data gap. public let sharedLinkOwner: TeamLog.UserLogInfo? public init(sharedLinkOwner: TeamLog.UserLogInfo? = nil) { self.sharedLinkOwner = sharedLinkOwner } + func json() throws -> JSON { + try SharedLinkDownloadDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkDownloadDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkDownloadDetails: \(error)" } } } @@ -50532,7 +53984,7 @@ public class TeamLog { } /// The SharedLinkDownloadType struct - public class SharedLinkDownloadType: CustomStringConvertible { + public class SharedLinkDownloadType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50540,11 +53992,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkDownloadTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkDownloadTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkDownloadType: \(error)" } } } @@ -50570,18 +54026,22 @@ public class TeamLog { } /// Removed shared link expiration date. - public class SharedLinkRemoveExpiryDetails: CustomStringConvertible { + public class SharedLinkRemoveExpiryDetails: CustomStringConvertible, JSONRepresentable { /// Previous shared link expiration date. Might be missing due to historical data gap. public let previousValue: Date? public init(previousValue: Date? = nil) { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedLinkRemoveExpiryDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkRemoveExpiryDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkRemoveExpiryDetails: \(error)" } } } @@ -50607,7 +54067,7 @@ public class TeamLog { } /// The SharedLinkRemoveExpiryType struct - public class SharedLinkRemoveExpiryType: CustomStringConvertible { + public class SharedLinkRemoveExpiryType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50615,11 +54075,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkRemoveExpiryTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkRemoveExpiryTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkRemoveExpiryType: \(error)" } } } @@ -50645,7 +54109,7 @@ public class TeamLog { } /// Added an expiration date to the shared link. - public class SharedLinkSettingsAddExpirationDetails: CustomStringConvertible { + public class SharedLinkSettingsAddExpirationDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -50659,11 +54123,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SharedLinkSettingsAddExpirationDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsAddExpirationDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsAddExpirationDetails: \(error)" } } } @@ -50697,7 +54165,7 @@ public class TeamLog { } /// The SharedLinkSettingsAddExpirationType struct - public class SharedLinkSettingsAddExpirationType: CustomStringConvertible { + public class SharedLinkSettingsAddExpirationType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50705,11 +54173,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsAddExpirationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsAddExpirationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsAddExpirationType: \(error)" } } } @@ -50735,7 +54207,7 @@ public class TeamLog { } /// Added a password to the shared link. - public class SharedLinkSettingsAddPasswordDetails: CustomStringConvertible { + public class SharedLinkSettingsAddPasswordDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -50746,11 +54218,15 @@ public class TeamLog { self.sharedContentLink = sharedContentLink } + func json() throws -> JSON { + try SharedLinkSettingsAddPasswordDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsAddPasswordDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsAddPasswordDetails: \(error)" } } } @@ -50778,7 +54254,7 @@ public class TeamLog { } /// The SharedLinkSettingsAddPasswordType struct - public class SharedLinkSettingsAddPasswordType: CustomStringConvertible { + public class SharedLinkSettingsAddPasswordType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50786,11 +54262,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsAddPasswordTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsAddPasswordTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsAddPasswordType: \(error)" } } } @@ -50816,7 +54296,7 @@ public class TeamLog { } /// Disabled downloads. - public class SharedLinkSettingsAllowDownloadDisabledDetails: CustomStringConvertible { + public class SharedLinkSettingsAllowDownloadDisabledDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -50827,11 +54307,15 @@ public class TeamLog { self.sharedContentLink = sharedContentLink } + func json() throws -> JSON { + try SharedLinkSettingsAllowDownloadDisabledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsAllowDownloadDisabledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsAllowDownloadDisabledDetails: \(error)" } } } @@ -50862,7 +54346,7 @@ public class TeamLog { } /// The SharedLinkSettingsAllowDownloadDisabledType struct - public class SharedLinkSettingsAllowDownloadDisabledType: CustomStringConvertible { + public class SharedLinkSettingsAllowDownloadDisabledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50870,11 +54354,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsAllowDownloadDisabledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsAllowDownloadDisabledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsAllowDownloadDisabledType: \(error)" } } } @@ -50900,7 +54388,7 @@ public class TeamLog { } /// Enabled downloads. - public class SharedLinkSettingsAllowDownloadEnabledDetails: CustomStringConvertible { + public class SharedLinkSettingsAllowDownloadEnabledDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -50911,11 +54399,15 @@ public class TeamLog { self.sharedContentLink = sharedContentLink } + func json() throws -> JSON { + try SharedLinkSettingsAllowDownloadEnabledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsAllowDownloadEnabledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsAllowDownloadEnabledDetails: \(error)" } } } @@ -50946,7 +54438,7 @@ public class TeamLog { } /// The SharedLinkSettingsAllowDownloadEnabledType struct - public class SharedLinkSettingsAllowDownloadEnabledType: CustomStringConvertible { + public class SharedLinkSettingsAllowDownloadEnabledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -50954,11 +54446,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsAllowDownloadEnabledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsAllowDownloadEnabledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsAllowDownloadEnabledType: \(error)" } } } @@ -50984,7 +54480,7 @@ public class TeamLog { } /// Changed the audience of the shared link. - public class SharedLinkSettingsChangeAudienceDetails: CustomStringConvertible { + public class SharedLinkSettingsChangeAudienceDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -51006,11 +54502,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedLinkSettingsChangeAudienceDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsChangeAudienceDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsChangeAudienceDetails: \(error)" } } } @@ -51047,7 +54547,7 @@ public class TeamLog { } /// The SharedLinkSettingsChangeAudienceType struct - public class SharedLinkSettingsChangeAudienceType: CustomStringConvertible { + public class SharedLinkSettingsChangeAudienceType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51055,11 +54555,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsChangeAudienceTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsChangeAudienceTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsChangeAudienceType: \(error)" } } } @@ -51085,7 +54589,7 @@ public class TeamLog { } /// Changed the expiration date of the shared link. - public class SharedLinkSettingsChangeExpirationDetails: CustomStringConvertible { + public class SharedLinkSettingsChangeExpirationDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -51102,11 +54606,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedLinkSettingsChangeExpirationDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsChangeExpirationDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsChangeExpirationDetails: \(error)" } } } @@ -51143,7 +54651,7 @@ public class TeamLog { } /// The SharedLinkSettingsChangeExpirationType struct - public class SharedLinkSettingsChangeExpirationType: CustomStringConvertible { + public class SharedLinkSettingsChangeExpirationType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51151,11 +54659,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsChangeExpirationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsChangeExpirationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsChangeExpirationType: \(error)" } } } @@ -51181,7 +54693,7 @@ public class TeamLog { } /// Changed the password of the shared link. - public class SharedLinkSettingsChangePasswordDetails: CustomStringConvertible { + public class SharedLinkSettingsChangePasswordDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -51192,11 +54704,15 @@ public class TeamLog { self.sharedContentLink = sharedContentLink } + func json() throws -> JSON { + try SharedLinkSettingsChangePasswordDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsChangePasswordDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsChangePasswordDetails: \(error)" } } } @@ -51224,7 +54740,7 @@ public class TeamLog { } /// The SharedLinkSettingsChangePasswordType struct - public class SharedLinkSettingsChangePasswordType: CustomStringConvertible { + public class SharedLinkSettingsChangePasswordType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51232,11 +54748,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsChangePasswordTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsChangePasswordTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsChangePasswordType: \(error)" } } } @@ -51262,7 +54782,7 @@ public class TeamLog { } /// Removed the expiration date from the shared link. - public class SharedLinkSettingsRemoveExpirationDetails: CustomStringConvertible { + public class SharedLinkSettingsRemoveExpirationDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -51276,11 +54796,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharedLinkSettingsRemoveExpirationDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsRemoveExpirationDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsRemoveExpirationDetails: \(error)" } } } @@ -51314,7 +54838,7 @@ public class TeamLog { } /// The SharedLinkSettingsRemoveExpirationType struct - public class SharedLinkSettingsRemoveExpirationType: CustomStringConvertible { + public class SharedLinkSettingsRemoveExpirationType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51322,11 +54846,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsRemoveExpirationTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsRemoveExpirationTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsRemoveExpirationType: \(error)" } } } @@ -51352,7 +54880,7 @@ public class TeamLog { } /// Removed the password from the shared link. - public class SharedLinkSettingsRemovePasswordDetails: CustomStringConvertible { + public class SharedLinkSettingsRemovePasswordDetails: CustomStringConvertible, JSONRepresentable { /// Shared content access level. public let sharedContentAccessLevel: Sharing.AccessLevel /// Shared content link. @@ -51363,11 +54891,15 @@ public class TeamLog { self.sharedContentLink = sharedContentLink } + func json() throws -> JSON { + try SharedLinkSettingsRemovePasswordDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsRemovePasswordDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsRemovePasswordDetails: \(error)" } } } @@ -51395,7 +54927,7 @@ public class TeamLog { } /// The SharedLinkSettingsRemovePasswordType struct - public class SharedLinkSettingsRemovePasswordType: CustomStringConvertible { + public class SharedLinkSettingsRemovePasswordType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51403,11 +54935,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkSettingsRemovePasswordTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkSettingsRemovePasswordTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkSettingsRemovePasswordType: \(error)" } } } @@ -51433,7 +54969,7 @@ public class TeamLog { } /// Added members as audience of shared link. - public class SharedLinkShareDetails: CustomStringConvertible { + public class SharedLinkShareDetails: CustomStringConvertible, JSONRepresentable { /// Shared link owner details. Might be missing due to historical data gap. public let sharedLinkOwner: TeamLog.UserLogInfo? /// Users without a Dropbox account that were added as shared link audience. @@ -51443,11 +54979,15 @@ public class TeamLog { self.externalUsers = externalUsers } + func json() throws -> JSON { + try SharedLinkShareDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkShareDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkShareDetails: \(error)" } } } @@ -51476,7 +55016,7 @@ public class TeamLog { } /// The SharedLinkShareType struct - public class SharedLinkShareType: CustomStringConvertible { + public class SharedLinkShareType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51484,11 +55024,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkShareTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkShareTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkShareType: \(error)" } } } @@ -51514,18 +55058,22 @@ public class TeamLog { } /// Opened shared link. - public class SharedLinkViewDetails: CustomStringConvertible { + public class SharedLinkViewDetails: CustomStringConvertible, JSONRepresentable { /// Shared link owner details. Might be missing due to historical data gap. public let sharedLinkOwner: TeamLog.UserLogInfo? public init(sharedLinkOwner: TeamLog.UserLogInfo? = nil) { self.sharedLinkOwner = sharedLinkOwner } + func json() throws -> JSON { + try SharedLinkViewDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkViewDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkViewDetails: \(error)" } } } @@ -51551,7 +55099,7 @@ public class TeamLog { } /// The SharedLinkViewType struct - public class SharedLinkViewType: CustomStringConvertible { + public class SharedLinkViewType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51559,11 +55107,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedLinkViewTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkViewTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkViewType: \(error)" } } } @@ -51589,7 +55141,7 @@ public class TeamLog { } /// Defines who has access to a shared link. - public enum SharedLinkVisibility: CustomStringConvertible { + public enum SharedLinkVisibility: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case noOne /// An unspecified error. @@ -51601,11 +55153,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SharedLinkVisibilitySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkVisibilitySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkVisibility: \(error)" } } } @@ -51662,12 +55218,16 @@ public class TeamLog { } /// Opened shared Paper doc. - public class SharedNoteOpenedDetails: CustomStringConvertible { + public class SharedNoteOpenedDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SharedNoteOpenedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedNoteOpenedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedNoteOpenedDetails: \(error)" } } } @@ -51690,7 +55250,7 @@ public class TeamLog { } /// The SharedNoteOpenedType struct - public class SharedNoteOpenedType: CustomStringConvertible { + public class SharedNoteOpenedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51698,11 +55258,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharedNoteOpenedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedNoteOpenedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedNoteOpenedType: \(error)" } } } @@ -51728,7 +55292,7 @@ public class TeamLog { } /// Changed whether team members can join shared folders owned outside team. - public class SharingChangeFolderJoinPolicyDetails: CustomStringConvertible { + public class SharingChangeFolderJoinPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New external join policy. public let newValue: TeamLog.SharingFolderJoinPolicy /// Previous external join policy. Might be missing due to historical data gap. @@ -51738,11 +55302,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharingChangeFolderJoinPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeFolderJoinPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeFolderJoinPolicyDetails: \(error)" } } } @@ -51770,7 +55338,7 @@ public class TeamLog { } /// The SharingChangeFolderJoinPolicyType struct - public class SharingChangeFolderJoinPolicyType: CustomStringConvertible { + public class SharingChangeFolderJoinPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51778,11 +55346,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharingChangeFolderJoinPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeFolderJoinPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeFolderJoinPolicyType: \(error)" } } } @@ -51808,7 +55380,7 @@ public class TeamLog { } /// Changed the allow remove or change expiration policy for the links shared outside of the team. - public class SharingChangeLinkAllowChangeExpirationPolicyDetails: CustomStringConvertible { + public class SharingChangeLinkAllowChangeExpirationPolicyDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.EnforceLinkPasswordPolicy /// From. @@ -51818,11 +55390,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharingChangeLinkAllowChangeExpirationPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeLinkAllowChangeExpirationPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeLinkAllowChangeExpirationPolicyDetails: \(error)" } } } @@ -51850,7 +55426,7 @@ public class TeamLog { } /// The SharingChangeLinkAllowChangeExpirationPolicyType struct - public class SharingChangeLinkAllowChangeExpirationPolicyType: CustomStringConvertible { + public class SharingChangeLinkAllowChangeExpirationPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51858,11 +55434,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharingChangeLinkAllowChangeExpirationPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeLinkAllowChangeExpirationPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeLinkAllowChangeExpirationPolicyType: \(error)" } } } @@ -51888,7 +55468,7 @@ public class TeamLog { } /// Changed the default expiration for the links shared outside of the team. - public class SharingChangeLinkDefaultExpirationPolicyDetails: CustomStringConvertible { + public class SharingChangeLinkDefaultExpirationPolicyDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.DefaultLinkExpirationDaysPolicy /// From. @@ -51898,11 +55478,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharingChangeLinkDefaultExpirationPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeLinkDefaultExpirationPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeLinkDefaultExpirationPolicyDetails: \(error)" } } } @@ -51930,7 +55514,7 @@ public class TeamLog { } /// The SharingChangeLinkDefaultExpirationPolicyType struct - public class SharingChangeLinkDefaultExpirationPolicyType: CustomStringConvertible { + public class SharingChangeLinkDefaultExpirationPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -51938,11 +55522,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharingChangeLinkDefaultExpirationPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeLinkDefaultExpirationPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeLinkDefaultExpirationPolicyType: \(error)" } } } @@ -51968,7 +55556,7 @@ public class TeamLog { } /// Changed the password requirement for the links shared outside of the team. - public class SharingChangeLinkEnforcePasswordPolicyDetails: CustomStringConvertible { + public class SharingChangeLinkEnforcePasswordPolicyDetails: CustomStringConvertible, JSONRepresentable { /// To. public let newValue: TeamLog.ChangeLinkExpirationPolicy /// From. @@ -51978,11 +55566,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharingChangeLinkEnforcePasswordPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeLinkEnforcePasswordPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeLinkEnforcePasswordPolicyDetails: \(error)" } } } @@ -52010,7 +55602,7 @@ public class TeamLog { } /// The SharingChangeLinkEnforcePasswordPolicyType struct - public class SharingChangeLinkEnforcePasswordPolicyType: CustomStringConvertible { + public class SharingChangeLinkEnforcePasswordPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52018,11 +55610,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharingChangeLinkEnforcePasswordPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeLinkEnforcePasswordPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeLinkEnforcePasswordPolicyType: \(error)" } } } @@ -52049,7 +55645,7 @@ public class TeamLog { /// Changed whether members can share links outside team, and if links are accessible only by team members or anyone /// by default. - public class SharingChangeLinkPolicyDetails: CustomStringConvertible { + public class SharingChangeLinkPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New external link accessibility policy. public let newValue: TeamLog.SharingLinkPolicy /// Previous external link accessibility policy. Might be missing due to historical data gap. @@ -52059,11 +55655,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharingChangeLinkPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeLinkPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeLinkPolicyDetails: \(error)" } } } @@ -52091,7 +55691,7 @@ public class TeamLog { } /// The SharingChangeLinkPolicyType struct - public class SharingChangeLinkPolicyType: CustomStringConvertible { + public class SharingChangeLinkPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52099,11 +55699,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharingChangeLinkPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeLinkPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeLinkPolicyType: \(error)" } } } @@ -52129,7 +55733,7 @@ public class TeamLog { } /// Changed whether members can share files/folders outside team. - public class SharingChangeMemberPolicyDetails: CustomStringConvertible { + public class SharingChangeMemberPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New external invite policy. public let newValue: TeamLog.SharingMemberPolicy /// Previous external invite policy. Might be missing due to historical data gap. @@ -52139,11 +55743,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SharingChangeMemberPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeMemberPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeMemberPolicyDetails: \(error)" } } } @@ -52171,7 +55779,7 @@ public class TeamLog { } /// The SharingChangeMemberPolicyType struct - public class SharingChangeMemberPolicyType: CustomStringConvertible { + public class SharingChangeMemberPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52179,11 +55787,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SharingChangeMemberPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingChangeMemberPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingChangeMemberPolicyType: \(error)" } } } @@ -52209,7 +55821,7 @@ public class TeamLog { } /// Policy for controlling if team members can join shared folders owned by non team members. - public enum SharingFolderJoinPolicy: CustomStringConvertible { + public enum SharingFolderJoinPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case fromAnyone /// An unspecified error. @@ -52217,11 +55829,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SharingFolderJoinPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingFolderJoinPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingFolderJoinPolicy: \(error)" } } } @@ -52266,7 +55882,7 @@ public class TeamLog { } /// Policy for controlling if team members can share links externally - public enum SharingLinkPolicy: CustomStringConvertible { + public enum SharingLinkPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case defaultNoOne /// An unspecified error. @@ -52278,11 +55894,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SharingLinkPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingLinkPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingLinkPolicy: \(error)" } } } @@ -52339,7 +55959,7 @@ public class TeamLog { } /// External sharing policy - public enum SharingMemberPolicy: CustomStringConvertible { + public enum SharingMemberPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case allow /// An unspecified error. @@ -52349,11 +55969,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SharingMemberPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharingMemberPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharingMemberPolicy: \(error)" } } } @@ -52404,18 +56028,22 @@ public class TeamLog { } /// Disabled downloads for link. - public class ShmodelDisableDownloadsDetails: CustomStringConvertible { + public class ShmodelDisableDownloadsDetails: CustomStringConvertible, JSONRepresentable { /// Shared link owner details. Might be missing due to historical data gap. public let sharedLinkOwner: TeamLog.UserLogInfo? public init(sharedLinkOwner: TeamLog.UserLogInfo? = nil) { self.sharedLinkOwner = sharedLinkOwner } + func json() throws -> JSON { + try ShmodelDisableDownloadsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShmodelDisableDownloadsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShmodelDisableDownloadsDetails: \(error)" } } } @@ -52441,7 +56069,7 @@ public class TeamLog { } /// The ShmodelDisableDownloadsType struct - public class ShmodelDisableDownloadsType: CustomStringConvertible { + public class ShmodelDisableDownloadsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52449,11 +56077,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShmodelDisableDownloadsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShmodelDisableDownloadsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShmodelDisableDownloadsType: \(error)" } } } @@ -52479,18 +56111,22 @@ public class TeamLog { } /// Enabled downloads for link. - public class ShmodelEnableDownloadsDetails: CustomStringConvertible { + public class ShmodelEnableDownloadsDetails: CustomStringConvertible, JSONRepresentable { /// Shared link owner details. Might be missing due to historical data gap. public let sharedLinkOwner: TeamLog.UserLogInfo? public init(sharedLinkOwner: TeamLog.UserLogInfo? = nil) { self.sharedLinkOwner = sharedLinkOwner } + func json() throws -> JSON { + try ShmodelEnableDownloadsDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShmodelEnableDownloadsDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShmodelEnableDownloadsDetails: \(error)" } } } @@ -52516,7 +56152,7 @@ public class TeamLog { } /// The ShmodelEnableDownloadsType struct - public class ShmodelEnableDownloadsType: CustomStringConvertible { + public class ShmodelEnableDownloadsType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52524,11 +56160,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShmodelEnableDownloadsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShmodelEnableDownloadsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShmodelEnableDownloadsType: \(error)" } } } @@ -52554,12 +56194,16 @@ public class TeamLog { } /// Shared link with group. - public class ShmodelGroupShareDetails: CustomStringConvertible { + public class ShmodelGroupShareDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try ShmodelGroupShareDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShmodelGroupShareDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShmodelGroupShareDetails: \(error)" } } } @@ -52582,7 +56226,7 @@ public class TeamLog { } /// The ShmodelGroupShareType struct - public class ShmodelGroupShareType: CustomStringConvertible { + public class ShmodelGroupShareType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52590,11 +56234,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShmodelGroupShareTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShmodelGroupShareTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShmodelGroupShareType: \(error)" } } } @@ -52620,7 +56268,7 @@ public class TeamLog { } /// Granted access to showcase. - public class ShowcaseAccessGrantedDetails: CustomStringConvertible { + public class ShowcaseAccessGrantedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -52628,11 +56276,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseAccessGrantedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseAccessGrantedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseAccessGrantedDetails: \(error)" } } } @@ -52658,7 +56310,7 @@ public class TeamLog { } /// The ShowcaseAccessGrantedType struct - public class ShowcaseAccessGrantedType: CustomStringConvertible { + public class ShowcaseAccessGrantedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52666,11 +56318,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseAccessGrantedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseAccessGrantedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseAccessGrantedType: \(error)" } } } @@ -52696,7 +56352,7 @@ public class TeamLog { } /// Added member to showcase. - public class ShowcaseAddMemberDetails: CustomStringConvertible { + public class ShowcaseAddMemberDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -52704,11 +56360,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseAddMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseAddMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseAddMemberDetails: \(error)" } } } @@ -52734,7 +56394,7 @@ public class TeamLog { } /// The ShowcaseAddMemberType struct - public class ShowcaseAddMemberType: CustomStringConvertible { + public class ShowcaseAddMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52742,11 +56402,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseAddMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseAddMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseAddMemberType: \(error)" } } } @@ -52772,7 +56436,7 @@ public class TeamLog { } /// Archived showcase. - public class ShowcaseArchivedDetails: CustomStringConvertible { + public class ShowcaseArchivedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -52780,11 +56444,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseArchivedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseArchivedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseArchivedDetails: \(error)" } } } @@ -52810,7 +56478,7 @@ public class TeamLog { } /// The ShowcaseArchivedType struct - public class ShowcaseArchivedType: CustomStringConvertible { + public class ShowcaseArchivedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52818,11 +56486,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseArchivedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseArchivedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseArchivedType: \(error)" } } } @@ -52848,7 +56520,7 @@ public class TeamLog { } /// Enabled/disabled downloading files from Dropbox Showcase for team. - public class ShowcaseChangeDownloadPolicyDetails: CustomStringConvertible { + public class ShowcaseChangeDownloadPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New Dropbox Showcase download policy. public let newValue: TeamLog.ShowcaseDownloadPolicy /// Previous Dropbox Showcase download policy. @@ -52858,11 +56530,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try ShowcaseChangeDownloadPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseChangeDownloadPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseChangeDownloadPolicyDetails: \(error)" } } } @@ -52890,7 +56566,7 @@ public class TeamLog { } /// The ShowcaseChangeDownloadPolicyType struct - public class ShowcaseChangeDownloadPolicyType: CustomStringConvertible { + public class ShowcaseChangeDownloadPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52898,11 +56574,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseChangeDownloadPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseChangeDownloadPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseChangeDownloadPolicyType: \(error)" } } } @@ -52928,7 +56608,7 @@ public class TeamLog { } /// Enabled/disabled Dropbox Showcase for team. - public class ShowcaseChangeEnabledPolicyDetails: CustomStringConvertible { + public class ShowcaseChangeEnabledPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New Dropbox Showcase policy. public let newValue: TeamLog.ShowcaseEnabledPolicy /// Previous Dropbox Showcase policy. @@ -52938,11 +56618,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try ShowcaseChangeEnabledPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseChangeEnabledPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseChangeEnabledPolicyDetails: \(error)" } } } @@ -52970,7 +56654,7 @@ public class TeamLog { } /// The ShowcaseChangeEnabledPolicyType struct - public class ShowcaseChangeEnabledPolicyType: CustomStringConvertible { + public class ShowcaseChangeEnabledPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -52978,11 +56662,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseChangeEnabledPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseChangeEnabledPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseChangeEnabledPolicyType: \(error)" } } } @@ -53008,7 +56696,7 @@ public class TeamLog { } /// Enabled/disabled sharing Dropbox Showcase externally for team. - public class ShowcaseChangeExternalSharingPolicyDetails: CustomStringConvertible { + public class ShowcaseChangeExternalSharingPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New Dropbox Showcase external sharing policy. public let newValue: TeamLog.ShowcaseExternalSharingPolicy /// Previous Dropbox Showcase external sharing policy. @@ -53018,11 +56706,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try ShowcaseChangeExternalSharingPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseChangeExternalSharingPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseChangeExternalSharingPolicyDetails: \(error)" } } } @@ -53050,7 +56742,7 @@ public class TeamLog { } /// The ShowcaseChangeExternalSharingPolicyType struct - public class ShowcaseChangeExternalSharingPolicyType: CustomStringConvertible { + public class ShowcaseChangeExternalSharingPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53058,11 +56750,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseChangeExternalSharingPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseChangeExternalSharingPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseChangeExternalSharingPolicyType: \(error)" } } } @@ -53088,7 +56784,7 @@ public class TeamLog { } /// Created showcase. - public class ShowcaseCreatedDetails: CustomStringConvertible { + public class ShowcaseCreatedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -53096,11 +56792,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseCreatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseCreatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseCreatedDetails: \(error)" } } } @@ -53126,7 +56826,7 @@ public class TeamLog { } /// The ShowcaseCreatedType struct - public class ShowcaseCreatedType: CustomStringConvertible { + public class ShowcaseCreatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53134,11 +56834,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseCreatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseCreatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseCreatedType: \(error)" } } } @@ -53164,7 +56868,7 @@ public class TeamLog { } /// Deleted showcase comment. - public class ShowcaseDeleteCommentDetails: CustomStringConvertible { + public class ShowcaseDeleteCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -53176,11 +56880,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try ShowcaseDeleteCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseDeleteCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseDeleteCommentDetails: \(error)" } } } @@ -53208,7 +56916,7 @@ public class TeamLog { } /// The ShowcaseDeleteCommentType struct - public class ShowcaseDeleteCommentType: CustomStringConvertible { + public class ShowcaseDeleteCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53216,11 +56924,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseDeleteCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseDeleteCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseDeleteCommentType: \(error)" } } } @@ -53246,7 +56958,7 @@ public class TeamLog { } /// Showcase document's logged information. - public class ShowcaseDocumentLogInfo: CustomStringConvertible { + public class ShowcaseDocumentLogInfo: CustomStringConvertible, JSONRepresentable { /// Showcase document Id. public let showcaseId: String /// Showcase document title. @@ -53258,11 +56970,15 @@ public class TeamLog { self.showcaseTitle = showcaseTitle } + func json() throws -> JSON { + try ShowcaseDocumentLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseDocumentLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseDocumentLogInfo: \(error)" } } } @@ -53290,7 +57006,7 @@ public class TeamLog { } /// Policy for controlling if files can be downloaded from Showcases by team members - public enum ShowcaseDownloadPolicy: CustomStringConvertible { + public enum ShowcaseDownloadPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -53298,11 +57014,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ShowcaseDownloadPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseDownloadPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseDownloadPolicy: \(error)" } } } @@ -53347,7 +57067,7 @@ public class TeamLog { } /// Edited showcase comment. - public class ShowcaseEditCommentDetails: CustomStringConvertible { + public class ShowcaseEditCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -53359,11 +57079,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try ShowcaseEditCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseEditCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseEditCommentDetails: \(error)" } } } @@ -53391,7 +57115,7 @@ public class TeamLog { } /// The ShowcaseEditCommentType struct - public class ShowcaseEditCommentType: CustomStringConvertible { + public class ShowcaseEditCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53399,11 +57123,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseEditCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseEditCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseEditCommentType: \(error)" } } } @@ -53429,7 +57157,7 @@ public class TeamLog { } /// Edited showcase. - public class ShowcaseEditedDetails: CustomStringConvertible { + public class ShowcaseEditedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -53437,11 +57165,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseEditedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseEditedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseEditedDetails: \(error)" } } } @@ -53467,7 +57199,7 @@ public class TeamLog { } /// The ShowcaseEditedType struct - public class ShowcaseEditedType: CustomStringConvertible { + public class ShowcaseEditedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53475,11 +57207,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseEditedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseEditedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseEditedType: \(error)" } } } @@ -53505,7 +57241,7 @@ public class TeamLog { } /// Policy for controlling whether Showcase is enabled. - public enum ShowcaseEnabledPolicy: CustomStringConvertible { + public enum ShowcaseEnabledPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -53513,11 +57249,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ShowcaseEnabledPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseEnabledPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseEnabledPolicy: \(error)" } } } @@ -53562,7 +57302,7 @@ public class TeamLog { } /// Policy for controlling if team members can share Showcases externally. - public enum ShowcaseExternalSharingPolicy: CustomStringConvertible { + public enum ShowcaseExternalSharingPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -53570,11 +57310,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try ShowcaseExternalSharingPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseExternalSharingPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseExternalSharingPolicy: \(error)" } } } @@ -53619,7 +57363,7 @@ public class TeamLog { } /// Added file to showcase. - public class ShowcaseFileAddedDetails: CustomStringConvertible { + public class ShowcaseFileAddedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -53627,11 +57371,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseFileAddedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseFileAddedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseFileAddedDetails: \(error)" } } } @@ -53657,7 +57405,7 @@ public class TeamLog { } /// The ShowcaseFileAddedType struct - public class ShowcaseFileAddedType: CustomStringConvertible { + public class ShowcaseFileAddedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53665,11 +57413,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseFileAddedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseFileAddedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseFileAddedType: \(error)" } } } @@ -53695,7 +57447,7 @@ public class TeamLog { } /// Downloaded file from showcase. - public class ShowcaseFileDownloadDetails: CustomStringConvertible { + public class ShowcaseFileDownloadDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Showcase download type. @@ -53707,11 +57459,15 @@ public class TeamLog { self.downloadType = downloadType } + func json() throws -> JSON { + try ShowcaseFileDownloadDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseFileDownloadDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseFileDownloadDetails: \(error)" } } } @@ -53739,7 +57495,7 @@ public class TeamLog { } /// The ShowcaseFileDownloadType struct - public class ShowcaseFileDownloadType: CustomStringConvertible { + public class ShowcaseFileDownloadType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53747,11 +57503,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseFileDownloadTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseFileDownloadTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseFileDownloadType: \(error)" } } } @@ -53777,7 +57537,7 @@ public class TeamLog { } /// Removed file from showcase. - public class ShowcaseFileRemovedDetails: CustomStringConvertible { + public class ShowcaseFileRemovedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -53785,11 +57545,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseFileRemovedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseFileRemovedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseFileRemovedDetails: \(error)" } } } @@ -53815,7 +57579,7 @@ public class TeamLog { } /// The ShowcaseFileRemovedType struct - public class ShowcaseFileRemovedType: CustomStringConvertible { + public class ShowcaseFileRemovedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53823,11 +57587,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseFileRemovedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseFileRemovedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseFileRemovedType: \(error)" } } } @@ -53853,7 +57621,7 @@ public class TeamLog { } /// Viewed file in showcase. - public class ShowcaseFileViewDetails: CustomStringConvertible { + public class ShowcaseFileViewDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -53861,11 +57629,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseFileViewDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseFileViewDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseFileViewDetails: \(error)" } } } @@ -53891,7 +57663,7 @@ public class TeamLog { } /// The ShowcaseFileViewType struct - public class ShowcaseFileViewType: CustomStringConvertible { + public class ShowcaseFileViewType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53899,11 +57671,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseFileViewTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseFileViewTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseFileViewType: \(error)" } } } @@ -53929,7 +57705,7 @@ public class TeamLog { } /// Permanently deleted showcase. - public class ShowcasePermanentlyDeletedDetails: CustomStringConvertible { + public class ShowcasePermanentlyDeletedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -53937,11 +57713,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcasePermanentlyDeletedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcasePermanentlyDeletedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcasePermanentlyDeletedDetails: \(error)" } } } @@ -53967,7 +57747,7 @@ public class TeamLog { } /// The ShowcasePermanentlyDeletedType struct - public class ShowcasePermanentlyDeletedType: CustomStringConvertible { + public class ShowcasePermanentlyDeletedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -53975,11 +57755,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcasePermanentlyDeletedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcasePermanentlyDeletedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcasePermanentlyDeletedType: \(error)" } } } @@ -54005,7 +57789,7 @@ public class TeamLog { } /// Added showcase comment. - public class ShowcasePostCommentDetails: CustomStringConvertible { + public class ShowcasePostCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -54017,11 +57801,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try ShowcasePostCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcasePostCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcasePostCommentDetails: \(error)" } } } @@ -54049,7 +57837,7 @@ public class TeamLog { } /// The ShowcasePostCommentType struct - public class ShowcasePostCommentType: CustomStringConvertible { + public class ShowcasePostCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54057,11 +57845,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcasePostCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcasePostCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcasePostCommentType: \(error)" } } } @@ -54087,7 +57879,7 @@ public class TeamLog { } /// Removed member from showcase. - public class ShowcaseRemoveMemberDetails: CustomStringConvertible { + public class ShowcaseRemoveMemberDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54095,11 +57887,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseRemoveMemberDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseRemoveMemberDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseRemoveMemberDetails: \(error)" } } } @@ -54125,7 +57921,7 @@ public class TeamLog { } /// The ShowcaseRemoveMemberType struct - public class ShowcaseRemoveMemberType: CustomStringConvertible { + public class ShowcaseRemoveMemberType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54133,11 +57929,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseRemoveMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseRemoveMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseRemoveMemberType: \(error)" } } } @@ -54163,7 +57963,7 @@ public class TeamLog { } /// Renamed showcase. - public class ShowcaseRenamedDetails: CustomStringConvertible { + public class ShowcaseRenamedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54171,11 +57971,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseRenamedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseRenamedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseRenamedDetails: \(error)" } } } @@ -54201,7 +58005,7 @@ public class TeamLog { } /// The ShowcaseRenamedType struct - public class ShowcaseRenamedType: CustomStringConvertible { + public class ShowcaseRenamedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54209,11 +58013,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseRenamedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseRenamedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseRenamedType: \(error)" } } } @@ -54239,7 +58047,7 @@ public class TeamLog { } /// Requested access to showcase. - public class ShowcaseRequestAccessDetails: CustomStringConvertible { + public class ShowcaseRequestAccessDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54247,11 +58055,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseRequestAccessDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseRequestAccessDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseRequestAccessDetails: \(error)" } } } @@ -54277,7 +58089,7 @@ public class TeamLog { } /// The ShowcaseRequestAccessType struct - public class ShowcaseRequestAccessType: CustomStringConvertible { + public class ShowcaseRequestAccessType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54285,11 +58097,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseRequestAccessTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseRequestAccessTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseRequestAccessType: \(error)" } } } @@ -54315,7 +58131,7 @@ public class TeamLog { } /// Resolved showcase comment. - public class ShowcaseResolveCommentDetails: CustomStringConvertible { + public class ShowcaseResolveCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -54327,11 +58143,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try ShowcaseResolveCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseResolveCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseResolveCommentDetails: \(error)" } } } @@ -54359,7 +58179,7 @@ public class TeamLog { } /// The ShowcaseResolveCommentType struct - public class ShowcaseResolveCommentType: CustomStringConvertible { + public class ShowcaseResolveCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54367,11 +58187,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseResolveCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseResolveCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseResolveCommentType: \(error)" } } } @@ -54397,7 +58221,7 @@ public class TeamLog { } /// Unarchived showcase. - public class ShowcaseRestoredDetails: CustomStringConvertible { + public class ShowcaseRestoredDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54405,11 +58229,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseRestoredDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseRestoredDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseRestoredDetails: \(error)" } } } @@ -54435,7 +58263,7 @@ public class TeamLog { } /// The ShowcaseRestoredType struct - public class ShowcaseRestoredType: CustomStringConvertible { + public class ShowcaseRestoredType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54443,11 +58271,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseRestoredTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseRestoredTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseRestoredType: \(error)" } } } @@ -54473,7 +58305,7 @@ public class TeamLog { } /// Deleted showcase (old version). - public class ShowcaseTrashedDeprecatedDetails: CustomStringConvertible { + public class ShowcaseTrashedDeprecatedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54481,11 +58313,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseTrashedDeprecatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseTrashedDeprecatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseTrashedDeprecatedDetails: \(error)" } } } @@ -54511,7 +58347,7 @@ public class TeamLog { } /// The ShowcaseTrashedDeprecatedType struct - public class ShowcaseTrashedDeprecatedType: CustomStringConvertible { + public class ShowcaseTrashedDeprecatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54519,11 +58355,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseTrashedDeprecatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseTrashedDeprecatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseTrashedDeprecatedType: \(error)" } } } @@ -54549,7 +58389,7 @@ public class TeamLog { } /// Deleted showcase. - public class ShowcaseTrashedDetails: CustomStringConvertible { + public class ShowcaseTrashedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54557,11 +58397,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseTrashedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseTrashedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseTrashedDetails: \(error)" } } } @@ -54587,7 +58431,7 @@ public class TeamLog { } /// The ShowcaseTrashedType struct - public class ShowcaseTrashedType: CustomStringConvertible { + public class ShowcaseTrashedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54595,11 +58439,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseTrashedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseTrashedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseTrashedType: \(error)" } } } @@ -54625,7 +58473,7 @@ public class TeamLog { } /// Unresolved showcase comment. - public class ShowcaseUnresolveCommentDetails: CustomStringConvertible { + public class ShowcaseUnresolveCommentDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String /// Comment text. @@ -54637,11 +58485,15 @@ public class TeamLog { self.commentText = commentText } + func json() throws -> JSON { + try ShowcaseUnresolveCommentDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseUnresolveCommentDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseUnresolveCommentDetails: \(error)" } } } @@ -54669,7 +58521,7 @@ public class TeamLog { } /// The ShowcaseUnresolveCommentType struct - public class ShowcaseUnresolveCommentType: CustomStringConvertible { + public class ShowcaseUnresolveCommentType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54677,11 +58529,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseUnresolveCommentTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseUnresolveCommentTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseUnresolveCommentType: \(error)" } } } @@ -54707,7 +58563,7 @@ public class TeamLog { } /// Restored showcase (old version). - public class ShowcaseUntrashedDeprecatedDetails: CustomStringConvertible { + public class ShowcaseUntrashedDeprecatedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54715,11 +58571,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseUntrashedDeprecatedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseUntrashedDeprecatedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseUntrashedDeprecatedDetails: \(error)" } } } @@ -54745,7 +58605,7 @@ public class TeamLog { } /// The ShowcaseUntrashedDeprecatedType struct - public class ShowcaseUntrashedDeprecatedType: CustomStringConvertible { + public class ShowcaseUntrashedDeprecatedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54753,11 +58613,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseUntrashedDeprecatedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseUntrashedDeprecatedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseUntrashedDeprecatedType: \(error)" } } } @@ -54783,7 +58647,7 @@ public class TeamLog { } /// Restored showcase. - public class ShowcaseUntrashedDetails: CustomStringConvertible { + public class ShowcaseUntrashedDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54791,11 +58655,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseUntrashedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseUntrashedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseUntrashedDetails: \(error)" } } } @@ -54821,7 +58689,7 @@ public class TeamLog { } /// The ShowcaseUntrashedType struct - public class ShowcaseUntrashedType: CustomStringConvertible { + public class ShowcaseUntrashedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54829,11 +58697,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseUntrashedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseUntrashedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseUntrashedType: \(error)" } } } @@ -54859,7 +58731,7 @@ public class TeamLog { } /// Viewed showcase. - public class ShowcaseViewDetails: CustomStringConvertible { + public class ShowcaseViewDetails: CustomStringConvertible, JSONRepresentable { /// Event unique identifier. public let eventUuid: String public init(eventUuid: String) { @@ -54867,11 +58739,15 @@ public class TeamLog { self.eventUuid = eventUuid } + func json() throws -> JSON { + try ShowcaseViewDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseViewDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseViewDetails: \(error)" } } } @@ -54897,7 +58773,7 @@ public class TeamLog { } /// The ShowcaseViewType struct - public class ShowcaseViewType: CustomStringConvertible { + public class ShowcaseViewType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54905,11 +58781,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ShowcaseViewTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseViewTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseViewType: \(error)" } } } @@ -54935,12 +58815,16 @@ public class TeamLog { } /// Ended admin sign-in-as session. - public class SignInAsSessionEndDetails: CustomStringConvertible { + public class SignInAsSessionEndDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SignInAsSessionEndDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SignInAsSessionEndDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SignInAsSessionEndDetails: \(error)" } } } @@ -54963,7 +58847,7 @@ public class TeamLog { } /// The SignInAsSessionEndType struct - public class SignInAsSessionEndType: CustomStringConvertible { + public class SignInAsSessionEndType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -54971,11 +58855,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SignInAsSessionEndTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SignInAsSessionEndTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SignInAsSessionEndType: \(error)" } } } @@ -55001,12 +58889,16 @@ public class TeamLog { } /// Started admin sign-in-as session. - public class SignInAsSessionStartDetails: CustomStringConvertible { + public class SignInAsSessionStartDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SignInAsSessionStartDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SignInAsSessionStartDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SignInAsSessionStartDetails: \(error)" } } } @@ -55029,7 +58921,7 @@ public class TeamLog { } /// The SignInAsSessionStartType struct - public class SignInAsSessionStartType: CustomStringConvertible { + public class SignInAsSessionStartType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55037,11 +58929,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SignInAsSessionStartTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SignInAsSessionStartTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SignInAsSessionStartType: \(error)" } } } @@ -55067,7 +58963,7 @@ public class TeamLog { } /// Changed default Smart Sync setting for team members. - public class SmartSyncChangePolicyDetails: CustomStringConvertible { + public class SmartSyncChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New smart sync policy. public let newValue: TeamPolicies.SmartSyncPolicy? /// Previous smart sync policy. @@ -55077,11 +58973,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SmartSyncChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncChangePolicyDetails: \(error)" } } } @@ -55109,7 +59009,7 @@ public class TeamLog { } /// The SmartSyncChangePolicyType struct - public class SmartSyncChangePolicyType: CustomStringConvertible { + public class SmartSyncChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55117,11 +59017,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SmartSyncChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncChangePolicyType: \(error)" } } } @@ -55147,12 +59051,16 @@ public class TeamLog { } /// Created Smart Sync non-admin devices report. - public class SmartSyncCreateAdminPrivilegeReportDetails: CustomStringConvertible { + public class SmartSyncCreateAdminPrivilegeReportDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SmartSyncCreateAdminPrivilegeReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncCreateAdminPrivilegeReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncCreateAdminPrivilegeReportDetails: \(error)" } } } @@ -55175,7 +59083,7 @@ public class TeamLog { } /// The SmartSyncCreateAdminPrivilegeReportType struct - public class SmartSyncCreateAdminPrivilegeReportType: CustomStringConvertible { + public class SmartSyncCreateAdminPrivilegeReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55183,11 +59091,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SmartSyncCreateAdminPrivilegeReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncCreateAdminPrivilegeReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncCreateAdminPrivilegeReportType: \(error)" } } } @@ -55213,7 +59125,7 @@ public class TeamLog { } /// Opted team into Smart Sync. - public class SmartSyncNotOptOutDetails: CustomStringConvertible { + public class SmartSyncNotOptOutDetails: CustomStringConvertible, JSONRepresentable { /// Previous Smart Sync opt out policy. public let previousValue: TeamLog.SmartSyncOptOutPolicy /// New Smart Sync opt out policy. @@ -55223,11 +59135,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SmartSyncNotOptOutDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncNotOptOutDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncNotOptOutDetails: \(error)" } } } @@ -55255,7 +59171,7 @@ public class TeamLog { } /// The SmartSyncNotOptOutType struct - public class SmartSyncNotOptOutType: CustomStringConvertible { + public class SmartSyncNotOptOutType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55263,11 +59179,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SmartSyncNotOptOutTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncNotOptOutTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncNotOptOutType: \(error)" } } } @@ -55293,7 +59213,7 @@ public class TeamLog { } /// Opted team out of Smart Sync. - public class SmartSyncOptOutDetails: CustomStringConvertible { + public class SmartSyncOptOutDetails: CustomStringConvertible, JSONRepresentable { /// Previous Smart Sync opt out policy. public let previousValue: TeamLog.SmartSyncOptOutPolicy /// New Smart Sync opt out policy. @@ -55303,11 +59223,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SmartSyncOptOutDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncOptOutDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncOptOutDetails: \(error)" } } } @@ -55335,7 +59259,7 @@ public class TeamLog { } /// The SmartSyncOptOutPolicy union - public enum SmartSyncOptOutPolicy: CustomStringConvertible { + public enum SmartSyncOptOutPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case default_ /// An unspecified error. @@ -55343,11 +59267,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SmartSyncOptOutPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncOptOutPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncOptOutPolicy: \(error)" } } } @@ -55392,7 +59320,7 @@ public class TeamLog { } /// The SmartSyncOptOutType struct - public class SmartSyncOptOutType: CustomStringConvertible { + public class SmartSyncOptOutType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55400,11 +59328,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SmartSyncOptOutTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncOptOutTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncOptOutType: \(error)" } } } @@ -55430,7 +59362,7 @@ public class TeamLog { } /// Changed automatic Smart Sync setting for team. - public class SmarterSmartSyncPolicyChangedDetails: CustomStringConvertible { + public class SmarterSmartSyncPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// Previous automatic Smart Sync setting. public let previousValue: TeamPolicies.SmarterSmartSyncPolicyState /// New automatic Smart Sync setting. @@ -55440,11 +59372,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SmarterSmartSyncPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmarterSmartSyncPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmarterSmartSyncPolicyChangedDetails: \(error)" } } } @@ -55472,7 +59408,7 @@ public class TeamLog { } /// The SmarterSmartSyncPolicyChangedType struct - public class SmarterSmartSyncPolicyChangedType: CustomStringConvertible { + public class SmarterSmartSyncPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55480,11 +59416,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SmarterSmartSyncPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmarterSmartSyncPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmarterSmartSyncPolicyChangedType: \(error)" } } } @@ -55510,7 +59450,7 @@ public class TeamLog { } /// Space limit alert policy - public enum SpaceCapsType: CustomStringConvertible { + public enum SpaceCapsType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case hard /// An unspecified error. @@ -55520,11 +59460,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SpaceCapsTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SpaceCapsTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SpaceCapsType: \(error)" } } } @@ -55575,7 +59519,7 @@ public class TeamLog { } /// The SpaceLimitsStatus union - public enum SpaceLimitsStatus: CustomStringConvertible { + public enum SpaceLimitsStatus: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case nearQuota /// An unspecified error. @@ -55585,11 +59529,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try SpaceLimitsStatusSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SpaceLimitsStatusSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SpaceLimitsStatus: \(error)" } } } @@ -55640,18 +59588,22 @@ public class TeamLog { } /// Added X.509 certificate for SSO. - public class SsoAddCertDetails: CustomStringConvertible { + public class SsoAddCertDetails: CustomStringConvertible, JSONRepresentable { /// SSO certificate details. public let certificateDetails: TeamLog.Certificate public init(certificateDetails: TeamLog.Certificate) { self.certificateDetails = certificateDetails } + func json() throws -> JSON { + try SsoAddCertDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoAddCertDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoAddCertDetails: \(error)" } } } @@ -55677,7 +59629,7 @@ public class TeamLog { } /// The SsoAddCertType struct - public class SsoAddCertType: CustomStringConvertible { + public class SsoAddCertType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55685,11 +59637,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoAddCertTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoAddCertTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoAddCertType: \(error)" } } } @@ -55715,7 +59671,7 @@ public class TeamLog { } /// Added sign-in URL for SSO. - public class SsoAddLoginUrlDetails: CustomStringConvertible { + public class SsoAddLoginUrlDetails: CustomStringConvertible, JSONRepresentable { /// New single sign-on login URL. public let newValue: String public init(newValue: String) { @@ -55723,11 +59679,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SsoAddLoginUrlDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoAddLoginUrlDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoAddLoginUrlDetails: \(error)" } } } @@ -55753,7 +59713,7 @@ public class TeamLog { } /// The SsoAddLoginUrlType struct - public class SsoAddLoginUrlType: CustomStringConvertible { + public class SsoAddLoginUrlType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55761,11 +59721,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoAddLoginUrlTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoAddLoginUrlTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoAddLoginUrlType: \(error)" } } } @@ -55791,7 +59755,7 @@ public class TeamLog { } /// Added sign-out URL for SSO. - public class SsoAddLogoutUrlDetails: CustomStringConvertible { + public class SsoAddLogoutUrlDetails: CustomStringConvertible, JSONRepresentable { /// New single sign-on logout URL. public let newValue: String? public init(newValue: String? = nil) { @@ -55799,11 +59763,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SsoAddLogoutUrlDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoAddLogoutUrlDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoAddLogoutUrlDetails: \(error)" } } } @@ -55829,7 +59797,7 @@ public class TeamLog { } /// The SsoAddLogoutUrlType struct - public class SsoAddLogoutUrlType: CustomStringConvertible { + public class SsoAddLogoutUrlType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55837,11 +59805,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoAddLogoutUrlTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoAddLogoutUrlTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoAddLogoutUrlType: \(error)" } } } @@ -55867,7 +59839,7 @@ public class TeamLog { } /// Changed X.509 certificate for SSO. - public class SsoChangeCertDetails: CustomStringConvertible { + public class SsoChangeCertDetails: CustomStringConvertible, JSONRepresentable { /// Previous SSO certificate details. Might be missing due to historical data gap. public let previousCertificateDetails: TeamLog.Certificate? /// New SSO certificate details. @@ -55877,11 +59849,15 @@ public class TeamLog { self.newCertificateDetails = newCertificateDetails } + func json() throws -> JSON { + try SsoChangeCertDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangeCertDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangeCertDetails: \(error)" } } } @@ -55910,7 +59886,7 @@ public class TeamLog { } /// The SsoChangeCertType struct - public class SsoChangeCertType: CustomStringConvertible { + public class SsoChangeCertType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -55918,11 +59894,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoChangeCertTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangeCertTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangeCertType: \(error)" } } } @@ -55948,7 +59928,7 @@ public class TeamLog { } /// Changed sign-in URL for SSO. - public class SsoChangeLoginUrlDetails: CustomStringConvertible { + public class SsoChangeLoginUrlDetails: CustomStringConvertible, JSONRepresentable { /// Previous single sign-on login URL. public let previousValue: String /// New single sign-on login URL. @@ -55960,11 +59940,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SsoChangeLoginUrlDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangeLoginUrlDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangeLoginUrlDetails: \(error)" } } } @@ -55992,7 +59976,7 @@ public class TeamLog { } /// The SsoChangeLoginUrlType struct - public class SsoChangeLoginUrlType: CustomStringConvertible { + public class SsoChangeLoginUrlType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56000,11 +59984,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoChangeLoginUrlTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangeLoginUrlTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangeLoginUrlType: \(error)" } } } @@ -56030,7 +60018,7 @@ public class TeamLog { } /// Changed sign-out URL for SSO. - public class SsoChangeLogoutUrlDetails: CustomStringConvertible { + public class SsoChangeLogoutUrlDetails: CustomStringConvertible, JSONRepresentable { /// Previous single sign-on logout URL. Might be missing due to historical data gap. public let previousValue: String? /// New single sign-on logout URL. @@ -56042,11 +60030,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SsoChangeLogoutUrlDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangeLogoutUrlDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangeLogoutUrlDetails: \(error)" } } } @@ -56074,7 +60066,7 @@ public class TeamLog { } /// The SsoChangeLogoutUrlType struct - public class SsoChangeLogoutUrlType: CustomStringConvertible { + public class SsoChangeLogoutUrlType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56082,11 +60074,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoChangeLogoutUrlTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangeLogoutUrlTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangeLogoutUrlType: \(error)" } } } @@ -56112,7 +60108,7 @@ public class TeamLog { } /// Changed single sign-on setting for team. - public class SsoChangePolicyDetails: CustomStringConvertible { + public class SsoChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New single sign-on policy. public let newValue: TeamPolicies.SsoPolicy /// Previous single sign-on policy. Might be missing due to historical data gap. @@ -56122,11 +60118,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SsoChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangePolicyDetails: \(error)" } } } @@ -56154,7 +60154,7 @@ public class TeamLog { } /// The SsoChangePolicyType struct - public class SsoChangePolicyType: CustomStringConvertible { + public class SsoChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56162,11 +60162,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangePolicyType: \(error)" } } } @@ -56192,7 +60196,7 @@ public class TeamLog { } /// Changed SAML identity mode for SSO. - public class SsoChangeSamlIdentityModeDetails: CustomStringConvertible { + public class SsoChangeSamlIdentityModeDetails: CustomStringConvertible, JSONRepresentable { /// Previous single sign-on identity mode. public let previousValue: Int64 /// New single sign-on identity mode. @@ -56204,11 +60208,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try SsoChangeSamlIdentityModeDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangeSamlIdentityModeDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangeSamlIdentityModeDetails: \(error)" } } } @@ -56236,7 +60244,7 @@ public class TeamLog { } /// The SsoChangeSamlIdentityModeType struct - public class SsoChangeSamlIdentityModeType: CustomStringConvertible { + public class SsoChangeSamlIdentityModeType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56244,11 +60252,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoChangeSamlIdentityModeTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoChangeSamlIdentityModeTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoChangeSamlIdentityModeType: \(error)" } } } @@ -56274,18 +60286,22 @@ public class TeamLog { } /// Failed to sign in via SSO. - public class SsoErrorDetails: CustomStringConvertible { + public class SsoErrorDetails: CustomStringConvertible, JSONRepresentable { /// Error details. public let errorDetails: TeamLog.FailureDetailsLogInfo public init(errorDetails: TeamLog.FailureDetailsLogInfo) { self.errorDetails = errorDetails } + func json() throws -> JSON { + try SsoErrorDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoErrorDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoErrorDetails: \(error)" } } } @@ -56311,7 +60327,7 @@ public class TeamLog { } /// The SsoErrorType struct - public class SsoErrorType: CustomStringConvertible { + public class SsoErrorType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56319,11 +60335,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoErrorTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoErrorTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoErrorType: \(error)" } } } @@ -56349,12 +60369,16 @@ public class TeamLog { } /// Removed X.509 certificate for SSO. - public class SsoRemoveCertDetails: CustomStringConvertible { + public class SsoRemoveCertDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try SsoRemoveCertDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoRemoveCertDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoRemoveCertDetails: \(error)" } } } @@ -56377,7 +60401,7 @@ public class TeamLog { } /// The SsoRemoveCertType struct - public class SsoRemoveCertType: CustomStringConvertible { + public class SsoRemoveCertType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56385,11 +60409,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoRemoveCertTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoRemoveCertTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoRemoveCertType: \(error)" } } } @@ -56415,7 +60443,7 @@ public class TeamLog { } /// Removed sign-in URL for SSO. - public class SsoRemoveLoginUrlDetails: CustomStringConvertible { + public class SsoRemoveLoginUrlDetails: CustomStringConvertible, JSONRepresentable { /// Previous single sign-on login URL. public let previousValue: String public init(previousValue: String) { @@ -56423,11 +60451,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SsoRemoveLoginUrlDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoRemoveLoginUrlDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoRemoveLoginUrlDetails: \(error)" } } } @@ -56453,7 +60485,7 @@ public class TeamLog { } /// The SsoRemoveLoginUrlType struct - public class SsoRemoveLoginUrlType: CustomStringConvertible { + public class SsoRemoveLoginUrlType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56461,11 +60493,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoRemoveLoginUrlTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoRemoveLoginUrlTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoRemoveLoginUrlType: \(error)" } } } @@ -56491,7 +60527,7 @@ public class TeamLog { } /// Removed sign-out URL for SSO. - public class SsoRemoveLogoutUrlDetails: CustomStringConvertible { + public class SsoRemoveLogoutUrlDetails: CustomStringConvertible, JSONRepresentable { /// Previous single sign-on logout URL. public let previousValue: String public init(previousValue: String) { @@ -56499,11 +60535,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try SsoRemoveLogoutUrlDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoRemoveLogoutUrlDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoRemoveLogoutUrlDetails: \(error)" } } } @@ -56529,7 +60569,7 @@ public class TeamLog { } /// The SsoRemoveLogoutUrlType struct - public class SsoRemoveLogoutUrlType: CustomStringConvertible { + public class SsoRemoveLogoutUrlType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56537,11 +60577,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try SsoRemoveLogoutUrlTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoRemoveLogoutUrlTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoRemoveLogoutUrlType: \(error)" } } } @@ -56567,18 +60611,22 @@ public class TeamLog { } /// Started enterprise admin session. - public class StartedEnterpriseAdminSessionDetails: CustomStringConvertible { + public class StartedEnterpriseAdminSessionDetails: CustomStringConvertible, JSONRepresentable { /// More information about the organization or team. public let federationExtraDetails: TeamLog.FedExtraDetails public init(federationExtraDetails: TeamLog.FedExtraDetails) { self.federationExtraDetails = federationExtraDetails } + func json() throws -> JSON { + try StartedEnterpriseAdminSessionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try StartedEnterpriseAdminSessionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for StartedEnterpriseAdminSessionDetails: \(error)" } } } @@ -56604,7 +60652,7 @@ public class TeamLog { } /// The StartedEnterpriseAdminSessionType struct - public class StartedEnterpriseAdminSessionType: CustomStringConvertible { + public class StartedEnterpriseAdminSessionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56612,11 +60660,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try StartedEnterpriseAdminSessionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try StartedEnterpriseAdminSessionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for StartedEnterpriseAdminSessionType: \(error)" } } } @@ -56642,7 +60694,7 @@ public class TeamLog { } /// Created team activity report. - public class TeamActivityCreateReportDetails: CustomStringConvertible { + public class TeamActivityCreateReportDetails: CustomStringConvertible, JSONRepresentable { /// Report start date. public let startDate: Date /// Report end date. @@ -56652,11 +60704,15 @@ public class TeamLog { self.endDate = endDate } + func json() throws -> JSON { + try TeamActivityCreateReportDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamActivityCreateReportDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamActivityCreateReportDetails: \(error)" } } } @@ -56684,18 +60740,22 @@ public class TeamLog { } /// Couldn't generate team activity report. - public class TeamActivityCreateReportFailDetails: CustomStringConvertible { + public class TeamActivityCreateReportFailDetails: CustomStringConvertible, JSONRepresentable { /// Failure reason. public let failureReason: Team.TeamReportFailureReason public init(failureReason: Team.TeamReportFailureReason) { self.failureReason = failureReason } + func json() throws -> JSON { + try TeamActivityCreateReportFailDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamActivityCreateReportFailDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamActivityCreateReportFailDetails: \(error)" } } } @@ -56721,7 +60781,7 @@ public class TeamLog { } /// The TeamActivityCreateReportFailType struct - public class TeamActivityCreateReportFailType: CustomStringConvertible { + public class TeamActivityCreateReportFailType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56729,11 +60789,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamActivityCreateReportFailTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamActivityCreateReportFailTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamActivityCreateReportFailType: \(error)" } } } @@ -56759,7 +60823,7 @@ public class TeamLog { } /// The TeamActivityCreateReportType struct - public class TeamActivityCreateReportType: CustomStringConvertible { + public class TeamActivityCreateReportType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56767,11 +60831,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamActivityCreateReportTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamActivityCreateReportTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamActivityCreateReportType: \(error)" } } } @@ -56797,7 +60865,7 @@ public class TeamLog { } /// Policy for controlling team access to setting up branding feature - public enum TeamBrandingPolicy: CustomStringConvertible { + public enum TeamBrandingPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -56805,11 +60873,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TeamBrandingPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamBrandingPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamBrandingPolicy: \(error)" } } } @@ -56854,7 +60926,7 @@ public class TeamLog { } /// Changed team branding policy for team. - public class TeamBrandingPolicyChangedDetails: CustomStringConvertible { + public class TeamBrandingPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New team branding policy. public let newValue: TeamLog.TeamBrandingPolicy /// Previous team branding policy. @@ -56864,11 +60936,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try TeamBrandingPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamBrandingPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamBrandingPolicyChangedDetails: \(error)" } } } @@ -56896,7 +60972,7 @@ public class TeamLog { } /// The TeamBrandingPolicyChangedType struct - public class TeamBrandingPolicyChangedType: CustomStringConvertible { + public class TeamBrandingPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -56904,11 +60980,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamBrandingPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamBrandingPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamBrandingPolicyChangedType: \(error)" } } } @@ -56934,7 +61014,7 @@ public class TeamLog { } /// More details about the team. - public class TeamDetails: CustomStringConvertible { + public class TeamDetails: CustomStringConvertible, JSONRepresentable { /// The name of the team. public let team: String public init(team: String) { @@ -56942,11 +61022,15 @@ public class TeamLog { self.team = team } + func json() throws -> JSON { + try TeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamDetails: \(error)" } } } @@ -56972,12 +61056,16 @@ public class TeamLog { } /// Canceled team encryption key deletion. - public class TeamEncryptionKeyCancelKeyDeletionDetails: CustomStringConvertible { + public class TeamEncryptionKeyCancelKeyDeletionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamEncryptionKeyCancelKeyDeletionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyCancelKeyDeletionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyCancelKeyDeletionDetails: \(error)" } } } @@ -57000,7 +61088,7 @@ public class TeamLog { } /// The TeamEncryptionKeyCancelKeyDeletionType struct - public class TeamEncryptionKeyCancelKeyDeletionType: CustomStringConvertible { + public class TeamEncryptionKeyCancelKeyDeletionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57008,11 +61096,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamEncryptionKeyCancelKeyDeletionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyCancelKeyDeletionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyCancelKeyDeletionType: \(error)" } } } @@ -57038,12 +61130,16 @@ public class TeamLog { } /// Created team encryption key. - public class TeamEncryptionKeyCreateKeyDetails: CustomStringConvertible { + public class TeamEncryptionKeyCreateKeyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamEncryptionKeyCreateKeyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyCreateKeyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyCreateKeyDetails: \(error)" } } } @@ -57066,7 +61162,7 @@ public class TeamLog { } /// The TeamEncryptionKeyCreateKeyType struct - public class TeamEncryptionKeyCreateKeyType: CustomStringConvertible { + public class TeamEncryptionKeyCreateKeyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57074,11 +61170,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamEncryptionKeyCreateKeyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyCreateKeyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyCreateKeyType: \(error)" } } } @@ -57104,12 +61204,16 @@ public class TeamLog { } /// Deleted team encryption key. - public class TeamEncryptionKeyDeleteKeyDetails: CustomStringConvertible { + public class TeamEncryptionKeyDeleteKeyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamEncryptionKeyDeleteKeyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyDeleteKeyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyDeleteKeyDetails: \(error)" } } } @@ -57132,7 +61236,7 @@ public class TeamLog { } /// The TeamEncryptionKeyDeleteKeyType struct - public class TeamEncryptionKeyDeleteKeyType: CustomStringConvertible { + public class TeamEncryptionKeyDeleteKeyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57140,11 +61244,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamEncryptionKeyDeleteKeyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyDeleteKeyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyDeleteKeyType: \(error)" } } } @@ -57170,12 +61278,16 @@ public class TeamLog { } /// Disabled team encryption key. - public class TeamEncryptionKeyDisableKeyDetails: CustomStringConvertible { + public class TeamEncryptionKeyDisableKeyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamEncryptionKeyDisableKeyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyDisableKeyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyDisableKeyDetails: \(error)" } } } @@ -57198,7 +61310,7 @@ public class TeamLog { } /// The TeamEncryptionKeyDisableKeyType struct - public class TeamEncryptionKeyDisableKeyType: CustomStringConvertible { + public class TeamEncryptionKeyDisableKeyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57206,11 +61318,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamEncryptionKeyDisableKeyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyDisableKeyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyDisableKeyType: \(error)" } } } @@ -57236,12 +61352,16 @@ public class TeamLog { } /// Enabled team encryption key. - public class TeamEncryptionKeyEnableKeyDetails: CustomStringConvertible { + public class TeamEncryptionKeyEnableKeyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamEncryptionKeyEnableKeyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyEnableKeyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyEnableKeyDetails: \(error)" } } } @@ -57264,7 +61384,7 @@ public class TeamLog { } /// The TeamEncryptionKeyEnableKeyType struct - public class TeamEncryptionKeyEnableKeyType: CustomStringConvertible { + public class TeamEncryptionKeyEnableKeyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57272,11 +61392,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamEncryptionKeyEnableKeyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyEnableKeyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyEnableKeyType: \(error)" } } } @@ -57302,12 +61426,16 @@ public class TeamLog { } /// Rotated team encryption key. - public class TeamEncryptionKeyRotateKeyDetails: CustomStringConvertible { + public class TeamEncryptionKeyRotateKeyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamEncryptionKeyRotateKeyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyRotateKeyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyRotateKeyDetails: \(error)" } } } @@ -57330,7 +61458,7 @@ public class TeamLog { } /// The TeamEncryptionKeyRotateKeyType struct - public class TeamEncryptionKeyRotateKeyType: CustomStringConvertible { + public class TeamEncryptionKeyRotateKeyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57338,11 +61466,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamEncryptionKeyRotateKeyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyRotateKeyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyRotateKeyType: \(error)" } } } @@ -57368,12 +61500,16 @@ public class TeamLog { } /// Scheduled encryption key deletion. - public class TeamEncryptionKeyScheduleKeyDeletionDetails: CustomStringConvertible { + public class TeamEncryptionKeyScheduleKeyDeletionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamEncryptionKeyScheduleKeyDeletionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyScheduleKeyDeletionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyScheduleKeyDeletionDetails: \(error)" } } } @@ -57396,7 +61532,7 @@ public class TeamLog { } /// The TeamEncryptionKeyScheduleKeyDeletionType struct - public class TeamEncryptionKeyScheduleKeyDeletionType: CustomStringConvertible { + public class TeamEncryptionKeyScheduleKeyDeletionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57404,11 +61540,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamEncryptionKeyScheduleKeyDeletionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEncryptionKeyScheduleKeyDeletionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEncryptionKeyScheduleKeyDeletionType: \(error)" } } } @@ -57434,7 +61574,7 @@ public class TeamLog { } /// An audit log event. - public class TeamEvent: CustomStringConvertible { + public class TeamEvent: CustomStringConvertible, JSONRepresentable { /// The Dropbox timestamp representing when the action was taken. public let timestamp_: Date /// The category that this type of action belongs to. @@ -57486,11 +61626,15 @@ public class TeamLog { self.details = details } + func json() throws -> JSON { + try TeamEventSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamEventSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamEvent: \(error)" } } } @@ -57546,7 +61690,7 @@ public class TeamLog { } /// Policy for controlling whether App Integrations are enabled for the team. - public enum TeamExtensionsPolicy: CustomStringConvertible { + public enum TeamExtensionsPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -57554,11 +61698,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TeamExtensionsPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamExtensionsPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamExtensionsPolicy: \(error)" } } } @@ -57603,7 +61751,7 @@ public class TeamLog { } /// Changed App Integrations setting for team. - public class TeamExtensionsPolicyChangedDetails: CustomStringConvertible { + public class TeamExtensionsPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New Extensions policy. public let newValue: TeamLog.TeamExtensionsPolicy /// Previous Extensions policy. @@ -57613,11 +61761,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try TeamExtensionsPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamExtensionsPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamExtensionsPolicyChangedDetails: \(error)" } } } @@ -57645,7 +61797,7 @@ public class TeamLog { } /// The TeamExtensionsPolicyChangedType struct - public class TeamExtensionsPolicyChangedType: CustomStringConvertible { + public class TeamExtensionsPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57653,11 +61805,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamExtensionsPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamExtensionsPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamExtensionsPolicyChangedType: \(error)" } } } @@ -57683,7 +61839,7 @@ public class TeamLog { } /// Changed archival status of team folder. - public class TeamFolderChangeStatusDetails: CustomStringConvertible { + public class TeamFolderChangeStatusDetails: CustomStringConvertible, JSONRepresentable { /// New team folder status. public let newValue: Team.TeamFolderStatus /// Previous team folder status. Might be missing due to historical data gap. @@ -57693,11 +61849,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try TeamFolderChangeStatusDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderChangeStatusDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderChangeStatusDetails: \(error)" } } } @@ -57725,7 +61885,7 @@ public class TeamLog { } /// The TeamFolderChangeStatusType struct - public class TeamFolderChangeStatusType: CustomStringConvertible { + public class TeamFolderChangeStatusType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57733,11 +61893,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamFolderChangeStatusTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderChangeStatusTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderChangeStatusType: \(error)" } } } @@ -57763,12 +61927,16 @@ public class TeamLog { } /// Created team folder in active status. - public class TeamFolderCreateDetails: CustomStringConvertible { + public class TeamFolderCreateDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamFolderCreateDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderCreateDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderCreateDetails: \(error)" } } } @@ -57791,7 +61959,7 @@ public class TeamLog { } /// The TeamFolderCreateType struct - public class TeamFolderCreateType: CustomStringConvertible { + public class TeamFolderCreateType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57799,11 +61967,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamFolderCreateTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderCreateTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderCreateType: \(error)" } } } @@ -57829,7 +62001,7 @@ public class TeamLog { } /// Downgraded team folder to regular shared folder. - public class TeamFolderDowngradeDetails: CustomStringConvertible { + public class TeamFolderDowngradeDetails: CustomStringConvertible, JSONRepresentable { /// Target asset position in the Assets list. public let targetAssetIndex: UInt64 public init(targetAssetIndex: UInt64) { @@ -57837,11 +62009,15 @@ public class TeamLog { self.targetAssetIndex = targetAssetIndex } + func json() throws -> JSON { + try TeamFolderDowngradeDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderDowngradeDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderDowngradeDetails: \(error)" } } } @@ -57867,7 +62043,7 @@ public class TeamLog { } /// The TeamFolderDowngradeType struct - public class TeamFolderDowngradeType: CustomStringConvertible { + public class TeamFolderDowngradeType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57875,11 +62051,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamFolderDowngradeTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderDowngradeTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderDowngradeType: \(error)" } } } @@ -57905,12 +62085,16 @@ public class TeamLog { } /// Permanently deleted archived team folder. - public class TeamFolderPermanentlyDeleteDetails: CustomStringConvertible { + public class TeamFolderPermanentlyDeleteDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamFolderPermanentlyDeleteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderPermanentlyDeleteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderPermanentlyDeleteDetails: \(error)" } } } @@ -57933,7 +62117,7 @@ public class TeamLog { } /// The TeamFolderPermanentlyDeleteType struct - public class TeamFolderPermanentlyDeleteType: CustomStringConvertible { + public class TeamFolderPermanentlyDeleteType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -57941,11 +62125,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamFolderPermanentlyDeleteTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderPermanentlyDeleteTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderPermanentlyDeleteType: \(error)" } } } @@ -57971,7 +62159,7 @@ public class TeamLog { } /// Renamed active/archived team folder. - public class TeamFolderRenameDetails: CustomStringConvertible { + public class TeamFolderRenameDetails: CustomStringConvertible, JSONRepresentable { /// Previous folder name. public let previousFolderName: String /// New folder name. @@ -57983,11 +62171,15 @@ public class TeamLog { self.newFolderName = newFolderName } + func json() throws -> JSON { + try TeamFolderRenameDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderRenameDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderRenameDetails: \(error)" } } } @@ -58015,7 +62207,7 @@ public class TeamLog { } /// The TeamFolderRenameType struct - public class TeamFolderRenameType: CustomStringConvertible { + public class TeamFolderRenameType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -58023,11 +62215,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamFolderRenameTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamFolderRenameTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamFolderRenameType: \(error)" } } } @@ -58053,7 +62249,7 @@ public class TeamLog { } /// Details about team invites - public class TeamInviteDetails: CustomStringConvertible { + public class TeamInviteDetails: CustomStringConvertible, JSONRepresentable { /// How the user was invited to the team. public let inviteMethod: TeamLog.InviteMethod /// True if the invitation incurred an additional license purchase. @@ -58063,11 +62259,15 @@ public class TeamLog { self.additionalLicensePurchase = additionalLicensePurchase } + func json() throws -> JSON { + try TeamInviteDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamInviteDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamInviteDetails: \(error)" } } } @@ -58101,7 +62301,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamLinkedAppLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamLinkedAppLogInfo: \(error)" } } } @@ -58129,7 +62329,7 @@ public class TeamLog { } /// Team's logged information. - public class TeamLogInfo: CustomStringConvertible { + public class TeamLogInfo: CustomStringConvertible, JSONRepresentable { /// Team display name. public let displayName: String public init(displayName: String) { @@ -58137,11 +62337,15 @@ public class TeamLog { self.displayName = displayName } + func json() throws -> JSON { + try TeamLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamLogInfo: \(error)" } } } @@ -58194,7 +62398,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberLogInfo: \(error)" } } } @@ -58237,7 +62441,7 @@ public class TeamLog { } /// The TeamMembershipType union - public enum TeamMembershipType: CustomStringConvertible { + public enum TeamMembershipType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case free /// An unspecified error. @@ -58247,11 +62451,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TeamMembershipTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMembershipTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMembershipType: \(error)" } } } @@ -58302,7 +62510,7 @@ public class TeamLog { } /// Merged another team into this team. - public class TeamMergeFromDetails: CustomStringConvertible { + public class TeamMergeFromDetails: CustomStringConvertible, JSONRepresentable { /// The name of the team that was merged into this team. public let teamName: String public init(teamName: String) { @@ -58310,11 +62518,15 @@ public class TeamLog { self.teamName = teamName } + func json() throws -> JSON { + try TeamMergeFromDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeFromDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeFromDetails: \(error)" } } } @@ -58340,7 +62552,7 @@ public class TeamLog { } /// The TeamMergeFromType struct - public class TeamMergeFromType: CustomStringConvertible { + public class TeamMergeFromType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -58348,11 +62560,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeFromTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeFromTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeFromType: \(error)" } } } @@ -58378,18 +62594,22 @@ public class TeamLog { } /// Accepted a team merge request. - public class TeamMergeRequestAcceptedDetails: CustomStringConvertible { + public class TeamMergeRequestAcceptedDetails: CustomStringConvertible, JSONRepresentable { /// Team merge request acceptance details. public let requestAcceptedDetails: TeamLog.TeamMergeRequestAcceptedExtraDetails public init(requestAcceptedDetails: TeamLog.TeamMergeRequestAcceptedExtraDetails) { self.requestAcceptedDetails = requestAcceptedDetails } + func json() throws -> JSON { + try TeamMergeRequestAcceptedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAcceptedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAcceptedDetails: \(error)" } } } @@ -58416,7 +62636,7 @@ public class TeamLog { } /// Team merge request acceptance details - public enum TeamMergeRequestAcceptedExtraDetails: CustomStringConvertible { + public enum TeamMergeRequestAcceptedExtraDetails: CustomStringConvertible, JSONRepresentable { /// Team merge request accepted details shown to the primary team. case primaryTeam(TeamLog.PrimaryTeamRequestAcceptedDetails) /// Team merge request accepted details shown to the secondary team. @@ -58424,11 +62644,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TeamMergeRequestAcceptedExtraDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAcceptedExtraDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAcceptedExtraDetails: \(error)" } } } @@ -58475,7 +62699,7 @@ public class TeamLog { } /// Accepted a team merge request. - public class TeamMergeRequestAcceptedShownToPrimaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestAcceptedShownToPrimaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -58487,11 +62711,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try TeamMergeRequestAcceptedShownToPrimaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAcceptedShownToPrimaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAcceptedShownToPrimaryTeamDetails: \(error)" } } } @@ -58519,7 +62747,7 @@ public class TeamLog { } /// The TeamMergeRequestAcceptedShownToPrimaryTeamType struct - public class TeamMergeRequestAcceptedShownToPrimaryTeamType: CustomStringConvertible { + public class TeamMergeRequestAcceptedShownToPrimaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -58527,11 +62755,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestAcceptedShownToPrimaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAcceptedShownToPrimaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAcceptedShownToPrimaryTeamType: \(error)" } } } @@ -58557,7 +62789,7 @@ public class TeamLog { } /// Accepted a team merge request. - public class TeamMergeRequestAcceptedShownToSecondaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestAcceptedShownToSecondaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The primary team name. public let primaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -58569,11 +62801,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try TeamMergeRequestAcceptedShownToSecondaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAcceptedShownToSecondaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAcceptedShownToSecondaryTeamDetails: \(error)" } } } @@ -58601,7 +62837,7 @@ public class TeamLog { } /// The TeamMergeRequestAcceptedShownToSecondaryTeamType struct - public class TeamMergeRequestAcceptedShownToSecondaryTeamType: CustomStringConvertible { + public class TeamMergeRequestAcceptedShownToSecondaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -58609,11 +62845,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestAcceptedShownToSecondaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAcceptedShownToSecondaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAcceptedShownToSecondaryTeamType: \(error)" } } } @@ -58639,7 +62879,7 @@ public class TeamLog { } /// The TeamMergeRequestAcceptedType struct - public class TeamMergeRequestAcceptedType: CustomStringConvertible { + public class TeamMergeRequestAcceptedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -58647,11 +62887,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestAcceptedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAcceptedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAcceptedType: \(error)" } } } @@ -58677,7 +62921,7 @@ public class TeamLog { } /// Automatically canceled team merge request. - public class TeamMergeRequestAutoCanceledDetails: CustomStringConvertible { + public class TeamMergeRequestAutoCanceledDetails: CustomStringConvertible, JSONRepresentable { /// The cancellation reason. public let details: String? public init(details: String? = nil) { @@ -58685,11 +62929,15 @@ public class TeamLog { self.details = details } + func json() throws -> JSON { + try TeamMergeRequestAutoCanceledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAutoCanceledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAutoCanceledDetails: \(error)" } } } @@ -58715,7 +62963,7 @@ public class TeamLog { } /// The TeamMergeRequestAutoCanceledType struct - public class TeamMergeRequestAutoCanceledType: CustomStringConvertible { + public class TeamMergeRequestAutoCanceledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -58723,11 +62971,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestAutoCanceledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestAutoCanceledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestAutoCanceledType: \(error)" } } } @@ -58753,18 +63005,22 @@ public class TeamLog { } /// Canceled a team merge request. - public class TeamMergeRequestCanceledDetails: CustomStringConvertible { + public class TeamMergeRequestCanceledDetails: CustomStringConvertible, JSONRepresentable { /// Team merge request cancellation details. public let requestCanceledDetails: TeamLog.TeamMergeRequestCanceledExtraDetails public init(requestCanceledDetails: TeamLog.TeamMergeRequestCanceledExtraDetails) { self.requestCanceledDetails = requestCanceledDetails } + func json() throws -> JSON { + try TeamMergeRequestCanceledDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestCanceledDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestCanceledDetails: \(error)" } } } @@ -58791,7 +63047,7 @@ public class TeamLog { } /// Team merge request cancellation details - public enum TeamMergeRequestCanceledExtraDetails: CustomStringConvertible { + public enum TeamMergeRequestCanceledExtraDetails: CustomStringConvertible, JSONRepresentable { /// Team merge request cancellation details shown to the primary team. case primaryTeam(TeamLog.PrimaryTeamRequestCanceledDetails) /// Team merge request cancellation details shown to the secondary team. @@ -58799,11 +63055,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TeamMergeRequestCanceledExtraDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestCanceledExtraDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestCanceledExtraDetails: \(error)" } } } @@ -58850,7 +63110,7 @@ public class TeamLog { } /// Canceled a team merge request. - public class TeamMergeRequestCanceledShownToPrimaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestCanceledShownToPrimaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -58862,11 +63122,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try TeamMergeRequestCanceledShownToPrimaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestCanceledShownToPrimaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestCanceledShownToPrimaryTeamDetails: \(error)" } } } @@ -58894,7 +63158,7 @@ public class TeamLog { } /// The TeamMergeRequestCanceledShownToPrimaryTeamType struct - public class TeamMergeRequestCanceledShownToPrimaryTeamType: CustomStringConvertible { + public class TeamMergeRequestCanceledShownToPrimaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -58902,11 +63166,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestCanceledShownToPrimaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestCanceledShownToPrimaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestCanceledShownToPrimaryTeamType: \(error)" } } } @@ -58932,7 +63200,7 @@ public class TeamLog { } /// Canceled a team merge request. - public class TeamMergeRequestCanceledShownToSecondaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestCanceledShownToSecondaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The email of the primary team admin that the request was sent to. public let sentTo: String /// The name of the secondary team admin who sent the request originally. @@ -58944,11 +63212,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try TeamMergeRequestCanceledShownToSecondaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestCanceledShownToSecondaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestCanceledShownToSecondaryTeamDetails: \(error)" } } } @@ -58976,7 +63248,7 @@ public class TeamLog { } /// The TeamMergeRequestCanceledShownToSecondaryTeamType struct - public class TeamMergeRequestCanceledShownToSecondaryTeamType: CustomStringConvertible { + public class TeamMergeRequestCanceledShownToSecondaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -58984,11 +63256,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestCanceledShownToSecondaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestCanceledShownToSecondaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestCanceledShownToSecondaryTeamType: \(error)" } } } @@ -59014,7 +63290,7 @@ public class TeamLog { } /// The TeamMergeRequestCanceledType struct - public class TeamMergeRequestCanceledType: CustomStringConvertible { + public class TeamMergeRequestCanceledType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59022,11 +63298,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestCanceledTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestCanceledTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestCanceledType: \(error)" } } } @@ -59052,18 +63332,22 @@ public class TeamLog { } /// Team merge request expired. - public class TeamMergeRequestExpiredDetails: CustomStringConvertible { + public class TeamMergeRequestExpiredDetails: CustomStringConvertible, JSONRepresentable { /// Team merge request expiration details. public let requestExpiredDetails: TeamLog.TeamMergeRequestExpiredExtraDetails public init(requestExpiredDetails: TeamLog.TeamMergeRequestExpiredExtraDetails) { self.requestExpiredDetails = requestExpiredDetails } + func json() throws -> JSON { + try TeamMergeRequestExpiredDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestExpiredDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestExpiredDetails: \(error)" } } } @@ -59090,7 +63374,7 @@ public class TeamLog { } /// Team merge request expiration details - public enum TeamMergeRequestExpiredExtraDetails: CustomStringConvertible { + public enum TeamMergeRequestExpiredExtraDetails: CustomStringConvertible, JSONRepresentable { /// Team merge request canceled details shown to the primary team. case primaryTeam(TeamLog.PrimaryTeamRequestExpiredDetails) /// Team merge request canceled details shown to the secondary team. @@ -59098,11 +63382,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TeamMergeRequestExpiredExtraDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestExpiredExtraDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestExpiredExtraDetails: \(error)" } } } @@ -59149,7 +63437,7 @@ public class TeamLog { } /// Team merge request expired. - public class TeamMergeRequestExpiredShownToPrimaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestExpiredShownToPrimaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -59161,11 +63449,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try TeamMergeRequestExpiredShownToPrimaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestExpiredShownToPrimaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestExpiredShownToPrimaryTeamDetails: \(error)" } } } @@ -59193,7 +63485,7 @@ public class TeamLog { } /// The TeamMergeRequestExpiredShownToPrimaryTeamType struct - public class TeamMergeRequestExpiredShownToPrimaryTeamType: CustomStringConvertible { + public class TeamMergeRequestExpiredShownToPrimaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59201,11 +63493,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestExpiredShownToPrimaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestExpiredShownToPrimaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestExpiredShownToPrimaryTeamType: \(error)" } } } @@ -59231,7 +63527,7 @@ public class TeamLog { } /// Team merge request expired. - public class TeamMergeRequestExpiredShownToSecondaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestExpiredShownToSecondaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The email of the primary team admin the request was sent to. public let sentTo: String public init(sentTo: String) { @@ -59239,11 +63535,15 @@ public class TeamLog { self.sentTo = sentTo } + func json() throws -> JSON { + try TeamMergeRequestExpiredShownToSecondaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestExpiredShownToSecondaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestExpiredShownToSecondaryTeamDetails: \(error)" } } } @@ -59269,7 +63569,7 @@ public class TeamLog { } /// The TeamMergeRequestExpiredShownToSecondaryTeamType struct - public class TeamMergeRequestExpiredShownToSecondaryTeamType: CustomStringConvertible { + public class TeamMergeRequestExpiredShownToSecondaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59277,11 +63577,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestExpiredShownToSecondaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestExpiredShownToSecondaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestExpiredShownToSecondaryTeamType: \(error)" } } } @@ -59307,7 +63611,7 @@ public class TeamLog { } /// The TeamMergeRequestExpiredType struct - public class TeamMergeRequestExpiredType: CustomStringConvertible { + public class TeamMergeRequestExpiredType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59315,11 +63619,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestExpiredTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestExpiredTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestExpiredType: \(error)" } } } @@ -59345,7 +63653,7 @@ public class TeamLog { } /// Rejected a team merge request. - public class TeamMergeRequestRejectedShownToPrimaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestRejectedShownToPrimaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the secondary team admin who sent the request originally. @@ -59357,11 +63665,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try TeamMergeRequestRejectedShownToPrimaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestRejectedShownToPrimaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestRejectedShownToPrimaryTeamDetails: \(error)" } } } @@ -59389,7 +63701,7 @@ public class TeamLog { } /// The TeamMergeRequestRejectedShownToPrimaryTeamType struct - public class TeamMergeRequestRejectedShownToPrimaryTeamType: CustomStringConvertible { + public class TeamMergeRequestRejectedShownToPrimaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59397,11 +63709,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestRejectedShownToPrimaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestRejectedShownToPrimaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestRejectedShownToPrimaryTeamType: \(error)" } } } @@ -59427,7 +63743,7 @@ public class TeamLog { } /// Rejected a team merge request. - public class TeamMergeRequestRejectedShownToSecondaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestRejectedShownToSecondaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The name of the secondary team admin who sent the request originally. public let sentBy: String public init(sentBy: String) { @@ -59435,11 +63751,15 @@ public class TeamLog { self.sentBy = sentBy } + func json() throws -> JSON { + try TeamMergeRequestRejectedShownToSecondaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestRejectedShownToSecondaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestRejectedShownToSecondaryTeamDetails: \(error)" } } } @@ -59465,7 +63785,7 @@ public class TeamLog { } /// The TeamMergeRequestRejectedShownToSecondaryTeamType struct - public class TeamMergeRequestRejectedShownToSecondaryTeamType: CustomStringConvertible { + public class TeamMergeRequestRejectedShownToSecondaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59473,11 +63793,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestRejectedShownToSecondaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestRejectedShownToSecondaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestRejectedShownToSecondaryTeamType: \(error)" } } } @@ -59503,18 +63827,22 @@ public class TeamLog { } /// Sent a team merge request reminder. - public class TeamMergeRequestReminderDetails: CustomStringConvertible { + public class TeamMergeRequestReminderDetails: CustomStringConvertible, JSONRepresentable { /// Team merge request reminder details. public let requestReminderDetails: TeamLog.TeamMergeRequestReminderExtraDetails public init(requestReminderDetails: TeamLog.TeamMergeRequestReminderExtraDetails) { self.requestReminderDetails = requestReminderDetails } + func json() throws -> JSON { + try TeamMergeRequestReminderDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestReminderDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestReminderDetails: \(error)" } } } @@ -59541,7 +63869,7 @@ public class TeamLog { } /// Team merge request reminder details - public enum TeamMergeRequestReminderExtraDetails: CustomStringConvertible { + public enum TeamMergeRequestReminderExtraDetails: CustomStringConvertible, JSONRepresentable { /// Team merge request reminder details shown to the primary team. case primaryTeam(TeamLog.PrimaryTeamRequestReminderDetails) /// Team merge request reminder details shown to the secondary team. @@ -59549,11 +63877,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TeamMergeRequestReminderExtraDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestReminderExtraDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestReminderExtraDetails: \(error)" } } } @@ -59600,7 +63932,7 @@ public class TeamLog { } /// Sent a team merge request reminder. - public class TeamMergeRequestReminderShownToPrimaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestReminderShownToPrimaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the primary team admin the request was sent to. @@ -59612,11 +63944,15 @@ public class TeamLog { self.sentTo = sentTo } + func json() throws -> JSON { + try TeamMergeRequestReminderShownToPrimaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestReminderShownToPrimaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestReminderShownToPrimaryTeamDetails: \(error)" } } } @@ -59644,7 +63980,7 @@ public class TeamLog { } /// The TeamMergeRequestReminderShownToPrimaryTeamType struct - public class TeamMergeRequestReminderShownToPrimaryTeamType: CustomStringConvertible { + public class TeamMergeRequestReminderShownToPrimaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59652,11 +63988,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestReminderShownToPrimaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestReminderShownToPrimaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestReminderShownToPrimaryTeamType: \(error)" } } } @@ -59682,7 +64022,7 @@ public class TeamLog { } /// Sent a team merge request reminder. - public class TeamMergeRequestReminderShownToSecondaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestReminderShownToSecondaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The email of the primary team admin the request was sent to. public let sentTo: String public init(sentTo: String) { @@ -59690,11 +64030,15 @@ public class TeamLog { self.sentTo = sentTo } + func json() throws -> JSON { + try TeamMergeRequestReminderShownToSecondaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestReminderShownToSecondaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestReminderShownToSecondaryTeamDetails: \(error)" } } } @@ -59720,7 +64064,7 @@ public class TeamLog { } /// The TeamMergeRequestReminderShownToSecondaryTeamType struct - public class TeamMergeRequestReminderShownToSecondaryTeamType: CustomStringConvertible { + public class TeamMergeRequestReminderShownToSecondaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59728,11 +64072,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestReminderShownToSecondaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestReminderShownToSecondaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestReminderShownToSecondaryTeamType: \(error)" } } } @@ -59758,7 +64106,7 @@ public class TeamLog { } /// The TeamMergeRequestReminderType struct - public class TeamMergeRequestReminderType: CustomStringConvertible { + public class TeamMergeRequestReminderType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59766,11 +64114,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestReminderTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestReminderTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestReminderType: \(error)" } } } @@ -59796,7 +64148,7 @@ public class TeamLog { } /// Canceled the team merge. - public class TeamMergeRequestRevokedDetails: CustomStringConvertible { + public class TeamMergeRequestRevokedDetails: CustomStringConvertible, JSONRepresentable { /// The name of the other team. public let team: String public init(team: String) { @@ -59804,11 +64156,15 @@ public class TeamLog { self.team = team } + func json() throws -> JSON { + try TeamMergeRequestRevokedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestRevokedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestRevokedDetails: \(error)" } } } @@ -59834,7 +64190,7 @@ public class TeamLog { } /// The TeamMergeRequestRevokedType struct - public class TeamMergeRequestRevokedType: CustomStringConvertible { + public class TeamMergeRequestRevokedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59842,11 +64198,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestRevokedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestRevokedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestRevokedType: \(error)" } } } @@ -59872,7 +64232,7 @@ public class TeamLog { } /// Requested to merge their Dropbox team into yours. - public class TeamMergeRequestSentShownToPrimaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestSentShownToPrimaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The secondary team name. public let secondaryTeam: String /// The name of the primary team admin the request was sent to. @@ -59884,11 +64244,15 @@ public class TeamLog { self.sentTo = sentTo } + func json() throws -> JSON { + try TeamMergeRequestSentShownToPrimaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestSentShownToPrimaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestSentShownToPrimaryTeamDetails: \(error)" } } } @@ -59916,7 +64280,7 @@ public class TeamLog { } /// The TeamMergeRequestSentShownToPrimaryTeamType struct - public class TeamMergeRequestSentShownToPrimaryTeamType: CustomStringConvertible { + public class TeamMergeRequestSentShownToPrimaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -59924,11 +64288,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestSentShownToPrimaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestSentShownToPrimaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestSentShownToPrimaryTeamType: \(error)" } } } @@ -59954,7 +64322,7 @@ public class TeamLog { } /// Requested to merge your team into another Dropbox team. - public class TeamMergeRequestSentShownToSecondaryTeamDetails: CustomStringConvertible { + public class TeamMergeRequestSentShownToSecondaryTeamDetails: CustomStringConvertible, JSONRepresentable { /// The email of the primary team admin the request was sent to. public let sentTo: String public init(sentTo: String) { @@ -59962,11 +64330,15 @@ public class TeamLog { self.sentTo = sentTo } + func json() throws -> JSON { + try TeamMergeRequestSentShownToSecondaryTeamDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestSentShownToSecondaryTeamDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestSentShownToSecondaryTeamDetails: \(error)" } } } @@ -59992,7 +64364,7 @@ public class TeamLog { } /// The TeamMergeRequestSentShownToSecondaryTeamType struct - public class TeamMergeRequestSentShownToSecondaryTeamType: CustomStringConvertible { + public class TeamMergeRequestSentShownToSecondaryTeamType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60000,11 +64372,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeRequestSentShownToSecondaryTeamTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeRequestSentShownToSecondaryTeamTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeRequestSentShownToSecondaryTeamType: \(error)" } } } @@ -60030,7 +64406,7 @@ public class TeamLog { } /// Merged this team into another team. - public class TeamMergeToDetails: CustomStringConvertible { + public class TeamMergeToDetails: CustomStringConvertible, JSONRepresentable { /// The name of the team that this team was merged into. public let teamName: String public init(teamName: String) { @@ -60038,11 +64414,15 @@ public class TeamLog { self.teamName = teamName } + func json() throws -> JSON { + try TeamMergeToDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeToDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeToDetails: \(error)" } } } @@ -60068,7 +64448,7 @@ public class TeamLog { } /// The TeamMergeToType struct - public class TeamMergeToType: CustomStringConvertible { + public class TeamMergeToType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60076,11 +64456,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamMergeToTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMergeToTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMergeToType: \(error)" } } } @@ -60106,7 +64490,7 @@ public class TeamLog { } /// Team name details - public class TeamName: CustomStringConvertible { + public class TeamName: CustomStringConvertible, JSONRepresentable { /// Team's display name. public let teamDisplayName: String /// Team's legal name. @@ -60118,11 +64502,15 @@ public class TeamLog { self.teamLegalName = teamLegalName } + func json() throws -> JSON { + try TeamNameSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamNameSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamName: \(error)" } } } @@ -60150,12 +64538,16 @@ public class TeamLog { } /// Added team background to display on shared link headers. - public class TeamProfileAddBackgroundDetails: CustomStringConvertible { + public class TeamProfileAddBackgroundDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamProfileAddBackgroundDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileAddBackgroundDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileAddBackgroundDetails: \(error)" } } } @@ -60178,7 +64570,7 @@ public class TeamLog { } /// The TeamProfileAddBackgroundType struct - public class TeamProfileAddBackgroundType: CustomStringConvertible { + public class TeamProfileAddBackgroundType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60186,11 +64578,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamProfileAddBackgroundTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileAddBackgroundTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileAddBackgroundType: \(error)" } } } @@ -60216,12 +64612,16 @@ public class TeamLog { } /// Added team logo to display on shared link headers. - public class TeamProfileAddLogoDetails: CustomStringConvertible { + public class TeamProfileAddLogoDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamProfileAddLogoDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileAddLogoDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileAddLogoDetails: \(error)" } } } @@ -60244,7 +64644,7 @@ public class TeamLog { } /// The TeamProfileAddLogoType struct - public class TeamProfileAddLogoType: CustomStringConvertible { + public class TeamProfileAddLogoType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60252,11 +64652,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamProfileAddLogoTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileAddLogoTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileAddLogoType: \(error)" } } } @@ -60282,12 +64686,16 @@ public class TeamLog { } /// Changed team background displayed on shared link headers. - public class TeamProfileChangeBackgroundDetails: CustomStringConvertible { + public class TeamProfileChangeBackgroundDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamProfileChangeBackgroundDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileChangeBackgroundDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileChangeBackgroundDetails: \(error)" } } } @@ -60310,7 +64718,7 @@ public class TeamLog { } /// The TeamProfileChangeBackgroundType struct - public class TeamProfileChangeBackgroundType: CustomStringConvertible { + public class TeamProfileChangeBackgroundType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60318,11 +64726,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamProfileChangeBackgroundTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileChangeBackgroundTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileChangeBackgroundType: \(error)" } } } @@ -60348,7 +64760,7 @@ public class TeamLog { } /// Changed default language for team. - public class TeamProfileChangeDefaultLanguageDetails: CustomStringConvertible { + public class TeamProfileChangeDefaultLanguageDetails: CustomStringConvertible, JSONRepresentable { /// New team's default language. public let newValue: String /// Previous team's default language. @@ -60360,11 +64772,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try TeamProfileChangeDefaultLanguageDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileChangeDefaultLanguageDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileChangeDefaultLanguageDetails: \(error)" } } } @@ -60392,7 +64808,7 @@ public class TeamLog { } /// The TeamProfileChangeDefaultLanguageType struct - public class TeamProfileChangeDefaultLanguageType: CustomStringConvertible { + public class TeamProfileChangeDefaultLanguageType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60400,11 +64816,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamProfileChangeDefaultLanguageTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileChangeDefaultLanguageTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileChangeDefaultLanguageType: \(error)" } } } @@ -60430,12 +64850,16 @@ public class TeamLog { } /// Changed team logo displayed on shared link headers. - public class TeamProfileChangeLogoDetails: CustomStringConvertible { + public class TeamProfileChangeLogoDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamProfileChangeLogoDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileChangeLogoDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileChangeLogoDetails: \(error)" } } } @@ -60458,7 +64882,7 @@ public class TeamLog { } /// The TeamProfileChangeLogoType struct - public class TeamProfileChangeLogoType: CustomStringConvertible { + public class TeamProfileChangeLogoType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60466,11 +64890,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamProfileChangeLogoTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileChangeLogoTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileChangeLogoType: \(error)" } } } @@ -60496,7 +64924,7 @@ public class TeamLog { } /// Changed team name. - public class TeamProfileChangeNameDetails: CustomStringConvertible { + public class TeamProfileChangeNameDetails: CustomStringConvertible, JSONRepresentable { /// Previous teams name. Might be missing due to historical data gap. public let previousValue: TeamLog.TeamName? /// New team name. @@ -60506,11 +64934,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try TeamProfileChangeNameDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileChangeNameDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileChangeNameDetails: \(error)" } } } @@ -60538,7 +64970,7 @@ public class TeamLog { } /// The TeamProfileChangeNameType struct - public class TeamProfileChangeNameType: CustomStringConvertible { + public class TeamProfileChangeNameType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60546,11 +64978,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamProfileChangeNameTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileChangeNameTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileChangeNameType: \(error)" } } } @@ -60576,12 +65012,16 @@ public class TeamLog { } /// Removed team background displayed on shared link headers. - public class TeamProfileRemoveBackgroundDetails: CustomStringConvertible { + public class TeamProfileRemoveBackgroundDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamProfileRemoveBackgroundDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileRemoveBackgroundDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileRemoveBackgroundDetails: \(error)" } } } @@ -60604,7 +65044,7 @@ public class TeamLog { } /// The TeamProfileRemoveBackgroundType struct - public class TeamProfileRemoveBackgroundType: CustomStringConvertible { + public class TeamProfileRemoveBackgroundType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60612,11 +65052,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamProfileRemoveBackgroundTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileRemoveBackgroundTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileRemoveBackgroundType: \(error)" } } } @@ -60642,12 +65086,16 @@ public class TeamLog { } /// Removed team logo displayed on shared link headers. - public class TeamProfileRemoveLogoDetails: CustomStringConvertible { + public class TeamProfileRemoveLogoDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TeamProfileRemoveLogoDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileRemoveLogoDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileRemoveLogoDetails: \(error)" } } } @@ -60670,7 +65118,7 @@ public class TeamLog { } /// The TeamProfileRemoveLogoType struct - public class TeamProfileRemoveLogoType: CustomStringConvertible { + public class TeamProfileRemoveLogoType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60678,11 +65126,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamProfileRemoveLogoTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamProfileRemoveLogoTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamProfileRemoveLogoType: \(error)" } } } @@ -60708,7 +65160,7 @@ public class TeamLog { } /// Policy for controlling whether team selective sync is enabled for team. - public enum TeamSelectiveSyncPolicy: CustomStringConvertible { + public enum TeamSelectiveSyncPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -60716,11 +65168,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TeamSelectiveSyncPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSelectiveSyncPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSelectiveSyncPolicy: \(error)" } } } @@ -60765,7 +65221,7 @@ public class TeamLog { } /// Enabled/disabled Team Selective Sync for team. - public class TeamSelectiveSyncPolicyChangedDetails: CustomStringConvertible { + public class TeamSelectiveSyncPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New Team Selective Sync policy. public let newValue: TeamLog.TeamSelectiveSyncPolicy /// Previous Team Selective Sync policy. @@ -60775,11 +65231,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try TeamSelectiveSyncPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSelectiveSyncPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSelectiveSyncPolicyChangedDetails: \(error)" } } } @@ -60807,7 +65267,7 @@ public class TeamLog { } /// The TeamSelectiveSyncPolicyChangedType struct - public class TeamSelectiveSyncPolicyChangedType: CustomStringConvertible { + public class TeamSelectiveSyncPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60815,11 +65275,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamSelectiveSyncPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSelectiveSyncPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSelectiveSyncPolicyChangedType: \(error)" } } } @@ -60845,7 +65309,7 @@ public class TeamLog { } /// Changed sync default. - public class TeamSelectiveSyncSettingsChangedDetails: CustomStringConvertible { + public class TeamSelectiveSyncSettingsChangedDetails: CustomStringConvertible, JSONRepresentable { /// Previous value. public let previousValue: Files.SyncSetting /// New value. @@ -60855,11 +65319,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try TeamSelectiveSyncSettingsChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSelectiveSyncSettingsChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSelectiveSyncSettingsChangedDetails: \(error)" } } } @@ -60887,7 +65355,7 @@ public class TeamLog { } /// The TeamSelectiveSyncSettingsChangedType struct - public class TeamSelectiveSyncSettingsChangedType: CustomStringConvertible { + public class TeamSelectiveSyncSettingsChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60895,11 +65363,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamSelectiveSyncSettingsChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSelectiveSyncSettingsChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSelectiveSyncSettingsChangedType: \(error)" } } } @@ -60925,7 +65397,7 @@ public class TeamLog { } /// Edited the approved list for sharing externally. - public class TeamSharingWhitelistSubjectsChangedDetails: CustomStringConvertible { + public class TeamSharingWhitelistSubjectsChangedDetails: CustomStringConvertible, JSONRepresentable { /// Domains or emails added to the approved list for sharing externally. public let addedWhitelistSubjects: [String] /// Domains or emails removed from the approved list for sharing externally. @@ -60937,11 +65409,15 @@ public class TeamLog { self.removedWhitelistSubjects = removedWhitelistSubjects } + func json() throws -> JSON { + try TeamSharingWhitelistSubjectsChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSharingWhitelistSubjectsChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSharingWhitelistSubjectsChangedDetails: \(error)" } } } @@ -60972,7 +65448,7 @@ public class TeamLog { } /// The TeamSharingWhitelistSubjectsChangedType struct - public class TeamSharingWhitelistSubjectsChangedType: CustomStringConvertible { + public class TeamSharingWhitelistSubjectsChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -60980,11 +65456,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TeamSharingWhitelistSubjectsChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSharingWhitelistSubjectsChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSharingWhitelistSubjectsChangedType: \(error)" } } } @@ -61010,12 +65490,16 @@ public class TeamLog { } /// Added backup phone for two-step verification. - public class TfaAddBackupPhoneDetails: CustomStringConvertible { + public class TfaAddBackupPhoneDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TfaAddBackupPhoneDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaAddBackupPhoneDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaAddBackupPhoneDetails: \(error)" } } } @@ -61038,7 +65522,7 @@ public class TeamLog { } /// The TfaAddBackupPhoneType struct - public class TfaAddBackupPhoneType: CustomStringConvertible { + public class TfaAddBackupPhoneType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61046,11 +65530,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaAddBackupPhoneTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaAddBackupPhoneTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaAddBackupPhoneType: \(error)" } } } @@ -61076,12 +65564,16 @@ public class TeamLog { } /// Added members to two factor authentication exception list. - public class TfaAddExceptionDetails: CustomStringConvertible { + public class TfaAddExceptionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TfaAddExceptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaAddExceptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaAddExceptionDetails: \(error)" } } } @@ -61104,7 +65596,7 @@ public class TeamLog { } /// The TfaAddExceptionType struct - public class TfaAddExceptionType: CustomStringConvertible { + public class TfaAddExceptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61112,11 +65604,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaAddExceptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaAddExceptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaAddExceptionType: \(error)" } } } @@ -61142,12 +65638,16 @@ public class TeamLog { } /// Added security key for two-step verification. - public class TfaAddSecurityKeyDetails: CustomStringConvertible { + public class TfaAddSecurityKeyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TfaAddSecurityKeyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaAddSecurityKeyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaAddSecurityKeyDetails: \(error)" } } } @@ -61170,7 +65670,7 @@ public class TeamLog { } /// The TfaAddSecurityKeyType struct - public class TfaAddSecurityKeyType: CustomStringConvertible { + public class TfaAddSecurityKeyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61178,11 +65678,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaAddSecurityKeyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaAddSecurityKeyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaAddSecurityKeyType: \(error)" } } } @@ -61208,12 +65712,16 @@ public class TeamLog { } /// Changed backup phone for two-step verification. - public class TfaChangeBackupPhoneDetails: CustomStringConvertible { + public class TfaChangeBackupPhoneDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TfaChangeBackupPhoneDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaChangeBackupPhoneDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaChangeBackupPhoneDetails: \(error)" } } } @@ -61236,7 +65744,7 @@ public class TeamLog { } /// The TfaChangeBackupPhoneType struct - public class TfaChangeBackupPhoneType: CustomStringConvertible { + public class TfaChangeBackupPhoneType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61244,11 +65752,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaChangeBackupPhoneTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaChangeBackupPhoneTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaChangeBackupPhoneType: \(error)" } } } @@ -61274,7 +65786,7 @@ public class TeamLog { } /// Changed two-step verification setting for team. - public class TfaChangePolicyDetails: CustomStringConvertible { + public class TfaChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New change policy. public let newValue: TeamPolicies.TwoStepVerificationPolicy /// Previous change policy. Might be missing due to historical data gap. @@ -61284,11 +65796,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try TfaChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaChangePolicyDetails: \(error)" } } } @@ -61316,7 +65832,7 @@ public class TeamLog { } /// The TfaChangePolicyType struct - public class TfaChangePolicyType: CustomStringConvertible { + public class TfaChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61324,11 +65840,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaChangePolicyType: \(error)" } } } @@ -61354,7 +65874,7 @@ public class TeamLog { } /// Enabled/disabled/changed two-step verification setting. - public class TfaChangeStatusDetails: CustomStringConvertible { + public class TfaChangeStatusDetails: CustomStringConvertible, JSONRepresentable { /// The new two factor authentication configuration. public let newValue: TeamLog.TfaConfiguration /// The previous two factor authentication configuration. Might be missing due to historical data gap. @@ -61368,11 +65888,15 @@ public class TeamLog { self.usedRescueCode = usedRescueCode } + func json() throws -> JSON { + try TfaChangeStatusDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaChangeStatusDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaChangeStatusDetails: \(error)" } } } @@ -61402,7 +65926,7 @@ public class TeamLog { } /// The TfaChangeStatusType struct - public class TfaChangeStatusType: CustomStringConvertible { + public class TfaChangeStatusType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61410,11 +65934,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaChangeStatusTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaChangeStatusTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaChangeStatusType: \(error)" } } } @@ -61440,7 +65968,7 @@ public class TeamLog { } /// Two factor authentication configuration. Note: the enabled option is deprecated. - public enum TfaConfiguration: CustomStringConvertible { + public enum TfaConfiguration: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case authenticator /// An unspecified error. @@ -61452,11 +65980,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TfaConfigurationSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaConfigurationSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaConfiguration: \(error)" } } } @@ -61513,12 +66045,16 @@ public class TeamLog { } /// Removed backup phone for two-step verification. - public class TfaRemoveBackupPhoneDetails: CustomStringConvertible { + public class TfaRemoveBackupPhoneDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TfaRemoveBackupPhoneDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaRemoveBackupPhoneDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaRemoveBackupPhoneDetails: \(error)" } } } @@ -61541,7 +66077,7 @@ public class TeamLog { } /// The TfaRemoveBackupPhoneType struct - public class TfaRemoveBackupPhoneType: CustomStringConvertible { + public class TfaRemoveBackupPhoneType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61549,11 +66085,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaRemoveBackupPhoneTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaRemoveBackupPhoneTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaRemoveBackupPhoneType: \(error)" } } } @@ -61579,12 +66119,16 @@ public class TeamLog { } /// Removed members from two factor authentication exception list. - public class TfaRemoveExceptionDetails: CustomStringConvertible { + public class TfaRemoveExceptionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TfaRemoveExceptionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaRemoveExceptionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaRemoveExceptionDetails: \(error)" } } } @@ -61607,7 +66151,7 @@ public class TeamLog { } /// The TfaRemoveExceptionType struct - public class TfaRemoveExceptionType: CustomStringConvertible { + public class TfaRemoveExceptionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61615,11 +66159,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaRemoveExceptionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaRemoveExceptionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaRemoveExceptionType: \(error)" } } } @@ -61645,12 +66193,16 @@ public class TeamLog { } /// Removed security key for two-step verification. - public class TfaRemoveSecurityKeyDetails: CustomStringConvertible { + public class TfaRemoveSecurityKeyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TfaRemoveSecurityKeyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaRemoveSecurityKeyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaRemoveSecurityKeyDetails: \(error)" } } } @@ -61673,7 +66225,7 @@ public class TeamLog { } /// The TfaRemoveSecurityKeyType struct - public class TfaRemoveSecurityKeyType: CustomStringConvertible { + public class TfaRemoveSecurityKeyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61681,11 +66233,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaRemoveSecurityKeyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaRemoveSecurityKeyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaRemoveSecurityKeyType: \(error)" } } } @@ -61711,12 +66267,16 @@ public class TeamLog { } /// Reset two-step verification for team member. - public class TfaResetDetails: CustomStringConvertible { + public class TfaResetDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try TfaResetDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaResetDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaResetDetails: \(error)" } } } @@ -61739,7 +66299,7 @@ public class TeamLog { } /// The TfaResetType struct - public class TfaResetType: CustomStringConvertible { + public class TfaResetType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -61747,11 +66307,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TfaResetTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TfaResetTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TfaResetType: \(error)" } } } @@ -61777,7 +66341,7 @@ public class TeamLog { } /// The TimeUnit union - public enum TimeUnit: CustomStringConvertible { + public enum TimeUnit: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case days /// An unspecified error. @@ -61797,11 +66361,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TimeUnitSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TimeUnitSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TimeUnit: \(error)" } } } @@ -61903,7 +66471,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try TrustedNonTeamMemberLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TrustedNonTeamMemberLogInfo: \(error)" } } } @@ -61943,7 +66511,7 @@ public class TeamLog { } /// The TrustedNonTeamMemberType union - public enum TrustedNonTeamMemberType: CustomStringConvertible { + public enum TrustedNonTeamMemberType: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case enterpriseAdmin /// An unspecified error. @@ -61951,11 +66519,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TrustedNonTeamMemberTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TrustedNonTeamMemberTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TrustedNonTeamMemberType: \(error)" } } } @@ -62000,7 +66572,7 @@ public class TeamLog { } /// The TrustedTeamsRequestAction union - public enum TrustedTeamsRequestAction: CustomStringConvertible { + public enum TrustedTeamsRequestAction: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case accepted /// An unspecified error. @@ -62014,11 +66586,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TrustedTeamsRequestActionSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TrustedTeamsRequestActionSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TrustedTeamsRequestAction: \(error)" } } } @@ -62081,7 +66657,7 @@ public class TeamLog { } /// The TrustedTeamsRequestState union - public enum TrustedTeamsRequestState: CustomStringConvertible { + public enum TrustedTeamsRequestState: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case invited /// An unspecified error. @@ -62091,11 +66667,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TrustedTeamsRequestStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TrustedTeamsRequestStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TrustedTeamsRequestState: \(error)" } } } @@ -62146,7 +66726,7 @@ public class TeamLog { } /// Enabled/disabled option for members to link personal Dropbox account and team account to same computer. - public class TwoAccountChangePolicyDetails: CustomStringConvertible { + public class TwoAccountChangePolicyDetails: CustomStringConvertible, JSONRepresentable { /// New two account policy. public let newValue: TeamLog.TwoAccountPolicy /// Previous two account policy. Might be missing due to historical data gap. @@ -62156,11 +66736,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try TwoAccountChangePolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TwoAccountChangePolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TwoAccountChangePolicyDetails: \(error)" } } } @@ -62188,7 +66772,7 @@ public class TeamLog { } /// The TwoAccountChangePolicyType struct - public class TwoAccountChangePolicyType: CustomStringConvertible { + public class TwoAccountChangePolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -62196,11 +66780,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try TwoAccountChangePolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TwoAccountChangePolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TwoAccountChangePolicyType: \(error)" } } } @@ -62226,7 +66814,7 @@ public class TeamLog { } /// Policy for pairing personal account to work account - public enum TwoAccountPolicy: CustomStringConvertible { + public enum TwoAccountPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -62234,11 +66822,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try TwoAccountPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TwoAccountPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TwoAccountPolicy: \(error)" } } } @@ -62283,12 +66875,16 @@ public class TeamLog { } /// Reverted naming convention. - public class UndoNamingConventionDetails: CustomStringConvertible { + public class UndoNamingConventionDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try UndoNamingConventionDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UndoNamingConventionDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UndoNamingConventionDetails: \(error)" } } } @@ -62311,7 +66907,7 @@ public class TeamLog { } /// The UndoNamingConventionType struct - public class UndoNamingConventionType: CustomStringConvertible { + public class UndoNamingConventionType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -62319,11 +66915,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try UndoNamingConventionTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UndoNamingConventionTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UndoNamingConventionType: \(error)" } } } @@ -62349,12 +66949,16 @@ public class TeamLog { } /// Removed multi-file organize. - public class UndoOrganizeFolderWithTidyDetails: CustomStringConvertible { + public class UndoOrganizeFolderWithTidyDetails: CustomStringConvertible, JSONRepresentable { + func json() throws -> JSON { + try UndoOrganizeFolderWithTidyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UndoOrganizeFolderWithTidyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UndoOrganizeFolderWithTidyDetails: \(error)" } } } @@ -62377,7 +66981,7 @@ public class TeamLog { } /// The UndoOrganizeFolderWithTidyType struct - public class UndoOrganizeFolderWithTidyType: CustomStringConvertible { + public class UndoOrganizeFolderWithTidyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -62385,11 +66989,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try UndoOrganizeFolderWithTidyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UndoOrganizeFolderWithTidyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UndoOrganizeFolderWithTidyType: \(error)" } } } @@ -62420,7 +67028,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserLinkedAppLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserLinkedAppLogInfo: \(error)" } } } @@ -62448,7 +67056,7 @@ public class TeamLog { } /// User's name logged information - public class UserNameLogInfo: CustomStringConvertible { + public class UserNameLogInfo: CustomStringConvertible, JSONRepresentable { /// Given name. public let givenName: String /// Surname. @@ -62464,11 +67072,15 @@ public class TeamLog { self.locale = locale } + func json() throws -> JSON { + try UserNameLogInfoSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserNameLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserNameLogInfo: \(error)" } } } @@ -62503,7 +67115,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserOrTeamLinkedAppLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserOrTeamLinkedAppLogInfo: \(error)" } } } @@ -62531,7 +67143,7 @@ public class TeamLog { } /// Tagged a file. - public class UserTagsAddedDetails: CustomStringConvertible { + public class UserTagsAddedDetails: CustomStringConvertible, JSONRepresentable { /// values. public let values: [String] public init(values: [String]) { @@ -62539,11 +67151,15 @@ public class TeamLog { self.values = values } + func json() throws -> JSON { + try UserTagsAddedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserTagsAddedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserTagsAddedDetails: \(error)" } } } @@ -62569,7 +67185,7 @@ public class TeamLog { } /// The UserTagsAddedType struct - public class UserTagsAddedType: CustomStringConvertible { + public class UserTagsAddedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -62577,11 +67193,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try UserTagsAddedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserTagsAddedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserTagsAddedType: \(error)" } } } @@ -62607,7 +67227,7 @@ public class TeamLog { } /// Removed tags. - public class UserTagsRemovedDetails: CustomStringConvertible { + public class UserTagsRemovedDetails: CustomStringConvertible, JSONRepresentable { /// values. public let values: [String] public init(values: [String]) { @@ -62615,11 +67235,15 @@ public class TeamLog { self.values = values } + func json() throws -> JSON { + try UserTagsRemovedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserTagsRemovedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserTagsRemovedDetails: \(error)" } } } @@ -62645,7 +67269,7 @@ public class TeamLog { } /// The UserTagsRemovedType struct - public class UserTagsRemovedType: CustomStringConvertible { + public class UserTagsRemovedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -62653,11 +67277,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try UserTagsRemovedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserTagsRemovedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserTagsRemovedType: \(error)" } } } @@ -62683,7 +67311,7 @@ public class TeamLog { } /// Changed team policy for viewer info. - public class ViewerInfoPolicyChangedDetails: CustomStringConvertible { + public class ViewerInfoPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// Previous Viewer Info policy. public let previousValue: TeamLog.PassPolicy /// New Viewer Info policy. @@ -62693,11 +67321,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try ViewerInfoPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ViewerInfoPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ViewerInfoPolicyChangedDetails: \(error)" } } } @@ -62725,7 +67357,7 @@ public class TeamLog { } /// The ViewerInfoPolicyChangedType struct - public class ViewerInfoPolicyChangedType: CustomStringConvertible { + public class ViewerInfoPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -62733,11 +67365,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try ViewerInfoPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ViewerInfoPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ViewerInfoPolicyChangedType: \(error)" } } } @@ -62763,7 +67399,7 @@ public class TeamLog { } /// Policy for controlling team access to watermarking feature - public enum WatermarkingPolicy: CustomStringConvertible { + public enum WatermarkingPolicy: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case disabled /// An unspecified error. @@ -62771,11 +67407,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try WatermarkingPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WatermarkingPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WatermarkingPolicy: \(error)" } } } @@ -62820,7 +67460,7 @@ public class TeamLog { } /// Changed watermarking policy for team. - public class WatermarkingPolicyChangedDetails: CustomStringConvertible { + public class WatermarkingPolicyChangedDetails: CustomStringConvertible, JSONRepresentable { /// New watermarking policy. public let newValue: TeamLog.WatermarkingPolicy /// Previous watermarking policy. @@ -62830,11 +67470,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try WatermarkingPolicyChangedDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WatermarkingPolicyChangedDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WatermarkingPolicyChangedDetails: \(error)" } } } @@ -62862,7 +67506,7 @@ public class TeamLog { } /// The WatermarkingPolicyChangedType struct - public class WatermarkingPolicyChangedType: CustomStringConvertible { + public class WatermarkingPolicyChangedType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -62870,11 +67514,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try WatermarkingPolicyChangedTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WatermarkingPolicyChangedTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WatermarkingPolicyChangedType: \(error)" } } } @@ -62932,7 +67580,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebDeviceSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebDeviceSessionLogInfo: \(error)" } } } @@ -62983,7 +67631,7 @@ public class TeamLog { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionLogInfoSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionLogInfo: \(error)" } } } @@ -63009,7 +67657,7 @@ public class TeamLog { } /// Changed limit on active sessions per member. - public class WebSessionsChangeActiveSessionLimitDetails: CustomStringConvertible { + public class WebSessionsChangeActiveSessionLimitDetails: CustomStringConvertible, JSONRepresentable { /// Previous max number of concurrent active sessions policy. public let previousValue: String /// New max number of concurrent active sessions policy. @@ -63021,11 +67669,15 @@ public class TeamLog { self.newValue = newValue } + func json() throws -> JSON { + try WebSessionsChangeActiveSessionLimitDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionsChangeActiveSessionLimitDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionsChangeActiveSessionLimitDetails: \(error)" } } } @@ -63053,7 +67705,7 @@ public class TeamLog { } /// The WebSessionsChangeActiveSessionLimitType struct - public class WebSessionsChangeActiveSessionLimitType: CustomStringConvertible { + public class WebSessionsChangeActiveSessionLimitType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -63061,11 +67713,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try WebSessionsChangeActiveSessionLimitTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionsChangeActiveSessionLimitTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionsChangeActiveSessionLimitType: \(error)" } } } @@ -63091,7 +67747,7 @@ public class TeamLog { } /// Changed how long members can stay signed in to Dropbox.com. - public class WebSessionsChangeFixedLengthPolicyDetails: CustomStringConvertible { + public class WebSessionsChangeFixedLengthPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New session length policy. Might be missing due to historical data gap. public let newValue: TeamLog.WebSessionsFixedLengthPolicy? /// Previous session length policy. Might be missing due to historical data gap. @@ -63101,11 +67757,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try WebSessionsChangeFixedLengthPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionsChangeFixedLengthPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionsChangeFixedLengthPolicyDetails: \(error)" } } } @@ -63133,7 +67793,7 @@ public class TeamLog { } /// The WebSessionsChangeFixedLengthPolicyType struct - public class WebSessionsChangeFixedLengthPolicyType: CustomStringConvertible { + public class WebSessionsChangeFixedLengthPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -63141,11 +67801,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try WebSessionsChangeFixedLengthPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionsChangeFixedLengthPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionsChangeFixedLengthPolicyType: \(error)" } } } @@ -63171,7 +67835,7 @@ public class TeamLog { } /// Changed how long team members can be idle while signed in to Dropbox.com. - public class WebSessionsChangeIdleLengthPolicyDetails: CustomStringConvertible { + public class WebSessionsChangeIdleLengthPolicyDetails: CustomStringConvertible, JSONRepresentable { /// New idle length policy. Might be missing due to historical data gap. public let newValue: TeamLog.WebSessionsIdleLengthPolicy? /// Previous idle length policy. Might be missing due to historical data gap. @@ -63181,11 +67845,15 @@ public class TeamLog { self.previousValue = previousValue } + func json() throws -> JSON { + try WebSessionsChangeIdleLengthPolicyDetailsSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionsChangeIdleLengthPolicyDetailsSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionsChangeIdleLengthPolicyDetails: \(error)" } } } @@ -63213,7 +67881,7 @@ public class TeamLog { } /// The WebSessionsChangeIdleLengthPolicyType struct - public class WebSessionsChangeIdleLengthPolicyType: CustomStringConvertible { + public class WebSessionsChangeIdleLengthPolicyType: CustomStringConvertible, JSONRepresentable { /// (no description) public let description_: String public init(description_: String) { @@ -63221,11 +67889,15 @@ public class TeamLog { self.description_ = description_ } + func json() throws -> JSON { + try WebSessionsChangeIdleLengthPolicyTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionsChangeIdleLengthPolicyTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionsChangeIdleLengthPolicyType: \(error)" } } } @@ -63251,7 +67923,7 @@ public class TeamLog { } /// Web sessions fixed length policy. - public enum WebSessionsFixedLengthPolicy: CustomStringConvertible { + public enum WebSessionsFixedLengthPolicy: CustomStringConvertible, JSONRepresentable { /// Defined fixed session length. case defined(TeamLog.DurationLogInfo) /// Undefined fixed session length. @@ -63259,11 +67931,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try WebSessionsFixedLengthPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionsFixedLengthPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionsFixedLengthPolicy: \(error)" } } } @@ -63309,7 +67985,7 @@ public class TeamLog { } /// Web sessions idle length policy. - public enum WebSessionsIdleLengthPolicy: CustomStringConvertible { + public enum WebSessionsIdleLengthPolicy: CustomStringConvertible, JSONRepresentable { /// Defined idle session length. case defined(TeamLog.DurationLogInfo) /// Undefined idle session length. @@ -63317,11 +67993,15 @@ public class TeamLog { /// An unspecified error. case other + func json() throws -> JSON { + try WebSessionsIdleLengthPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try WebSessionsIdleLengthPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for WebSessionsIdleLengthPolicy: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/TeamLogRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/TeamLogRoutes.swift index e0ddc3aa..16bfffea 100644 --- a/Source/SwiftyDropbox/Shared/Generated/TeamLogRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/TeamLogRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the team_log namespace /// For Objective-C compatible routes see DBTeamLogRoutes -public class TeamLogRoutes { +public class TeamLogRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/TeamPolicies.swift b/Source/SwiftyDropbox/Shared/Generated/TeamPolicies.swift index 60997975..1a67f512 100644 --- a/Source/SwiftyDropbox/Shared/Generated/TeamPolicies.swift +++ b/Source/SwiftyDropbox/Shared/Generated/TeamPolicies.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the team_policies namespace public class TeamPolicies { /// The CameraUploadsPolicyState union - public enum CameraUploadsPolicyState: CustomStringConvertible { + public enum CameraUploadsPolicyState: CustomStringConvertible, JSONRepresentable { /// Background camera uploads are disabled. case disabled /// Background camera uploads are allowed. @@ -17,11 +17,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try CameraUploadsPolicyStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try CameraUploadsPolicyStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for CameraUploadsPolicyState: \(error)" } } } @@ -66,7 +70,7 @@ public class TeamPolicies { } /// The ComputerBackupPolicyState union - public enum ComputerBackupPolicyState: CustomStringConvertible { + public enum ComputerBackupPolicyState: CustomStringConvertible, JSONRepresentable { /// Computer Backup feature is disabled. case disabled /// Computer Backup feature is enabled. @@ -76,11 +80,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try ComputerBackupPolicyStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ComputerBackupPolicyStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ComputerBackupPolicyState: \(error)" } } } @@ -131,7 +139,7 @@ public class TeamPolicies { } /// The EmmState union - public enum EmmState: CustomStringConvertible { + public enum EmmState: CustomStringConvertible, JSONRepresentable { /// Emm token is disabled. case disabled /// Emm token is optional. @@ -141,11 +149,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try EmmStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try EmmStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for EmmState: \(error)" } } } @@ -196,7 +208,7 @@ public class TeamPolicies { } /// The ExternalDriveBackupPolicyState union - public enum ExternalDriveBackupPolicyState: CustomStringConvertible { + public enum ExternalDriveBackupPolicyState: CustomStringConvertible, JSONRepresentable { /// External Drive Backup feature is disabled. case disabled /// External Drive Backup feature is enabled. @@ -206,11 +218,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try ExternalDriveBackupPolicyStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ExternalDriveBackupPolicyStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ExternalDriveBackupPolicyState: \(error)" } } } @@ -261,7 +277,7 @@ public class TeamPolicies { } /// The FileLockingPolicyState union - public enum FileLockingPolicyState: CustomStringConvertible { + public enum FileLockingPolicyState: CustomStringConvertible, JSONRepresentable { /// File locking feature is disabled. case disabled /// File locking feature is allowed. @@ -269,11 +285,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try FileLockingPolicyStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockingPolicyStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLockingPolicyState: \(error)" } } } @@ -318,7 +338,7 @@ public class TeamPolicies { } /// The FileProviderMigrationPolicyState union - public enum FileProviderMigrationPolicyState: CustomStringConvertible { + public enum FileProviderMigrationPolicyState: CustomStringConvertible, JSONRepresentable { /// Team admin has opted out of File Provider Migration for team members. case disabled /// Team admin has not opted out of File Provider Migration for team members. @@ -328,11 +348,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try FileProviderMigrationPolicyStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileProviderMigrationPolicyStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileProviderMigrationPolicyState: \(error)" } } } @@ -383,17 +407,21 @@ public class TeamPolicies { } /// The GroupCreation union - public enum GroupCreation: CustomStringConvertible { + public enum GroupCreation: CustomStringConvertible, JSONRepresentable { /// Team admins and members can create groups. case adminsAndMembers /// Only team admins can create groups. case adminsOnly + func json() throws -> JSON { + try GroupCreationSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GroupCreationSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GroupCreation: \(error)" } } } @@ -432,7 +460,7 @@ public class TeamPolicies { } /// The OfficeAddInPolicy union - public enum OfficeAddInPolicy: CustomStringConvertible { + public enum OfficeAddInPolicy: CustomStringConvertible, JSONRepresentable { /// Office Add-In is disabled. case disabled /// Office Add-In is enabled. @@ -440,11 +468,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try OfficeAddInPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try OfficeAddInPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for OfficeAddInPolicy: \(error)" } } } @@ -489,7 +521,7 @@ public class TeamPolicies { } /// The PaperDefaultFolderPolicy union - public enum PaperDefaultFolderPolicy: CustomStringConvertible { + public enum PaperDefaultFolderPolicy: CustomStringConvertible, JSONRepresentable { /// Everyone in team will be the default option when creating a folder in Paper. case everyoneInTeam /// Invite only will be the default option when creating a folder in Paper. @@ -497,11 +529,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDefaultFolderPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDefaultFolderPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDefaultFolderPolicy: \(error)" } } } @@ -546,7 +582,7 @@ public class TeamPolicies { } /// The PaperDeploymentPolicy union - public enum PaperDeploymentPolicy: CustomStringConvertible { + public enum PaperDeploymentPolicy: CustomStringConvertible, JSONRepresentable { /// All team members have access to Paper. case full /// Only whitelisted team members can access Paper. To see which user is whitelisted, check @@ -555,11 +591,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDeploymentPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDeploymentPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDeploymentPolicy: \(error)" } } } @@ -604,7 +644,7 @@ public class TeamPolicies { } /// The PaperDesktopPolicy union - public enum PaperDesktopPolicy: CustomStringConvertible { + public enum PaperDesktopPolicy: CustomStringConvertible, JSONRepresentable { /// Do not allow team members to use Paper Desktop. case disabled /// Allow team members to use Paper Desktop. @@ -612,11 +652,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try PaperDesktopPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperDesktopPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperDesktopPolicy: \(error)" } } } @@ -661,7 +705,7 @@ public class TeamPolicies { } /// The PaperEnabledPolicy union - public enum PaperEnabledPolicy: CustomStringConvertible { + public enum PaperEnabledPolicy: CustomStringConvertible, JSONRepresentable { /// Paper is disabled. case disabled /// Paper is enabled. @@ -671,11 +715,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try PaperEnabledPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperEnabledPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperEnabledPolicy: \(error)" } } } @@ -726,7 +774,7 @@ public class TeamPolicies { } /// The PasswordControlMode union - public enum PasswordControlMode: CustomStringConvertible { + public enum PasswordControlMode: CustomStringConvertible, JSONRepresentable { /// Password is disabled. case disabled /// Password is enabled. @@ -734,11 +782,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try PasswordControlModeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordControlModeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordControlMode: \(error)" } } } @@ -783,7 +835,7 @@ public class TeamPolicies { } /// The PasswordStrengthPolicy union - public enum PasswordStrengthPolicy: CustomStringConvertible { + public enum PasswordStrengthPolicy: CustomStringConvertible, JSONRepresentable { /// User passwords will adhere to the minimal password strength policy. case minimalRequirements /// User passwords will adhere to the moderate password strength policy. @@ -793,11 +845,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try PasswordStrengthPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PasswordStrengthPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PasswordStrengthPolicy: \(error)" } } } @@ -848,7 +904,7 @@ public class TeamPolicies { } /// The RolloutMethod union - public enum RolloutMethod: CustomStringConvertible { + public enum RolloutMethod: CustomStringConvertible, JSONRepresentable { /// Unlink all. case unlinkAll /// Unlink devices with the most inactivity. @@ -856,11 +912,15 @@ public class TeamPolicies { /// Add member to Exceptions. case addMemberToExceptions + func json() throws -> JSON { + try RolloutMethodSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try RolloutMethodSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for RolloutMethod: \(error)" } } } @@ -905,7 +965,7 @@ public class TeamPolicies { } /// Policy governing whether shared folder membership is required to access shared links. - public enum SharedFolderBlanketLinkRestrictionPolicy: CustomStringConvertible { + public enum SharedFolderBlanketLinkRestrictionPolicy: CustomStringConvertible, JSONRepresentable { /// Only members of shared folders can access folder content via shared link. case members /// Anyone can access folder content via shared link. @@ -913,11 +973,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try SharedFolderBlanketLinkRestrictionPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderBlanketLinkRestrictionPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderBlanketLinkRestrictionPolicy: \(error)" } } } @@ -962,7 +1026,7 @@ public class TeamPolicies { } /// Policy governing which shared folders a team member can join. - public enum SharedFolderJoinPolicy: CustomStringConvertible { + public enum SharedFolderJoinPolicy: CustomStringConvertible, JSONRepresentable { /// Team members can only join folders shared by teammates. case fromTeamOnly /// Team members can join any shared folder, including those shared by users outside the team. @@ -970,11 +1034,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try SharedFolderJoinPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderJoinPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderJoinPolicy: \(error)" } } } @@ -1019,7 +1087,7 @@ public class TeamPolicies { } /// Policy governing who can be a member of a folder shared by a team member. - public enum SharedFolderMemberPolicy: CustomStringConvertible { + public enum SharedFolderMemberPolicy: CustomStringConvertible, JSONRepresentable { /// Only a teammate can be a member of a folder shared by a team member. case team /// Anyone can be a member of a folder shared by a team member. @@ -1027,11 +1095,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try SharedFolderMemberPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedFolderMemberPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedFolderMemberPolicy: \(error)" } } } @@ -1077,7 +1149,7 @@ public class TeamPolicies { /// Policy governing the visibility of shared links. This policy can apply to newly created shared links, or all /// shared links. - public enum SharedLinkCreatePolicy: CustomStringConvertible { + public enum SharedLinkCreatePolicy: CustomStringConvertible, JSONRepresentable { /// By default, anyone can access newly created shared links. No login will be required to access the shared /// links unless overridden. case defaultPublic @@ -1093,11 +1165,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try SharedLinkCreatePolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SharedLinkCreatePolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SharedLinkCreatePolicy: \(error)" } } } @@ -1154,7 +1230,7 @@ public class TeamPolicies { } /// The ShowcaseDownloadPolicy union - public enum ShowcaseDownloadPolicy: CustomStringConvertible { + public enum ShowcaseDownloadPolicy: CustomStringConvertible, JSONRepresentable { /// Do not allow files to be downloaded from Showcases. case disabled /// Allow files to be downloaded from Showcases. @@ -1162,11 +1238,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try ShowcaseDownloadPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseDownloadPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseDownloadPolicy: \(error)" } } } @@ -1211,7 +1291,7 @@ public class TeamPolicies { } /// The ShowcaseEnabledPolicy union - public enum ShowcaseEnabledPolicy: CustomStringConvertible { + public enum ShowcaseEnabledPolicy: CustomStringConvertible, JSONRepresentable { /// Showcase is disabled. case disabled /// Showcase is enabled. @@ -1219,11 +1299,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try ShowcaseEnabledPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseEnabledPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseEnabledPolicy: \(error)" } } } @@ -1268,7 +1352,7 @@ public class TeamPolicies { } /// The ShowcaseExternalSharingPolicy union - public enum ShowcaseExternalSharingPolicy: CustomStringConvertible { + public enum ShowcaseExternalSharingPolicy: CustomStringConvertible, JSONRepresentable { /// Do not allow showcases to be shared with people not on the team. case disabled /// Allow showcases to be shared with people not on the team. @@ -1276,11 +1360,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try ShowcaseExternalSharingPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try ShowcaseExternalSharingPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for ShowcaseExternalSharingPolicy: \(error)" } } } @@ -1325,7 +1413,7 @@ public class TeamPolicies { } /// The SmartSyncPolicy union - public enum SmartSyncPolicy: CustomStringConvertible { + public enum SmartSyncPolicy: CustomStringConvertible, JSONRepresentable { /// The specified content will be synced as local files by default. case local /// The specified content will be synced as on-demand files by default. @@ -1333,11 +1421,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try SmartSyncPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmartSyncPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmartSyncPolicy: \(error)" } } } @@ -1382,7 +1474,7 @@ public class TeamPolicies { } /// The SmarterSmartSyncPolicyState union - public enum SmarterSmartSyncPolicyState: CustomStringConvertible { + public enum SmarterSmartSyncPolicyState: CustomStringConvertible, JSONRepresentable { /// Smarter Smart Sync feature is disabled. case disabled /// Smarter Smart Sync feature is enabled. @@ -1390,11 +1482,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try SmarterSmartSyncPolicyStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SmarterSmartSyncPolicyStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SmarterSmartSyncPolicyState: \(error)" } } } @@ -1439,7 +1535,7 @@ public class TeamPolicies { } /// The SsoPolicy union - public enum SsoPolicy: CustomStringConvertible { + public enum SsoPolicy: CustomStringConvertible, JSONRepresentable { /// Users will be able to sign in with their Dropbox credentials. case disabled /// Users will be able to sign in with either their Dropbox or single sign-on credentials. @@ -1449,11 +1545,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try SsoPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SsoPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SsoPolicy: \(error)" } } } @@ -1504,7 +1604,7 @@ public class TeamPolicies { } /// The SuggestMembersPolicy union - public enum SuggestMembersPolicy: CustomStringConvertible { + public enum SuggestMembersPolicy: CustomStringConvertible, JSONRepresentable { /// Suggest members is disabled. case disabled /// Suggest members is enabled. @@ -1512,11 +1612,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try SuggestMembersPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SuggestMembersPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SuggestMembersPolicy: \(error)" } } } @@ -1561,7 +1665,7 @@ public class TeamPolicies { } /// Policies governing team members. - public class TeamMemberPolicies: CustomStringConvertible { + public class TeamMemberPolicies: CustomStringConvertible, JSONRepresentable { /// Policies governing sharing. public let sharing: TeamPolicies.TeamSharingPolicies /// This describes the Enterprise Mobility Management (EMM) state for this team. This information can be used to @@ -1585,11 +1689,15 @@ public class TeamPolicies { self.suggestMembersPolicy = suggestMembersPolicy } + func json() throws -> JSON { + try TeamMemberPoliciesSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamMemberPoliciesSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamMemberPolicies: \(error)" } } } @@ -1621,7 +1729,7 @@ public class TeamPolicies { } /// Policies governing sharing within and outside of the team. - public class TeamSharingPolicies: CustomStringConvertible { + public class TeamSharingPolicies: CustomStringConvertible, JSONRepresentable { /// Who can join folders shared by team members. public let sharedFolderMemberPolicy: TeamPolicies.SharedFolderMemberPolicy /// Which shared folders team members can join. @@ -1646,11 +1754,15 @@ public class TeamPolicies { self.sharedFolderLinkRestrictionPolicy = sharedFolderLinkRestrictionPolicy } + func json() throws -> JSON { + try TeamSharingPoliciesSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSharingPoliciesSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSharingPolicies: \(error)" } } } @@ -1693,7 +1805,7 @@ public class TeamPolicies { } /// The TwoStepVerificationPolicy union - public enum TwoStepVerificationPolicy: CustomStringConvertible { + public enum TwoStepVerificationPolicy: CustomStringConvertible, JSONRepresentable { /// Enabled require two factor authorization. case requireTfaEnable /// Disabled require two factor authorization. @@ -1701,11 +1813,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try TwoStepVerificationPolicySerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TwoStepVerificationPolicySerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TwoStepVerificationPolicy: \(error)" } } } @@ -1750,7 +1866,7 @@ public class TeamPolicies { } /// The TwoStepVerificationState union - public enum TwoStepVerificationState: CustomStringConvertible { + public enum TwoStepVerificationState: CustomStringConvertible, JSONRepresentable { /// Enabled require two factor authorization. case required /// Optional require two factor authorization. @@ -1760,11 +1876,15 @@ public class TeamPolicies { /// An unspecified error. case other + func json() throws -> JSON { + try TwoStepVerificationStateSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TwoStepVerificationStateSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TwoStepVerificationState: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/TeamRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/TeamRoutes.swift index 4167ac9b..67e66bf6 100644 --- a/Source/SwiftyDropbox/Shared/Generated/TeamRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/TeamRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the team namespace /// For Objective-C compatible routes see DBTeamRoutes -public class TeamRoutes { +public class TeamRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Generated/Users.swift b/Source/SwiftyDropbox/Shared/Generated/Users.swift index a25c9a5c..1ad5a496 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Users.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Users.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the users namespace public class Users { /// The amount of detail revealed about an account depends on the user being queried and the user making the query. - public class Account: CustomStringConvertible { + public class Account: CustomStringConvertible, JSONRepresentable { /// The user's unique Dropbox ID. public let accountId: String /// Details of a user's name. @@ -35,11 +35,15 @@ public class Users { self.disabled = disabled } + func json() throws -> JSON { + try AccountSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Account: \(error)" } } } @@ -109,7 +113,7 @@ public class Users { do { return "\(SerializeUtil.prepareJSONForSerialization(try BasicAccountSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for BasicAccount: \(error)" } } } @@ -158,18 +162,22 @@ public class Users { } /// The value for fileLocking in UserFeature. - public enum FileLockingValue: CustomStringConvertible { + public enum FileLockingValue: CustomStringConvertible, JSONRepresentable { /// When this value is True, the user can lock files in shared directories. When the value is False the user can /// unlock the files they have locked or request to unlock files locked by others. case enabled(Bool) /// An unspecified error. case other + func json() throws -> JSON { + try FileLockingValueSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try FileLockingValueSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FileLockingValue: \(error)" } } } @@ -264,7 +272,7 @@ public class Users { do { return "\(SerializeUtil.prepareJSONForSerialization(try FullAccountSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FullAccount: \(error)" } } } @@ -331,7 +339,7 @@ public class Users { } /// Information about a team. - public class Team: CustomStringConvertible { + public class Team: CustomStringConvertible, JSONRepresentable { /// The team's unique ID. public let id: String /// The name of the team. @@ -343,11 +351,15 @@ public class Users { self.name = name } + func json() throws -> JSON { + try TeamSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Team: \(error)" } } } @@ -390,7 +402,7 @@ public class Users { do { return "\(SerializeUtil.prepareJSONForSerialization(try FullTeamSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for FullTeam: \(error)" } } } @@ -422,7 +434,7 @@ public class Users { } /// The GetAccountArg struct - public class GetAccountArg: CustomStringConvertible { + public class GetAccountArg: CustomStringConvertible, JSONRepresentable { /// A user's account identifier. public let accountId: String public init(accountId: String) { @@ -430,11 +442,15 @@ public class Users { self.accountId = accountId } + func json() throws -> JSON { + try GetAccountArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetAccountArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetAccountArg: \(error)" } } } @@ -460,7 +476,7 @@ public class Users { } /// The GetAccountBatchArg struct - public class GetAccountBatchArg: CustomStringConvertible { + public class GetAccountBatchArg: CustomStringConvertible, JSONRepresentable { /// List of user account identifiers. Should not contain any duplicate account IDs. public let accountIds: [String] public init(accountIds: [String]) { @@ -468,11 +484,15 @@ public class Users { self.accountIds = accountIds } + func json() throws -> JSON { + try GetAccountBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetAccountBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetAccountBatchArg: \(error)" } } } @@ -498,17 +518,21 @@ public class Users { } /// The GetAccountBatchError union - public enum GetAccountBatchError: CustomStringConvertible { + public enum GetAccountBatchError: CustomStringConvertible, JSONRepresentable { /// The value is an account ID specified in accountIds in GetAccountBatchArg that does not exist. case noAccount(String) /// An unspecified error. case other + func json() throws -> JSON { + try GetAccountBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetAccountBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetAccountBatchError: \(error)" } } } @@ -548,17 +572,21 @@ public class Users { } /// The GetAccountError union - public enum GetAccountError: CustomStringConvertible { + public enum GetAccountError: CustomStringConvertible, JSONRepresentable { /// The specified accountId in GetAccountArg does not exist. case noAccount /// An unspecified error. case other + func json() throws -> JSON { + try GetAccountErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try GetAccountErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for GetAccountError: \(error)" } } } @@ -597,7 +625,7 @@ public class Users { } /// The IndividualSpaceAllocation struct - public class IndividualSpaceAllocation: CustomStringConvertible { + public class IndividualSpaceAllocation: CustomStringConvertible, JSONRepresentable { /// The total space allocated to the user's account (bytes). public let allocated: UInt64 public init(allocated: UInt64) { @@ -605,11 +633,15 @@ public class Users { self.allocated = allocated } + func json() throws -> JSON { + try IndividualSpaceAllocationSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try IndividualSpaceAllocationSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for IndividualSpaceAllocation: \(error)" } } } @@ -635,7 +667,7 @@ public class Users { } /// Representations for a person's name to assist with internationalization. - public class Name: CustomStringConvertible { + public class Name: CustomStringConvertible, JSONRepresentable { /// Also known as a first name. public let givenName: String /// Also known as a last name or family name. @@ -660,11 +692,15 @@ public class Users { self.abbreviatedName = abbreviatedName } + func json() throws -> JSON { + try NameSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try NameSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for Name: \(error)" } } } @@ -698,7 +734,7 @@ public class Users { } /// The value for paperAsFiles in UserFeature. - public enum PaperAsFilesValue: CustomStringConvertible { + public enum PaperAsFilesValue: CustomStringConvertible, JSONRepresentable { /// When this value is true, the user's Paper docs are accessible in Dropbox with the .paper extension and must /// be accessed via the /files endpoints. When this value is false, the user's Paper docs are stored /// separate from Dropbox files and folders and should be accessed via the /paper endpoints. @@ -706,11 +742,15 @@ public class Users { /// An unspecified error. case other + func json() throws -> JSON { + try PaperAsFilesValueSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try PaperAsFilesValueSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for PaperAsFilesValue: \(error)" } } } @@ -750,7 +790,7 @@ public class Users { } /// Space is allocated differently based on the type of account. - public enum SpaceAllocation: CustomStringConvertible { + public enum SpaceAllocation: CustomStringConvertible, JSONRepresentable { /// The user's space allocation applies only to their individual account. case individual(Users.IndividualSpaceAllocation) /// The user shares space with other members of their team. @@ -758,11 +798,15 @@ public class Users { /// An unspecified error. case other + func json() throws -> JSON { + try SpaceAllocationSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SpaceAllocationSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SpaceAllocation: \(error)" } } } @@ -809,7 +853,7 @@ public class Users { } /// Information about a user's space usage and quota. - public class SpaceUsage: CustomStringConvertible { + public class SpaceUsage: CustomStringConvertible, JSONRepresentable { /// The user's total space usage (bytes). public let used: UInt64 /// The user's space allocation. @@ -820,11 +864,15 @@ public class Users { self.allocation = allocation } + func json() throws -> JSON { + try SpaceUsageSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try SpaceUsageSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for SpaceUsage: \(error)" } } } @@ -852,7 +900,7 @@ public class Users { } /// The TeamSpaceAllocation struct - public class TeamSpaceAllocation: CustomStringConvertible { + public class TeamSpaceAllocation: CustomStringConvertible, JSONRepresentable { /// The total space currently used by the user's team (bytes). public let used: UInt64 /// The total space allocated to the user's team (bytes). @@ -882,11 +930,15 @@ public class Users { self.userWithinTeamSpaceUsedCached = userWithinTeamSpaceUsedCached } + func json() throws -> JSON { + try TeamSpaceAllocationSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try TeamSpaceAllocationSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for TeamSpaceAllocation: \(error)" } } } @@ -927,7 +979,7 @@ public class Users { } /// A set of features that a Dropbox User account may have configured. - public enum UserFeature: CustomStringConvertible { + public enum UserFeature: CustomStringConvertible, JSONRepresentable { /// This feature contains information about how the user's Paper files are stored. case paperAsFiles /// This feature allows users to lock files in order to restrict other users from editing them. @@ -935,11 +987,15 @@ public class Users { /// An unspecified error. case other + func json() throws -> JSON { + try UserFeatureSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserFeatureSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserFeature: \(error)" } } } @@ -984,7 +1040,7 @@ public class Users { } /// Values that correspond to entries in UserFeature. - public enum UserFeatureValue: CustomStringConvertible { + public enum UserFeatureValue: CustomStringConvertible, JSONRepresentable { /// An unspecified error. case paperAsFiles(Users.PaperAsFilesValue) /// An unspecified error. @@ -992,11 +1048,15 @@ public class Users { /// An unspecified error. case other + func json() throws -> JSON { + try UserFeatureValueSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserFeatureValueSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserFeatureValue: \(error)" } } } @@ -1043,7 +1103,7 @@ public class Users { } /// The UserFeaturesGetValuesBatchArg struct - public class UserFeaturesGetValuesBatchArg: CustomStringConvertible { + public class UserFeaturesGetValuesBatchArg: CustomStringConvertible, JSONRepresentable { /// A list of features in UserFeature. If the list is empty, this route will return /// UserFeaturesGetValuesBatchError. public let features: [Users.UserFeature] @@ -1051,11 +1111,15 @@ public class Users { self.features = features } + func json() throws -> JSON { + try UserFeaturesGetValuesBatchArgSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserFeaturesGetValuesBatchArgSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserFeaturesGetValuesBatchArg: \(error)" } } } @@ -1081,17 +1145,21 @@ public class Users { } /// The UserFeaturesGetValuesBatchError union - public enum UserFeaturesGetValuesBatchError: CustomStringConvertible { + public enum UserFeaturesGetValuesBatchError: CustomStringConvertible, JSONRepresentable { /// At least one UserFeature must be included in the UserFeaturesGetValuesBatchArg.features list. case emptyFeaturesList /// An unspecified error. case other + func json() throws -> JSON { + try UserFeaturesGetValuesBatchErrorSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserFeaturesGetValuesBatchErrorSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserFeaturesGetValuesBatchError: \(error)" } } } @@ -1130,18 +1198,22 @@ public class Users { } /// The UserFeaturesGetValuesBatchResult struct - public class UserFeaturesGetValuesBatchResult: CustomStringConvertible { + public class UserFeaturesGetValuesBatchResult: CustomStringConvertible, JSONRepresentable { /// (no description) public let values: [Users.UserFeatureValue] public init(values: [Users.UserFeatureValue]) { self.values = values } + func json() throws -> JSON { + try UserFeaturesGetValuesBatchResultSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try UserFeaturesGetValuesBatchResultSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for UserFeaturesGetValuesBatchResult: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/UsersCommon.swift b/Source/SwiftyDropbox/Shared/Generated/UsersCommon.swift index 42eb0300..d9bb2f58 100644 --- a/Source/SwiftyDropbox/Shared/Generated/UsersCommon.swift +++ b/Source/SwiftyDropbox/Shared/Generated/UsersCommon.swift @@ -9,7 +9,7 @@ import Foundation /// Datatypes and serializers for the users_common namespace public class UsersCommon { /// What type of account this user has. - public enum AccountType: CustomStringConvertible { + public enum AccountType: CustomStringConvertible, JSONRepresentable { /// The basic account type. case basic /// The Dropbox Pro account type. @@ -17,11 +17,15 @@ public class UsersCommon { /// The Dropbox Business account type. case business + func json() throws -> JSON { + try AccountTypeSerializer().serialize(self) + } + public var description: String { do { return "\(SerializeUtil.prepareJSONForSerialization(try AccountTypeSerializer().serialize(self)))" } catch { - return "\(self)" + return "Failed to generate description for AccountType: \(error)" } } } diff --git a/Source/SwiftyDropbox/Shared/Generated/UsersRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/UsersRoutes.swift index c1b52676..7c3abd37 100644 --- a/Source/SwiftyDropbox/Shared/Generated/UsersRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/UsersRoutes.swift @@ -8,9 +8,9 @@ import Foundation /// Routes for the users namespace /// For Objective-C compatible routes see DBUsersRoutes -public class UsersRoutes { +public class UsersRoutes: DropboxTransportClientOwning { public let client: DropboxTransportClient - init(client: DropboxTransportClient) { + required init(client: DropboxTransportClient) { self.client = client } diff --git a/Source/SwiftyDropbox/Shared/Handwritten/MockApiRequest.swift b/Source/SwiftyDropbox/Shared/Handwritten/MockApiRequest.swift index 251380b9..5e6e1387 100644 --- a/Source/SwiftyDropbox/Shared/Handwritten/MockApiRequest.swift +++ b/Source/SwiftyDropbox/Shared/Handwritten/MockApiRequest.swift @@ -74,6 +74,25 @@ extension MockApiRequest { func handleMockInput(_ mockInput: MockInput) throws { try _handleMockInput(mockInput) } + + func handleMockInput(_ mockInput: MockInputWithModel) throws { + var mappedInput: MockInput + + switch mockInput { + case .none: + mappedInput = .none + case .success(let model): + mappedInput = .success(json: try MockingUtilities.jsonObject(from: model)) + case .downloadSuccess(let model, let downloadLocation): + mappedInput = .downloadSuccess(json: try MockingUtilities.jsonObject(from: model), downloadLocation: downloadLocation) + case .requestError(let model, let code): + mappedInput = .requestError(json: try MockingUtilities.jsonObject(from: model), code: code) + case .routeError(let model): + mappedInput = .success(json: try MockingUtilities.jsonObject(from: model)) + } + + try _handleMockInput(mappedInput) + } } enum MockApiRequestError: Error { diff --git a/Source/SwiftyDropbox/Shared/Handwritten/MockDropboxTransportClient.swift b/Source/SwiftyDropbox/Shared/Handwritten/MockDropboxTransportClient.swift index 443abc05..7ba2959f 100644 --- a/Source/SwiftyDropbox/Shared/Handwritten/MockDropboxTransportClient.swift +++ b/Source/SwiftyDropbox/Shared/Handwritten/MockDropboxTransportClient.swift @@ -4,6 +4,29 @@ import Foundation +protocol DropboxTransportClientOwning { + var client: DropboxTransportClient { get } + init(client: DropboxTransportClient) +} + +protocol JSONRepresentable { + func json() throws -> JSON +} + +enum MockingUtilities { + static func makeRoutesObject(forType: T.Type) -> (T, MockDropboxTransportClient) { + let mockTransportClient = MockDropboxTransportClient() + let namespaceObject = T(client: mockTransportClient) + return (namespaceObject, mockTransportClient) + } + + static func jsonObject(from result: T) throws -> [String: Any] { + let json = try result.json() + let jsonObject = try (SerializeUtil.prepareJSONForSerialization(json) as? [String: Any]).orThrow() + return jsonObject + } +} + class MockDropboxTransportClient: DropboxTransportClient { var identifier: String? let filesAccess: FilesAccess = FilesAccessImpl() diff --git a/Source/SwiftyDropbox/Shared/Handwritten/NetworkSession/Mocks/MockNetworkSession.swift b/Source/SwiftyDropbox/Shared/Handwritten/NetworkSession/Mocks/MockNetworkSession.swift index 267385c9..1fea0b33 100644 --- a/Source/SwiftyDropbox/Shared/Handwritten/NetworkSession/Mocks/MockNetworkSession.swift +++ b/Source/SwiftyDropbox/Shared/Handwritten/NetworkSession/Mocks/MockNetworkSession.swift @@ -89,3 +89,11 @@ enum MockInput { case routeError(json: [String: Any]) case clientError(error: ClientError) } + +enum MockInputWithModel { + case none + case success(model: JSONRepresentable) + case downloadSuccess(model: JSONRepresentable, downloadLocation: URL) + case requestError(model: JSONRepresentable, code: NetworkStatusCode) + case routeError(model: JSONRepresentable) +} diff --git a/Source/SwiftyDropboxUnitTests/TestMockingUtilities.swift b/Source/SwiftyDropboxUnitTests/TestMockingUtilities.swift new file mode 100644 index 00000000..462c95f8 --- /dev/null +++ b/Source/SwiftyDropboxUnitTests/TestMockingUtilities.swift @@ -0,0 +1,91 @@ +/// +/// Copyright (c) 2023 Dropbox, Inc. All rights reserved. +/// + +@testable import SwiftyDropbox +import XCTest + +final class TestMockingUtilities: XCTestCase { + func testExampleModel() throws { + let e = expectation(description: "") + + let (filesRoutes, mockTransportClient) = MockingUtilities.makeRoutesObject(forType: FilesRoutes.self) + let webService = ExampleWebService(routes: filesRoutes) + + webService.getMetadata { result, _ in + XCTAssertNotNil(result) + e.fulfill() + } + + let model: Files.Metadata = Files.FileMetadata( + name: "name", id: "id", clientModified: Date(), serverModified: Date(), rev: "123456789", size: 0 + ) + try mockTransportClient.getLastRequest()?.handleMockInput( + .success(model: model) + ) + + wait(for: [e]) + } + + func testExampleJsonFixture() throws { + let e = expectation(description: "") + + let (filesRoutes, mockTransportClient) = MockingUtilities.makeRoutesObject(forType: FilesRoutes.self) + let webService = ExampleWebService(routes: filesRoutes) + + webService.getMetadata { result, _ in + XCTAssertNotNil(result) + e.fulfill() + } + + let fileMetadataJSON: [String: Any] = + [ + ".tag": "file", + "id": "id", + "server_modified": "2023-12-15T13:43:32Z", + "name": "name", + "size": 0, + "client_modified": "2023-12-15T13:43:32Z", + "rev": "123456789", + "is_downloadable": 1, + ] + try mockTransportClient.getLastRequest()?.handleMockInput( + .success(json: fileMetadataJSON) + ) + + wait(for: [e]) + } + + func testExampleError() throws { + let e = expectation(description: "") + + let (filesRoutes, mockTransportClient) = MockingUtilities.makeRoutesObject(forType: FilesRoutes.self) + let webService = ExampleWebService(routes: filesRoutes) + + webService.getMetadata { _, error in + XCTAssertNotNil(error) + e.fulfill() + } + + let error = Files.GetMetadataError.path(.notFound) + try mockTransportClient.getLastRequest()?.handleMockInput( + .routeError(model: error) + ) + + wait(for: [e]) + } +} + +private class ExampleWebService { + var routes: FilesRoutes + + init(routes: FilesRoutes) { + self.routes = routes + } + + func getMetadata(completion: @escaping (Files.Metadata?, CallError?) -> Void) { + routes.getMetadata(path: "/real/path").response { result, error in + completion(result, error) + } + } +} diff --git a/stone b/stone index a105afeb..f02b6de6 160000 --- a/stone +++ b/stone @@ -1 +1 @@ -Subproject commit a105afeb514d86e8f0891ea5449e1991559f71be +Subproject commit f02b6de60ee36780f8c37216ab765fea21ffbf40