// // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only // // DO NOT EDIT. // swift-format-ignore-file // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: Provisioning.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ // // Copyright 2014 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only /// iOS - since we use a modern proto-compiler, we must specify /// the legacy proto format. 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 } struct ProvisioningProtos_ProvisioningUuid { // 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. /// @required var uuid: String { get {return _uuid ?? String()} set {_uuid = newValue} } /// Returns true if `uuid` has been explicitly set. var hasUuid: Bool {return self._uuid != nil} /// Clears the value of `uuid`. Subsequent reads from it will return its default value. mutating func clearUuid() {self._uuid = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _uuid: String? = nil } struct ProvisioningProtos_ProvisionEnvelope { // 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. /// @required var publicKey: Data { get {return _publicKey ?? Data()} set {_publicKey = newValue} } /// Returns true if `publicKey` has been explicitly set. var hasPublicKey: Bool {return self._publicKey != nil} /// Clears the value of `publicKey`. Subsequent reads from it will return its default value. mutating func clearPublicKey() {self._publicKey = nil} /// @required var body: Data { get {return _body ?? Data()} set {_body = newValue} } /// Returns true if `body` has been explicitly set. var hasBody: Bool {return self._body != nil} /// Clears the value of `body`. Subsequent reads from it will return its default value. mutating func clearBody() {self._body = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _publicKey: Data? = nil fileprivate var _body: Data? = nil } struct ProvisioningProtos_ProvisionMessage { // 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. /// @required var aciIdentityKeyPublic: Data { get {return _aciIdentityKeyPublic ?? Data()} set {_aciIdentityKeyPublic = newValue} } /// Returns true if `aciIdentityKeyPublic` has been explicitly set. var hasAciIdentityKeyPublic: Bool {return self._aciIdentityKeyPublic != nil} /// Clears the value of `aciIdentityKeyPublic`. Subsequent reads from it will return its default value. mutating func clearAciIdentityKeyPublic() {self._aciIdentityKeyPublic = nil} /// @required var aciIdentityKeyPrivate: Data { get {return _aciIdentityKeyPrivate ?? Data()} set {_aciIdentityKeyPrivate = newValue} } /// Returns true if `aciIdentityKeyPrivate` has been explicitly set. var hasAciIdentityKeyPrivate: Bool {return self._aciIdentityKeyPrivate != nil} /// Clears the value of `aciIdentityKeyPrivate`. Subsequent reads from it will return its default value. mutating func clearAciIdentityKeyPrivate() {self._aciIdentityKeyPrivate = nil} /// @required var pniIdentityKeyPublic: Data { get {return _pniIdentityKeyPublic ?? Data()} set {_pniIdentityKeyPublic = newValue} } /// Returns true if `pniIdentityKeyPublic` has been explicitly set. var hasPniIdentityKeyPublic: Bool {return self._pniIdentityKeyPublic != nil} /// Clears the value of `pniIdentityKeyPublic`. Subsequent reads from it will return its default value. mutating func clearPniIdentityKeyPublic() {self._pniIdentityKeyPublic = nil} /// @required var pniIdentityKeyPrivate: Data { get {return _pniIdentityKeyPrivate ?? Data()} set {_pniIdentityKeyPrivate = newValue} } /// Returns true if `pniIdentityKeyPrivate` has been explicitly set. var hasPniIdentityKeyPrivate: Bool {return self._pniIdentityKeyPrivate != nil} /// Clears the value of `pniIdentityKeyPrivate`. Subsequent reads from it will return its default value. mutating func clearPniIdentityKeyPrivate() {self._pniIdentityKeyPrivate = nil} var aci: String { get {return _aci ?? String()} set {_aci = newValue} } /// Returns true if `aci` has been explicitly set. var hasAci: Bool {return self._aci != nil} /// Clears the value of `aci`. Subsequent reads from it will return its default value. mutating func clearAci() {self._aci = nil} var pni: String { get {return _pni ?? String()} set {_pni = newValue} } /// Returns true if `pni` has been explicitly set. var hasPni: Bool {return self._pni != nil} /// Clears the value of `pni`. Subsequent reads from it will return its default value. mutating func clearPni() {self._pni = nil} var number: String { get {return _number ?? String()} set {_number = newValue} } /// Returns true if `number` has been explicitly set. var hasNumber: Bool {return self._number != nil} /// Clears the value of `number`. Subsequent reads from it will return its default value. mutating func clearNumber() {self._number = nil} /// @required var provisioningCode: String { get {return _provisioningCode ?? String()} set {_provisioningCode = newValue} } /// Returns true if `provisioningCode` has been explicitly set. var hasProvisioningCode: Bool {return self._provisioningCode != nil} /// Clears the value of `provisioningCode`. Subsequent reads from it will return its default value. mutating func clearProvisioningCode() {self._provisioningCode = nil} var userAgent: String { get {return _userAgent ?? String()} set {_userAgent = newValue} } /// Returns true if `userAgent` has been explicitly set. var hasUserAgent: Bool {return self._userAgent != nil} /// Clears the value of `userAgent`. Subsequent reads from it will return its default value. mutating func clearUserAgent() {self._userAgent = nil} /// @required var profileKey: Data { get {return _profileKey ?? Data()} set {_profileKey = newValue} } /// Returns true if `profileKey` has been explicitly set. var hasProfileKey: Bool {return self._profileKey != nil} /// Clears the value of `profileKey`. Subsequent reads from it will return its default value. mutating func clearProfileKey() {self._profileKey = nil} var readReceipts: Bool { get {return _readReceipts ?? false} set {_readReceipts = newValue} } /// Returns true if `readReceipts` has been explicitly set. var hasReadReceipts: Bool {return self._readReceipts != nil} /// Clears the value of `readReceipts`. Subsequent reads from it will return its default value. mutating func clearReadReceipts() {self._readReceipts = nil} var provisioningVersion: UInt32 { get {return _provisioningVersion ?? 0} set {_provisioningVersion = newValue} } /// Returns true if `provisioningVersion` has been explicitly set. var hasProvisioningVersion: Bool {return self._provisioningVersion != nil} /// Clears the value of `provisioningVersion`. Subsequent reads from it will return its default value. mutating func clearProvisioningVersion() {self._provisioningVersion = nil} /// NEXT ID: 14 var masterKey: Data { get {return _masterKey ?? Data()} set {_masterKey = newValue} } /// Returns true if `masterKey` has been explicitly set. var hasMasterKey: Bool {return self._masterKey != nil} /// Clears the value of `masterKey`. Subsequent reads from it will return its default value. mutating func clearMasterKey() {self._masterKey = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _aciIdentityKeyPublic: Data? = nil fileprivate var _aciIdentityKeyPrivate: Data? = nil fileprivate var _pniIdentityKeyPublic: Data? = nil fileprivate var _pniIdentityKeyPrivate: Data? = nil fileprivate var _aci: String? = nil fileprivate var _pni: String? = nil fileprivate var _number: String? = nil fileprivate var _provisioningCode: String? = nil fileprivate var _userAgent: String? = nil fileprivate var _profileKey: Data? = nil fileprivate var _readReceipts: Bool? = nil fileprivate var _provisioningVersion: UInt32? = nil fileprivate var _masterKey: Data? = nil } #if swift(>=5.5) && canImport(_Concurrency) extension ProvisioningProtos_ProvisioningUuid: @unchecked Sendable {} extension ProvisioningProtos_ProvisionEnvelope: @unchecked Sendable {} extension ProvisioningProtos_ProvisionMessage: @unchecked Sendable {} #endif // swift(>=5.5) && canImport(_Concurrency) // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "ProvisioningProtos" extension ProvisioningProtos_ProvisioningUuid: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ProvisioningUuid" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "uuid"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self._uuid) }() default: break } } } func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 try { if let v = self._uuid { try visitor.visitSingularStringField(value: v, fieldNumber: 1) } }() try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: ProvisioningProtos_ProvisioningUuid, rhs: ProvisioningProtos_ProvisioningUuid) -> Bool { if lhs._uuid != rhs._uuid {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension ProvisioningProtos_ProvisionEnvelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ProvisionEnvelope" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "publicKey"), 2: .same(proto: "body"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularBytesField(value: &self._publicKey) }() case 2: try { try decoder.decodeSingularBytesField(value: &self._body) }() default: break } } } func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 try { if let v = self._publicKey { try visitor.visitSingularBytesField(value: v, fieldNumber: 1) } }() try { if let v = self._body { try visitor.visitSingularBytesField(value: v, fieldNumber: 2) } }() try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: ProvisioningProtos_ProvisionEnvelope, rhs: ProvisioningProtos_ProvisionEnvelope) -> Bool { if lhs._publicKey != rhs._publicKey {return false} if lhs._body != rhs._body {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension ProvisioningProtos_ProvisionMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ProvisionMessage" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "aciIdentityKeyPublic"), 2: .same(proto: "aciIdentityKeyPrivate"), 11: .same(proto: "pniIdentityKeyPublic"), 12: .same(proto: "pniIdentityKeyPrivate"), 8: .same(proto: "aci"), 10: .same(proto: "pni"), 3: .same(proto: "number"), 4: .same(proto: "provisioningCode"), 5: .same(proto: "userAgent"), 6: .same(proto: "profileKey"), 7: .same(proto: "readReceipts"), 9: .same(proto: "provisioningVersion"), 13: .same(proto: "masterKey"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularBytesField(value: &self._aciIdentityKeyPublic) }() case 2: try { try decoder.decodeSingularBytesField(value: &self._aciIdentityKeyPrivate) }() case 3: try { try decoder.decodeSingularStringField(value: &self._number) }() case 4: try { try decoder.decodeSingularStringField(value: &self._provisioningCode) }() case 5: try { try decoder.decodeSingularStringField(value: &self._userAgent) }() case 6: try { try decoder.decodeSingularBytesField(value: &self._profileKey) }() case 7: try { try decoder.decodeSingularBoolField(value: &self._readReceipts) }() case 8: try { try decoder.decodeSingularStringField(value: &self._aci) }() case 9: try { try decoder.decodeSingularUInt32Field(value: &self._provisioningVersion) }() case 10: try { try decoder.decodeSingularStringField(value: &self._pni) }() case 11: try { try decoder.decodeSingularBytesField(value: &self._pniIdentityKeyPublic) }() case 12: try { try decoder.decodeSingularBytesField(value: &self._pniIdentityKeyPrivate) }() case 13: try { try decoder.decodeSingularBytesField(value: &self._masterKey) }() default: break } } } func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 try { if let v = self._aciIdentityKeyPublic { try visitor.visitSingularBytesField(value: v, fieldNumber: 1) } }() try { if let v = self._aciIdentityKeyPrivate { try visitor.visitSingularBytesField(value: v, fieldNumber: 2) } }() try { if let v = self._number { try visitor.visitSingularStringField(value: v, fieldNumber: 3) } }() try { if let v = self._provisioningCode { try visitor.visitSingularStringField(value: v, fieldNumber: 4) } }() try { if let v = self._userAgent { try visitor.visitSingularStringField(value: v, fieldNumber: 5) } }() try { if let v = self._profileKey { try visitor.visitSingularBytesField(value: v, fieldNumber: 6) } }() try { if let v = self._readReceipts { try visitor.visitSingularBoolField(value: v, fieldNumber: 7) } }() try { if let v = self._aci { try visitor.visitSingularStringField(value: v, fieldNumber: 8) } }() try { if let v = self._provisioningVersion { try visitor.visitSingularUInt32Field(value: v, fieldNumber: 9) } }() try { if let v = self._pni { try visitor.visitSingularStringField(value: v, fieldNumber: 10) } }() try { if let v = self._pniIdentityKeyPublic { try visitor.visitSingularBytesField(value: v, fieldNumber: 11) } }() try { if let v = self._pniIdentityKeyPrivate { try visitor.visitSingularBytesField(value: v, fieldNumber: 12) } }() try { if let v = self._masterKey { try visitor.visitSingularBytesField(value: v, fieldNumber: 13) } }() try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: ProvisioningProtos_ProvisionMessage, rhs: ProvisioningProtos_ProvisionMessage) -> Bool { if lhs._aciIdentityKeyPublic != rhs._aciIdentityKeyPublic {return false} if lhs._aciIdentityKeyPrivate != rhs._aciIdentityKeyPrivate {return false} if lhs._pniIdentityKeyPublic != rhs._pniIdentityKeyPublic {return false} if lhs._pniIdentityKeyPrivate != rhs._pniIdentityKeyPrivate {return false} if lhs._aci != rhs._aci {return false} if lhs._pni != rhs._pni {return false} if lhs._number != rhs._number {return false} if lhs._provisioningCode != rhs._provisioningCode {return false} if lhs._userAgent != rhs._userAgent {return false} if lhs._profileKey != rhs._profileKey {return false} if lhs._readReceipts != rhs._readReceipts {return false} if lhs._provisioningVersion != rhs._provisioningVersion {return false} if lhs._masterKey != rhs._masterKey {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } }