// _____ _ // |_ _| |_ _ _ ___ ___ _ __ __ _ // | | | ' \| '_/ -_) -_) ' \/ _` |_ // |_| |_||_|_| \___\___|_|_|_\__,_(_) // // Threema iOS Client // Copyright (c) 2020 Threema GmbH // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License, version 3, // as published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . import Foundation import SwiftProtobuf // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is // incompatible with the version of SwiftProtobuf to which you are linking. // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} typealias Version = _2 } /// Message type as defined by the Chat Server Protocol. enum D2d_MessageType: SwiftProtobuf.Enum { typealias RawValue = Int /// Invalid message type case invalid // = 0 /// Text message case text // = 1 /// Image message (deprecated, use `FILE_MESSAGE`) case image // = 2 /// Location message case location // = 16 /// Audio message (deprecated, use `FILE_MESSAGE`) case audio // = 20 /// Video message (deprecated, use `FILE_MESSAGE`) case video // = 19 /// File message case file // = 23 /// Create a poll case pollCreate // = 21 /// Cast a vote on a poll case pollVote // = 22 /// Call offer case callOffer // = 96 /// Call answer case callAnswer // = 97 /// Call ICE Candidate case callIceCandidate // = 98 /// Call hangup case callHangup // = 99 /// Call ringing case callRinging // = 100 /// Call missed case callMissed // = 101 /// Delivery receipt case deliveryReceipt // = 128 /// Typing indicator case typingIndicator // = 144 /// Set profile picture of a contact case contactSetProfilePicture // = 24 /// Delete profile picture of a contact case contactDeleteProfilePicture // = 25 /// Request profile picture of a contact case contactRequestProfilePicture // = 26 /// Create a group case groupCreate // = 74 /// Rename a group case groupRename // = 75 /// Leave a group case groupLeave // = 76 /// Set a group's profile picture case groupSetProfilePicture // = 80 /// Delete a group's profile picture case groupDeleteProfilePicture // = 84 /// Request group synchronisation case groupRequestSync // = 81 /// Group text message case groupText // = 65 /// Group location message case groupLocation // = 66 /// Group image message case groupImage // = 67 /// Group audio message case groupAudio // = 69 /// Group video message case groupVideo // = 68 /// Group file message case groupFile // = 70 /// Create a group poll case groupPollCreate // = 82 /// Cast a vote on a group poll case groupPollVote // = 83 case UNRECOGNIZED(Int) init() { self = .invalid } init?(rawValue: Int) { switch rawValue { case 0: self = .invalid case 1: self = .text case 2: self = .image case 16: self = .location case 19: self = .video case 20: self = .audio case 21: self = .pollCreate case 22: self = .pollVote case 23: self = .file case 24: self = .contactSetProfilePicture case 25: self = .contactDeleteProfilePicture case 26: self = .contactRequestProfilePicture case 65: self = .groupText case 66: self = .groupLocation case 67: self = .groupImage case 68: self = .groupVideo case 69: self = .groupAudio case 70: self = .groupFile case 74: self = .groupCreate case 75: self = .groupRename case 76: self = .groupLeave case 80: self = .groupSetProfilePicture case 81: self = .groupRequestSync case 82: self = .groupPollCreate case 83: self = .groupPollVote case 84: self = .groupDeleteProfilePicture case 96: self = .callOffer case 97: self = .callAnswer case 98: self = .callIceCandidate case 99: self = .callHangup case 100: self = .callRinging case 101: self = .callMissed case 128: self = .deliveryReceipt case 144: self = .typingIndicator default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .invalid: return 0 case .text: return 1 case .image: return 2 case .location: return 16 case .video: return 19 case .audio: return 20 case .pollCreate: return 21 case .pollVote: return 22 case .file: return 23 case .contactSetProfilePicture: return 24 case .contactDeleteProfilePicture: return 25 case .contactRequestProfilePicture: return 26 case .groupText: return 65 case .groupLocation: return 66 case .groupImage: return 67 case .groupVideo: return 68 case .groupAudio: return 69 case .groupFile: return 70 case .groupCreate: return 74 case .groupRename: return 75 case .groupLeave: return 76 case .groupSetProfilePicture: return 80 case .groupRequestSync: return 81 case .groupPollCreate: return 82 case .groupPollVote: return 83 case .groupDeleteProfilePicture: return 84 case .callOffer: return 96 case .callAnswer: return 97 case .callIceCandidate: return 98 case .callHangup: return 99 case .callRinging: return 100 case .callMissed: return 101 case .deliveryReceipt: return 128 case .typingIndicator: return 144 case .UNRECOGNIZED(let i): return i } } } #if swift(>=4.2) extension D2d_MessageType: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MessageType] = [ .invalid, .text, .image, .location, .audio, .video, .file, .pollCreate, .pollVote, .callOffer, .callAnswer, .callIceCandidate, .callHangup, .callRinging, .callMissed, .deliveryReceipt, .typingIndicator, .contactSetProfilePicture, .contactDeleteProfilePicture, .contactRequestProfilePicture, .groupCreate, .groupRename, .groupLeave, .groupSetProfilePicture, .groupDeleteProfilePicture, .groupRequestSync, .groupText, .groupLocation, .groupImage, .groupAudio, .groupVideo, .groupFile, .groupPollCreate, .groupPollVote, ] } #endif // swift(>=4.2) /// Initial data sent to a device that wants to participate in the device /// group (i.e. a new device to be added by the user). struct D2d_InitialData { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Threema Safe Backup var backup: Safe_Backup { get {return _backup ?? Safe_Backup()} set {_backup = newValue} } /// Returns true if `backup` has been explicitly set. var hasBackup: Bool {return self._backup != nil} /// Clears the value of `backup`. Subsequent reads from it will return its default value. mutating func clearBackup() {self._backup = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _backup: Safe_Backup? = nil } /// Data shared across all devices and transmitted during the handshake. struct D2d_SharedDeviceData { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Random amount of padding, ignored by the receiver var padding: Data = SwiftProtobuf.Internal.emptyData /// MDM parameters to be applied on all devices var mdmParameters: D2d_MdmParameters { get {return _mdmParameters ?? D2d_MdmParameters()} set {_mdmParameters = newValue} } /// Returns true if `mdmParameters` has been explicitly set. var hasMdmParameters: Bool {return self._mdmParameters != nil} /// Clears the value of `mdmParameters`. Subsequent reads from it will return its default value. mutating func clearMdmParameters() {self._mdmParameters = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _mdmParameters: D2d_MdmParameters? = nil } /// Metadata about a device, determined by the device itself. struct D2d_DeviceInfo { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Random amount of padding, ignored by the receiver var padding: Data = SwiftProtobuf.Internal.emptyData var platform: D2d_DeviceInfo.Platform = .unspecified /// App version var appVersion: String = String() /// Device description (smartphone model / browser) var description_p: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() /// Platform enum Platform: SwiftProtobuf.Enum { typealias RawValue = Int /// Unknown platform case unspecified // = 0 /// Android case android // = 1 /// Apple iOS case ios // = 2 /// Web application case web // = 3 case UNRECOGNIZED(Int) init() { self = .unspecified } init?(rawValue: Int) { switch rawValue { case 0: self = .unspecified case 1: self = .android case 2: self = .ios case 3: self = .web default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .unspecified: return 0 case .android: return 1 case .ios: return 2 case .web: return 3 case .UNRECOGNIZED(let i): return i } } } init() {} } #if swift(>=4.2) extension D2d_DeviceInfo.Platform: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_DeviceInfo.Platform] = [ .unspecified, .android, .ios, .web, ] } #endif // swift(>=4.2) /// A transaction scope. Used in the d2m transaction messages. struct D2d_TransactionScope { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. var scope: D2d_TransactionScope.Scope = .userProfileSync var unknownFields = SwiftProtobuf.UnknownStorage() enum Scope: SwiftProtobuf.Enum { typealias RawValue = Int case userProfileSync // = 0 case contactSync // = 1 case groupSync // = 2 case distributionListSync // = 3 case settingsSync // = 4 case UNRECOGNIZED(Int) init() { self = .userProfileSync } init?(rawValue: Int) { switch rawValue { case 0: self = .userProfileSync case 1: self = .contactSync case 2: self = .groupSync case 3: self = .distributionListSync case 4: self = .settingsSync default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .userProfileSync: return 0 case .contactSync: return 1 case .groupSync: return 2 case .distributionListSync: return 3 case .settingsSync: return 4 case .UNRECOGNIZED(let i): return i } } } init() {} } #if swift(>=4.2) extension D2d_TransactionScope.Scope: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_TransactionScope.Scope] = [ .userProfileSync, .contactSync, .groupSync, .distributionListSync, .settingsSync, ] } #endif // swift(>=4.2) /// Root message struct D2d_Envelope { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Random amount of padding, ignored by the receiver var padding: Data = SwiftProtobuf.Internal.emptyData /// The enveloped reflected message var content: D2d_Envelope.OneOf_Content? = nil var outgoingMessage: D2d_OutgoingMessage { get { if case .outgoingMessage(let v)? = content {return v} return D2d_OutgoingMessage() } set {content = .outgoingMessage(newValue)} } var incomingMessage: D2d_IncomingMessage { get { if case .incomingMessage(let v)? = content {return v} return D2d_IncomingMessage() } set {content = .incomingMessage(newValue)} } var userProfileSync: D2d_UserProfileSync { get { if case .userProfileSync(let v)? = content {return v} return D2d_UserProfileSync() } set {content = .userProfileSync(newValue)} } var contactSync: D2d_ContactSync { get { if case .contactSync(let v)? = content {return v} return D2d_ContactSync() } set {content = .contactSync(newValue)} } var groupSync: D2d_GroupSync { get { if case .groupSync(let v)? = content {return v} return D2d_GroupSync() } set {content = .groupSync(newValue)} } var distributionListSync: D2d_DistributionListSync { get { if case .distributionListSync(let v)? = content {return v} return D2d_DistributionListSync() } set {content = .distributionListSync(newValue)} } var settingsSync: D2d_SettingsSync { get { if case .settingsSync(let v)? = content {return v} return D2d_SettingsSync() } set {content = .settingsSync(newValue)} } var mdmParameters: D2d_MdmParameters { get { if case .mdmParameters(let v)? = content {return v} return D2d_MdmParameters() } set {content = .mdmParameters(newValue)} } var unknownFields = SwiftProtobuf.UnknownStorage() /// The enveloped reflected message enum OneOf_Content: Equatable { case outgoingMessage(D2d_OutgoingMessage) case incomingMessage(D2d_IncomingMessage) case userProfileSync(D2d_UserProfileSync) case contactSync(D2d_ContactSync) case groupSync(D2d_GroupSync) case distributionListSync(D2d_DistributionListSync) case settingsSync(D2d_SettingsSync) case mdmParameters(D2d_MdmParameters) #if !swift(>=4.1) static func ==(lhs: D2d_Envelope.OneOf_Content, rhs: D2d_Envelope.OneOf_Content) -> Bool { switch (lhs, rhs) { case (.outgoingMessage(let l), .outgoingMessage(let r)): return l == r case (.incomingMessage(let l), .incomingMessage(let r)): return l == r case (.userProfileSync(let l), .userProfileSync(let r)): return l == r case (.contactSync(let l), .contactSync(let r)): return l == r case (.groupSync(let l), .groupSync(let r)): return l == r case (.distributionListSync(let l), .distributionListSync(let r)): return l == r case (.settingsSync(let l), .settingsSync(let r)): return l == r case (.mdmParameters(let l), .mdmParameters(let r)): return l == r default: return false } } #endif } init() {} } /// Mobile device management parameters shared across Threema Work devices. /// /// More detailed parameter information is available here: /// https://work.threema.ch/en/docs/mdm_configuration struct D2d_MdmParameters { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Username required for activation of the app /// References: `th_license_username` var licenseUsername: OneOf_LicenseUsername? { get {return _storage._licenseUsername} set {_uniqueStorage()._licenseUsername = newValue} } var licenseUsernameValue: String { get { if case .licenseUsernameValue(let v)? = _storage._licenseUsername {return v} return String() } set {_uniqueStorage()._licenseUsername = .licenseUsernameValue(newValue)} } /// Password required for activation of the app /// References: `th_license_password` var licensePassword: OneOf_LicensePassword? { get {return _storage._licensePassword} set {_uniqueStorage()._licensePassword = newValue} } var licensePasswordValue: String { get { if case .licensePasswordValue(let v)? = _storage._licensePassword {return v} return String() } set {_uniqueStorage()._licensePassword = .licensePasswordValue(newValue)} } /// Nickname to be used /// References: `th_nickname` var nickname: OneOf_Nickname? { get {return _storage._nickname} set {_uniqueStorage()._nickname = newValue} } var nicknameValue: String { get { if case .nicknameValue(let v)? = _storage._nickname {return v} return String() } set {_uniqueStorage()._nickname = .nicknameValue(newValue)} } /// First name of the user /// References: `th_firstname` var firstName: OneOf_FirstName? { get {return _storage._firstName} set {_uniqueStorage()._firstName = newValue} } var firstNameValue: String { get { if case .firstNameValue(let v)? = _storage._firstName {return v} return String() } set {_uniqueStorage()._firstName = .firstNameValue(newValue)} } /// Last name of the user /// References: `th_lastname` var lastName: OneOf_LastName? { get {return _storage._lastName} set {_uniqueStorage()._lastName = newValue} } var lastNameValue: String { get { if case .lastNameValue(let v)? = _storage._lastName {return v} return String() } set {_uniqueStorage()._lastName = .lastNameValue(newValue)} } /// Customer specific identifier /// References: `th_csi` var customerSpecificID: OneOf_CustomerSpecificID? { get {return _storage._customerSpecificID} set {_uniqueStorage()._customerSpecificID = newValue} } var customerSpecificIDValue: String { get { if case .customerSpecificIDValue(let v)? = _storage._customerSpecificID {return v} return String() } set {_uniqueStorage()._customerSpecificID = .customerSpecificIDValue(newValue)} } /// User category /// References: `th_category` var category: OneOf_Category? { get {return _storage._category} set {_uniqueStorage()._category = newValue} } var categoryValue: String { get { if case .categoryValue(let v)? = _storage._category {return v} return String() } set {_uniqueStorage()._category = .categoryValue(newValue)} } /// Email address linked to the ID /// References: `th_linked_email` var linkedEmail: OneOf_LinkedEmail? { get {return _storage._linkedEmail} set {_uniqueStorage()._linkedEmail = newValue} } var linkedEmailValue: String { get { if case .linkedEmailValue(let v)? = _storage._linkedEmail {return v} return String() } set {_uniqueStorage()._linkedEmail = .linkedEmailValue(newValue)} } /// Phone number linked to the ID /// References: `th_linked_phone` var linkedPhone: OneOf_LinkedPhone? { get {return _storage._linkedPhone} set {_uniqueStorage()._linkedPhone = newValue} } var linkedPhoneValue: String { get { if case .linkedPhoneValue(let v)? = _storage._linkedPhone {return v} return String() } set {_uniqueStorage()._linkedPhone = .linkedPhoneValue(newValue)} } /// Restore a Threema ID /// References: `th_id_backup` var identityRestore: OneOf_IdentityRestore? { get {return _storage._identityRestore} set {_uniqueStorage()._identityRestore = newValue} } var identityRestoreValue: String { get { if case .identityRestoreValue(let v)? = _storage._identityRestore {return v} return String() } set {_uniqueStorage()._identityRestore = .identityRestoreValue(newValue)} } /// Password for restoring a Threema ID /// References: `th_id_backup_password` var identityRestorePassword: OneOf_IdentityRestorePassword? { get {return _storage._identityRestorePassword} set {_uniqueStorage()._identityRestorePassword = newValue} } var identityRestorePasswordValue: String { get { if case .identityRestorePasswordValue(let v)? = _storage._identityRestorePassword {return v} return String() } set {_uniqueStorage()._identityRestorePassword = .identityRestorePasswordValue(newValue)} } var threemaSafePolicy: D2d_MdmParameters.ThreemaSafePolicy { get {return _storage._threemaSafePolicy} set {_uniqueStorage()._threemaSafePolicy = newValue} } /// Threema Safe password (predefined) /// References: `th_safe_password` var threemaSafePassword: OneOf_ThreemaSafePassword? { get {return _storage._threemaSafePassword} set {_uniqueStorage()._threemaSafePassword = newValue} } var threemaSafePasswordValue: String { get { if case .threemaSafePasswordValue(let v)? = _storage._threemaSafePassword {return v} return String() } set {_uniqueStorage()._threemaSafePassword = .threemaSafePasswordValue(newValue)} } /// Threema Safe password pattern /// References: `th_safe_password_pattern` var threemaSafePasswordPattern: OneOf_ThreemaSafePasswordPattern? { get {return _storage._threemaSafePasswordPattern} set {_uniqueStorage()._threemaSafePasswordPattern = newValue} } var threemaSafePasswordPatternValue: String { get { if case .threemaSafePasswordPatternValue(let v)? = _storage._threemaSafePasswordPattern {return v} return String() } set {_uniqueStorage()._threemaSafePasswordPattern = .threemaSafePasswordPatternValue(newValue)} } /// Threema Safe password pattern error (mismatch) message /// References: `th_safe_password_message` var threemaSafePasswordPatternErrorMessage: OneOf_ThreemaSafePasswordPatternErrorMessage? { get {return _storage._threemaSafePasswordPatternErrorMessage} set {_uniqueStorage()._threemaSafePasswordPatternErrorMessage = newValue} } var threemaSafePasswordPatternErrorMessageValue: String { get { if case .threemaSafePasswordPatternErrorMessageValue(let v)? = _storage._threemaSafePasswordPatternErrorMessage {return v} return String() } set {_uniqueStorage()._threemaSafePasswordPatternErrorMessage = .threemaSafePasswordPatternErrorMessageValue(newValue)} } /// Threema Safe server URL /// References: `th_safe_server_url` var threemaSafeServerURL: OneOf_ThreemaSafeServerURL? { get {return _storage._threemaSafeServerURL} set {_uniqueStorage()._threemaSafeServerURL = newValue} } var threemaSafeServerURLValue: String { get { if case .threemaSafeServerURLValue(let v)? = _storage._threemaSafeServerURL {return v} return String() } set {_uniqueStorage()._threemaSafeServerURL = .threemaSafeServerURLValue(newValue)} } /// Threema Safe server username for authentication /// References: `th_safe_server_username` var threemaSafeServerUsername: OneOf_ThreemaSafeServerUsername? { get {return _storage._threemaSafeServerUsername} set {_uniqueStorage()._threemaSafeServerUsername = newValue} } var threemaSafeServerUsernameValue: String { get { if case .threemaSafeServerUsernameValue(let v)? = _storage._threemaSafeServerUsername {return v} return String() } set {_uniqueStorage()._threemaSafeServerUsername = .threemaSafeServerUsernameValue(newValue)} } /// Threema Safe server password for authentication /// References: `th_safe_server_password` var threemaSafeServerPassword: OneOf_ThreemaSafeServerPassword? { get {return _storage._threemaSafeServerPassword} set {_uniqueStorage()._threemaSafeServerPassword = newValue} } var threemaSafeServerPasswordValue: String { get { if case .threemaSafeServerPasswordValue(let v)? = _storage._threemaSafeServerPassword {return v} return String() } set {_uniqueStorage()._threemaSafeServerPassword = .threemaSafeServerPasswordValue(newValue)} } var threemaSafeRestorePolicy: D2d_MdmParameters.ThreemaSafeRestorePolicy { get {return _storage._threemaSafeRestorePolicy} set {_uniqueStorage()._threemaSafeRestorePolicy = newValue} } /// Threema ID to be restored from Threema Safe /// References: `th_safe_restore_id` var threemaSafeRestoreIdentity: OneOf_ThreemaSafeRestoreIdentity? { get {return _storage._threemaSafeRestoreIdentity} set {_uniqueStorage()._threemaSafeRestoreIdentity = newValue} } var threemaSafeRestoreIdentityValue: String { get { if case .threemaSafeRestoreIdentityValue(let v)? = _storage._threemaSafeRestoreIdentity {return v} return String() } set {_uniqueStorage()._threemaSafeRestoreIdentity = .threemaSafeRestoreIdentityValue(newValue)} } var overridePolicy: D2d_MdmParameters.OverridePolicy { get {return _storage._overridePolicy} set {_uniqueStorage()._overridePolicy = newValue} } var contactSyncPolicy: D2d_MdmParameters.ContactSyncPolicy { get {return _storage._contactSyncPolicy} set {_uniqueStorage()._contactSyncPolicy = newValue} } var inactiveIdentityDisplayPolicy: D2d_MdmParameters.InactiveIdentityDisplayPolicy { get {return _storage._inactiveIdentityDisplayPolicy} set {_uniqueStorage()._inactiveIdentityDisplayPolicy = newValue} } var unknownContactPolicy: D2d_MdmParameters.UnknownContactPolicy { get {return _storage._unknownContactPolicy} set {_uniqueStorage()._unknownContactPolicy = newValue} } var autoSaveMediaPolicy: D2d_MdmParameters.AutoSaveMediaPolicy { get {return _storage._autoSaveMediaPolicy} set {_uniqueStorage()._autoSaveMediaPolicy = newValue} } var screenshotPolicy: D2d_MdmParameters.ScreenshotPolicy { get {return _storage._screenshotPolicy} set {_uniqueStorage()._screenshotPolicy = newValue} } var addContactPolicy: D2d_MdmParameters.AddContactPolicy { get {return _storage._addContactPolicy} set {_uniqueStorage()._addContactPolicy = newValue} } var chatExportPolicy: D2d_MdmParameters.ChatExportPolicy { get {return _storage._chatExportPolicy} set {_uniqueStorage()._chatExportPolicy = newValue} } var backupPolicy: D2d_MdmParameters.BackupPolicy { get {return _storage._backupPolicy} set {_uniqueStorage()._backupPolicy = newValue} } var identityExportPolicy: D2d_MdmParameters.IdentityExportPolicy { get {return _storage._identityExportPolicy} set {_uniqueStorage()._identityExportPolicy = newValue} } var dataBackupPolicy: D2d_MdmParameters.DataBackupPolicy { get {return _storage._dataBackupPolicy} set {_uniqueStorage()._dataBackupPolicy = newValue} } var systemBackupPolicy: D2d_MdmParameters.SystemBackupPolicy { get {return _storage._systemBackupPolicy} set {_uniqueStorage()._systemBackupPolicy = newValue} } var messagePreviewPolicy: D2d_MdmParameters.MessagePreviewPolicy { get {return _storage._messagePreviewPolicy} set {_uniqueStorage()._messagePreviewPolicy = newValue} } var profilePictureSharePolicy: D2d_MdmParameters.ProfilePictureSharePolicy { get {return _storage._profilePictureSharePolicy} set {_uniqueStorage()._profilePictureSharePolicy = newValue} } var callPolicy: D2d_MdmParameters.CallPolicy { get {return _storage._callPolicy} set {_uniqueStorage()._callPolicy = newValue} } var setupWizardPolicy: D2d_MdmParameters.SetupWizardPolicy { get {return _storage._setupWizardPolicy} set {_uniqueStorage()._setupWizardPolicy = newValue} } var createGroupPolicy: D2d_MdmParameters.CreateGroupPolicy { get {return _storage._createGroupPolicy} set {_uniqueStorage()._createGroupPolicy = newValue} } var shareMediaPolicy: D2d_MdmParameters.ShareMediaPolicy { get {return _storage._shareMediaPolicy} set {_uniqueStorage()._shareMediaPolicy = newValue} } var unknownFields = SwiftProtobuf.UnknownStorage() /// Username required for activation of the app /// References: `th_license_username` enum OneOf_LicenseUsername: Equatable { case licenseUsernameValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_LicenseUsername, rhs: D2d_MdmParameters.OneOf_LicenseUsername) -> Bool { switch (lhs, rhs) { case (.licenseUsernameValue(let l), .licenseUsernameValue(let r)): return l == r } } #endif } /// Password required for activation of the app /// References: `th_license_password` enum OneOf_LicensePassword: Equatable { case licensePasswordValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_LicensePassword, rhs: D2d_MdmParameters.OneOf_LicensePassword) -> Bool { switch (lhs, rhs) { case (.licensePasswordValue(let l), .licensePasswordValue(let r)): return l == r } } #endif } /// Nickname to be used /// References: `th_nickname` enum OneOf_Nickname: Equatable { case nicknameValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_Nickname, rhs: D2d_MdmParameters.OneOf_Nickname) -> Bool { switch (lhs, rhs) { case (.nicknameValue(let l), .nicknameValue(let r)): return l == r } } #endif } /// First name of the user /// References: `th_firstname` enum OneOf_FirstName: Equatable { case firstNameValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_FirstName, rhs: D2d_MdmParameters.OneOf_FirstName) -> Bool { switch (lhs, rhs) { case (.firstNameValue(let l), .firstNameValue(let r)): return l == r } } #endif } /// Last name of the user /// References: `th_lastname` enum OneOf_LastName: Equatable { case lastNameValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_LastName, rhs: D2d_MdmParameters.OneOf_LastName) -> Bool { switch (lhs, rhs) { case (.lastNameValue(let l), .lastNameValue(let r)): return l == r } } #endif } /// Customer specific identifier /// References: `th_csi` enum OneOf_CustomerSpecificID: Equatable { case customerSpecificIDValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_CustomerSpecificID, rhs: D2d_MdmParameters.OneOf_CustomerSpecificID) -> Bool { switch (lhs, rhs) { case (.customerSpecificIDValue(let l), .customerSpecificIDValue(let r)): return l == r } } #endif } /// User category /// References: `th_category` enum OneOf_Category: Equatable { case categoryValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_Category, rhs: D2d_MdmParameters.OneOf_Category) -> Bool { switch (lhs, rhs) { case (.categoryValue(let l), .categoryValue(let r)): return l == r } } #endif } /// Email address linked to the ID /// References: `th_linked_email` enum OneOf_LinkedEmail: Equatable { case linkedEmailValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_LinkedEmail, rhs: D2d_MdmParameters.OneOf_LinkedEmail) -> Bool { switch (lhs, rhs) { case (.linkedEmailValue(let l), .linkedEmailValue(let r)): return l == r } } #endif } /// Phone number linked to the ID /// References: `th_linked_phone` enum OneOf_LinkedPhone: Equatable { case linkedPhoneValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_LinkedPhone, rhs: D2d_MdmParameters.OneOf_LinkedPhone) -> Bool { switch (lhs, rhs) { case (.linkedPhoneValue(let l), .linkedPhoneValue(let r)): return l == r } } #endif } /// Restore a Threema ID /// References: `th_id_backup` enum OneOf_IdentityRestore: Equatable { case identityRestoreValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_IdentityRestore, rhs: D2d_MdmParameters.OneOf_IdentityRestore) -> Bool { switch (lhs, rhs) { case (.identityRestoreValue(let l), .identityRestoreValue(let r)): return l == r } } #endif } /// Password for restoring a Threema ID /// References: `th_id_backup_password` enum OneOf_IdentityRestorePassword: Equatable { case identityRestorePasswordValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_IdentityRestorePassword, rhs: D2d_MdmParameters.OneOf_IdentityRestorePassword) -> Bool { switch (lhs, rhs) { case (.identityRestorePasswordValue(let l), .identityRestorePasswordValue(let r)): return l == r } } #endif } /// Threema Safe password (predefined) /// References: `th_safe_password` enum OneOf_ThreemaSafePassword: Equatable { case threemaSafePasswordValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafePassword, rhs: D2d_MdmParameters.OneOf_ThreemaSafePassword) -> Bool { switch (lhs, rhs) { case (.threemaSafePasswordValue(let l), .threemaSafePasswordValue(let r)): return l == r } } #endif } /// Threema Safe password pattern /// References: `th_safe_password_pattern` enum OneOf_ThreemaSafePasswordPattern: Equatable { case threemaSafePasswordPatternValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafePasswordPattern, rhs: D2d_MdmParameters.OneOf_ThreemaSafePasswordPattern) -> Bool { switch (lhs, rhs) { case (.threemaSafePasswordPatternValue(let l), .threemaSafePasswordPatternValue(let r)): return l == r } } #endif } /// Threema Safe password pattern error (mismatch) message /// References: `th_safe_password_message` enum OneOf_ThreemaSafePasswordPatternErrorMessage: Equatable { case threemaSafePasswordPatternErrorMessageValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafePasswordPatternErrorMessage, rhs: D2d_MdmParameters.OneOf_ThreemaSafePasswordPatternErrorMessage) -> Bool { switch (lhs, rhs) { case (.threemaSafePasswordPatternErrorMessageValue(let l), .threemaSafePasswordPatternErrorMessageValue(let r)): return l == r } } #endif } /// Threema Safe server URL /// References: `th_safe_server_url` enum OneOf_ThreemaSafeServerURL: Equatable { case threemaSafeServerURLValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafeServerURL, rhs: D2d_MdmParameters.OneOf_ThreemaSafeServerURL) -> Bool { switch (lhs, rhs) { case (.threemaSafeServerURLValue(let l), .threemaSafeServerURLValue(let r)): return l == r } } #endif } /// Threema Safe server username for authentication /// References: `th_safe_server_username` enum OneOf_ThreemaSafeServerUsername: Equatable { case threemaSafeServerUsernameValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafeServerUsername, rhs: D2d_MdmParameters.OneOf_ThreemaSafeServerUsername) -> Bool { switch (lhs, rhs) { case (.threemaSafeServerUsernameValue(let l), .threemaSafeServerUsernameValue(let r)): return l == r } } #endif } /// Threema Safe server password for authentication /// References: `th_safe_server_password` enum OneOf_ThreemaSafeServerPassword: Equatable { case threemaSafeServerPasswordValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafeServerPassword, rhs: D2d_MdmParameters.OneOf_ThreemaSafeServerPassword) -> Bool { switch (lhs, rhs) { case (.threemaSafeServerPasswordValue(let l), .threemaSafeServerPasswordValue(let r)): return l == r } } #endif } /// Threema ID to be restored from Threema Safe /// References: `th_safe_restore_id` enum OneOf_ThreemaSafeRestoreIdentity: Equatable { case threemaSafeRestoreIdentityValue(String) #if !swift(>=4.1) static func ==(lhs: D2d_MdmParameters.OneOf_ThreemaSafeRestoreIdentity, rhs: D2d_MdmParameters.OneOf_ThreemaSafeRestoreIdentity) -> Bool { switch (lhs, rhs) { case (.threemaSafeRestoreIdentityValue(let l), .threemaSafeRestoreIdentityValue(let r)): return l == r } } #endif } /// Threema Safe configuration /// References: `th_safe_enable` enum ThreemaSafePolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Configurable by the user case safeOptional // = 0 /// Forcibly enabled case safeMandatory // = 1 /// Forcibly disabled case safeDisabled // = 2 case UNRECOGNIZED(Int) init() { self = .safeOptional } init?(rawValue: Int) { switch rawValue { case 0: self = .safeOptional case 1: self = .safeMandatory case 2: self = .safeDisabled default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .safeOptional: return 0 case .safeMandatory: return 1 case .safeDisabled: return 2 case .UNRECOGNIZED(let i): return i } } } /// Restore policy for restoring from a Threema Safe backup /// References: `th_safe_restore_enable` enum ThreemaSafeRestorePolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Choosable by the user case safeRestoreOptional // = 0 /// Automatic restore case safeRestoreMandatory // = 1 /// Forcibly disabled case safeRestoreDisabled // = 2 case UNRECOGNIZED(Int) init() { self = .safeRestoreOptional } init?(rawValue: Int) { switch rawValue { case 0: self = .safeRestoreOptional case 1: self = .safeRestoreMandatory case 2: self = .safeRestoreDisabled default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .safeRestoreOptional: return 0 case .safeRestoreMandatory: return 1 case .safeRestoreDisabled: return 2 case .UNRECOGNIZED(let i): return i } } } /// Override policy in regards to MDM parameters (profile, settings, ...) /// References: `th_readonly_profile` enum OverridePolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allows the user to override some of the MDM parameter presets case loose // = 0 /// The user may not override any MDM parameter presets case strict // = 1 case UNRECOGNIZED(Int) init() { self = .loose } init?(rawValue: Int) { switch rawValue { case 0: self = .loose case 1: self = .strict default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .loose: return 0 case .strict: return 1 case .UNRECOGNIZED(let i): return i } } } /// Contact synchronisation policy /// References: `th_contact_sync` enum ContactSyncPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Not synced case notSynced // = 0 /// Synced case sync // = 1 case UNRECOGNIZED(Int) init() { self = .notSynced } init?(rawValue: Int) { switch rawValue { case 0: self = .notSynced case 1: self = .sync default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .notSynced: return 0 case .sync: return 1 case .UNRECOGNIZED(let i): return i } } } /// Inactive Threema ID display policy /// References: `th_hide_inactive_ids` enum InactiveIdentityDisplayPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Show inactive IDs case showInactive // = 0 /// Hide inactive IDs case hideInactive // = 1 case UNRECOGNIZED(Int) init() { self = .showInactive } init?(rawValue: Int) { switch rawValue { case 0: self = .showInactive case 1: self = .hideInactive default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .showInactive: return 0 case .hideInactive: return 1 case .UNRECOGNIZED(let i): return i } } } /// Unknown contacts policy /// References: `th_block_unknown` enum UnknownContactPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allowed to contact the user case allowUnknown // = 0 /// Will be blocked by the user case blockUnknown // = 1 case UNRECOGNIZED(Int) init() { self = .allowUnknown } init?(rawValue: Int) { switch rawValue { case 0: self = .allowUnknown case 1: self = .blockUnknown default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowUnknown: return 0 case .blockUnknown: return 1 case .UNRECOGNIZED(let i): return i } } } /// Auto-save media policy /// References: `th_disable_save_to_gallery` enum AutoSaveMediaPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow auto-saving, configurable by the user case allowAutoSave // = 0 /// Deny auto-saving case denyAutoSave // = 1 case UNRECOGNIZED(Int) init() { self = .allowAutoSave } init?(rawValue: Int) { switch rawValue { case 0: self = .allowAutoSave case 1: self = .denyAutoSave default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowAutoSave: return 0 case .denyAutoSave: return 1 case .UNRECOGNIZED(let i): return i } } } /// Screenshot policy /// References: `th_disable_screenshots` enum ScreenshotPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow taking screenshots case allowScreenshot // = 0 /// Deny taking screenshots, if possible case denyScreenshot // = 1 case UNRECOGNIZED(Int) init() { self = .allowScreenshot } init?(rawValue: Int) { switch rawValue { case 0: self = .allowScreenshot case 1: self = .denyScreenshot default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowScreenshot: return 0 case .denyScreenshot: return 1 case .UNRECOGNIZED(let i): return i } } } /// Add contact policy /// References: `th_disable_add_contact` enum AddContactPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow manually adding contacts case allowAddContact // = 0 /// Deny manually adding contacts case denyAddContact // = 1 case UNRECOGNIZED(Int) init() { self = .allowAddContact } init?(rawValue: Int) { switch rawValue { case 0: self = .allowAddContact case 1: self = .denyAddContact default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowAddContact: return 0 case .denyAddContact: return 1 case .UNRECOGNIZED(let i): return i } } } /// Chat export policy /// References: `th_disable_export` enum ChatExportPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow exporting chats case allowChatExport // = 0 /// Deny exporting of chats case denyChatExport // = 1 case UNRECOGNIZED(Int) init() { self = .allowChatExport } init?(rawValue: Int) { switch rawValue { case 0: self = .allowChatExport case 1: self = .denyChatExport default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowChatExport: return 0 case .denyChatExport: return 1 case .UNRECOGNIZED(let i): return i } } } /// Backup policy /// References: `th_disable_backups` enum BackupPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Generally allow backups to be made case allowBackup // = 0 /// Deny creating backups case denyBackup // = 1 case UNRECOGNIZED(Int) init() { self = .allowBackup } init?(rawValue: Int) { switch rawValue { case 0: self = .allowBackup case 1: self = .denyBackup default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowBackup: return 0 case .denyBackup: return 1 case .UNRECOGNIZED(let i): return i } } } /// Threema ID export policy /// References: `th_disable_id_export` enum IdentityExportPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow exporting of the Threema ID case allowIdentityExport // = 0 /// Deny exporting of the Threema ID case denyIdentityExport // = 1 case UNRECOGNIZED(Int) init() { self = .allowIdentityExport } init?(rawValue: Int) { switch rawValue { case 0: self = .allowIdentityExport case 1: self = .denyIdentityExport default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowIdentityExport: return 0 case .denyIdentityExport: return 1 case .UNRECOGNIZED(let i): return i } } } /// Data backup policy /// References: `th_disable_data_backups` enum DataBackupPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow creating data backups case allowDataBackup // = 0 /// Deny creating data backups case denyDataBackup // = 1 case UNRECOGNIZED(Int) init() { self = .allowDataBackup } init?(rawValue: Int) { switch rawValue { case 0: self = .allowDataBackup case 1: self = .denyDataBackup default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowDataBackup: return 0 case .denyDataBackup: return 1 case .UNRECOGNIZED(let i): return i } } } /// System backup policy /// References: `th_disable_system_backups` enum SystemBackupPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// The system may include app data case allowSystemBackup // = 0 /// The system is denied from including app data case denySystemBackup // = 1 case UNRECOGNIZED(Int) init() { self = .allowSystemBackup } init?(rawValue: Int) { switch rawValue { case 0: self = .allowSystemBackup case 1: self = .denySystemBackup default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowSystemBackup: return 0 case .denySystemBackup: return 1 case .UNRECOGNIZED(let i): return i } } } /// Message preview (in notifications) /// References: `th_disable_message_preview` enum MessagePreviewPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow showing a message preview case allowPreview // = 0 /// Deny showing a message preview case denyPreview // = 1 case UNRECOGNIZED(Int) init() { self = .allowPreview } init?(rawValue: Int) { switch rawValue { case 0: self = .allowPreview case 1: self = .denyPreview default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowPreview: return 0 case .denyPreview: return 1 case .UNRECOGNIZED(let i): return i } } } /// Profile picture sharing policy /// References: `th_disable_send_profile_picture` enum ProfilePictureSharePolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow the profile picture to be shared with contacts case allowShare // = 0 /// Denied from sharing the profile picture with contacts case denyShare // = 1 case UNRECOGNIZED(Int) init() { self = .allowShare } init?(rawValue: Int) { switch rawValue { case 0: self = .allowShare case 1: self = .denyShare default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowShare: return 0 case .denyShare: return 1 case .UNRECOGNIZED(let i): return i } } } /// Threema Call policy /// References: `th_disable_calls` enum CallPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow creating/receiving Threema Calls case allowCall // = 0 /// Denied from creating/receiving any Threema Calls case denyCall // = 1 case UNRECOGNIZED(Int) init() { self = .allowCall } init?(rawValue: Int) { switch rawValue { case 0: self = .allowCall case 1: self = .denyCall default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowCall: return 0 case .denyCall: return 1 case .UNRECOGNIZED(let i): return i } } } /// Setup wizard policy /// References: `th_skip_wizard` enum SetupWizardPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Show the setup wizard case showWizard // = 0 /// Skip the setup wizard (restores an ID or a backup and sets up the /// profile automatically). case skipWizard // = 1 case UNRECOGNIZED(Int) init() { self = .showWizard } init?(rawValue: Int) { switch rawValue { case 0: self = .showWizard case 1: self = .skipWizard default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .showWizard: return 0 case .skipWizard: return 1 case .UNRECOGNIZED(let i): return i } } } /// Group creation policy /// References: `th_disable_create_group` enum CreateGroupPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow manually creating groups case allowCreateGroup // = 0 /// Deny manually creating groups case denyCreateGroup // = 1 case UNRECOGNIZED(Int) init() { self = .allowCreateGroup } init?(rawValue: Int) { switch rawValue { case 0: self = .allowCreateGroup case 1: self = .denyCreateGroup default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowCreateGroup: return 0 case .denyCreateGroup: return 1 case .UNRECOGNIZED(let i): return i } } } /// Share media policy /// References: `th_disable_share_media` enum ShareMediaPolicy: SwiftProtobuf.Enum { typealias RawValue = Int /// Allow unrestricted sharing of media case allowShareMedia // = 0 /// Deny sharing of media outside of Threema, if possible case denyOutsideApp // = 1 case UNRECOGNIZED(Int) init() { self = .allowShareMedia } init?(rawValue: Int) { switch rawValue { case 0: self = .allowShareMedia case 1: self = .denyOutsideApp default: self = .UNRECOGNIZED(rawValue) } } var rawValue: Int { switch self { case .allowShareMedia: return 0 case .denyOutsideApp: return 1 case .UNRECOGNIZED(let i): return i } } } init() {} fileprivate var _storage = _StorageClass.defaultInstance } #if swift(>=4.2) extension D2d_MdmParameters.ThreemaSafePolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.ThreemaSafePolicy] = [ .safeOptional, .safeMandatory, .safeDisabled, ] } extension D2d_MdmParameters.ThreemaSafeRestorePolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.ThreemaSafeRestorePolicy] = [ .safeRestoreOptional, .safeRestoreMandatory, .safeRestoreDisabled, ] } extension D2d_MdmParameters.OverridePolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.OverridePolicy] = [ .loose, .strict, ] } extension D2d_MdmParameters.ContactSyncPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.ContactSyncPolicy] = [ .notSynced, .sync, ] } extension D2d_MdmParameters.InactiveIdentityDisplayPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.InactiveIdentityDisplayPolicy] = [ .showInactive, .hideInactive, ] } extension D2d_MdmParameters.UnknownContactPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.UnknownContactPolicy] = [ .allowUnknown, .blockUnknown, ] } extension D2d_MdmParameters.AutoSaveMediaPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.AutoSaveMediaPolicy] = [ .allowAutoSave, .denyAutoSave, ] } extension D2d_MdmParameters.ScreenshotPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.ScreenshotPolicy] = [ .allowScreenshot, .denyScreenshot, ] } extension D2d_MdmParameters.AddContactPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.AddContactPolicy] = [ .allowAddContact, .denyAddContact, ] } extension D2d_MdmParameters.ChatExportPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.ChatExportPolicy] = [ .allowChatExport, .denyChatExport, ] } extension D2d_MdmParameters.BackupPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.BackupPolicy] = [ .allowBackup, .denyBackup, ] } extension D2d_MdmParameters.IdentityExportPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.IdentityExportPolicy] = [ .allowIdentityExport, .denyIdentityExport, ] } extension D2d_MdmParameters.DataBackupPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.DataBackupPolicy] = [ .allowDataBackup, .denyDataBackup, ] } extension D2d_MdmParameters.SystemBackupPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.SystemBackupPolicy] = [ .allowSystemBackup, .denySystemBackup, ] } extension D2d_MdmParameters.MessagePreviewPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.MessagePreviewPolicy] = [ .allowPreview, .denyPreview, ] } extension D2d_MdmParameters.ProfilePictureSharePolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.ProfilePictureSharePolicy] = [ .allowShare, .denyShare, ] } extension D2d_MdmParameters.CallPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.CallPolicy] = [ .allowCall, .denyCall, ] } extension D2d_MdmParameters.SetupWizardPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.SetupWizardPolicy] = [ .showWizard, .skipWizard, ] } extension D2d_MdmParameters.CreateGroupPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.CreateGroupPolicy] = [ .allowCreateGroup, .denyCreateGroup, ] } extension D2d_MdmParameters.ShareMediaPolicy: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. static var allCases: [D2d_MdmParameters.ShareMediaPolicy] = [ .allowShareMedia, .denyOutsideApp, ] } #endif // swift(>=4.2) /// A message receiver can be a single user or a group. struct D2d_MessageReceiver { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// The recipient's Threema ID or a group identity. var receiver: D2d_MessageReceiver.OneOf_Receiver? = nil var identity: String { get { if case .identity(let v)? = receiver {return v} return String() } set {receiver = .identity(newValue)} } var group: Common_GroupIdentity { get { if case .group(let v)? = receiver {return v} return Common_GroupIdentity() } set {receiver = .group(newValue)} } var unknownFields = SwiftProtobuf.UnknownStorage() /// The recipient's Threema ID or a group identity. enum OneOf_Receiver: Equatable { case identity(String) case group(Common_GroupIdentity) #if !swift(>=4.1) static func ==(lhs: D2d_MessageReceiver.OneOf_Receiver, rhs: D2d_MessageReceiver.OneOf_Receiver) -> Bool { switch (lhs, rhs) { case (.identity(let l), .identity(let r)): return l == r case (.group(let l), .group(let r)): return l == r default: return false } } #endif } init() {} } /// An outgoing message, reflected to other devices. struct D2d_OutgoingMessage { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Recipient of the enclosed message. /// /// Note: If the receiver is a group identity, group and group creator id of /// the enclosed message must match the values of the supplied group /// identity. Otherwise, the message must be considered invalid. var receiver: D2d_MessageReceiver { get {return _receiver ?? D2d_MessageReceiver()} set {_receiver = newValue} } /// Returns true if `receiver` has been explicitly set. var hasReceiver: Bool {return self._receiver != nil} /// Clears the value of `receiver`. Subsequent reads from it will return its default value. mutating func clearReceiver() {self._receiver = nil} /// Unique ID of the enclosed message var messageID: UInt64 = 0 /// Unix-ish timestamp in milliseconds for when the message has been created var createdAt: UInt64 = 0 /// Enclosed message's type var type: D2d_MessageType = .invalid /// The message's body as defined for `Message` (0x01/0x02) of the Chat /// Server Protocol. var body: Data = SwiftProtobuf.Internal.emptyData var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _receiver: D2d_MessageReceiver? = nil } /// An outgoing message has been delivered to the chat server. /// /// Note: This indicates that the message has been successfully stored in the /// message queue of the server. It does NOT indicate that the message has /// been delivered to the intended receiver. struct D2d_OutgoingMessageDelivered { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Recipient of the delivered message. var receiver: D2d_MessageReceiver { get {return _receiver ?? D2d_MessageReceiver()} set {_receiver = newValue} } /// Returns true if `receiver` has been explicitly set. var hasReceiver: Bool {return self._receiver != nil} /// Clears the value of `receiver`. Subsequent reads from it will return its default value. mutating func clearReceiver() {self._receiver = nil} /// Unique ID of the delivered message var messageID: UInt64 = 0 var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _receiver: D2d_MessageReceiver? = nil } /// An incoming message, reflected to other devices. struct D2d_IncomingMessage { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Sender's Threema ID var senderIdentity: String = String() /// Sender's public nickname var senderNickname: String = String() /// Unique ID of the enclosed message var messageID: UInt64 = 0 /// Unix-ish timestamp in milliseconds for when the message has been created var createdAt: UInt64 = 0 /// Enclosed message's type var type: D2d_MessageType = .invalid /// The message's body as defined for `Message` (0x01/0x02) of the Chat /// Server Protocol. var body: Data = SwiftProtobuf.Internal.emptyData var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } /// User profile synchronisation message. struct D2d_UserProfileSync { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Synchronisation type var action: D2d_UserProfileSync.OneOf_Action? = nil var set: D2d_UserProfileSync.Set { get { if case .set(let v)? = action {return v} return D2d_UserProfileSync.Set() } set {action = .set(newValue)} } var unknownFields = SwiftProtobuf.UnknownStorage() /// Synchronisation type enum OneOf_Action: Equatable { case set(D2d_UserProfileSync.Set) #if !swift(>=4.1) static func ==(lhs: D2d_UserProfileSync.OneOf_Action, rhs: D2d_UserProfileSync.OneOf_Action) -> Bool { switch (lhs, rhs) { case (.set(let l), .set(let r)): return l == r } } #endif } /// Update the user's profile struct Set { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. var userProfile: Safe_UserProfile { get {return _userProfile ?? Safe_UserProfile()} set {_userProfile = newValue} } /// Returns true if `userProfile` has been explicitly set. var hasUserProfile: Bool {return self._userProfile != nil} /// Clears the value of `userProfile`. Subsequent reads from it will return its default value. mutating func clearUserProfile() {self._userProfile = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _userProfile: Safe_UserProfile? = nil } init() {} } /// Contact synchronisation message. struct D2d_ContactSync { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Synchronisation type var action: D2d_ContactSync.OneOf_Action? = nil var set: D2d_ContactSync.Set { get { if case .set(let v)? = action {return v} return D2d_ContactSync.Set() } set {action = .set(newValue)} } var delete: D2d_ContactSync.Delete { get { if case .delete(let v)? = action {return v} return D2d_ContactSync.Delete() } set {action = .delete(newValue)} } var unknownFields = SwiftProtobuf.UnknownStorage() /// Synchronisation type enum OneOf_Action: Equatable { case set(D2d_ContactSync.Set) case delete(D2d_ContactSync.Delete) #if !swift(>=4.1) static func ==(lhs: D2d_ContactSync.OneOf_Action, rhs: D2d_ContactSync.OneOf_Action) -> Bool { switch (lhs, rhs) { case (.set(let l), .set(let r)): return l == r case (.delete(let l), .delete(let r)): return l == r default: return false } } #endif } /// Set a Threema contact struct Set { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. var contact: Safe_Contact { get {return _contact ?? Safe_Contact()} set {_contact = newValue} } /// Returns true if `contact` has been explicitly set. var hasContact: Bool {return self._contact != nil} /// Clears the value of `contact`. Subsequent reads from it will return its default value. mutating func clearContact() {self._contact = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _contact: Safe_Contact? = nil } /// Delete a Threema contact struct Delete { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. var deleteIdentity: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } init() {} } /// Group synchronisation message. struct D2d_GroupSync { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Synchronisation type var action: D2d_GroupSync.OneOf_Action? = nil var set: D2d_GroupSync.Set { get { if case .set(let v)? = action {return v} return D2d_GroupSync.Set() } set {action = .set(newValue)} } var delete: D2d_GroupSync.Delete { get { if case .delete(let v)? = action {return v} return D2d_GroupSync.Delete() } set {action = .delete(newValue)} } var unknownFields = SwiftProtobuf.UnknownStorage() /// Synchronisation type enum OneOf_Action: Equatable { case set(D2d_GroupSync.Set) case delete(D2d_GroupSync.Delete) #if !swift(>=4.1) static func ==(lhs: D2d_GroupSync.OneOf_Action, rhs: D2d_GroupSync.OneOf_Action) -> Bool { switch (lhs, rhs) { case (.set(let l), .set(let r)): return l == r case (.delete(let l), .delete(let r)): return l == r default: return false } } #endif } /// Set a group struct Set { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. var group: Safe_Group { get {return _group ?? Safe_Group()} set {_group = newValue} } /// Returns true if `group` has been explicitly set. var hasGroup: Bool {return self._group != nil} /// Clears the value of `group`. Subsequent reads from it will return its default value. mutating func clearGroup() {self._group = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _group: Safe_Group? = nil } /// Delete a group struct Delete { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Unique group identity var groupIdentity: Common_GroupIdentity { get {return _groupIdentity ?? Common_GroupIdentity()} set {_groupIdentity = newValue} } /// Returns true if `groupIdentity` has been explicitly set. var hasGroupIdentity: Bool {return self._groupIdentity != nil} /// Clears the value of `groupIdentity`. Subsequent reads from it will return its default value. mutating func clearGroupIdentity() {self._groupIdentity = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _groupIdentity: Common_GroupIdentity? = nil } init() {} } /// Distribution list synchronisation message. struct D2d_DistributionListSync { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Synchronisation type var action: D2d_DistributionListSync.OneOf_Action? = nil var set: D2d_DistributionListSync.Set { get { if case .set(let v)? = action {return v} return D2d_DistributionListSync.Set() } set {action = .set(newValue)} } var delete: D2d_DistributionListSync.Delete { get { if case .delete(let v)? = action {return v} return D2d_DistributionListSync.Delete() } set {action = .delete(newValue)} } var unknownFields = SwiftProtobuf.UnknownStorage() /// Synchronisation type enum OneOf_Action: Equatable { case set(D2d_DistributionListSync.Set) case delete(D2d_DistributionListSync.Delete) #if !swift(>=4.1) static func ==(lhs: D2d_DistributionListSync.OneOf_Action, rhs: D2d_DistributionListSync.OneOf_Action) -> Bool { switch (lhs, rhs) { case (.set(let l), .set(let r)): return l == r case (.delete(let l), .delete(let r)): return l == r default: return false } } #endif } /// Set a distribution list struct Set { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. var distributionList: Safe_DistributionList { get {return _distributionList ?? Safe_DistributionList()} set {_distributionList = newValue} } /// Returns true if `distributionList` has been explicitly set. var hasDistributionList: Bool {return self._distributionList != nil} /// Clears the value of `distributionList`. Subsequent reads from it will return its default value. mutating func clearDistributionList() {self._distributionList = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _distributionList: Safe_DistributionList? = nil } /// Delete a group struct Delete { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Unique ID of the distribution list var distributionListID: UInt64 = 0 var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } init() {} } /// Settings synchronisation message. struct D2d_SettingsSync { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Synchronisation type var action: D2d_SettingsSync.OneOf_Action? = nil var set: D2d_SettingsSync.Set { get { if case .set(let v)? = action {return v} return D2d_SettingsSync.Set() } set {action = .set(newValue)} } var unknownFields = SwiftProtobuf.UnknownStorage() /// Synchronisation type enum OneOf_Action: Equatable { case set(D2d_SettingsSync.Set) #if !swift(>=4.1) static func ==(lhs: D2d_SettingsSync.OneOf_Action, rhs: D2d_SettingsSync.OneOf_Action) -> Bool { switch (lhs, rhs) { case (.set(let l), .set(let r)): return l == r } } #endif } /// Apply settings struct Set { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. var settings: Safe_Settings { get {return _settings ?? Safe_Settings()} set {_settings = newValue} } /// Returns true if `settings` has been explicitly set. var hasSettings: Bool {return self._settings != nil} /// Clears the value of `settings`. Subsequent reads from it will return its default value. mutating func clearSettings() {self._settings = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _settings: Safe_Settings? = nil } init() {} } // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "d2d" extension D2d_MessageType: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "INVALID"), 1: .same(proto: "TEXT"), 2: .same(proto: "IMAGE"), 16: .same(proto: "LOCATION"), 19: .same(proto: "VIDEO"), 20: .same(proto: "AUDIO"), 21: .same(proto: "POLL_CREATE"), 22: .same(proto: "POLL_VOTE"), 23: .same(proto: "FILE"), 24: .same(proto: "CONTACT_SET_PROFILE_PICTURE"), 25: .same(proto: "CONTACT_DELETE_PROFILE_PICTURE"), 26: .same(proto: "CONTACT_REQUEST_PROFILE_PICTURE"), 65: .same(proto: "GROUP_TEXT"), 66: .same(proto: "GROUP_LOCATION"), 67: .same(proto: "GROUP_IMAGE"), 68: .same(proto: "GROUP_VIDEO"), 69: .same(proto: "GROUP_AUDIO"), 70: .same(proto: "GROUP_FILE"), 74: .same(proto: "GROUP_CREATE"), 75: .same(proto: "GROUP_RENAME"), 76: .same(proto: "GROUP_LEAVE"), 80: .same(proto: "GROUP_SET_PROFILE_PICTURE"), 81: .same(proto: "GROUP_REQUEST_SYNC"), 82: .same(proto: "GROUP_POLL_CREATE"), 83: .same(proto: "GROUP_POLL_VOTE"), 84: .same(proto: "GROUP_DELETE_PROFILE_PICTURE"), 96: .same(proto: "CALL_OFFER"), 97: .same(proto: "CALL_ANSWER"), 98: .same(proto: "CALL_ICE_CANDIDATE"), 99: .same(proto: "CALL_HANGUP"), 100: .same(proto: "CALL_RINGING"), 101: .same(proto: "CALL_MISSED"), 128: .same(proto: "DELIVERY_RECEIPT"), 144: .same(proto: "TYPING_INDICATOR"), ] } extension D2d_InitialData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".InitialData" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "backup"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._backup) default: break } } } func traverse(visitor: inout V) throws { if let v = self._backup { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_InitialData, rhs: D2d_InitialData) -> Bool { if lhs._backup != rhs._backup {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_SharedDeviceData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".SharedDeviceData" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "padding"), 2: .standard(proto: "mdm_parameters"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularBytesField(value: &self.padding) case 2: try decoder.decodeSingularMessageField(value: &self._mdmParameters) default: break } } } func traverse(visitor: inout V) throws { if !self.padding.isEmpty { try visitor.visitSingularBytesField(value: self.padding, fieldNumber: 1) } if let v = self._mdmParameters { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_SharedDeviceData, rhs: D2d_SharedDeviceData) -> Bool { if lhs.padding != rhs.padding {return false} if lhs._mdmParameters != rhs._mdmParameters {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_DeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".DeviceInfo" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "padding"), 2: .same(proto: "platform"), 3: .standard(proto: "app_version"), 4: .same(proto: "description"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularBytesField(value: &self.padding) case 2: try decoder.decodeSingularEnumField(value: &self.platform) case 3: try decoder.decodeSingularStringField(value: &self.appVersion) case 4: try decoder.decodeSingularStringField(value: &self.description_p) default: break } } } func traverse(visitor: inout V) throws { if !self.padding.isEmpty { try visitor.visitSingularBytesField(value: self.padding, fieldNumber: 1) } if self.platform != .unspecified { try visitor.visitSingularEnumField(value: self.platform, fieldNumber: 2) } if !self.appVersion.isEmpty { try visitor.visitSingularStringField(value: self.appVersion, fieldNumber: 3) } if !self.description_p.isEmpty { try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_DeviceInfo, rhs: D2d_DeviceInfo) -> Bool { if lhs.padding != rhs.padding {return false} if lhs.platform != rhs.platform {return false} if lhs.appVersion != rhs.appVersion {return false} if lhs.description_p != rhs.description_p {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_DeviceInfo.Platform: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "UNSPECIFIED"), 1: .same(proto: "ANDROID"), 2: .same(proto: "IOS"), 3: .same(proto: "WEB"), ] } extension D2d_TransactionScope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".TransactionScope" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "scope"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularEnumField(value: &self.scope) default: break } } } func traverse(visitor: inout V) throws { if self.scope != .userProfileSync { try visitor.visitSingularEnumField(value: self.scope, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_TransactionScope, rhs: D2d_TransactionScope) -> Bool { if lhs.scope != rhs.scope {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_TransactionScope.Scope: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "USER_PROFILE_SYNC"), 1: .same(proto: "CONTACT_SYNC"), 2: .same(proto: "GROUP_SYNC"), 3: .same(proto: "DISTRIBUTION_LIST_SYNC"), 4: .same(proto: "SETTINGS_SYNC"), ] } extension D2d_Envelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Envelope" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "padding"), 2: .standard(proto: "outgoing_message"), 3: .standard(proto: "incoming_message"), 4: .standard(proto: "user_profile_sync"), 5: .standard(proto: "contact_sync"), 6: .standard(proto: "group_sync"), 7: .standard(proto: "distribution_list_sync"), 8: .standard(proto: "settings_sync"), 9999: .standard(proto: "mdm_parameters"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularBytesField(value: &self.padding) case 2: var v: D2d_OutgoingMessage? if let current = self.content { try decoder.handleConflictingOneOf() if case .outgoingMessage(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.content = .outgoingMessage(v)} case 3: var v: D2d_IncomingMessage? if let current = self.content { try decoder.handleConflictingOneOf() if case .incomingMessage(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.content = .incomingMessage(v)} case 4: var v: D2d_UserProfileSync? if let current = self.content { try decoder.handleConflictingOneOf() if case .userProfileSync(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.content = .userProfileSync(v)} case 5: var v: D2d_ContactSync? if let current = self.content { try decoder.handleConflictingOneOf() if case .contactSync(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.content = .contactSync(v)} case 6: var v: D2d_GroupSync? if let current = self.content { try decoder.handleConflictingOneOf() if case .groupSync(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.content = .groupSync(v)} case 7: var v: D2d_DistributionListSync? if let current = self.content { try decoder.handleConflictingOneOf() if case .distributionListSync(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.content = .distributionListSync(v)} case 8: var v: D2d_SettingsSync? if let current = self.content { try decoder.handleConflictingOneOf() if case .settingsSync(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.content = .settingsSync(v)} case 9999: var v: D2d_MdmParameters? if let current = self.content { try decoder.handleConflictingOneOf() if case .mdmParameters(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.content = .mdmParameters(v)} default: break } } } func traverse(visitor: inout V) throws { if !self.padding.isEmpty { try visitor.visitSingularBytesField(value: self.padding, fieldNumber: 1) } switch self.content { case .outgoingMessage(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 2) case .incomingMessage(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 3) case .userProfileSync(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 4) case .contactSync(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 5) case .groupSync(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 6) case .distributionListSync(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 7) case .settingsSync(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 8) case .mdmParameters(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 9999) case nil: break } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_Envelope, rhs: D2d_Envelope) -> Bool { if lhs.padding != rhs.padding {return false} if lhs.content != rhs.content {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_MdmParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".MdmParameters" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "license_username_value"), 2: .standard(proto: "license_password_value"), 3: .standard(proto: "nickname_value"), 4: .standard(proto: "first_name_value"), 5: .standard(proto: "last_name_value"), 6: .standard(proto: "customer_specific_id_value"), 7: .standard(proto: "category_value"), 8: .standard(proto: "linked_email_value"), 9: .standard(proto: "linked_phone_value"), 10: .standard(proto: "identity_restore_value"), 11: .standard(proto: "identity_restore_password_value"), 12: .standard(proto: "threema_safe_policy"), 13: .standard(proto: "threema_safe_password_value"), 14: .standard(proto: "threema_safe_password_pattern_value"), 15: .standard(proto: "threema_safe_password_pattern_error_message_value"), 16: .standard(proto: "threema_safe_server_url_value"), 17: .standard(proto: "threema_safe_server_username_value"), 18: .standard(proto: "threema_safe_server_password_value"), 19: .standard(proto: "threema_safe_restore_policy"), 20: .standard(proto: "threema_safe_restore_identity_value"), 21: .standard(proto: "override_policy"), 22: .standard(proto: "contact_sync_policy"), 23: .standard(proto: "inactive_identity_display_policy"), 24: .standard(proto: "unknown_contact_policy"), 25: .standard(proto: "auto_save_media_policy"), 26: .standard(proto: "screenshot_policy"), 27: .standard(proto: "add_contact_policy"), 28: .standard(proto: "chat_export_policy"), 29: .standard(proto: "backup_policy"), 30: .standard(proto: "identity_export_policy"), 31: .standard(proto: "data_backup_policy"), 32: .standard(proto: "system_backup_policy"), 33: .standard(proto: "message_preview_policy"), 34: .standard(proto: "profile_picture_share_policy"), 35: .standard(proto: "call_policy"), 36: .standard(proto: "setup_wizard_policy"), 37: .standard(proto: "create_group_policy"), 38: .standard(proto: "share_media_policy"), ] fileprivate class _StorageClass { var _licenseUsername: D2d_MdmParameters.OneOf_LicenseUsername? var _licensePassword: D2d_MdmParameters.OneOf_LicensePassword? var _nickname: D2d_MdmParameters.OneOf_Nickname? var _firstName: D2d_MdmParameters.OneOf_FirstName? var _lastName: D2d_MdmParameters.OneOf_LastName? var _customerSpecificID: D2d_MdmParameters.OneOf_CustomerSpecificID? var _category: D2d_MdmParameters.OneOf_Category? var _linkedEmail: D2d_MdmParameters.OneOf_LinkedEmail? var _linkedPhone: D2d_MdmParameters.OneOf_LinkedPhone? var _identityRestore: D2d_MdmParameters.OneOf_IdentityRestore? var _identityRestorePassword: D2d_MdmParameters.OneOf_IdentityRestorePassword? var _threemaSafePolicy: D2d_MdmParameters.ThreemaSafePolicy = .safeOptional var _threemaSafePassword: D2d_MdmParameters.OneOf_ThreemaSafePassword? var _threemaSafePasswordPattern: D2d_MdmParameters.OneOf_ThreemaSafePasswordPattern? var _threemaSafePasswordPatternErrorMessage: D2d_MdmParameters.OneOf_ThreemaSafePasswordPatternErrorMessage? var _threemaSafeServerURL: D2d_MdmParameters.OneOf_ThreemaSafeServerURL? var _threemaSafeServerUsername: D2d_MdmParameters.OneOf_ThreemaSafeServerUsername? var _threemaSafeServerPassword: D2d_MdmParameters.OneOf_ThreemaSafeServerPassword? var _threemaSafeRestorePolicy: D2d_MdmParameters.ThreemaSafeRestorePolicy = .safeRestoreOptional var _threemaSafeRestoreIdentity: D2d_MdmParameters.OneOf_ThreemaSafeRestoreIdentity? var _overridePolicy: D2d_MdmParameters.OverridePolicy = .loose var _contactSyncPolicy: D2d_MdmParameters.ContactSyncPolicy = .notSynced var _inactiveIdentityDisplayPolicy: D2d_MdmParameters.InactiveIdentityDisplayPolicy = .showInactive var _unknownContactPolicy: D2d_MdmParameters.UnknownContactPolicy = .allowUnknown var _autoSaveMediaPolicy: D2d_MdmParameters.AutoSaveMediaPolicy = .allowAutoSave var _screenshotPolicy: D2d_MdmParameters.ScreenshotPolicy = .allowScreenshot var _addContactPolicy: D2d_MdmParameters.AddContactPolicy = .allowAddContact var _chatExportPolicy: D2d_MdmParameters.ChatExportPolicy = .allowChatExport var _backupPolicy: D2d_MdmParameters.BackupPolicy = .allowBackup var _identityExportPolicy: D2d_MdmParameters.IdentityExportPolicy = .allowIdentityExport var _dataBackupPolicy: D2d_MdmParameters.DataBackupPolicy = .allowDataBackup var _systemBackupPolicy: D2d_MdmParameters.SystemBackupPolicy = .allowSystemBackup var _messagePreviewPolicy: D2d_MdmParameters.MessagePreviewPolicy = .allowPreview var _profilePictureSharePolicy: D2d_MdmParameters.ProfilePictureSharePolicy = .allowShare var _callPolicy: D2d_MdmParameters.CallPolicy = .allowCall var _setupWizardPolicy: D2d_MdmParameters.SetupWizardPolicy = .showWizard var _createGroupPolicy: D2d_MdmParameters.CreateGroupPolicy = .allowCreateGroup var _shareMediaPolicy: D2d_MdmParameters.ShareMediaPolicy = .allowShareMedia static let defaultInstance = _StorageClass() private init() {} init(copying source: _StorageClass) { _licenseUsername = source._licenseUsername _licensePassword = source._licensePassword _nickname = source._nickname _firstName = source._firstName _lastName = source._lastName _customerSpecificID = source._customerSpecificID _category = source._category _linkedEmail = source._linkedEmail _linkedPhone = source._linkedPhone _identityRestore = source._identityRestore _identityRestorePassword = source._identityRestorePassword _threemaSafePolicy = source._threemaSafePolicy _threemaSafePassword = source._threemaSafePassword _threemaSafePasswordPattern = source._threemaSafePasswordPattern _threemaSafePasswordPatternErrorMessage = source._threemaSafePasswordPatternErrorMessage _threemaSafeServerURL = source._threemaSafeServerURL _threemaSafeServerUsername = source._threemaSafeServerUsername _threemaSafeServerPassword = source._threemaSafeServerPassword _threemaSafeRestorePolicy = source._threemaSafeRestorePolicy _threemaSafeRestoreIdentity = source._threemaSafeRestoreIdentity _overridePolicy = source._overridePolicy _contactSyncPolicy = source._contactSyncPolicy _inactiveIdentityDisplayPolicy = source._inactiveIdentityDisplayPolicy _unknownContactPolicy = source._unknownContactPolicy _autoSaveMediaPolicy = source._autoSaveMediaPolicy _screenshotPolicy = source._screenshotPolicy _addContactPolicy = source._addContactPolicy _chatExportPolicy = source._chatExportPolicy _backupPolicy = source._backupPolicy _identityExportPolicy = source._identityExportPolicy _dataBackupPolicy = source._dataBackupPolicy _systemBackupPolicy = source._systemBackupPolicy _messagePreviewPolicy = source._messagePreviewPolicy _profilePictureSharePolicy = source._profilePictureSharePolicy _callPolicy = source._callPolicy _setupWizardPolicy = source._setupWizardPolicy _createGroupPolicy = source._createGroupPolicy _shareMediaPolicy = source._shareMediaPolicy } } fileprivate mutating func _uniqueStorage() -> _StorageClass { if !isKnownUniquelyReferenced(&_storage) { _storage = _StorageClass(copying: _storage) } return _storage } mutating func decodeMessage(decoder: inout D) throws { _ = _uniqueStorage() try withExtendedLifetime(_storage) { (_storage: _StorageClass) in while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: if _storage._licenseUsername != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._licenseUsername = .licenseUsernameValue(v)} case 2: if _storage._licensePassword != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._licensePassword = .licensePasswordValue(v)} case 3: if _storage._nickname != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._nickname = .nicknameValue(v)} case 4: if _storage._firstName != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._firstName = .firstNameValue(v)} case 5: if _storage._lastName != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._lastName = .lastNameValue(v)} case 6: if _storage._customerSpecificID != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._customerSpecificID = .customerSpecificIDValue(v)} case 7: if _storage._category != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._category = .categoryValue(v)} case 8: if _storage._linkedEmail != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._linkedEmail = .linkedEmailValue(v)} case 9: if _storage._linkedPhone != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._linkedPhone = .linkedPhoneValue(v)} case 10: if _storage._identityRestore != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._identityRestore = .identityRestoreValue(v)} case 11: if _storage._identityRestorePassword != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._identityRestorePassword = .identityRestorePasswordValue(v)} case 12: try decoder.decodeSingularEnumField(value: &_storage._threemaSafePolicy) case 13: if _storage._threemaSafePassword != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._threemaSafePassword = .threemaSafePasswordValue(v)} case 14: if _storage._threemaSafePasswordPattern != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._threemaSafePasswordPattern = .threemaSafePasswordPatternValue(v)} case 15: if _storage._threemaSafePasswordPatternErrorMessage != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._threemaSafePasswordPatternErrorMessage = .threemaSafePasswordPatternErrorMessageValue(v)} case 16: if _storage._threemaSafeServerURL != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._threemaSafeServerURL = .threemaSafeServerURLValue(v)} case 17: if _storage._threemaSafeServerUsername != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._threemaSafeServerUsername = .threemaSafeServerUsernameValue(v)} case 18: if _storage._threemaSafeServerPassword != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._threemaSafeServerPassword = .threemaSafeServerPasswordValue(v)} case 19: try decoder.decodeSingularEnumField(value: &_storage._threemaSafeRestorePolicy) case 20: if _storage._threemaSafeRestoreIdentity != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {_storage._threemaSafeRestoreIdentity = .threemaSafeRestoreIdentityValue(v)} case 21: try decoder.decodeSingularEnumField(value: &_storage._overridePolicy) case 22: try decoder.decodeSingularEnumField(value: &_storage._contactSyncPolicy) case 23: try decoder.decodeSingularEnumField(value: &_storage._inactiveIdentityDisplayPolicy) case 24: try decoder.decodeSingularEnumField(value: &_storage._unknownContactPolicy) case 25: try decoder.decodeSingularEnumField(value: &_storage._autoSaveMediaPolicy) case 26: try decoder.decodeSingularEnumField(value: &_storage._screenshotPolicy) case 27: try decoder.decodeSingularEnumField(value: &_storage._addContactPolicy) case 28: try decoder.decodeSingularEnumField(value: &_storage._chatExportPolicy) case 29: try decoder.decodeSingularEnumField(value: &_storage._backupPolicy) case 30: try decoder.decodeSingularEnumField(value: &_storage._identityExportPolicy) case 31: try decoder.decodeSingularEnumField(value: &_storage._dataBackupPolicy) case 32: try decoder.decodeSingularEnumField(value: &_storage._systemBackupPolicy) case 33: try decoder.decodeSingularEnumField(value: &_storage._messagePreviewPolicy) case 34: try decoder.decodeSingularEnumField(value: &_storage._profilePictureSharePolicy) case 35: try decoder.decodeSingularEnumField(value: &_storage._callPolicy) case 36: try decoder.decodeSingularEnumField(value: &_storage._setupWizardPolicy) case 37: try decoder.decodeSingularEnumField(value: &_storage._createGroupPolicy) case 38: try decoder.decodeSingularEnumField(value: &_storage._shareMediaPolicy) default: break } } } } func traverse(visitor: inout V) throws { try withExtendedLifetime(_storage) { (_storage: _StorageClass) in if case .licenseUsernameValue(let v)? = _storage._licenseUsername { try visitor.visitSingularStringField(value: v, fieldNumber: 1) } if case .licensePasswordValue(let v)? = _storage._licensePassword { try visitor.visitSingularStringField(value: v, fieldNumber: 2) } if case .nicknameValue(let v)? = _storage._nickname { try visitor.visitSingularStringField(value: v, fieldNumber: 3) } if case .firstNameValue(let v)? = _storage._firstName { try visitor.visitSingularStringField(value: v, fieldNumber: 4) } if case .lastNameValue(let v)? = _storage._lastName { try visitor.visitSingularStringField(value: v, fieldNumber: 5) } if case .customerSpecificIDValue(let v)? = _storage._customerSpecificID { try visitor.visitSingularStringField(value: v, fieldNumber: 6) } if case .categoryValue(let v)? = _storage._category { try visitor.visitSingularStringField(value: v, fieldNumber: 7) } if case .linkedEmailValue(let v)? = _storage._linkedEmail { try visitor.visitSingularStringField(value: v, fieldNumber: 8) } if case .linkedPhoneValue(let v)? = _storage._linkedPhone { try visitor.visitSingularStringField(value: v, fieldNumber: 9) } if case .identityRestoreValue(let v)? = _storage._identityRestore { try visitor.visitSingularStringField(value: v, fieldNumber: 10) } if case .identityRestorePasswordValue(let v)? = _storage._identityRestorePassword { try visitor.visitSingularStringField(value: v, fieldNumber: 11) } if _storage._threemaSafePolicy != .safeOptional { try visitor.visitSingularEnumField(value: _storage._threemaSafePolicy, fieldNumber: 12) } if case .threemaSafePasswordValue(let v)? = _storage._threemaSafePassword { try visitor.visitSingularStringField(value: v, fieldNumber: 13) } if case .threemaSafePasswordPatternValue(let v)? = _storage._threemaSafePasswordPattern { try visitor.visitSingularStringField(value: v, fieldNumber: 14) } if case .threemaSafePasswordPatternErrorMessageValue(let v)? = _storage._threemaSafePasswordPatternErrorMessage { try visitor.visitSingularStringField(value: v, fieldNumber: 15) } if case .threemaSafeServerURLValue(let v)? = _storage._threemaSafeServerURL { try visitor.visitSingularStringField(value: v, fieldNumber: 16) } if case .threemaSafeServerUsernameValue(let v)? = _storage._threemaSafeServerUsername { try visitor.visitSingularStringField(value: v, fieldNumber: 17) } if case .threemaSafeServerPasswordValue(let v)? = _storage._threemaSafeServerPassword { try visitor.visitSingularStringField(value: v, fieldNumber: 18) } if _storage._threemaSafeRestorePolicy != .safeRestoreOptional { try visitor.visitSingularEnumField(value: _storage._threemaSafeRestorePolicy, fieldNumber: 19) } if case .threemaSafeRestoreIdentityValue(let v)? = _storage._threemaSafeRestoreIdentity { try visitor.visitSingularStringField(value: v, fieldNumber: 20) } if _storage._overridePolicy != .loose { try visitor.visitSingularEnumField(value: _storage._overridePolicy, fieldNumber: 21) } if _storage._contactSyncPolicy != .notSynced { try visitor.visitSingularEnumField(value: _storage._contactSyncPolicy, fieldNumber: 22) } if _storage._inactiveIdentityDisplayPolicy != .showInactive { try visitor.visitSingularEnumField(value: _storage._inactiveIdentityDisplayPolicy, fieldNumber: 23) } if _storage._unknownContactPolicy != .allowUnknown { try visitor.visitSingularEnumField(value: _storage._unknownContactPolicy, fieldNumber: 24) } if _storage._autoSaveMediaPolicy != .allowAutoSave { try visitor.visitSingularEnumField(value: _storage._autoSaveMediaPolicy, fieldNumber: 25) } if _storage._screenshotPolicy != .allowScreenshot { try visitor.visitSingularEnumField(value: _storage._screenshotPolicy, fieldNumber: 26) } if _storage._addContactPolicy != .allowAddContact { try visitor.visitSingularEnumField(value: _storage._addContactPolicy, fieldNumber: 27) } if _storage._chatExportPolicy != .allowChatExport { try visitor.visitSingularEnumField(value: _storage._chatExportPolicy, fieldNumber: 28) } if _storage._backupPolicy != .allowBackup { try visitor.visitSingularEnumField(value: _storage._backupPolicy, fieldNumber: 29) } if _storage._identityExportPolicy != .allowIdentityExport { try visitor.visitSingularEnumField(value: _storage._identityExportPolicy, fieldNumber: 30) } if _storage._dataBackupPolicy != .allowDataBackup { try visitor.visitSingularEnumField(value: _storage._dataBackupPolicy, fieldNumber: 31) } if _storage._systemBackupPolicy != .allowSystemBackup { try visitor.visitSingularEnumField(value: _storage._systemBackupPolicy, fieldNumber: 32) } if _storage._messagePreviewPolicy != .allowPreview { try visitor.visitSingularEnumField(value: _storage._messagePreviewPolicy, fieldNumber: 33) } if _storage._profilePictureSharePolicy != .allowShare { try visitor.visitSingularEnumField(value: _storage._profilePictureSharePolicy, fieldNumber: 34) } if _storage._callPolicy != .allowCall { try visitor.visitSingularEnumField(value: _storage._callPolicy, fieldNumber: 35) } if _storage._setupWizardPolicy != .showWizard { try visitor.visitSingularEnumField(value: _storage._setupWizardPolicy, fieldNumber: 36) } if _storage._createGroupPolicy != .allowCreateGroup { try visitor.visitSingularEnumField(value: _storage._createGroupPolicy, fieldNumber: 37) } if _storage._shareMediaPolicy != .allowShareMedia { try visitor.visitSingularEnumField(value: _storage._shareMediaPolicy, fieldNumber: 38) } } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_MdmParameters, rhs: D2d_MdmParameters) -> Bool { if lhs._storage !== rhs._storage { let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 let rhs_storage = _args.1 if _storage._licenseUsername != rhs_storage._licenseUsername {return false} if _storage._licensePassword != rhs_storage._licensePassword {return false} if _storage._nickname != rhs_storage._nickname {return false} if _storage._firstName != rhs_storage._firstName {return false} if _storage._lastName != rhs_storage._lastName {return false} if _storage._customerSpecificID != rhs_storage._customerSpecificID {return false} if _storage._category != rhs_storage._category {return false} if _storage._linkedEmail != rhs_storage._linkedEmail {return false} if _storage._linkedPhone != rhs_storage._linkedPhone {return false} if _storage._identityRestore != rhs_storage._identityRestore {return false} if _storage._identityRestorePassword != rhs_storage._identityRestorePassword {return false} if _storage._threemaSafePolicy != rhs_storage._threemaSafePolicy {return false} if _storage._threemaSafePassword != rhs_storage._threemaSafePassword {return false} if _storage._threemaSafePasswordPattern != rhs_storage._threemaSafePasswordPattern {return false} if _storage._threemaSafePasswordPatternErrorMessage != rhs_storage._threemaSafePasswordPatternErrorMessage {return false} if _storage._threemaSafeServerURL != rhs_storage._threemaSafeServerURL {return false} if _storage._threemaSafeServerUsername != rhs_storage._threemaSafeServerUsername {return false} if _storage._threemaSafeServerPassword != rhs_storage._threemaSafeServerPassword {return false} if _storage._threemaSafeRestorePolicy != rhs_storage._threemaSafeRestorePolicy {return false} if _storage._threemaSafeRestoreIdentity != rhs_storage._threemaSafeRestoreIdentity {return false} if _storage._overridePolicy != rhs_storage._overridePolicy {return false} if _storage._contactSyncPolicy != rhs_storage._contactSyncPolicy {return false} if _storage._inactiveIdentityDisplayPolicy != rhs_storage._inactiveIdentityDisplayPolicy {return false} if _storage._unknownContactPolicy != rhs_storage._unknownContactPolicy {return false} if _storage._autoSaveMediaPolicy != rhs_storage._autoSaveMediaPolicy {return false} if _storage._screenshotPolicy != rhs_storage._screenshotPolicy {return false} if _storage._addContactPolicy != rhs_storage._addContactPolicy {return false} if _storage._chatExportPolicy != rhs_storage._chatExportPolicy {return false} if _storage._backupPolicy != rhs_storage._backupPolicy {return false} if _storage._identityExportPolicy != rhs_storage._identityExportPolicy {return false} if _storage._dataBackupPolicy != rhs_storage._dataBackupPolicy {return false} if _storage._systemBackupPolicy != rhs_storage._systemBackupPolicy {return false} if _storage._messagePreviewPolicy != rhs_storage._messagePreviewPolicy {return false} if _storage._profilePictureSharePolicy != rhs_storage._profilePictureSharePolicy {return false} if _storage._callPolicy != rhs_storage._callPolicy {return false} if _storage._setupWizardPolicy != rhs_storage._setupWizardPolicy {return false} if _storage._createGroupPolicy != rhs_storage._createGroupPolicy {return false} if _storage._shareMediaPolicy != rhs_storage._shareMediaPolicy {return false} return true } if !storagesAreEqual {return false} } if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_MdmParameters.ThreemaSafePolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "SAFE_OPTIONAL"), 1: .same(proto: "SAFE_MANDATORY"), 2: .same(proto: "SAFE_DISABLED"), ] } extension D2d_MdmParameters.ThreemaSafeRestorePolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "SAFE_RESTORE_OPTIONAL"), 1: .same(proto: "SAFE_RESTORE_MANDATORY"), 2: .same(proto: "SAFE_RESTORE_DISABLED"), ] } extension D2d_MdmParameters.OverridePolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "LOOSE"), 1: .same(proto: "STRICT"), ] } extension D2d_MdmParameters.ContactSyncPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NOT_SYNCED"), 1: .same(proto: "SYNC"), ] } extension D2d_MdmParameters.InactiveIdentityDisplayPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "SHOW_INACTIVE"), 1: .same(proto: "HIDE_INACTIVE"), ] } extension D2d_MdmParameters.UnknownContactPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_UNKNOWN"), 1: .same(proto: "BLOCK_UNKNOWN"), ] } extension D2d_MdmParameters.AutoSaveMediaPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_AUTO_SAVE"), 1: .same(proto: "DENY_AUTO_SAVE"), ] } extension D2d_MdmParameters.ScreenshotPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_SCREENSHOT"), 1: .same(proto: "DENY_SCREENSHOT"), ] } extension D2d_MdmParameters.AddContactPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_ADD_CONTACT"), 1: .same(proto: "DENY_ADD_CONTACT"), ] } extension D2d_MdmParameters.ChatExportPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_CHAT_EXPORT"), 1: .same(proto: "DENY_CHAT_EXPORT"), ] } extension D2d_MdmParameters.BackupPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_BACKUP"), 1: .same(proto: "DENY_BACKUP"), ] } extension D2d_MdmParameters.IdentityExportPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_IDENTITY_EXPORT"), 1: .same(proto: "DENY_IDENTITY_EXPORT"), ] } extension D2d_MdmParameters.DataBackupPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_DATA_BACKUP"), 1: .same(proto: "DENY_DATA_BACKUP"), ] } extension D2d_MdmParameters.SystemBackupPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_SYSTEM_BACKUP"), 1: .same(proto: "DENY_SYSTEM_BACKUP"), ] } extension D2d_MdmParameters.MessagePreviewPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_PREVIEW"), 1: .same(proto: "DENY_PREVIEW"), ] } extension D2d_MdmParameters.ProfilePictureSharePolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_SHARE"), 1: .same(proto: "DENY_SHARE"), ] } extension D2d_MdmParameters.CallPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_CALL"), 1: .same(proto: "DENY_CALL"), ] } extension D2d_MdmParameters.SetupWizardPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "SHOW_WIZARD"), 1: .same(proto: "SKIP_WIZARD"), ] } extension D2d_MdmParameters.CreateGroupPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_CREATE_GROUP"), 1: .same(proto: "DENY_CREATE_GROUP"), ] } extension D2d_MdmParameters.ShareMediaPolicy: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "ALLOW_SHARE_MEDIA"), 1: .same(proto: "DENY_OUTSIDE_APP"), ] } extension D2d_MessageReceiver: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".MessageReceiver" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "identity"), 2: .same(proto: "group"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: if self.receiver != nil {try decoder.handleConflictingOneOf()} var v: String? try decoder.decodeSingularStringField(value: &v) if let v = v {self.receiver = .identity(v)} case 2: var v: Common_GroupIdentity? if let current = self.receiver { try decoder.handleConflictingOneOf() if case .group(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.receiver = .group(v)} default: break } } } func traverse(visitor: inout V) throws { switch self.receiver { case .identity(let v)?: try visitor.visitSingularStringField(value: v, fieldNumber: 1) case .group(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 2) case nil: break } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_MessageReceiver, rhs: D2d_MessageReceiver) -> Bool { if lhs.receiver != rhs.receiver {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_OutgoingMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".OutgoingMessage" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "receiver"), 2: .standard(proto: "message_id"), 3: .standard(proto: "created_at"), 4: .same(proto: "type"), 5: .same(proto: "body"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._receiver) case 2: try decoder.decodeSingularFixed64Field(value: &self.messageID) case 3: try decoder.decodeSingularUInt64Field(value: &self.createdAt) case 4: try decoder.decodeSingularEnumField(value: &self.type) case 5: try decoder.decodeSingularBytesField(value: &self.body) default: break } } } func traverse(visitor: inout V) throws { if let v = self._receiver { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } if self.messageID != 0 { try visitor.visitSingularFixed64Field(value: self.messageID, fieldNumber: 2) } if self.createdAt != 0 { try visitor.visitSingularUInt64Field(value: self.createdAt, fieldNumber: 3) } if self.type != .invalid { try visitor.visitSingularEnumField(value: self.type, fieldNumber: 4) } if !self.body.isEmpty { try visitor.visitSingularBytesField(value: self.body, fieldNumber: 5) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_OutgoingMessage, rhs: D2d_OutgoingMessage) -> Bool { if lhs._receiver != rhs._receiver {return false} if lhs.messageID != rhs.messageID {return false} if lhs.createdAt != rhs.createdAt {return false} if lhs.type != rhs.type {return false} if lhs.body != rhs.body {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_OutgoingMessageDelivered: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".OutgoingMessageDelivered" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "receiver"), 2: .standard(proto: "message_id"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._receiver) case 2: try decoder.decodeSingularFixed64Field(value: &self.messageID) default: break } } } func traverse(visitor: inout V) throws { if let v = self._receiver { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } if self.messageID != 0 { try visitor.visitSingularFixed64Field(value: self.messageID, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_OutgoingMessageDelivered, rhs: D2d_OutgoingMessageDelivered) -> Bool { if lhs._receiver != rhs._receiver {return false} if lhs.messageID != rhs.messageID {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_IncomingMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".IncomingMessage" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "sender_identity"), 2: .standard(proto: "sender_nickname"), 3: .standard(proto: "message_id"), 4: .standard(proto: "created_at"), 5: .same(proto: "type"), 6: .same(proto: "body"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularStringField(value: &self.senderIdentity) case 2: try decoder.decodeSingularStringField(value: &self.senderNickname) case 3: try decoder.decodeSingularFixed64Field(value: &self.messageID) case 4: try decoder.decodeSingularUInt64Field(value: &self.createdAt) case 5: try decoder.decodeSingularEnumField(value: &self.type) case 6: try decoder.decodeSingularBytesField(value: &self.body) default: break } } } func traverse(visitor: inout V) throws { if !self.senderIdentity.isEmpty { try visitor.visitSingularStringField(value: self.senderIdentity, fieldNumber: 1) } if !self.senderNickname.isEmpty { try visitor.visitSingularStringField(value: self.senderNickname, fieldNumber: 2) } if self.messageID != 0 { try visitor.visitSingularFixed64Field(value: self.messageID, fieldNumber: 3) } if self.createdAt != 0 { try visitor.visitSingularUInt64Field(value: self.createdAt, fieldNumber: 4) } if self.type != .invalid { try visitor.visitSingularEnumField(value: self.type, fieldNumber: 5) } if !self.body.isEmpty { try visitor.visitSingularBytesField(value: self.body, fieldNumber: 6) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_IncomingMessage, rhs: D2d_IncomingMessage) -> Bool { if lhs.senderIdentity != rhs.senderIdentity {return false} if lhs.senderNickname != rhs.senderNickname {return false} if lhs.messageID != rhs.messageID {return false} if lhs.createdAt != rhs.createdAt {return false} if lhs.type != rhs.type {return false} if lhs.body != rhs.body {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_UserProfileSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".UserProfileSync" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "set"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: var v: D2d_UserProfileSync.Set? if let current = self.action { try decoder.handleConflictingOneOf() if case .set(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.action = .set(v)} default: break } } } func traverse(visitor: inout V) throws { if case .set(let v)? = self.action { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_UserProfileSync, rhs: D2d_UserProfileSync) -> Bool { if lhs.action != rhs.action {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_UserProfileSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = D2d_UserProfileSync.protoMessageName + ".Set" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "user_profile"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._userProfile) default: break } } } func traverse(visitor: inout V) throws { if let v = self._userProfile { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_UserProfileSync.Set, rhs: D2d_UserProfileSync.Set) -> Bool { if lhs._userProfile != rhs._userProfile {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_ContactSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ContactSync" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "set"), 2: .same(proto: "delete"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: var v: D2d_ContactSync.Set? if let current = self.action { try decoder.handleConflictingOneOf() if case .set(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.action = .set(v)} case 2: var v: D2d_ContactSync.Delete? if let current = self.action { try decoder.handleConflictingOneOf() if case .delete(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.action = .delete(v)} default: break } } } func traverse(visitor: inout V) throws { switch self.action { case .set(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 1) case .delete(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 2) case nil: break } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_ContactSync, rhs: D2d_ContactSync) -> Bool { if lhs.action != rhs.action {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_ContactSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = D2d_ContactSync.protoMessageName + ".Set" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "contact"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._contact) default: break } } } func traverse(visitor: inout V) throws { if let v = self._contact { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_ContactSync.Set, rhs: D2d_ContactSync.Set) -> Bool { if lhs._contact != rhs._contact {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_ContactSync.Delete: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = D2d_ContactSync.protoMessageName + ".Delete" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "delete_identity"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularStringField(value: &self.deleteIdentity) default: break } } } func traverse(visitor: inout V) throws { if !self.deleteIdentity.isEmpty { try visitor.visitSingularStringField(value: self.deleteIdentity, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_ContactSync.Delete, rhs: D2d_ContactSync.Delete) -> Bool { if lhs.deleteIdentity != rhs.deleteIdentity {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_GroupSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GroupSync" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "set"), 2: .same(proto: "delete"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: var v: D2d_GroupSync.Set? if let current = self.action { try decoder.handleConflictingOneOf() if case .set(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.action = .set(v)} case 2: var v: D2d_GroupSync.Delete? if let current = self.action { try decoder.handleConflictingOneOf() if case .delete(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.action = .delete(v)} default: break } } } func traverse(visitor: inout V) throws { switch self.action { case .set(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 1) case .delete(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 2) case nil: break } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_GroupSync, rhs: D2d_GroupSync) -> Bool { if lhs.action != rhs.action {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_GroupSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = D2d_GroupSync.protoMessageName + ".Set" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "group"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._group) default: break } } } func traverse(visitor: inout V) throws { if let v = self._group { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_GroupSync.Set, rhs: D2d_GroupSync.Set) -> Bool { if lhs._group != rhs._group {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_GroupSync.Delete: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = D2d_GroupSync.protoMessageName + ".Delete" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "group_identity"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._groupIdentity) default: break } } } func traverse(visitor: inout V) throws { if let v = self._groupIdentity { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_GroupSync.Delete, rhs: D2d_GroupSync.Delete) -> Bool { if lhs._groupIdentity != rhs._groupIdentity {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_DistributionListSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".DistributionListSync" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "set"), 2: .same(proto: "delete"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: var v: D2d_DistributionListSync.Set? if let current = self.action { try decoder.handleConflictingOneOf() if case .set(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.action = .set(v)} case 2: var v: D2d_DistributionListSync.Delete? if let current = self.action { try decoder.handleConflictingOneOf() if case .delete(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.action = .delete(v)} default: break } } } func traverse(visitor: inout V) throws { switch self.action { case .set(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 1) case .delete(let v)?: try visitor.visitSingularMessageField(value: v, fieldNumber: 2) case nil: break } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_DistributionListSync, rhs: D2d_DistributionListSync) -> Bool { if lhs.action != rhs.action {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_DistributionListSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = D2d_DistributionListSync.protoMessageName + ".Set" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "distribution_list"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._distributionList) default: break } } } func traverse(visitor: inout V) throws { if let v = self._distributionList { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_DistributionListSync.Set, rhs: D2d_DistributionListSync.Set) -> Bool { if lhs._distributionList != rhs._distributionList {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_DistributionListSync.Delete: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = D2d_DistributionListSync.protoMessageName + ".Delete" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "distribution_list_id"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularFixed64Field(value: &self.distributionListID) default: break } } } func traverse(visitor: inout V) throws { if self.distributionListID != 0 { try visitor.visitSingularFixed64Field(value: self.distributionListID, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_DistributionListSync.Delete, rhs: D2d_DistributionListSync.Delete) -> Bool { if lhs.distributionListID != rhs.distributionListID {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_SettingsSync: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".SettingsSync" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "set"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: var v: D2d_SettingsSync.Set? if let current = self.action { try decoder.handleConflictingOneOf() if case .set(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v {self.action = .set(v)} default: break } } } func traverse(visitor: inout V) throws { if case .set(let v)? = self.action { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_SettingsSync, rhs: D2d_SettingsSync) -> Bool { if lhs.action != rhs.action {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension D2d_SettingsSync.Set: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = D2d_SettingsSync.protoMessageName + ".Set" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "settings"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularMessageField(value: &self._settings) default: break } } } func traverse(visitor: inout V) throws { if let v = self._settings { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: D2d_SettingsSync.Set, rhs: D2d_SettingsSync.Set) -> Bool { if lhs._settings != rhs._settings {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } }