diff --git a/NearbyShare/GenerateProtobuf.sh b/NearbyShare/Model/GenerateProtobuf.sh similarity index 100% rename from NearbyShare/GenerateProtobuf.sh rename to NearbyShare/Model/GenerateProtobuf.sh diff --git a/NearbyShare/Model/Protobuf/device_to_device_messages.pb.swift b/NearbyShare/Model/Protobuf/device_to_device_messages.pb.swift index 61ccd84..815a0c4 100644 --- a/NearbyShare/Model/Protobuf/device_to_device_messages.pb.swift +++ b/NearbyShare/Model/Protobuf/device_to_device_messages.pb.swift @@ -1,5 +1,6 @@ // DO NOT EDIT. // swift-format-ignore-file +// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: device_to_device_messages.proto @@ -35,39 +36,17 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// Type of curve -enum Securegcm_Curve: SwiftProtobuf.Enum { - typealias RawValue = Int - case ed25519 // = 1 +enum Securegcm_Curve: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case ed25519 = 1 init() { self = .ed25519 } - init?(rawValue: Int) { - switch rawValue { - case 1: self = .ed25519 - default: return nil - } - } - - var rawValue: Int { - switch self { - case .ed25519: return 1 - } - } - } -#if swift(>=4.2) - -extension Securegcm_Curve: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Used by protocols between devices -struct Securegcm_DeviceToDeviceMessage { +struct Securegcm_DeviceToDeviceMessage: Sendable { // 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. @@ -102,7 +81,7 @@ struct Securegcm_DeviceToDeviceMessage { /// sent as the first message from initiator to responder /// in an unauthenticated Diffie-Hellman Key Exchange -struct Securegcm_InitiatorHello { +struct Securegcm_InitiatorHello: Sendable { // 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. @@ -137,7 +116,7 @@ struct Securegcm_InitiatorHello { /// sent inside the header of the first message from the responder to the /// initiator in an unauthenticated Diffie-Hellman Key Exchange -struct Securegcm_ResponderHello { +struct Securegcm_ResponderHello: Sendable { // 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. @@ -171,7 +150,7 @@ struct Securegcm_ResponderHello { } /// A convenience proto for encoding curve points in affine representation -struct Securegcm_EcPoint { +struct Securegcm_EcPoint: Sendable { // 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. @@ -214,7 +193,7 @@ struct Securegcm_EcPoint { fileprivate var _y: Data? = nil } -struct Securegcm_SpakeHandshakeMessage { +struct Securegcm_SpakeHandshakeMessage: Sendable { // 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. @@ -270,31 +249,17 @@ struct Securegcm_SpakeHandshakeMessage { fileprivate var _payload: Data? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Securegcm_Curve: @unchecked Sendable {} -extension Securegcm_DeviceToDeviceMessage: @unchecked Sendable {} -extension Securegcm_InitiatorHello: @unchecked Sendable {} -extension Securegcm_ResponderHello: @unchecked Sendable {} -extension Securegcm_EcPoint: @unchecked Sendable {} -extension Securegcm_SpakeHandshakeMessage: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "securegcm" extension Securegcm_Curve: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "ED_25519"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}ED_25519\0") } extension Securegcm_DeviceToDeviceMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".DeviceToDeviceMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "message"), - 2: .standard(proto: "sequence_number"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}message\0\u{3}sequence_number\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -333,10 +298,7 @@ extension Securegcm_DeviceToDeviceMessage: SwiftProtobuf.Message, SwiftProtobuf. extension Securegcm_InitiatorHello: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".InitiatorHello" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "public_dh_key"), - 2: .standard(proto: "protocol_version"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_dh_key\0\u{3}protocol_version\0") public var isInitialized: Bool { if let v = self._publicDhKey, !v.isInitialized {return false} @@ -380,10 +342,7 @@ extension Securegcm_InitiatorHello: SwiftProtobuf.Message, SwiftProtobuf._Messag extension Securegcm_ResponderHello: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ResponderHello" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "public_dh_key"), - 2: .standard(proto: "protocol_version"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_dh_key\0\u{3}protocol_version\0") public var isInitialized: Bool { if let v = self._publicDhKey, !v.isInitialized {return false} @@ -427,11 +386,7 @@ extension Securegcm_ResponderHello: SwiftProtobuf.Message, SwiftProtobuf._Messag extension Securegcm_EcPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".EcPoint" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "curve"), - 2: .same(proto: "x"), - 3: .same(proto: "y"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}curve\0\u{1}x\0\u{1}y\0") public var isInitialized: Bool { if self._curve == nil {return false} @@ -482,12 +437,7 @@ extension Securegcm_EcPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem extension Securegcm_SpakeHandshakeMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".SpakeHandshakeMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "flow_number"), - 2: .standard(proto: "ec_point"), - 3: .standard(proto: "hash_value"), - 4: .same(proto: "payload"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}flow_number\0\u{3}ec_point\0\u{3}hash_value\0\u{1}payload\0") public var isInitialized: Bool { if let v = self._ecPoint, !v.isInitialized {return false} diff --git a/NearbyShare/Model/Protobuf/offline_wire_formats.pb.swift b/NearbyShare/Model/Protobuf/offline_wire_formats.pb.swift index 2d5c0a0..521a0ee 100644 --- a/NearbyShare/Model/Protobuf/offline_wire_formats.pb.swift +++ b/NearbyShare/Model/Protobuf/offline_wire_formats.pb.swift @@ -1,5 +1,6 @@ // DO NOT EDIT. // swift-format-ignore-file +// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: offline_wire_formats.proto @@ -34,44 +35,18 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -enum Location_Nearby_Connections_EndpointType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownEndpoint // = 0 - case connectionsEndpoint // = 1 - case presenceEndpoint // = 2 +enum Location_Nearby_Connections_EndpointType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownEndpoint = 0 + case connectionsEndpoint = 1 + case presenceEndpoint = 2 init() { self = .unknownEndpoint } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownEndpoint - case 1: self = .connectionsEndpoint - case 2: self = .presenceEndpoint - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownEndpoint: return 0 - case .connectionsEndpoint: return 1 - case .presenceEndpoint: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Connections_EndpointType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_OfflineFrame { +struct Location_Nearby_Connections_OfflineFrame: Sendable { // 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. @@ -98,30 +73,14 @@ struct Location_Nearby_Connections_OfflineFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Version: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownVersion // = 0 - case v1 // = 1 + enum Version: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownVersion = 0 + case v1 = 1 init() { self = .unknownVersion } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownVersion - case 1: self = .v1 - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownVersion: return 0 - case .v1: return 1 - } - } - } init() {} @@ -130,15 +89,7 @@ struct Location_Nearby_Connections_OfflineFrame { fileprivate var _v1: Location_Nearby_Connections_V1Frame? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_OfflineFrame.Version: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_V1Frame { +struct Location_Nearby_Connections_V1Frame: @unchecked Sendable { // 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. @@ -263,63 +214,25 @@ struct Location_Nearby_Connections_V1Frame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum FrameType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownFrameType // = 0 - case connectionRequest // = 1 - case connectionResponse // = 2 - case payloadTransfer // = 3 - case bandwidthUpgradeNegotiation // = 4 - case keepAlive // = 5 - case disconnection // = 6 - case pairedKeyEncryption // = 7 - case authenticationMessage // = 8 - case authenticationResult // = 9 - case autoResume // = 10 - case autoReconnect // = 11 - case bandwidthUpgradeRetry // = 12 + enum FrameType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownFrameType = 0 + case connectionRequest = 1 + case connectionResponse = 2 + case payloadTransfer = 3 + case bandwidthUpgradeNegotiation = 4 + case keepAlive = 5 + case disconnection = 6 + case pairedKeyEncryption = 7 + case authenticationMessage = 8 + case authenticationResult = 9 + case autoResume = 10 + case autoReconnect = 11 + case bandwidthUpgradeRetry = 12 init() { self = .unknownFrameType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownFrameType - case 1: self = .connectionRequest - case 2: self = .connectionResponse - case 3: self = .payloadTransfer - case 4: self = .bandwidthUpgradeNegotiation - case 5: self = .keepAlive - case 6: self = .disconnection - case 7: self = .pairedKeyEncryption - case 8: self = .authenticationMessage - case 9: self = .authenticationResult - case 10: self = .autoResume - case 11: self = .autoReconnect - case 12: self = .bandwidthUpgradeRetry - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownFrameType: return 0 - case .connectionRequest: return 1 - case .connectionResponse: return 2 - case .payloadTransfer: return 3 - case .bandwidthUpgradeNegotiation: return 4 - case .keepAlive: return 5 - case .disconnection: return 6 - case .pairedKeyEncryption: return 7 - case .authenticationMessage: return 8 - case .authenticationResult: return 9 - case .autoResume: return 10 - case .autoReconnect: return 11 - case .bandwidthUpgradeRetry: return 12 - } - } - } init() {} @@ -327,15 +240,7 @@ struct Location_Nearby_Connections_V1Frame { fileprivate var _storage = _StorageClass.defaultInstance } -#if swift(>=4.2) - -extension Location_Nearby_Connections_V1Frame.FrameType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_ConnectionRequestFrame { +struct Location_Nearby_Connections_ConnectionRequestFrame: @unchecked Sendable { // 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. @@ -424,6 +329,8 @@ struct Location_Nearby_Connections_ConnectionRequestFrame { mutating func clearKeepAliveTimeoutMillis() {_uniqueStorage()._keepAliveTimeoutMillis = nil} /// The type of {@link Device} object. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var deviceType: Int32 { get {return _storage._deviceType ?? 0} set {_uniqueStorage()._deviceType = newValue} @@ -434,6 +341,8 @@ struct Location_Nearby_Connections_ConnectionRequestFrame { mutating func clearDeviceType() {_uniqueStorage()._deviceType = nil} /// The bytes of serialized {@link Device} object. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var deviceInfo: Data { get {return _storage._deviceInfo ?? Data()} set {_uniqueStorage()._deviceInfo = newValue} @@ -486,119 +395,47 @@ struct Location_Nearby_Connections_ConnectionRequestFrame { var unknownFields = SwiftProtobuf.UnknownStorage() /// Represents the {@link Device} that invokes the request. - enum OneOf_Device: Equatable { + enum OneOf_Device: Equatable, Sendable { case connectionsDevice(Location_Nearby_Connections_ConnectionsDevice) case presenceDevice(Location_Nearby_Connections_PresenceDevice) - #if !swift(>=4.1) - static func ==(lhs: Location_Nearby_Connections_ConnectionRequestFrame.OneOf_Device, rhs: Location_Nearby_Connections_ConnectionRequestFrame.OneOf_Device) -> Bool { - // 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 (lhs, rhs) { - case (.connectionsDevice, .connectionsDevice): return { - guard case .connectionsDevice(let l) = lhs, case .connectionsDevice(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.presenceDevice, .presenceDevice): return { - guard case .presenceDevice(let l) = lhs, case .presenceDevice(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif } /// Should always match cs/symbol:location.nearby.proto.connections.Medium /// LINT.IfChange - enum Medium: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownMedium // = 0 - case mdns // = 1 - case bluetooth // = 2 - case wifiHotspot // = 3 - case ble // = 4 - case wifiLan // = 5 - case wifiAware // = 6 - case nfc // = 7 - case wifiDirect // = 8 - case webRtc // = 9 - case bleL2Cap // = 10 - case usb // = 11 - case webRtcNonCellular // = 12 - case awdl // = 13 + enum Medium: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownMedium = 0 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case mdns = 1 + case bluetooth = 2 + case wifiHotspot = 3 + case ble = 4 + case wifiLan = 5 + case wifiAware = 6 + case nfc = 7 + case wifiDirect = 8 + case webRtc = 9 + case bleL2Cap = 10 + case usb = 11 + case webRtcNonCellular = 12 + case awdl = 13 init() { self = .unknownMedium } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownMedium - case 1: self = .mdns - case 2: self = .bluetooth - case 3: self = .wifiHotspot - case 4: self = .ble - case 5: self = .wifiLan - case 6: self = .wifiAware - case 7: self = .nfc - case 8: self = .wifiDirect - case 9: self = .webRtc - case 10: self = .bleL2Cap - case 11: self = .usb - case 12: self = .webRtcNonCellular - case 13: self = .awdl - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownMedium: return 0 - case .mdns: return 1 - case .bluetooth: return 2 - case .wifiHotspot: return 3 - case .ble: return 4 - case .wifiLan: return 5 - case .wifiAware: return 6 - case .nfc: return 7 - case .wifiDirect: return 8 - case .webRtc: return 9 - case .bleL2Cap: return 10 - case .usb: return 11 - case .webRtcNonCellular: return 12 - case .awdl: return 13 - } - } - } /// LINT.IfChange - enum ConnectionMode: SwiftProtobuf.Enum { - typealias RawValue = Int - case legacy // = 0 - case instant // = 1 + enum ConnectionMode: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case legacy = 0 + case instant = 1 init() { self = .legacy } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .legacy - case 1: self = .instant - default: return nil - } - } - - var rawValue: Int { - switch self { - case .legacy: return 0 - case .instant: return 1 - } - } - } init() {} @@ -606,22 +443,10 @@ struct Location_Nearby_Connections_ConnectionRequestFrame { fileprivate var _storage = _StorageClass.defaultInstance } -#if swift(>=4.2) - -extension Location_Nearby_Connections_ConnectionRequestFrame.Medium: CaseIterable { - // Support synthesized by the compiler. -} - -extension Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// This doesn't need to send back endpoint_id and endpoint_name (like /// the ConnectionRequestFrame does) because those have already been /// transmitted out-of-band, at the time this endpoint was discovered. -struct Location_Nearby_Connections_ConnectionResponseFrame { +struct Location_Nearby_Connections_ConnectionResponseFrame: Sendable { // 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. @@ -630,6 +455,8 @@ struct Location_Nearby_Connections_ConnectionResponseFrame { /// /// - ConnectionsStatusCodes.STATUS_OK /// - ConnectionsStatusCodes.STATUS_CONNECTION_REJECTED. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var status: Int32 { get {return _status ?? 0} set {_status = newValue} @@ -680,6 +507,7 @@ struct Location_Nearby_Connections_ConnectionResponseFrame { /// Clears the value of `multiplexSocketBitmask`. Subsequent reads from it will return its default value. mutating func clearMultiplexSocketBitmask() {self._multiplexSocketBitmask = nil} + /// NOTE: This field was marked as deprecated in the .proto file. var nearbyConnectionsVersion: Int32 { get {return _nearbyConnectionsVersion ?? 0} set {_nearbyConnectionsVersion = newValue} @@ -722,33 +550,15 @@ struct Location_Nearby_Connections_ConnectionResponseFrame { /// Map ConnectionsStatusCodes.STATUS_OK to ACCEPT and /// ConnectionsStatusCodes.STATUS_CONNECTION_REJECTED to REJECT. /// Flag: connection_replace_status_with_response_connectionResponseFrame - enum ResponseStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownResponseStatus // = 0 - case accept // = 1 - case reject // = 2 + enum ResponseStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownResponseStatus = 0 + case accept = 1 + case reject = 2 init() { self = .unknownResponseStatus } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownResponseStatus - case 1: self = .accept - case 2: self = .reject - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownResponseStatus: return 0 - case .accept: return 1 - case .reject: return 2 - } - } - } init() {} @@ -764,15 +574,7 @@ struct Location_Nearby_Connections_ConnectionResponseFrame { fileprivate var _keepAliveTimeoutMillis: Int32? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_ConnectionResponseFrame.ResponseStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_PayloadTransferFrame { +struct Location_Nearby_Connections_PayloadTransferFrame: Sendable { // 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. @@ -816,39 +618,19 @@ struct Location_Nearby_Connections_PayloadTransferFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum PacketType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownPacketType // = 0 - case data // = 1 - case control // = 2 - case payloadAck // = 3 + enum PacketType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownPacketType = 0 + case data = 1 + case control = 2 + case payloadAck = 3 init() { self = .unknownPacketType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownPacketType - case 1: self = .data - case 2: self = .control - case 3: self = .payloadAck - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownPacketType: return 0 - case .data: return 1 - case .control: return 2 - case .payloadAck: return 3 - } - } - } - struct PayloadHeader { + struct PayloadHeader: Sendable { // 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. @@ -919,36 +701,16 @@ struct Location_Nearby_Connections_PayloadTransferFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum PayloadType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownPayloadType // = 0 - case bytes // = 1 - case file // = 2 - case stream // = 3 + enum PayloadType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownPayloadType = 0 + case bytes = 1 + case file = 2 + case stream = 3 init() { self = .unknownPayloadType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownPayloadType - case 1: self = .bytes - case 2: self = .file - case 3: self = .stream - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownPayloadType: return 0 - case .bytes: return 1 - case .file: return 2 - case .stream: return 3 - } - } - } init() {} @@ -963,7 +725,7 @@ struct Location_Nearby_Connections_PayloadTransferFrame { } /// Accompanies DATA packets. - struct PayloadChunk { + struct PayloadChunk: Sendable { // 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. @@ -1006,27 +768,13 @@ struct Location_Nearby_Connections_PayloadTransferFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Flags: SwiftProtobuf.Enum { - typealias RawValue = Int - case lastChunk // = 1 + enum Flags: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case lastChunk = 1 init() { self = .lastChunk } - init?(rawValue: Int) { - switch rawValue { - case 1: self = .lastChunk - default: return nil - } - } - - var rawValue: Int { - switch self { - case .lastChunk: return 1 - } - } - } init() {} @@ -1038,7 +786,7 @@ struct Location_Nearby_Connections_PayloadTransferFrame { } /// Accompanies CONTROL packets. - struct ControlMessage { + struct ControlMessage: Sendable { // 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. @@ -1063,38 +811,20 @@ struct Location_Nearby_Connections_PayloadTransferFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum EventType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownEventType // = 0 - case payloadError // = 1 - case payloadCanceled // = 2 + enum EventType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownEventType = 0 + case payloadError = 1 + case payloadCanceled = 2 /// Use PacketType.PAYLOAD_ACK instead - case payloadReceivedAck // = 3 + /// + /// NOTE: This enum value was marked as deprecated in the .proto file + case payloadReceivedAck = 3 init() { self = .unknownEventType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownEventType - case 1: self = .payloadError - case 2: self = .payloadCanceled - case 3: self = .payloadReceivedAck - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownEventType: return 0 - case .payloadError: return 1 - case .payloadCanceled: return 2 - case .payloadReceivedAck: return 3 - } - } - } init() {} @@ -1111,27 +841,7 @@ struct Location_Nearby_Connections_PayloadTransferFrame { fileprivate var _controlMessage: Location_Nearby_Connections_PayloadTransferFrame.ControlMessage? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_PayloadTransferFrame.PacketType: CaseIterable { - // Support synthesized by the compiler. -} - -extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader.PayloadType: CaseIterable { - // Support synthesized by the compiler. -} - -extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk.Flags: CaseIterable { - // Support synthesized by the compiler. -} - -extension Location_Nearby_Connections_PayloadTransferFrame.ControlMessage.EventType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { +struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame: Sendable { // 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. @@ -1184,55 +894,27 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum EventType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownEventType // = 0 - case upgradePathAvailable // = 1 - case lastWriteToPriorChannel // = 2 - case safeToClosePriorChannel // = 3 - case clientIntroduction // = 4 - case upgradeFailure // = 5 - case clientIntroductionAck // = 6 + enum EventType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownEventType = 0 + case upgradePathAvailable = 1 + case lastWriteToPriorChannel = 2 + case safeToClosePriorChannel = 3 + case clientIntroduction = 4 + case upgradeFailure = 5 + case clientIntroductionAck = 6 /// The event type that requires the remote device to send the available /// upgrade path. - case upgradePathRequest // = 7 + case upgradePathRequest = 7 init() { self = .unknownEventType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownEventType - case 1: self = .upgradePathAvailable - case 2: self = .lastWriteToPriorChannel - case 3: self = .safeToClosePriorChannel - case 4: self = .clientIntroduction - case 5: self = .upgradeFailure - case 6: self = .clientIntroductionAck - case 7: self = .upgradePathRequest - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownEventType: return 0 - case .upgradePathAvailable: return 1 - case .lastWriteToPriorChannel: return 2 - case .safeToClosePriorChannel: return 3 - case .clientIntroduction: return 4 - case .upgradeFailure: return 5 - case .clientIntroductionAck: return 6 - case .upgradePathRequest: return 7 - } - } - } /// Accompanies UPGRADE_PATH_AVAILABLE and UPGRADE_FAILURE events. - struct UpgradePathInfo { + struct UpgradePathInfo: @unchecked Sendable { // 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. @@ -1342,69 +1024,33 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { var unknownFields = SwiftProtobuf.UnknownStorage() /// Should always match cs/symbol:location.nearby.proto.connections.Medium - enum Medium: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownMedium // = 0 - case mdns // = 1 - case bluetooth // = 2 - case wifiHotspot // = 3 - case ble // = 4 - case wifiLan // = 5 - case wifiAware // = 6 - case nfc // = 7 - case wifiDirect // = 8 - case webRtc // = 9 + enum Medium: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownMedium = 0 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case mdns = 1 + case bluetooth = 2 + case wifiHotspot = 3 + case ble = 4 + case wifiLan = 5 + case wifiAware = 6 + case nfc = 7 + case wifiDirect = 8 + case webRtc = 9 /// 10 is reserved. - case usb // = 11 - case webRtcNonCellular // = 12 - case awdl // = 13 + case usb = 11 + case webRtcNonCellular = 12 + case awdl = 13 init() { self = .unknownMedium } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownMedium - case 1: self = .mdns - case 2: self = .bluetooth - case 3: self = .wifiHotspot - case 4: self = .ble - case 5: self = .wifiLan - case 6: self = .wifiAware - case 7: self = .nfc - case 8: self = .wifiDirect - case 9: self = .webRtc - case 11: self = .usb - case 12: self = .webRtcNonCellular - case 13: self = .awdl - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownMedium: return 0 - case .mdns: return 1 - case .bluetooth: return 2 - case .wifiHotspot: return 3 - case .ble: return 4 - case .wifiLan: return 5 - case .wifiAware: return 6 - case .nfc: return 7 - case .wifiDirect: return 8 - case .webRtc: return 9 - case .usb: return 11 - case .webRtcNonCellular: return 12 - case .awdl: return 13 - } - } - } /// Accompanies Medium.WIFI_HOTSPOT. - struct WifiHotspotCredentials { + struct WifiHotspotCredentials: Sendable { // 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. @@ -1467,7 +1113,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies Medium.WIFI_LAN. - struct WifiLanSocket { + struct WifiLanSocket: Sendable { // 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. @@ -1499,7 +1145,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies Medium.BLUETOOTH. - struct BluetoothCredentials { + struct BluetoothCredentials: Sendable { // 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. @@ -1531,7 +1177,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies Medium.WIFI_AWARE. - struct WifiAwareCredentials { + struct WifiAwareCredentials: Sendable { // 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. @@ -1573,7 +1219,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies Medium.WIFI_DIRECT. - struct WifiDirectCredentials { + struct WifiDirectCredentials: Sendable { // 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. @@ -1648,7 +1294,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies Medium.WEB_RTC - struct WebRtcCredentials { + struct WebRtcCredentials: Sendable { // 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. @@ -1680,7 +1326,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies Medium.AWDL. - struct AwdlCredentials { + struct AwdlCredentials: Sendable { // 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. @@ -1721,7 +1367,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { fileprivate var _password: String? = nil } - struct UpgradePathRequest { + struct UpgradePathRequest: Sendable { // 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. @@ -1751,7 +1397,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies SAFE_TO_CLOSE_PRIOR_CHANNEL events. - struct SafeToClosePriorChannel { + struct SafeToClosePriorChannel: Sendable { // 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. @@ -1773,7 +1419,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies CLIENT_INTRODUCTION events. - struct ClientIntroduction { + struct ClientIntroduction: Sendable { // 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. @@ -1815,7 +1461,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { } /// Accompanies CLIENT_INTRODUCTION_ACK events. - struct ClientIntroductionAck { + struct ClientIntroductionAck: Sendable { // 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. @@ -1834,19 +1480,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { fileprivate var _safeToClosePriorChannel: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.EventType: CaseIterable { - // Support synthesized by the compiler. -} - -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_BandwidthUpgradeRetryFrame { +struct Location_Nearby_Connections_BandwidthUpgradeRetryFrame: Sendable { // 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. @@ -1870,65 +1504,27 @@ struct Location_Nearby_Connections_BandwidthUpgradeRetryFrame { /// Should always match cs/symbol:location.nearby.proto.connections.Medium /// LINT.IfChange - enum Medium: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownMedium // = 0 + enum Medium: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownMedium = 0 /// 1 is reserved. - case bluetooth // = 2 - case wifiHotspot // = 3 - case ble // = 4 - case wifiLan // = 5 - case wifiAware // = 6 - case nfc // = 7 - case wifiDirect // = 8 - case webRtc // = 9 - case bleL2Cap // = 10 - case usb // = 11 - case webRtcNonCellular // = 12 - case awdl // = 13 + case bluetooth = 2 + case wifiHotspot = 3 + case ble = 4 + case wifiLan = 5 + case wifiAware = 6 + case nfc = 7 + case wifiDirect = 8 + case webRtc = 9 + case bleL2Cap = 10 + case usb = 11 + case webRtcNonCellular = 12 + case awdl = 13 init() { self = .unknownMedium } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownMedium - case 2: self = .bluetooth - case 3: self = .wifiHotspot - case 4: self = .ble - case 5: self = .wifiLan - case 6: self = .wifiAware - case 7: self = .nfc - case 8: self = .wifiDirect - case 9: self = .webRtc - case 10: self = .bleL2Cap - case 11: self = .usb - case 12: self = .webRtcNonCellular - case 13: self = .awdl - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownMedium: return 0 - case .bluetooth: return 2 - case .wifiHotspot: return 3 - case .ble: return 4 - case .wifiLan: return 5 - case .wifiAware: return 6 - case .nfc: return 7 - case .wifiDirect: return 8 - case .webRtc: return 9 - case .bleL2Cap: return 10 - case .usb: return 11 - case .webRtcNonCellular: return 12 - case .awdl: return 13 - } - } - } init() {} @@ -1936,15 +1532,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeRetryFrame { fileprivate var _isRequest: Bool? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame.Medium: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_KeepAliveFrame { +struct Location_Nearby_Connections_KeepAliveFrame: Sendable { // 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. @@ -1981,7 +1569,7 @@ struct Location_Nearby_Connections_KeepAliveFrame { /// Used in bandwidth upgrades to get around a race condition, but may be used /// in other situations to trigger a faster disconnection event than waiting for /// socket closed on the remote side. -struct Location_Nearby_Connections_DisconnectionFrame { +struct Location_Nearby_Connections_DisconnectionFrame: Sendable { // 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. @@ -2016,7 +1604,7 @@ struct Location_Nearby_Connections_DisconnectionFrame { } /// A paired key encryption packet sent between devices, contains signed data. -struct Location_Nearby_Connections_PairedKeyEncryptionFrame { +struct Location_Nearby_Connections_PairedKeyEncryptionFrame: Sendable { // 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. @@ -2041,7 +1629,7 @@ struct Location_Nearby_Connections_PairedKeyEncryptionFrame { /// Nearby Connections authentication frame, contains the bytes format of a /// DeviceProvider's authentication message. -struct Location_Nearby_Connections_AuthenticationMessageFrame { +struct Location_Nearby_Connections_AuthenticationMessageFrame: Sendable { // 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. @@ -2065,7 +1653,7 @@ struct Location_Nearby_Connections_AuthenticationMessageFrame { } /// Nearby Connections authentication result frame. -struct Location_Nearby_Connections_AuthenticationResultFrame { +struct Location_Nearby_Connections_AuthenticationResultFrame: Sendable { // 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. @@ -2088,7 +1676,7 @@ struct Location_Nearby_Connections_AuthenticationResultFrame { fileprivate var _result: Int32? = nil } -struct Location_Nearby_Connections_AutoResumeFrame { +struct Location_Nearby_Connections_AutoResumeFrame: Sendable { // 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. @@ -2131,33 +1719,15 @@ struct Location_Nearby_Connections_AutoResumeFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum EventType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownAutoResumeEventType // = 0 - case payloadResumeTransferStart // = 1 - case payloadResumeTransferAck // = 2 + enum EventType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownAutoResumeEventType = 0 + case payloadResumeTransferStart = 1 + case payloadResumeTransferAck = 2 init() { self = .unknownAutoResumeEventType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownAutoResumeEventType - case 1: self = .payloadResumeTransferStart - case 2: self = .payloadResumeTransferAck - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownAutoResumeEventType: return 0 - case .payloadResumeTransferStart: return 1 - case .payloadResumeTransferAck: return 2 - } - } - } init() {} @@ -2168,15 +1738,7 @@ struct Location_Nearby_Connections_AutoResumeFrame { fileprivate var _version: Int32? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_AutoResumeFrame.EventType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_AutoReconnectFrame { +struct Location_Nearby_Connections_AutoReconnectFrame: Sendable { // 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. @@ -2210,33 +1772,15 @@ struct Location_Nearby_Connections_AutoReconnectFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum EventType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownEventType // = 0 - case clientIntroduction // = 1 - case clientIntroductionAck // = 2 + enum EventType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownEventType = 0 + case clientIntroduction = 1 + case clientIntroductionAck = 2 init() { self = .unknownEventType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownEventType - case 1: self = .clientIntroduction - case 2: self = .clientIntroductionAck - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownEventType: return 0 - case .clientIntroduction: return 1 - case .clientIntroductionAck: return 2 - } - } - } init() {} @@ -2246,15 +1790,7 @@ struct Location_Nearby_Connections_AutoReconnectFrame { fileprivate var _lastEndpointID: String? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_AutoReconnectFrame.EventType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_MediumMetadata { +struct Location_Nearby_Connections_MediumMetadata: @unchecked Sendable { // 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. @@ -2389,7 +1925,7 @@ struct Location_Nearby_Connections_MediumMetadata { } /// Available channels on the local device. -struct Location_Nearby_Connections_AvailableChannels { +struct Location_Nearby_Connections_AvailableChannels: Sendable { // 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. @@ -2402,7 +1938,7 @@ struct Location_Nearby_Connections_AvailableChannels { } /// Usable WiFi Direct client channels on the local device. -struct Location_Nearby_Connections_WifiDirectCliUsableChannels { +struct Location_Nearby_Connections_WifiDirectCliUsableChannels: Sendable { // 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. @@ -2415,7 +1951,7 @@ struct Location_Nearby_Connections_WifiDirectCliUsableChannels { } /// Usable WiFi LAN channels on the local device. -struct Location_Nearby_Connections_WifiLanUsableChannels { +struct Location_Nearby_Connections_WifiLanUsableChannels: Sendable { // 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. @@ -2428,7 +1964,7 @@ struct Location_Nearby_Connections_WifiLanUsableChannels { } /// Usable WiFi Aware channels on the local device. -struct Location_Nearby_Connections_WifiAwareUsableChannels { +struct Location_Nearby_Connections_WifiAwareUsableChannels: Sendable { // 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. @@ -2441,7 +1977,7 @@ struct Location_Nearby_Connections_WifiAwareUsableChannels { } /// Usable WiFi Hotspot STA channels on the local device. -struct Location_Nearby_Connections_WifiHotspotStaUsableChannels { +struct Location_Nearby_Connections_WifiHotspotStaUsableChannels: Sendable { // 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. @@ -2454,7 +1990,7 @@ struct Location_Nearby_Connections_WifiHotspotStaUsableChannels { } /// The medium roles. -struct Location_Nearby_Connections_MediumRole { +struct Location_Nearby_Connections_MediumRole: Sendable { // 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. @@ -2546,7 +2082,7 @@ struct Location_Nearby_Connections_MediumRole { } /// LocationHint is used to specify a location as well as format. -struct Location_Nearby_Connections_LocationHint { +struct Location_Nearby_Connections_LocationHint: Sendable { // 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. @@ -2579,62 +2115,36 @@ struct Location_Nearby_Connections_LocationHint { fileprivate var _format: Location_Nearby_Connections_LocationStandard.Format? = nil } -struct Location_Nearby_Connections_LocationStandard { +struct Location_Nearby_Connections_LocationStandard: Sendable { // 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 unknownFields = SwiftProtobuf.UnknownStorage() - enum Format: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 + enum Format: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 /// E164 country codes: /// https://en.wikipedia.org/wiki/List_of_country_calling_codes /// e.g. +1 for USA - case e164Calling // = 1 + case e164Calling = 1 /// ISO 3166-1 alpha-2 country codes: /// https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - case iso31661Alpha2 // = 2 + case iso31661Alpha2 = 2 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .e164Calling - case 2: self = .iso31661Alpha2 - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .e164Calling: return 1 - case .iso31661Alpha2: return 2 - } - } - } init() {} } -#if swift(>=4.2) - -extension Location_Nearby_Connections_LocationStandard.Format: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Device capability for OS information. -struct Location_Nearby_Connections_OsInfo { +struct Location_Nearby_Connections_OsInfo: Sendable { // 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. @@ -2650,44 +2160,20 @@ struct Location_Nearby_Connections_OsInfo { var unknownFields = SwiftProtobuf.UnknownStorage() - enum OsType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownOsType // = 0 - case android // = 1 - case chromeOs // = 2 - case windows // = 3 - case apple // = 4 + enum OsType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownOsType = 0 + case android = 1 + case chromeOs = 2 + case windows = 3 + case apple = 4 /// g3 test environment - case linux // = 100 + case linux = 100 init() { self = .unknownOsType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownOsType - case 1: self = .android - case 2: self = .chromeOs - case 3: self = .windows - case 4: self = .apple - case 100: self = .linux - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownOsType: return 0 - case .android: return 1 - case .chromeOs: return 2 - case .windows: return 3 - case .apple: return 4 - case .linux: return 100 - } - } - } init() {} @@ -2695,15 +2181,7 @@ struct Location_Nearby_Connections_OsInfo { fileprivate var _type: Location_Nearby_Connections_OsInfo.OsType? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_OsInfo.OsType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Location_Nearby_Connections_ConnectionsDevice { +struct Location_Nearby_Connections_ConnectionsDevice: Sendable { // 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. @@ -2755,7 +2233,7 @@ struct Location_Nearby_Connections_ConnectionsDevice { fileprivate var _endpointInfo: Data? = nil } -struct Location_Nearby_Connections_PresenceDevice { +struct Location_Nearby_Connections_PresenceDevice: Sendable { // 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. @@ -2832,45 +2310,19 @@ struct Location_Nearby_Connections_PresenceDevice { var unknownFields = SwiftProtobuf.UnknownStorage() - enum DeviceType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case phone // = 1 - case tablet // = 2 - case display // = 3 - case laptop // = 4 - case tv // = 5 - case watch // = 6 + enum DeviceType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case phone = 1 + case tablet = 2 + case display = 3 + case laptop = 4 + case tv = 5 + case watch = 6 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .phone - case 2: self = .tablet - case 3: self = .display - case 4: self = .laptop - case 5: self = .tv - case 6: self = .watch - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .phone: return 1 - case .tablet: return 2 - case .display: return 3 - case .laptop: return 4 - case .tv: return 5 - case .watch: return 6 - } - } - } init() {} @@ -2884,95 +2336,17 @@ struct Location_Nearby_Connections_PresenceDevice { fileprivate var _deviceImageURL: String? = nil } -#if swift(>=4.2) - -extension Location_Nearby_Connections_PresenceDevice.DeviceType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -#if swift(>=5.5) && canImport(_Concurrency) -extension Location_Nearby_Connections_EndpointType: @unchecked Sendable {} -extension Location_Nearby_Connections_OfflineFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_OfflineFrame.Version: @unchecked Sendable {} -extension Location_Nearby_Connections_V1Frame: @unchecked Sendable {} -extension Location_Nearby_Connections_V1Frame.FrameType: @unchecked Sendable {} -extension Location_Nearby_Connections_ConnectionRequestFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_ConnectionRequestFrame.OneOf_Device: @unchecked Sendable {} -extension Location_Nearby_Connections_ConnectionRequestFrame.Medium: @unchecked Sendable {} -extension Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode: @unchecked Sendable {} -extension Location_Nearby_Connections_ConnectionResponseFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_ConnectionResponseFrame.ResponseStatus: @unchecked Sendable {} -extension Location_Nearby_Connections_PayloadTransferFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_PayloadTransferFrame.PacketType: @unchecked Sendable {} -extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader: @unchecked Sendable {} -extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader.PayloadType: @unchecked Sendable {} -extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk: @unchecked Sendable {} -extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk.Flags: @unchecked Sendable {} -extension Location_Nearby_Connections_PayloadTransferFrame.ControlMessage: @unchecked Sendable {} -extension Location_Nearby_Connections_PayloadTransferFrame.ControlMessage.EventType: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.EventType: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroduction: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroductionAck: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame.Medium: @unchecked Sendable {} -extension Location_Nearby_Connections_KeepAliveFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_DisconnectionFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_PairedKeyEncryptionFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_AuthenticationMessageFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_AuthenticationResultFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_AutoResumeFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_AutoResumeFrame.EventType: @unchecked Sendable {} -extension Location_Nearby_Connections_AutoReconnectFrame: @unchecked Sendable {} -extension Location_Nearby_Connections_AutoReconnectFrame.EventType: @unchecked Sendable {} -extension Location_Nearby_Connections_MediumMetadata: @unchecked Sendable {} -extension Location_Nearby_Connections_AvailableChannels: @unchecked Sendable {} -extension Location_Nearby_Connections_WifiDirectCliUsableChannels: @unchecked Sendable {} -extension Location_Nearby_Connections_WifiLanUsableChannels: @unchecked Sendable {} -extension Location_Nearby_Connections_WifiAwareUsableChannels: @unchecked Sendable {} -extension Location_Nearby_Connections_WifiHotspotStaUsableChannels: @unchecked Sendable {} -extension Location_Nearby_Connections_MediumRole: @unchecked Sendable {} -extension Location_Nearby_Connections_LocationHint: @unchecked Sendable {} -extension Location_Nearby_Connections_LocationStandard: @unchecked Sendable {} -extension Location_Nearby_Connections_LocationStandard.Format: @unchecked Sendable {} -extension Location_Nearby_Connections_OsInfo: @unchecked Sendable {} -extension Location_Nearby_Connections_OsInfo.OsType: @unchecked Sendable {} -extension Location_Nearby_Connections_ConnectionsDevice: @unchecked Sendable {} -extension Location_Nearby_Connections_PresenceDevice: @unchecked Sendable {} -extension Location_Nearby_Connections_PresenceDevice.DeviceType: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "location.nearby.connections" extension Location_Nearby_Connections_EndpointType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_ENDPOINT"), - 1: .same(proto: "CONNECTIONS_ENDPOINT"), - 2: .same(proto: "PRESENCE_ENDPOINT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_ENDPOINT\0\u{1}CONNECTIONS_ENDPOINT\0\u{1}PRESENCE_ENDPOINT\0") } extension Location_Nearby_Connections_OfflineFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".OfflineFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .same(proto: "v1"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}v1\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3010,29 +2384,12 @@ extension Location_Nearby_Connections_OfflineFrame: SwiftProtobuf.Message, Swift } extension Location_Nearby_Connections_OfflineFrame.Version: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_VERSION"), - 1: .same(proto: "V1"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_VERSION\0\u{1}V1\0") } extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".V1Frame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .standard(proto: "connection_request"), - 3: .standard(proto: "connection_response"), - 4: .standard(proto: "payload_transfer"), - 5: .standard(proto: "bandwidth_upgrade_negotiation"), - 6: .standard(proto: "keep_alive"), - 7: .same(proto: "disconnection"), - 8: .standard(proto: "paired_key_encryption"), - 9: .standard(proto: "authentication_message"), - 10: .standard(proto: "authentication_result"), - 11: .standard(proto: "auto_resume"), - 12: .standard(proto: "auto_reconnect"), - 13: .standard(proto: "bandwidth_upgrade_retry"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}connection_request\0\u{3}connection_response\0\u{3}payload_transfer\0\u{3}bandwidth_upgrade_negotiation\0\u{3}keep_alive\0\u{1}disconnection\0\u{3}paired_key_encryption\0\u{3}authentication_message\0\u{3}authentication_result\0\u{3}auto_resume\0\u{3}auto_reconnect\0\u{3}bandwidth_upgrade_retry\0") fileprivate class _StorageClass { var _type: Location_Nearby_Connections_V1Frame.FrameType? = nil @@ -3049,7 +2406,11 @@ extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProto var _autoReconnect: Location_Nearby_Connections_AutoReconnectFrame? = nil var _bandwidthUpgradeRetry: Location_Nearby_Connections_BandwidthUpgradeRetryFrame? = nil - static let defaultInstance = _StorageClass() + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() private init() {} @@ -3181,42 +2542,12 @@ extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProto } extension Location_Nearby_Connections_V1Frame.FrameType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_FRAME_TYPE"), - 1: .same(proto: "CONNECTION_REQUEST"), - 2: .same(proto: "CONNECTION_RESPONSE"), - 3: .same(proto: "PAYLOAD_TRANSFER"), - 4: .same(proto: "BANDWIDTH_UPGRADE_NEGOTIATION"), - 5: .same(proto: "KEEP_ALIVE"), - 6: .same(proto: "DISCONNECTION"), - 7: .same(proto: "PAIRED_KEY_ENCRYPTION"), - 8: .same(proto: "AUTHENTICATION_MESSAGE"), - 9: .same(proto: "AUTHENTICATION_RESULT"), - 10: .same(proto: "AUTO_RESUME"), - 11: .same(proto: "AUTO_RECONNECT"), - 12: .same(proto: "BANDWIDTH_UPGRADE_RETRY"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_FRAME_TYPE\0\u{1}CONNECTION_REQUEST\0\u{1}CONNECTION_RESPONSE\0\u{1}PAYLOAD_TRANSFER\0\u{1}BANDWIDTH_UPGRADE_NEGOTIATION\0\u{1}KEEP_ALIVE\0\u{1}DISCONNECTION\0\u{1}PAIRED_KEY_ENCRYPTION\0\u{1}AUTHENTICATION_MESSAGE\0\u{1}AUTHENTICATION_RESULT\0\u{1}AUTO_RESUME\0\u{1}AUTO_RECONNECT\0\u{1}BANDWIDTH_UPGRADE_RETRY\0") } extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ConnectionRequestFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "endpoint_id"), - 2: .standard(proto: "endpoint_name"), - 3: .standard(proto: "handshake_data"), - 4: .same(proto: "nonce"), - 5: .same(proto: "mediums"), - 6: .standard(proto: "endpoint_info"), - 7: .standard(proto: "medium_metadata"), - 8: .standard(proto: "keep_alive_interval_millis"), - 9: .standard(proto: "keep_alive_timeout_millis"), - 10: .standard(proto: "device_type"), - 11: .standard(proto: "device_info"), - 12: .standard(proto: "connections_device"), - 13: .standard(proto: "presence_device"), - 14: .standard(proto: "connection_mode"), - 15: .standard(proto: "location_hint"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}endpoint_id\0\u{3}endpoint_name\0\u{3}handshake_data\0\u{1}nonce\0\u{1}mediums\0\u{3}endpoint_info\0\u{3}medium_metadata\0\u{3}keep_alive_interval_millis\0\u{3}keep_alive_timeout_millis\0\u{3}device_type\0\u{3}device_info\0\u{3}connections_device\0\u{3}presence_device\0\u{3}connection_mode\0\u{3}location_hint\0") fileprivate class _StorageClass { var _endpointID: String? = nil @@ -3234,7 +2565,11 @@ extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Mess var _connectionMode: Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode? = nil var _locationHint: Location_Nearby_Connections_LocationHint? = nil - static let defaultInstance = _StorageClass() + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() private init() {} @@ -3405,44 +2740,16 @@ extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Mess } extension Location_Nearby_Connections_ConnectionRequestFrame.Medium: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_MEDIUM"), - 1: .same(proto: "MDNS"), - 2: .same(proto: "BLUETOOTH"), - 3: .same(proto: "WIFI_HOTSPOT"), - 4: .same(proto: "BLE"), - 5: .same(proto: "WIFI_LAN"), - 6: .same(proto: "WIFI_AWARE"), - 7: .same(proto: "NFC"), - 8: .same(proto: "WIFI_DIRECT"), - 9: .same(proto: "WEB_RTC"), - 10: .same(proto: "BLE_L2CAP"), - 11: .same(proto: "USB"), - 12: .same(proto: "WEB_RTC_NON_CELLULAR"), - 13: .same(proto: "AWDL"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_MEDIUM\0\u{1}MDNS\0\u{1}BLUETOOTH\0\u{1}WIFI_HOTSPOT\0\u{1}BLE\0\u{1}WIFI_LAN\0\u{1}WIFI_AWARE\0\u{1}NFC\0\u{1}WIFI_DIRECT\0\u{1}WEB_RTC\0\u{1}BLE_L2CAP\0\u{1}USB\0\u{1}WEB_RTC_NON_CELLULAR\0\u{1}AWDL\0") } extension Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "LEGACY"), - 1: .same(proto: "INSTANT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0LEGACY\0\u{1}INSTANT\0") } extension Location_Nearby_Connections_ConnectionResponseFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ConnectionResponseFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "status"), - 2: .standard(proto: "handshake_data"), - 3: .same(proto: "response"), - 4: .standard(proto: "os_info"), - 5: .standard(proto: "multiplex_socket_bitmask"), - 6: .standard(proto: "nearby_connections_version"), - 7: .standard(proto: "safe_to_disconnect_version"), - 8: .standard(proto: "location_hint"), - 9: .standard(proto: "keep_alive_timeout_millis"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0\u{3}handshake_data\0\u{1}response\0\u{3}os_info\0\u{3}multiplex_socket_bitmask\0\u{3}nearby_connections_version\0\u{3}safe_to_disconnect_version\0\u{3}location_hint\0\u{3}keep_alive_timeout_millis\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3515,21 +2822,12 @@ extension Location_Nearby_Connections_ConnectionResponseFrame: SwiftProtobuf.Mes } extension Location_Nearby_Connections_ConnectionResponseFrame.ResponseStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_RESPONSE_STATUS"), - 1: .same(proto: "ACCEPT"), - 2: .same(proto: "REJECT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_RESPONSE_STATUS\0\u{1}ACCEPT\0\u{1}REJECT\0") } extension Location_Nearby_Connections_PayloadTransferFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PayloadTransferFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "packet_type"), - 2: .standard(proto: "payload_header"), - 3: .standard(proto: "payload_chunk"), - 4: .standard(proto: "control_message"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}packet_type\0\u{3}payload_header\0\u{3}payload_chunk\0\u{3}control_message\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3577,25 +2875,12 @@ extension Location_Nearby_Connections_PayloadTransferFrame: SwiftProtobuf.Messag } extension Location_Nearby_Connections_PayloadTransferFrame.PacketType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_PACKET_TYPE"), - 1: .same(proto: "DATA"), - 2: .same(proto: "CONTROL"), - 3: .same(proto: "PAYLOAD_ACK"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_PACKET_TYPE\0\u{1}DATA\0\u{1}CONTROL\0\u{1}PAYLOAD_ACK\0") } extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_PayloadTransferFrame.protoMessageName + ".PayloadHeader" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "type"), - 3: .standard(proto: "total_size"), - 4: .standard(proto: "is_sensitive"), - 5: .standard(proto: "file_name"), - 6: .standard(proto: "parent_folder"), - 7: .standard(proto: "last_modified_timestamp_millis"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}type\0\u{3}total_size\0\u{3}is_sensitive\0\u{3}file_name\0\u{3}parent_folder\0\u{3}last_modified_timestamp_millis\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3658,22 +2943,12 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader: SwiftP } extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader.PayloadType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_PAYLOAD_TYPE"), - 1: .same(proto: "BYTES"), - 2: .same(proto: "FILE"), - 3: .same(proto: "STREAM"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_PAYLOAD_TYPE\0\u{1}BYTES\0\u{1}FILE\0\u{1}STREAM\0") } extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_PayloadTransferFrame.protoMessageName + ".PayloadChunk" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "flags"), - 2: .same(proto: "offset"), - 3: .same(proto: "body"), - 4: .same(proto: "index"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}flags\0\u{1}offset\0\u{1}body\0\u{1}index\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3721,17 +2996,12 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk: SwiftPr } extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk.Flags: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "LAST_CHUNK"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}LAST_CHUNK\0") } extension Location_Nearby_Connections_PayloadTransferFrame.ControlMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_PayloadTransferFrame.protoMessageName + ".ControlMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "event"), - 2: .same(proto: "offset"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}event\0\u{1}offset\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3769,23 +3039,12 @@ extension Location_Nearby_Connections_PayloadTransferFrame.ControlMessage: Swift } extension Location_Nearby_Connections_PayloadTransferFrame.ControlMessage.EventType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_EVENT_TYPE"), - 1: .same(proto: "PAYLOAD_ERROR"), - 2: .same(proto: "PAYLOAD_CANCELED"), - 3: .same(proto: "PAYLOAD_RECEIVED_ACK"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_EVENT_TYPE\0\u{1}PAYLOAD_ERROR\0\u{1}PAYLOAD_CANCELED\0\u{1}PAYLOAD_RECEIVED_ACK\0") } extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".BandwidthUpgradeNegotiationFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "event_type"), - 2: .standard(proto: "upgrade_path_info"), - 3: .standard(proto: "client_introduction"), - 4: .standard(proto: "client_introduction_ack"), - 5: .standard(proto: "safe_to_close_prior_channel"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}event_type\0\u{3}upgrade_path_info\0\u{3}client_introduction\0\u{3}client_introduction_ack\0\u{3}safe_to_close_prior_channel\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3838,33 +3097,12 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame: SwiftPro } extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.EventType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_EVENT_TYPE"), - 1: .same(proto: "UPGRADE_PATH_AVAILABLE"), - 2: .same(proto: "LAST_WRITE_TO_PRIOR_CHANNEL"), - 3: .same(proto: "SAFE_TO_CLOSE_PRIOR_CHANNEL"), - 4: .same(proto: "CLIENT_INTRODUCTION"), - 5: .same(proto: "UPGRADE_FAILURE"), - 6: .same(proto: "CLIENT_INTRODUCTION_ACK"), - 7: .same(proto: "UPGRADE_PATH_REQUEST"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_EVENT_TYPE\0\u{1}UPGRADE_PATH_AVAILABLE\0\u{1}LAST_WRITE_TO_PRIOR_CHANNEL\0\u{1}SAFE_TO_CLOSE_PRIOR_CHANNEL\0\u{1}CLIENT_INTRODUCTION\0\u{1}UPGRADE_FAILURE\0\u{1}CLIENT_INTRODUCTION_ACK\0\u{1}UPGRADE_PATH_REQUEST\0") } extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.protoMessageName + ".UpgradePathInfo" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "medium"), - 2: .standard(proto: "wifi_hotspot_credentials"), - 3: .standard(proto: "wifi_lan_socket"), - 4: .standard(proto: "bluetooth_credentials"), - 5: .standard(proto: "wifi_aware_credentials"), - 6: .standard(proto: "wifi_direct_credentials"), - 8: .standard(proto: "web_rtc_credentials"), - 11: .standard(proto: "awdl_credentials"), - 7: .standard(proto: "supports_disabling_encryption"), - 9: .standard(proto: "supports_client_introduction_ack"), - 10: .standard(proto: "upgrade_path_request"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}medium\0\u{3}wifi_hotspot_credentials\0\u{3}wifi_lan_socket\0\u{3}bluetooth_credentials\0\u{3}wifi_aware_credentials\0\u{3}wifi_direct_credentials\0\u{3}supports_disabling_encryption\0\u{3}web_rtc_credentials\0\u{3}supports_client_introduction_ack\0\u{3}upgrade_path_request\0\u{3}awdl_credentials\0") fileprivate class _StorageClass { var _medium: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium? = nil @@ -3879,7 +3117,11 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa var _supportsClientIntroductionAck: Bool? = nil var _upgradePathRequest: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest? = nil - static let defaultInstance = _StorageClass() + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() private init() {} @@ -3999,32 +3241,12 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa } extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_MEDIUM"), - 1: .same(proto: "MDNS"), - 2: .same(proto: "BLUETOOTH"), - 3: .same(proto: "WIFI_HOTSPOT"), - 4: .same(proto: "BLE"), - 5: .same(proto: "WIFI_LAN"), - 6: .same(proto: "WIFI_AWARE"), - 7: .same(proto: "NFC"), - 8: .same(proto: "WIFI_DIRECT"), - 9: .same(proto: "WEB_RTC"), - 11: .same(proto: "USB"), - 12: .same(proto: "WEB_RTC_NON_CELLULAR"), - 13: .same(proto: "AWDL"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_MEDIUM\0\u{1}MDNS\0\u{1}BLUETOOTH\0\u{1}WIFI_HOTSPOT\0\u{1}BLE\0\u{1}WIFI_LAN\0\u{1}WIFI_AWARE\0\u{1}NFC\0\u{1}WIFI_DIRECT\0\u{1}WEB_RTC\0\u{2}\u{2}USB\0\u{1}WEB_RTC_NON_CELLULAR\0\u{1}AWDL\0") } extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".WifiHotspotCredentials" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "ssid"), - 2: .same(proto: "password"), - 3: .same(proto: "port"), - 4: .same(proto: "gateway"), - 5: .same(proto: "frequency"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}ssid\0\u{1}password\0\u{1}port\0\u{1}gateway\0\u{1}frequency\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4078,10 +3300,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".WifiLanSocket" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "ip_address"), - 2: .standard(proto: "wifi_port"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}ip_address\0\u{3}wifi_port\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4120,10 +3339,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".BluetoothCredentials" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "service_name"), - 2: .standard(proto: "mac_address"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}service_name\0\u{3}mac_address\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4162,11 +3378,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".WifiAwareCredentials" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "service_id"), - 2: .standard(proto: "service_info"), - 3: .same(proto: "password"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}service_id\0\u{3}service_info\0\u{1}password\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4210,14 +3422,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".WifiDirectCredentials" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "ssid"), - 2: .same(proto: "password"), - 3: .same(proto: "port"), - 4: .same(proto: "frequency"), - 5: .same(proto: "gateway"), - 6: .standard(proto: "ip_v6_address"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}ssid\0\u{1}password\0\u{1}port\0\u{1}frequency\0\u{1}gateway\0\u{3}ip_v6_address\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4276,10 +3481,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".WebRtcCredentials" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "peer_id"), - 2: .standard(proto: "location_hint"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}peer_id\0\u{3}location_hint\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4318,11 +3520,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".AwdlCredentials" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "service_name"), - 2: .standard(proto: "service_type"), - 3: .same(proto: "password"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}service_name\0\u{3}service_type\0\u{1}password\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4366,10 +3564,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".UpgradePathRequest" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "mediums"), - 2: .standard(proto: "medium_meta_data"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}mediums\0\u{3}medium_meta_data\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4408,9 +3603,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.protoMessageName + ".SafeToClosePriorChannel" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sta_frequency"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sta_frequency\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4444,11 +3637,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClo extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroduction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.protoMessageName + ".ClientIntroduction" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "endpoint_id"), - 2: .standard(proto: "supports_disabling_encryption"), - 3: .standard(proto: "last_endpoint_id"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}endpoint_id\0\u{3}supports_disabling_encryption\0\u{3}last_endpoint_id\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4495,8 +3684,8 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientInt static let _protobuf_nameMap = SwiftProtobuf._NameMap() mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } + // Load everything into unknown fields + while try decoder.nextFieldNumber() != nil {} } func traverse(visitor: inout V) throws { @@ -4511,10 +3700,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientInt extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".BandwidthUpgradeRetryFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "supported_medium"), - 2: .standard(proto: "is_request"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}supported_medium\0\u{3}is_request\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4552,29 +3738,12 @@ extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame: SwiftProtobuf. } extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame.Medium: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_MEDIUM"), - 2: .same(proto: "BLUETOOTH"), - 3: .same(proto: "WIFI_HOTSPOT"), - 4: .same(proto: "BLE"), - 5: .same(proto: "WIFI_LAN"), - 6: .same(proto: "WIFI_AWARE"), - 7: .same(proto: "NFC"), - 8: .same(proto: "WIFI_DIRECT"), - 9: .same(proto: "WEB_RTC"), - 10: .same(proto: "BLE_L2CAP"), - 11: .same(proto: "USB"), - 12: .same(proto: "WEB_RTC_NON_CELLULAR"), - 13: .same(proto: "AWDL"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_MEDIUM\0\u{2}\u{2}BLUETOOTH\0\u{1}WIFI_HOTSPOT\0\u{1}BLE\0\u{1}WIFI_LAN\0\u{1}WIFI_AWARE\0\u{1}NFC\0\u{1}WIFI_DIRECT\0\u{1}WEB_RTC\0\u{1}BLE_L2CAP\0\u{1}USB\0\u{1}WEB_RTC_NON_CELLULAR\0\u{1}AWDL\0") } extension Location_Nearby_Connections_KeepAliveFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".KeepAliveFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "ack"), - 2: .standard(proto: "seq_num"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}ack\0\u{3}seq_num\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4613,10 +3782,7 @@ extension Location_Nearby_Connections_KeepAliveFrame: SwiftProtobuf.Message, Swi extension Location_Nearby_Connections_DisconnectionFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".DisconnectionFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "request_safe_to_disconnect"), - 2: .standard(proto: "ack_safe_to_disconnect"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}request_safe_to_disconnect\0\u{3}ack_safe_to_disconnect\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4655,9 +3821,7 @@ extension Location_Nearby_Connections_DisconnectionFrame: SwiftProtobuf.Message, extension Location_Nearby_Connections_PairedKeyEncryptionFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PairedKeyEncryptionFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "signed_data"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}signed_data\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4691,9 +3855,7 @@ extension Location_Nearby_Connections_PairedKeyEncryptionFrame: SwiftProtobuf.Me extension Location_Nearby_Connections_AuthenticationMessageFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AuthenticationMessageFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "auth_message"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}auth_message\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4727,9 +3889,7 @@ extension Location_Nearby_Connections_AuthenticationMessageFrame: SwiftProtobuf. extension Location_Nearby_Connections_AuthenticationResultFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AuthenticationResultFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "result"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4763,12 +3923,7 @@ extension Location_Nearby_Connections_AuthenticationResultFrame: SwiftProtobuf.M extension Location_Nearby_Connections_AutoResumeFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AutoResumeFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "event_type"), - 2: .standard(proto: "pending_payload_id"), - 3: .standard(proto: "next_payload_chunk_index"), - 4: .same(proto: "version"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}event_type\0\u{3}pending_payload_id\0\u{3}next_payload_chunk_index\0\u{1}version\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4816,20 +3971,12 @@ extension Location_Nearby_Connections_AutoResumeFrame: SwiftProtobuf.Message, Sw } extension Location_Nearby_Connections_AutoResumeFrame.EventType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_AUTO_RESUME_EVENT_TYPE"), - 1: .same(proto: "PAYLOAD_RESUME_TRANSFER_START"), - 2: .same(proto: "PAYLOAD_RESUME_TRANSFER_ACK"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_AUTO_RESUME_EVENT_TYPE\0\u{1}PAYLOAD_RESUME_TRANSFER_START\0\u{1}PAYLOAD_RESUME_TRANSFER_ACK\0") } extension Location_Nearby_Connections_AutoReconnectFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AutoReconnectFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "endpoint_id"), - 2: .standard(proto: "event_type"), - 3: .standard(proto: "last_endpoint_id"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}endpoint_id\0\u{3}event_type\0\u{3}last_endpoint_id\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -4872,29 +4019,12 @@ extension Location_Nearby_Connections_AutoReconnectFrame: SwiftProtobuf.Message, } extension Location_Nearby_Connections_AutoReconnectFrame.EventType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_EVENT_TYPE"), - 1: .same(proto: "CLIENT_INTRODUCTION"), - 2: .same(proto: "CLIENT_INTRODUCTION_ACK"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_EVENT_TYPE\0\u{1}CLIENT_INTRODUCTION\0\u{1}CLIENT_INTRODUCTION_ACK\0") } extension Location_Nearby_Connections_MediumMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".MediumMetadata" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "supports_5_ghz"), - 2: .same(proto: "bssid"), - 3: .standard(proto: "ip_address"), - 4: .standard(proto: "supports_6_ghz"), - 5: .standard(proto: "mobile_radio"), - 6: .standard(proto: "ap_frequency"), - 7: .standard(proto: "available_channels"), - 8: .standard(proto: "wifi_direct_cli_usable_channels"), - 9: .standard(proto: "wifi_lan_usable_channels"), - 10: .standard(proto: "wifi_aware_usable_channels"), - 11: .standard(proto: "wifi_hotspot_sta_usable_channels"), - 12: .standard(proto: "medium_role"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}supports_5_ghz\0\u{1}bssid\0\u{3}ip_address\0\u{3}supports_6_ghz\0\u{3}mobile_radio\0\u{3}ap_frequency\0\u{3}available_channels\0\u{3}wifi_direct_cli_usable_channels\0\u{3}wifi_lan_usable_channels\0\u{3}wifi_aware_usable_channels\0\u{3}wifi_hotspot_sta_usable_channels\0\u{3}medium_role\0") fileprivate class _StorageClass { var _supports5Ghz: Bool? = nil @@ -4910,7 +4040,11 @@ extension Location_Nearby_Connections_MediumMetadata: SwiftProtobuf.Message, Swi var _wifiHotspotStaUsableChannels: Location_Nearby_Connections_WifiHotspotStaUsableChannels? = nil var _mediumRole: Location_Nearby_Connections_MediumRole? = nil - static let defaultInstance = _StorageClass() + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() private init() {} @@ -5037,9 +4171,7 @@ extension Location_Nearby_Connections_MediumMetadata: SwiftProtobuf.Message, Swi extension Location_Nearby_Connections_AvailableChannels: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AvailableChannels" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "channels"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}channels\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5069,9 +4201,7 @@ extension Location_Nearby_Connections_AvailableChannels: SwiftProtobuf.Message, extension Location_Nearby_Connections_WifiDirectCliUsableChannels: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".WifiDirectCliUsableChannels" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "channels"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}channels\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5101,9 +4231,7 @@ extension Location_Nearby_Connections_WifiDirectCliUsableChannels: SwiftProtobuf extension Location_Nearby_Connections_WifiLanUsableChannels: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".WifiLanUsableChannels" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "channels"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}channels\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5133,9 +4261,7 @@ extension Location_Nearby_Connections_WifiLanUsableChannels: SwiftProtobuf.Messa extension Location_Nearby_Connections_WifiAwareUsableChannels: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".WifiAwareUsableChannels" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "channels"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}channels\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5165,9 +4291,7 @@ extension Location_Nearby_Connections_WifiAwareUsableChannels: SwiftProtobuf.Mes extension Location_Nearby_Connections_WifiHotspotStaUsableChannels: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".WifiHotspotStaUsableChannels" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "channels"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}channels\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5197,16 +4321,7 @@ extension Location_Nearby_Connections_WifiHotspotStaUsableChannels: SwiftProtobu extension Location_Nearby_Connections_MediumRole: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".MediumRole" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "support_wifi_direct_group_owner"), - 2: .standard(proto: "support_wifi_direct_group_client"), - 3: .standard(proto: "support_wifi_hotspot_host"), - 4: .standard(proto: "support_wifi_hotspot_client"), - 5: .standard(proto: "support_wifi_aware_publisher"), - 6: .standard(proto: "support_wifi_aware_subscriber"), - 7: .standard(proto: "support_awdl_publisher"), - 8: .standard(proto: "support_awdl_subscriber"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}support_wifi_direct_group_owner\0\u{3}support_wifi_direct_group_client\0\u{3}support_wifi_hotspot_host\0\u{3}support_wifi_hotspot_client\0\u{3}support_wifi_aware_publisher\0\u{3}support_wifi_aware_subscriber\0\u{3}support_awdl_publisher\0\u{3}support_awdl_subscriber\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5275,10 +4390,7 @@ extension Location_Nearby_Connections_MediumRole: SwiftProtobuf.Message, SwiftPr extension Location_Nearby_Connections_LocationHint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".LocationHint" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "location"), - 2: .same(proto: "format"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}location\0\u{1}format\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5320,8 +4432,8 @@ extension Location_Nearby_Connections_LocationStandard: SwiftProtobuf.Message, S static let _protobuf_nameMap = SwiftProtobuf._NameMap() mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } + // Load everything into unknown fields + while try decoder.nextFieldNumber() != nil {} } func traverse(visitor: inout V) throws { @@ -5335,18 +4447,12 @@ extension Location_Nearby_Connections_LocationStandard: SwiftProtobuf.Message, S } extension Location_Nearby_Connections_LocationStandard.Format: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "E164_CALLING"), - 2: .same(proto: "ISO_3166_1_ALPHA_2"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}E164_CALLING\0\u{1}ISO_3166_1_ALPHA_2\0") } extension Location_Nearby_Connections_OsInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".OsInfo" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5379,24 +4485,12 @@ extension Location_Nearby_Connections_OsInfo: SwiftProtobuf.Message, SwiftProtob } extension Location_Nearby_Connections_OsInfo.OsType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_OS_TYPE"), - 1: .same(proto: "ANDROID"), - 2: .same(proto: "CHROME_OS"), - 3: .same(proto: "WINDOWS"), - 4: .same(proto: "APPLE"), - 100: .same(proto: "LINUX"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_OS_TYPE\0\u{1}ANDROID\0\u{1}CHROME_OS\0\u{1}WINDOWS\0\u{1}APPLE\0\u{2}`\u{1}LINUX\0") } extension Location_Nearby_Connections_ConnectionsDevice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ConnectionsDevice" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "endpoint_id"), - 2: .standard(proto: "endpoint_type"), - 3: .standard(proto: "connectivity_info_list"), - 4: .standard(proto: "endpoint_info"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}endpoint_id\0\u{3}endpoint_type\0\u{3}connectivity_info_list\0\u{3}endpoint_info\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5445,18 +4539,7 @@ extension Location_Nearby_Connections_ConnectionsDevice: SwiftProtobuf.Message, extension Location_Nearby_Connections_PresenceDevice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PresenceDevice" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "endpoint_id"), - 2: .standard(proto: "endpoint_type"), - 3: .standard(proto: "connectivity_info_list"), - 4: .standard(proto: "device_id"), - 5: .standard(proto: "device_name"), - 6: .standard(proto: "device_type"), - 7: .standard(proto: "device_image_url"), - 8: .standard(proto: "discovery_medium"), - 9: .same(proto: "actions"), - 10: .standard(proto: "identity_type"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}endpoint_id\0\u{3}endpoint_type\0\u{3}connectivity_info_list\0\u{3}device_id\0\u{3}device_name\0\u{3}device_type\0\u{3}device_image_url\0\u{3}discovery_medium\0\u{1}actions\0\u{3}identity_type\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -5534,13 +4617,5 @@ extension Location_Nearby_Connections_PresenceDevice: SwiftProtobuf.Message, Swi } extension Location_Nearby_Connections_PresenceDevice.DeviceType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "PHONE"), - 2: .same(proto: "TABLET"), - 3: .same(proto: "DISPLAY"), - 4: .same(proto: "LAPTOP"), - 5: .same(proto: "TV"), - 6: .same(proto: "WATCH"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}PHONE\0\u{1}TABLET\0\u{1}DISPLAY\0\u{1}LAPTOP\0\u{1}TV\0\u{1}WATCH\0") } diff --git a/NearbyShare/Model/Protobuf/securegcm.pb.swift b/NearbyShare/Model/Protobuf/securegcm.pb.swift index 5da7ecc..e8be9bb 100644 --- a/NearbyShare/Model/Protobuf/securegcm.pb.swift +++ b/NearbyShare/Model/Protobuf/securegcm.pb.swift @@ -1,5 +1,6 @@ // DO NOT EDIT. // swift-format-ignore-file +// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: securegcm.proto @@ -36,278 +37,131 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// This enum is used by iOS devices as values for device_display_diagonal_mils /// in GcmDeviceInfo. There is no good way to calculate it on those devices. -enum Securegcm_AppleDeviceDiagonalMils: SwiftProtobuf.Enum { - typealias RawValue = Int +enum Securegcm_AppleDeviceDiagonalMils: Int, SwiftProtobuf.Enum, Swift.CaseIterable { /// This is the mils diagonal on an iPhone 5. - case applePhone // = 4000 + case applePhone = 4000 /// This is the mils diagonal on an iPad mini. - case applePad // = 7900 + case applePad = 7900 init() { self = .applePhone } - init?(rawValue: Int) { - switch rawValue { - case 4000: self = .applePhone - case 7900: self = .applePad - default: return nil - } - } - - var rawValue: Int { - switch self { - case .applePhone: return 4000 - case .applePad: return 7900 - } - } - } -#if swift(>=4.2) - -extension Securegcm_AppleDeviceDiagonalMils: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// This should be kept in sync with DeviceType in: /// java/com/google/security/cryptauth/backend/services/common/common_enums.proto -enum Securegcm_DeviceType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case android // = 1 - case chrome // = 2 - case ios // = 3 - case browser // = 4 - case osx // = 5 +enum Securegcm_DeviceType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case android = 1 + case chrome = 2 + case ios = 3 + case browser = 4 + case osx = 5 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .android - case 2: self = .chrome - case 3: self = .ios - case 4: self = .browser - case 5: self = .osx - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .android: return 1 - case .chrome: return 2 - case .ios: return 3 - case .browser: return 4 - case .osx: return 5 - } - } - } -#if swift(>=4.2) - -extension Securegcm_DeviceType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// MultiDevice features which may be supported and enabled on a device. See -enum Securegcm_SoftwareFeature: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownFeature // = 0 - case betterTogetherHost // = 1 - case betterTogetherClient // = 2 - case easyUnlockHost // = 3 - case easyUnlockClient // = 4 - case magicTetherHost // = 5 - case magicTetherClient // = 6 - case smsConnectHost // = 7 - case smsConnectClient // = 8 +enum Securegcm_SoftwareFeature: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownFeature = 0 + case betterTogetherHost = 1 + case betterTogetherClient = 2 + case easyUnlockHost = 3 + case easyUnlockClient = 4 + case magicTetherHost = 5 + case magicTetherClient = 6 + case smsConnectHost = 7 + case smsConnectClient = 8 init() { self = .unknownFeature } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownFeature - case 1: self = .betterTogetherHost - case 2: self = .betterTogetherClient - case 3: self = .easyUnlockHost - case 4: self = .easyUnlockClient - case 5: self = .magicTetherHost - case 6: self = .magicTetherClient - case 7: self = .smsConnectHost - case 8: self = .smsConnectClient - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownFeature: return 0 - case .betterTogetherHost: return 1 - case .betterTogetherClient: return 2 - case .easyUnlockHost: return 3 - case .easyUnlockClient: return 4 - case .magicTetherHost: return 5 - case .magicTetherClient: return 6 - case .smsConnectHost: return 7 - case .smsConnectClient: return 8 - } - } - } -#if swift(>=4.2) - -extension Securegcm_SoftwareFeature: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// A list of "reasons" that can be provided for calling server-side APIs. /// This is particularly important for calls that can be triggered by different /// kinds of events. Please try to keep reasons as generic as possible, so that /// codes can be re-used by various callers in a sensible fashion. -enum Securegcm_InvocationReason: SwiftProtobuf.Enum { - typealias RawValue = Int - case reasonUnknown // = 0 +enum Securegcm_InvocationReason: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case reasonUnknown = 0 /// First run of the software package invoking this call - case reasonInitialization // = 1 + case reasonInitialization = 1 /// Ordinary periodic actions (e.g. monthly master key rotation) - case reasonPeriodic // = 2 + case reasonPeriodic = 2 /// Slow-cycle periodic action (e.g. yearly keypair rotation???) - case reasonSlowPeriodic // = 3 + case reasonSlowPeriodic = 3 /// Fast-cycle periodic action (e.g. daily sync for Smart Lock users) - case reasonFastPeriodic // = 4 + case reasonFastPeriodic = 4 /// Expired state (e.g. expired credentials, or cached entries) was detected - case reasonExpiration // = 5 + case reasonExpiration = 5 /// An unexpected protocol failure occurred (so attempting to repair state) - case reasonFailureRecovery // = 6 + case reasonFailureRecovery = 6 /// A new account has been added to the device - case reasonNewAccount // = 7 + case reasonNewAccount = 7 /// An existing account on the device has been changed - case reasonChangedAccount // = 8 + case reasonChangedAccount = 8 /// The user toggled the state of a feature (e.g. Smart Lock enabled via BT) - case reasonFeatureToggled // = 9 + case reasonFeatureToggled = 9 /// A "push" from the server caused this action (e.g. a sync tickle) - case reasonServerInitiated // = 10 + case reasonServerInitiated = 10 /// A local address change triggered this (e.g. GCM registration id changed) - case reasonAddressChange // = 11 + case reasonAddressChange = 11 /// A software update has triggered this - case reasonSoftwareUpdate // = 12 + case reasonSoftwareUpdate = 12 /// A manual action by the user triggered this (e.g. commands sent via adb) - case reasonManual // = 13 + case reasonManual = 13 /// A custom key has been invalidated on the device (e.g. screen lock is /// disabled). - case reasonCustomKeyInvalidation // = 14 + case reasonCustomKeyInvalidation = 14 /// Periodic action triggered by auth_proximity - case reasonProximityPeriodic // = 15 + case reasonProximityPeriodic = 15 init() { self = .reasonUnknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .reasonUnknown - case 1: self = .reasonInitialization - case 2: self = .reasonPeriodic - case 3: self = .reasonSlowPeriodic - case 4: self = .reasonFastPeriodic - case 5: self = .reasonExpiration - case 6: self = .reasonFailureRecovery - case 7: self = .reasonNewAccount - case 8: self = .reasonChangedAccount - case 9: self = .reasonFeatureToggled - case 10: self = .reasonServerInitiated - case 11: self = .reasonAddressChange - case 12: self = .reasonSoftwareUpdate - case 13: self = .reasonManual - case 14: self = .reasonCustomKeyInvalidation - case 15: self = .reasonProximityPeriodic - default: return nil - } - } - - var rawValue: Int { - switch self { - case .reasonUnknown: return 0 - case .reasonInitialization: return 1 - case .reasonPeriodic: return 2 - case .reasonSlowPeriodic: return 3 - case .reasonFastPeriodic: return 4 - case .reasonExpiration: return 5 - case .reasonFailureRecovery: return 6 - case .reasonNewAccount: return 7 - case .reasonChangedAccount: return 8 - case .reasonFeatureToggled: return 9 - case .reasonServerInitiated: return 10 - case .reasonAddressChange: return 11 - case .reasonSoftwareUpdate: return 12 - case .reasonManual: return 13 - case .reasonCustomKeyInvalidation: return 14 - case .reasonProximityPeriodic: return 15 - } - } - } -#if swift(>=4.2) - -extension Securegcm_InvocationReason: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Securegcm_Type: SwiftProtobuf.Enum { - typealias RawValue = Int - case enrollment // = 0 - case tickle // = 1 - case txRequest // = 2 - case txReply // = 3 - case txSyncRequest // = 4 - case txSyncResponse // = 5 - case txPing // = 6 - case deviceInfoUpdate // = 7 - case txCancelRequest // = 8 +enum Securegcm_Type: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case enrollment = 0 + case tickle = 1 + case txRequest = 2 + case txReply = 3 + case txSyncRequest = 4 + case txSyncResponse = 5 + case txPing = 6 + case deviceInfoUpdate = 7 + case txCancelRequest = 8 /// DEPRECATED (can be re-used after Aug 2015) - case proximityauthPairing // = 10 + case proximityauthPairing = 10 /// The kind of identity assertion generated by a "GCM V1" device (i.e., /// an Android phone that has registered with us a public and a symmetric /// key) - case gcmv1IdentityAssertion // = 11 + case gcmv1IdentityAssertion = 11 /// Device-to-device communications are protected by an unauthenticated /// Diffie-Hellman exchange. The InitiatorHello message is simply the @@ -318,87 +172,36 @@ enum Securegcm_Type: SwiftProtobuf.Enum { /// by the derived shared key. It also contains the responder's /// public DH key. ResponderHelloAndPayload messages have the /// DEVICE_TO_DEVICE_RESPONDER_HELLO tag. - case deviceToDeviceResponderHelloPayload // = 12 + case deviceToDeviceResponderHelloPayload = 12 /// Device-to-device communications are protected by an unauthenticated /// Diffie-Hellman exchange. Once the initiator and responder /// agree on a shared key (through Diffie-Hellman), they will use messages /// tagged with DEVICE_TO_DEVICE_MESSAGE to exchange data. - case deviceToDeviceMessage // = 13 + case deviceToDeviceMessage = 13 /// Notification to let a device know it should contact a nearby device. - case deviceProximityCallback // = 14 + case deviceProximityCallback = 14 /// Device-to-device communications are protected by an unauthenticated /// Diffie-Hellman exchange. During device-to-device authentication, the first /// message from initiator (the challenge) is signed and put into the payload /// of the message sent back to the initiator. - case unlockKeySignedChallenge // = 15 + case unlockKeySignedChallenge = 15 /// Specialty (corp only) features - case loginNotification // = 101 + case loginNotification = 101 init() { self = .enrollment } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .enrollment - case 1: self = .tickle - case 2: self = .txRequest - case 3: self = .txReply - case 4: self = .txSyncRequest - case 5: self = .txSyncResponse - case 6: self = .txPing - case 7: self = .deviceInfoUpdate - case 8: self = .txCancelRequest - case 10: self = .proximityauthPairing - case 11: self = .gcmv1IdentityAssertion - case 12: self = .deviceToDeviceResponderHelloPayload - case 13: self = .deviceToDeviceMessage - case 14: self = .deviceProximityCallback - case 15: self = .unlockKeySignedChallenge - case 101: self = .loginNotification - default: return nil - } - } - - var rawValue: Int { - switch self { - case .enrollment: return 0 - case .tickle: return 1 - case .txRequest: return 2 - case .txReply: return 3 - case .txSyncRequest: return 4 - case .txSyncResponse: return 5 - case .txPing: return 6 - case .deviceInfoUpdate: return 7 - case .txCancelRequest: return 8 - case .proximityauthPairing: return 10 - case .gcmv1IdentityAssertion: return 11 - case .deviceToDeviceResponderHelloPayload: return 12 - case .deviceToDeviceMessage: return 13 - case .deviceProximityCallback: return 14 - case .unlockKeySignedChallenge: return 15 - case .loginNotification: return 101 - } - } - } -#if swift(>=4.2) - -extension Securegcm_Type: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Message used only during enrollment /// Field numbers should be kept in sync with DeviceInfo in: /// java/com/google/security/cryptauth/backend/services/common/common.proto -struct Securegcm_GcmDeviceInfo { +struct Securegcm_GcmDeviceInfo: @unchecked Sendable { // 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. @@ -798,7 +601,7 @@ struct Securegcm_GcmDeviceInfo { fileprivate var _storage = _StorageClass.defaultInstance } -struct Securegcm_GcmMetadata { +struct Securegcm_GcmMetadata: Sendable { // 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. @@ -829,7 +632,7 @@ struct Securegcm_GcmMetadata { fileprivate var _version: Int32? = nil } -struct Securegcm_Tickle { +struct Securegcm_Tickle: Sendable { // 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. @@ -851,7 +654,7 @@ struct Securegcm_Tickle { fileprivate var _expiryTime: UInt64? = nil } -struct Securegcm_LoginNotificationInfo { +struct Securegcm_LoginNotificationInfo: Sendable { // 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. @@ -917,138 +720,33 @@ struct Securegcm_LoginNotificationInfo { fileprivate var _eventType: String? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Securegcm_AppleDeviceDiagonalMils: @unchecked Sendable {} -extension Securegcm_DeviceType: @unchecked Sendable {} -extension Securegcm_SoftwareFeature: @unchecked Sendable {} -extension Securegcm_InvocationReason: @unchecked Sendable {} -extension Securegcm_Type: @unchecked Sendable {} -extension Securegcm_GcmDeviceInfo: @unchecked Sendable {} -extension Securegcm_GcmMetadata: @unchecked Sendable {} -extension Securegcm_Tickle: @unchecked Sendable {} -extension Securegcm_LoginNotificationInfo: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "securegcm" extension Securegcm_AppleDeviceDiagonalMils: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 4000: .same(proto: "APPLE_PHONE"), - 7900: .same(proto: "APPLE_PAD"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}`>APPLE_PHONE\0\u{2}|(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1463,13 +1160,7 @@ extension Securegcm_Tickle: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme extension Securegcm_LoginNotificationInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".LoginNotificationInfo" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 2: .standard(proto: "creation_time"), - 3: .same(proto: "email"), - 4: .same(proto: "host"), - 5: .same(proto: "source"), - 6: .standard(proto: "event_type"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{4}\u{2}creation_time\0\u{1}email\0\u{1}host\0\u{1}source\0\u{3}event_type\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { diff --git a/NearbyShare/Model/Protobuf/securemessage.pb.swift b/NearbyShare/Model/Protobuf/securemessage.pb.swift index eae8d01..8c6f31a 100644 --- a/NearbyShare/Model/Protobuf/securemessage.pb.swift +++ b/NearbyShare/Model/Protobuf/securemessage.pb.swift @@ -1,5 +1,6 @@ // DO NOT EDIT. // swift-format-ignore-file +// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: securemessage.proto @@ -37,123 +38,47 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// Supported "signature" schemes (both symmetric key and public key based) -enum Securemessage_SigScheme: SwiftProtobuf.Enum { - typealias RawValue = Int - case hmacSha256 // = 1 - case ecdsaP256Sha256 // = 2 +enum Securemessage_SigScheme: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case hmacSha256 = 1 + case ecdsaP256Sha256 = 2 /// Not recommended -- use ECDSA_P256_SHA256 instead - case rsa2048Sha256 // = 3 + case rsa2048Sha256 = 3 init() { self = .hmacSha256 } - init?(rawValue: Int) { - switch rawValue { - case 1: self = .hmacSha256 - case 2: self = .ecdsaP256Sha256 - case 3: self = .rsa2048Sha256 - default: return nil - } - } - - var rawValue: Int { - switch self { - case .hmacSha256: return 1 - case .ecdsaP256Sha256: return 2 - case .rsa2048Sha256: return 3 - } - } - } -#if swift(>=4.2) - -extension Securemessage_SigScheme: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Supported encryption schemes -enum Securemessage_EncScheme: SwiftProtobuf.Enum { - typealias RawValue = Int +enum Securemessage_EncScheme: Int, SwiftProtobuf.Enum, Swift.CaseIterable { /// No encryption - case none // = 1 - case aes256Cbc // = 2 + case none = 1 + case aes256Cbc = 2 init() { self = .none } - init?(rawValue: Int) { - switch rawValue { - case 1: self = .none - case 2: self = .aes256Cbc - default: return nil - } - } - - var rawValue: Int { - switch self { - case .none: return 1 - case .aes256Cbc: return 2 - } - } - } -#if swift(>=4.2) - -extension Securemessage_EncScheme: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// A list of supported public key types -enum Securemessage_PublicKeyType: SwiftProtobuf.Enum { - typealias RawValue = Int - case ecP256 // = 1 - case rsa2048 // = 2 +enum Securemessage_PublicKeyType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case ecP256 = 1 + case rsa2048 = 2 /// 2048-bit MODP group 14, from RFC 3526 - case dh2048Modp // = 3 + case dh2048Modp = 3 init() { self = .ecP256 } - init?(rawValue: Int) { - switch rawValue { - case 1: self = .ecP256 - case 2: self = .rsa2048 - case 3: self = .dh2048Modp - default: return nil - } - } - - var rawValue: Int { - switch self { - case .ecP256: return 1 - case .rsa2048: return 2 - case .dh2048Modp: return 3 - } - } - } -#if swift(>=4.2) - -extension Securemessage_PublicKeyType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Securemessage_SecureMessage { +struct Securemessage_SecureMessage: Sendable { // 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. @@ -186,7 +111,7 @@ struct Securemessage_SecureMessage { fileprivate var _signature: Data? = nil } -struct Securemessage_Header { +struct Securemessage_Header: Sendable { // 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. @@ -273,7 +198,7 @@ struct Securemessage_Header { fileprivate var _associatedDataLength: UInt32? = nil } -struct Securemessage_HeaderAndBody { +struct Securemessage_HeaderAndBody: Sendable { // 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. @@ -311,7 +236,7 @@ struct Securemessage_HeaderAndBody { /// remains stable irrespective of protobuf implementation choices. This /// low-level representation of a HeaderAndBody should not be used by /// any code outside of the SecureMessage library implementation/tests. -struct Securemessage_HeaderAndBodyInternal { +struct Securemessage_HeaderAndBodyInternal: Sendable { // 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. @@ -345,7 +270,7 @@ struct Securemessage_HeaderAndBodyInternal { } /// A convenience proto for encoding NIST P-256 elliptic curve public keys -struct Securemessage_EcP256PublicKey { +struct Securemessage_EcP256PublicKey: Sendable { // 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. @@ -379,7 +304,7 @@ struct Securemessage_EcP256PublicKey { } /// A convenience proto for encoding RSA public keys with small exponents -struct Securemessage_SimpleRsaPublicKey { +struct Securemessage_SimpleRsaPublicKey: Sendable { // 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. @@ -414,7 +339,7 @@ struct Securemessage_SimpleRsaPublicKey { /// A convenience proto for encoding Diffie-Hellman public keys, /// for use only when Elliptic Curve based key exchanges are not possible. /// (Note that the group parameters must be specified separately) -struct Securemessage_DhPublicKey { +struct Securemessage_DhPublicKey: Sendable { // 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. @@ -436,7 +361,7 @@ struct Securemessage_DhPublicKey { fileprivate var _y: Data? = nil } -struct Securemessage_GenericPublicKey { +struct Securemessage_GenericPublicKey: Sendable { // 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. @@ -488,53 +413,25 @@ struct Securemessage_GenericPublicKey { fileprivate var _dh2048PublicKey: Securemessage_DhPublicKey? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Securemessage_SigScheme: @unchecked Sendable {} -extension Securemessage_EncScheme: @unchecked Sendable {} -extension Securemessage_PublicKeyType: @unchecked Sendable {} -extension Securemessage_SecureMessage: @unchecked Sendable {} -extension Securemessage_Header: @unchecked Sendable {} -extension Securemessage_HeaderAndBody: @unchecked Sendable {} -extension Securemessage_HeaderAndBodyInternal: @unchecked Sendable {} -extension Securemessage_EcP256PublicKey: @unchecked Sendable {} -extension Securemessage_SimpleRsaPublicKey: @unchecked Sendable {} -extension Securemessage_DhPublicKey: @unchecked Sendable {} -extension Securemessage_GenericPublicKey: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "securemessage" extension Securemessage_SigScheme: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "HMAC_SHA256"), - 2: .same(proto: "ECDSA_P256_SHA256"), - 3: .same(proto: "RSA2048_SHA256"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}HMAC_SHA256\0\u{1}ECDSA_P256_SHA256\0\u{1}RSA2048_SHA256\0") } extension Securemessage_EncScheme: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "NONE"), - 2: .same(proto: "AES_256_CBC"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}NONE\0\u{1}AES_256_CBC\0") } extension Securemessage_PublicKeyType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "EC_P256"), - 2: .same(proto: "RSA2048"), - 3: .same(proto: "DH2048_MODP"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}EC_P256\0\u{1}RSA2048\0\u{1}DH2048_MODP\0") } extension Securemessage_SecureMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".SecureMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "header_and_body"), - 2: .same(proto: "signature"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}header_and_body\0\u{1}signature\0") public var isInitialized: Bool { if self._headerAndBody == nil {return false} @@ -579,15 +476,7 @@ extension Securemessage_SecureMessage: SwiftProtobuf.Message, SwiftProtobuf._Mes extension Securemessage_Header: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Header" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "signature_scheme"), - 2: .standard(proto: "encryption_scheme"), - 3: .standard(proto: "verification_key_id"), - 4: .standard(proto: "decryption_key_id"), - 5: .same(proto: "iv"), - 6: .standard(proto: "public_metadata"), - 7: .standard(proto: "associated_data_length"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}signature_scheme\0\u{3}encryption_scheme\0\u{3}verification_key_id\0\u{3}decryption_key_id\0\u{1}iv\0\u{3}public_metadata\0\u{3}associated_data_length\0") public var isInitialized: Bool { if self._signatureScheme == nil {return false} @@ -657,10 +546,7 @@ extension Securemessage_Header: SwiftProtobuf.Message, SwiftProtobuf._MessageImp extension Securemessage_HeaderAndBody: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".HeaderAndBody" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "header"), - 2: .same(proto: "body"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}header\0\u{1}body\0") public var isInitialized: Bool { if self._header == nil {return false} @@ -706,10 +592,7 @@ extension Securemessage_HeaderAndBody: SwiftProtobuf.Message, SwiftProtobuf._Mes extension Securemessage_HeaderAndBodyInternal: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".HeaderAndBodyInternal" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "header"), - 2: .same(proto: "body"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}header\0\u{1}body\0") public var isInitialized: Bool { if self._header == nil {return false} @@ -754,10 +637,7 @@ extension Securemessage_HeaderAndBodyInternal: SwiftProtobuf.Message, SwiftProto extension Securemessage_EcP256PublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".EcP256PublicKey" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "x"), - 2: .same(proto: "y"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}x\0\u{1}y\0") public var isInitialized: Bool { if self._x == nil {return false} @@ -802,10 +682,7 @@ extension Securemessage_EcP256PublicKey: SwiftProtobuf.Message, SwiftProtobuf._M extension Securemessage_SimpleRsaPublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".SimpleRsaPublicKey" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "n"), - 2: .same(proto: "e"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}n\0\u{1}e\0") public var isInitialized: Bool { if self._n == nil {return false} @@ -849,9 +726,7 @@ extension Securemessage_SimpleRsaPublicKey: SwiftProtobuf.Message, SwiftProtobuf extension Securemessage_DhPublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".DhPublicKey" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "y"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}y\0") public var isInitialized: Bool { if self._y == nil {return false} @@ -890,12 +765,7 @@ extension Securemessage_DhPublicKey: SwiftProtobuf.Message, SwiftProtobuf._Messa extension Securemessage_GenericPublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GenericPublicKey" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .standard(proto: "ec_p256_public_key"), - 3: .standard(proto: "rsa2048_public_key"), - 4: .standard(proto: "dh2048_public_key"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}ec_p256_public_key\0\u{3}rsa2048_public_key\0\u{3}dh2048_public_key\0") public var isInitialized: Bool { if self._type == nil {return false} diff --git a/NearbyShare/Model/Protobuf/sharing_enums.pb.swift b/NearbyShare/Model/Protobuf/sharing_enums.pb.swift index 3c891db..7cdd908 100644 --- a/NearbyShare/Model/Protobuf/sharing_enums.pb.swift +++ b/NearbyShare/Model/Protobuf/sharing_enums.pb.swift @@ -1,5 +1,6 @@ // DO NOT EDIT. // swift-format-ignore-file +// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: sharing_enums.proto @@ -21,7 +22,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Foundation import SwiftProtobuf // If the compiler emits an error on this type, it is because this file @@ -41,3428 +41,1347 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// equivalence for Windows) for all events (may exclude settings), and /// session_id for a pair of events (start and end of a session). /// Next id: 74 -enum Location_Nearby_Proto_Sharing_EventType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownEventType // = 0 +enum Location_Nearby_Proto_Sharing_EventType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownEventType = 0 /// When new users accept agreements (like grant permission to contacts for /// CONTACT_ONLY visibility) and are enrolled into Nearby Sharing. This event /// is used to count number of new users. - case acceptAgreements // = 1 + case acceptAgreements = 1 /// User enables/disables nearby sharing from setting or tile service. - case enableNearbySharing // = 2 + case enableNearbySharing = 2 /// User sets visibility preference from setting. - case setVisibility // = 3 + case setVisibility = 3 /// Describe attachments immediately when Nearby Sharing is opened by another /// app which is used to generate/attach attachments to be shared with other /// devices. - case describeAttachments // = 4 + case describeAttachments = 4 /// Start of a scanning phase at sender. - case scanForShareTargetsStart // = 5 + case scanForShareTargetsStart = 5 /// End of the scanning phase at sender. - case scanForShareTargetsEnd // = 6 + case scanForShareTargetsEnd = 6 /// Receiver advertises itself for presence (a pseudo session). - case advertiseDevicePresenceStart // = 7 + case advertiseDevicePresenceStart = 7 /// End of the advertising phase at receiver. - case advertiseDevicePresenceEnd // = 8 + case advertiseDevicePresenceEnd = 8 /// Sender sends a fast initialization to receiver. - case sendFastInitialization // = 9 + case sendFastInitialization = 9 /// Receiver receives the fast initialization. - case receiveFastInitialization // = 10 + case receiveFastInitialization = 10 /// Sender discovers a share target. - case discoverShareTarget // = 11 + case discoverShareTarget = 11 /// Sender sends introduction (before attachments being sent). - case sendIntroduction // = 12 + case sendIntroduction = 12 /// Receiver receives introduction. - case receiveIntroduction // = 13 + case receiveIntroduction = 13 /// Receiver responds to introduction (before attachments being sent). /// Actions: Accept, Reject, or (for some reason) Fail. - case respondToIntroduction // = 14 + case respondToIntroduction = 14 /// Start of the sending attachments phase at sender. - case sendAttachmentsStart // = 15 + case sendAttachmentsStart = 15 /// End of sending attachments phase at sender. - case sendAttachmentsEnd // = 16 + case sendAttachmentsEnd = 16 /// Start of the receiving attachments phase at receiver. - case receiveAttachmentsStart // = 17 + case receiveAttachmentsStart = 17 /// End of receiving attachments phase at receiver. - case receiveAttachmentsEnd // = 18 + case receiveAttachmentsEnd = 18 /// Sender cancels sending attachments. - case cancelSendingAttachments // = 19 + case cancelSendingAttachments = 19 /// Receiver cancels receiving attachments. - case cancelReceivingAttachments // = 20 + case cancelReceivingAttachments = 20 /// Receiver opens received attachments. - case openReceivedAttachments // = 21 + case openReceivedAttachments = 21 /// User opens the setup activity. - case launchSetupActivity // = 22 + /// + /// NOTE: This enum value was marked as deprecated in the .proto file + case launchSetupActivity = 22 /// User adds a contact. - case addContact // = 23 + case addContact = 23 /// User removes a contact. - case removeContact // = 24 + case removeContact = 24 /// Local devices all Fast Share server. - case fastShareServerResponse // = 25 + case fastShareServerResponse = 25 /// The start of a sending session. - case sendStart // = 26 + case sendStart = 26 /// Receiver accepts a fast initialization. - case acceptFastInitialization // = 27 + case acceptFastInitialization = 27 /// Set data usage preference. - case setDataUsage // = 28 + case setDataUsage = 28 /// Receiver dismisses a fast initialization - case dismissFastInitialization // = 29 + case dismissFastInitialization = 29 /// Cancel connection. - case cancelConnection // = 30 + case cancelConnection = 30 /// User starts a chimera activity (e.g. ConsentsChimeraActivity, /// DeviceVisibilityChimeraActivity...) - case launchActivity // = 31 + case launchActivity = 31 /// Receiver dismisses a privacy notification. - case dismissPrivacyNotification // = 32 + case dismissPrivacyNotification = 32 /// Receiver taps a privacy notification. - case tapPrivacyNotification // = 33 + case tapPrivacyNotification = 33 /// Receiver taps a help page. - case tapHelp // = 34 + case tapHelp = 34 /// Receiver taps a feedback. - case tapFeedback // = 35 + case tapFeedback = 35 /// Receiver adds quick settings tile. - case addQuickSettingsTile // = 36 + case addQuickSettingsTile = 36 /// Receiver removes quick settings tile. - case removeQuickSettingsTile // = 37 + case removeQuickSettingsTile = 37 /// Receiver phone consent clicked. - case launchPhoneConsent // = 38 + case launchPhoneConsent = 38 /// Devices show a phone consent banner in Nearby Share Settings - case displayPhoneConsent // = 54 + case displayPhoneConsent = 54 /// Receiver taps quick settings tile. - case tapQuickSettingsTile // = 39 + case tapQuickSettingsTile = 39 /// Receiver Installation of APKs status. - case installApk // = 40 + case installApk = 40 /// Receiver verification of APKs status. - case verifyApk // = 41 + case verifyApk = 41 /// User starts a consent. - case launchConsent // = 42 + case launchConsent = 42 /// After receiving payloads, Nearby Share still needs to transfer the payloads /// to correct attachment formats and move files attachments from temporary /// directory to final destination. - case processReceivedAttachmentsEnd // = 43 + case processReceivedAttachmentsEnd = 43 /// Toggle Show Notification setting item in Nearby Share setting. - case toggleShowNotification // = 44 + case toggleShowNotification = 44 /// Set device name - case setDeviceName // = 45 + case setDeviceName = 45 /// users dropped off opt-in page. - case declineAgreements // = 46 + case declineAgreements = 46 /// Request setting permissions (Wifi/BT/location/airplane mode). - case requestSettingPermissions // = 47 + case requestSettingPermissions = 47 /// Set up a connection with the remote device. - case establishConnection // = 48 + case establishConnection = 48 /// Track device states in Nearby Share setting. - case deviceSettings // = 49 + case deviceSettings = 49 /// Receiver auto dismisses a fast initialization notification. - case autoDismissFastInitialization // = 50 + case autoDismissFastInitialization = 50 /// App Crash event. /// Used only for Windows App now. - case appCrash // = 51 + case appCrash = 51 /// Sender taps the Send button in quick settings - case tapQuickSettingsFileShare // = 52 + case tapQuickSettingsFileShare = 52 /// Devices show a privacy notification - case displayPrivacyNotification // = 53 + case displayPrivacyNotification = 53 /// Preference usage event (e.g. load/save preferences, etc). /// Used only for Windows App now. - case preferencesUsage // = 55 + case preferencesUsage = 55 /// Default opt in - case defaultOptIn // = 56 + case defaultOptIn = 56 /// The result of the setup wizard flow - case setupWizard // = 57 + case setupWizard = 57 /// Sender taps a QR code - case tapQrCode // = 58 + case tapQrCode = 58 /// QR code link shown - case qrCodeLinkShown // = 59 + case qrCodeLinkShown = 59 /// Sender failed to parse endpoint id. - case parsingFailedEndpointID // = 60 + case parsingFailedEndpointID = 60 /// The device is discovered by fast initialization - case fastInitDiscoverDevice // = 61 + case fastInitDiscoverDevice = 61 /// Send desktop notification. - case sendDesktopNotification // = 62 + case sendDesktopNotification = 62 /// User sets account preference - case setAccount // = 63 + case setAccount = 63 /// Decrypt certificate failure - case decryptCertificateFailure // = 64 + case decryptCertificateFailure = 64 /// Show allow permission auto access UI - case showAllowPermissionAutoAccess // = 65 + case showAllowPermissionAutoAccess = 65 /// UI events for transferring files with desktop applications. It includes /// event types such as DESKTOP_TRANSFER_EVENT_SEND_TYPE_SELECT_A_DEVICE. - case sendDesktopTransferEvent // = 66 + case sendDesktopTransferEvent = 66 /// Show accept button on Quick Share receive UI - case waitingForAccept // = 67 + case waitingForAccept = 67 /// High quality event setup - case highQualityMediumSetup // = 68 + case highQualityMediumSetup = 68 /// RPC call status - case rpcCallStatus // = 69 + case rpcCallStatus = 69 /// A QR code sharing session has started - case startQrCodeSession // = 70 + case startQrCodeSession = 70 /// A QR code URL has been opened in a web client/browser instead of in a /// native Quick Share app. - case qrCodeOpenedInWebClient // = 71 + case qrCodeOpenedInWebClient = 71 /// A HaTS survey session id has been joined with Quick Share flow id. - case hatsJointEvent // = 72 + case hatsJointEvent = 72 /// Previews received. - case receivePreviews // = 73 + case receivePreviews = 73 init() { self = .unknownEventType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownEventType - case 1: self = .acceptAgreements - case 2: self = .enableNearbySharing - case 3: self = .setVisibility - case 4: self = .describeAttachments - case 5: self = .scanForShareTargetsStart - case 6: self = .scanForShareTargetsEnd - case 7: self = .advertiseDevicePresenceStart - case 8: self = .advertiseDevicePresenceEnd - case 9: self = .sendFastInitialization - case 10: self = .receiveFastInitialization - case 11: self = .discoverShareTarget - case 12: self = .sendIntroduction - case 13: self = .receiveIntroduction - case 14: self = .respondToIntroduction - case 15: self = .sendAttachmentsStart - case 16: self = .sendAttachmentsEnd - case 17: self = .receiveAttachmentsStart - case 18: self = .receiveAttachmentsEnd - case 19: self = .cancelSendingAttachments - case 20: self = .cancelReceivingAttachments - case 21: self = .openReceivedAttachments - case 22: self = .launchSetupActivity - case 23: self = .addContact - case 24: self = .removeContact - case 25: self = .fastShareServerResponse - case 26: self = .sendStart - case 27: self = .acceptFastInitialization - case 28: self = .setDataUsage - case 29: self = .dismissFastInitialization - case 30: self = .cancelConnection - case 31: self = .launchActivity - case 32: self = .dismissPrivacyNotification - case 33: self = .tapPrivacyNotification - case 34: self = .tapHelp - case 35: self = .tapFeedback - case 36: self = .addQuickSettingsTile - case 37: self = .removeQuickSettingsTile - case 38: self = .launchPhoneConsent - case 39: self = .tapQuickSettingsTile - case 40: self = .installApk - case 41: self = .verifyApk - case 42: self = .launchConsent - case 43: self = .processReceivedAttachmentsEnd - case 44: self = .toggleShowNotification - case 45: self = .setDeviceName - case 46: self = .declineAgreements - case 47: self = .requestSettingPermissions - case 48: self = .establishConnection - case 49: self = .deviceSettings - case 50: self = .autoDismissFastInitialization - case 51: self = .appCrash - case 52: self = .tapQuickSettingsFileShare - case 53: self = .displayPrivacyNotification - case 54: self = .displayPhoneConsent - case 55: self = .preferencesUsage - case 56: self = .defaultOptIn - case 57: self = .setupWizard - case 58: self = .tapQrCode - case 59: self = .qrCodeLinkShown - case 60: self = .parsingFailedEndpointID - case 61: self = .fastInitDiscoverDevice - case 62: self = .sendDesktopNotification - case 63: self = .setAccount - case 64: self = .decryptCertificateFailure - case 65: self = .showAllowPermissionAutoAccess - case 66: self = .sendDesktopTransferEvent - case 67: self = .waitingForAccept - case 68: self = .highQualityMediumSetup - case 69: self = .rpcCallStatus - case 70: self = .startQrCodeSession - case 71: self = .qrCodeOpenedInWebClient - case 72: self = .hatsJointEvent - case 73: self = .receivePreviews - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownEventType: return 0 - case .acceptAgreements: return 1 - case .enableNearbySharing: return 2 - case .setVisibility: return 3 - case .describeAttachments: return 4 - case .scanForShareTargetsStart: return 5 - case .scanForShareTargetsEnd: return 6 - case .advertiseDevicePresenceStart: return 7 - case .advertiseDevicePresenceEnd: return 8 - case .sendFastInitialization: return 9 - case .receiveFastInitialization: return 10 - case .discoverShareTarget: return 11 - case .sendIntroduction: return 12 - case .receiveIntroduction: return 13 - case .respondToIntroduction: return 14 - case .sendAttachmentsStart: return 15 - case .sendAttachmentsEnd: return 16 - case .receiveAttachmentsStart: return 17 - case .receiveAttachmentsEnd: return 18 - case .cancelSendingAttachments: return 19 - case .cancelReceivingAttachments: return 20 - case .openReceivedAttachments: return 21 - case .launchSetupActivity: return 22 - case .addContact: return 23 - case .removeContact: return 24 - case .fastShareServerResponse: return 25 - case .sendStart: return 26 - case .acceptFastInitialization: return 27 - case .setDataUsage: return 28 - case .dismissFastInitialization: return 29 - case .cancelConnection: return 30 - case .launchActivity: return 31 - case .dismissPrivacyNotification: return 32 - case .tapPrivacyNotification: return 33 - case .tapHelp: return 34 - case .tapFeedback: return 35 - case .addQuickSettingsTile: return 36 - case .removeQuickSettingsTile: return 37 - case .launchPhoneConsent: return 38 - case .tapQuickSettingsTile: return 39 - case .installApk: return 40 - case .verifyApk: return 41 - case .launchConsent: return 42 - case .processReceivedAttachmentsEnd: return 43 - case .toggleShowNotification: return 44 - case .setDeviceName: return 45 - case .declineAgreements: return 46 - case .requestSettingPermissions: return 47 - case .establishConnection: return 48 - case .deviceSettings: return 49 - case .autoDismissFastInitialization: return 50 - case .appCrash: return 51 - case .tapQuickSettingsFileShare: return 52 - case .displayPrivacyNotification: return 53 - case .displayPhoneConsent: return 54 - case .preferencesUsage: return 55 - case .defaultOptIn: return 56 - case .setupWizard: return 57 - case .tapQrCode: return 58 - case .qrCodeLinkShown: return 59 - case .parsingFailedEndpointID: return 60 - case .fastInitDiscoverDevice: return 61 - case .sendDesktopNotification: return 62 - case .setAccount: return 63 - case .decryptCertificateFailure: return 64 - case .showAllowPermissionAutoAccess: return 65 - case .sendDesktopTransferEvent: return 66 - case .waitingForAccept: return 67 - case .highQualityMediumSetup: return 68 - case .rpcCallStatus: return 69 - case .startQrCodeSession: return 70 - case .qrCodeOpenedInWebClient: return 71 - case .hatsJointEvent: return 72 - case .receivePreviews: return 73 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_EventType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Event category to differentiate whether this comes from sender or receiver, /// whether this is for communication flow, or for settings. -enum Location_Nearby_Proto_Sharing_EventCategory: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownEventCategory // = 0 - case sendingEvent // = 1 - case receivingEvent // = 2 - case settingsEvent // = 3 - case rpcEvent // = 4 +enum Location_Nearby_Proto_Sharing_EventCategory: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownEventCategory = 0 + case sendingEvent = 1 + case receivingEvent = 2 + case settingsEvent = 3 + case rpcEvent = 4 init() { self = .unknownEventCategory } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownEventCategory - case 1: self = .sendingEvent - case 2: self = .receivingEvent - case 3: self = .settingsEvent - case 4: self = .rpcEvent - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownEventCategory: return 0 - case .sendingEvent: return 1 - case .receivingEvent: return 2 - case .settingsEvent: return 3 - case .rpcEvent: return 4 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_EventCategory: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Status of nearby sharing. -enum Location_Nearby_Proto_Sharing_NearbySharingStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownNearbySharingStatus // = 0 - case on // = 1 - case off // = 2 +enum Location_Nearby_Proto_Sharing_NearbySharingStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownNearbySharingStatus = 0 + case on = 1 + case off = 2 init() { self = .unknownNearbySharingStatus } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownNearbySharingStatus - case 1: self = .on - case 2: self = .off - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownNearbySharingStatus: return 0 - case .on: return 1 - case .off: return 2 - } - } - } -#if swift(>=4.2) +enum Location_Nearby_Proto_Sharing_Visibility: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownVisibility = 0 + case contactsOnly = 1 + case everyone = 2 -extension Location_Nearby_Proto_Sharing_NearbySharingStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_Visibility: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownVisibility // = 0 - case contactsOnly // = 1 - case everyone // = 2 - case selectedContactsOnly // = 3 - case hidden // = 4 - case selfShare // = 5 + /// NOTE: This enum value was marked as deprecated in the .proto file + case selectedContactsOnly = 3 + case hidden = 4 + case selfShare = 5 init() { self = .unknownVisibility } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownVisibility - case 1: self = .contactsOnly - case 2: self = .everyone - case 3: self = .selectedContactsOnly - case 4: self = .hidden - case 5: self = .selfShare - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownVisibility: return 0 - case .contactsOnly: return 1 - case .everyone: return 2 - case .selectedContactsOnly: return 3 - case .hidden: return 4 - case .selfShare: return 5 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_Visibility: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_DataUsage: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownDataUsage // = 0 - case online // = 1 - case wifiOnly // = 2 - case offline // = 3 +enum Location_Nearby_Proto_Sharing_DataUsage: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownDataUsage = 0 + case online = 1 + case wifiOnly = 2 + case offline = 3 init() { self = .unknownDataUsage } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownDataUsage - case 1: self = .online - case 2: self = .wifiOnly - case 3: self = .offline - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownDataUsage: return 0 - case .online: return 1 - case .wifiOnly: return 2 - case .offline: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_DataUsage: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The status of establishing a connection. Used by ESTABLISH_CONNECTION. -enum Location_Nearby_Proto_Sharing_EstablishConnectionStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case connectionStatusUnknown // = 0 - case connectionStatusSuccess // = 1 - case connectionStatusFailure // = 2 - case connectionStatusCancellation // = 3 - case connectionStatusMediaUnavailableAttachment // = 4 - case connectionStatusFailedPairedKeyhandshake // = 5 - case connectionStatusFailedWriteIntroduction // = 6 - case connectionStatusFailedNullConnection // = 7 - case connectionStatusFailedNoTransferUpdateCallback // = 8 - case connectionStatusLostConnectivity // = 9 +enum Location_Nearby_Proto_Sharing_EstablishConnectionStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case connectionStatusUnknown = 0 + case connectionStatusSuccess = 1 + case connectionStatusFailure = 2 + case connectionStatusCancellation = 3 + case connectionStatusMediaUnavailableAttachment = 4 + case connectionStatusFailedPairedKeyhandshake = 5 + case connectionStatusFailedWriteIntroduction = 6 + case connectionStatusFailedNullConnection = 7 + case connectionStatusFailedNoTransferUpdateCallback = 8 + case connectionStatusLostConnectivity = 9 /// TODO: b/341782941 - : Annote this status when it's confirmed by Nearby /// Connections team. - case connectionStatusInvalidAdvertisement // = 10 + case connectionStatusInvalidAdvertisement = 10 init() { self = .connectionStatusUnknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .connectionStatusUnknown - case 1: self = .connectionStatusSuccess - case 2: self = .connectionStatusFailure - case 3: self = .connectionStatusCancellation - case 4: self = .connectionStatusMediaUnavailableAttachment - case 5: self = .connectionStatusFailedPairedKeyhandshake - case 6: self = .connectionStatusFailedWriteIntroduction - case 7: self = .connectionStatusFailedNullConnection - case 8: self = .connectionStatusFailedNoTransferUpdateCallback - case 9: self = .connectionStatusLostConnectivity - case 10: self = .connectionStatusInvalidAdvertisement - default: return nil - } - } - - var rawValue: Int { - switch self { - case .connectionStatusUnknown: return 0 - case .connectionStatusSuccess: return 1 - case .connectionStatusFailure: return 2 - case .connectionStatusCancellation: return 3 - case .connectionStatusMediaUnavailableAttachment: return 4 - case .connectionStatusFailedPairedKeyhandshake: return 5 - case .connectionStatusFailedWriteIntroduction: return 6 - case .connectionStatusFailedNullConnection: return 7 - case .connectionStatusFailedNoTransferUpdateCallback: return 8 - case .connectionStatusLostConnectivity: return 9 - case .connectionStatusInvalidAdvertisement: return 10 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_EstablishConnectionStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The status of sending and receiving attachments. Used by SEND_ATTACHMENTS. -enum Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownAttachmentTransmissionStatus // = 0 - case completeAttachmentTransmissionStatus // = 1 - case canceledAttachmentTransmissionStatus // = 2 - case failedAttachmentTransmissionStatus // = 3 - case rejectedAttachment // = 4 - case timedOutAttachment // = 5 - case awaitingRemoteAcceptanceFailedAttachment // = 6 - case notEnoughSpaceAttachment // = 7 - case failedNoTransferUpdateCallback // = 8 - case mediaUnavailableAttachment // = 9 - case unsupportedAttachmentTypeAttachment // = 10 - case noAttachmentFound // = 11 - case failedNoShareTargetEndpoint // = 12 - case failedPairedKeyhandshake // = 13 - case failedNullConnection // = 14 - case failedNoPayload // = 15 - case failedWriteIntroduction // = 16 +enum Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownAttachmentTransmissionStatus = 0 + case completeAttachmentTransmissionStatus = 1 + case canceledAttachmentTransmissionStatus = 2 + case failedAttachmentTransmissionStatus = 3 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case rejectedAttachment = 4 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case timedOutAttachment = 5 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case awaitingRemoteAcceptanceFailedAttachment = 6 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case notEnoughSpaceAttachment = 7 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedNoTransferUpdateCallback = 8 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case mediaUnavailableAttachment = 9 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case unsupportedAttachmentTypeAttachment = 10 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case noAttachmentFound = 11 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedNoShareTargetEndpoint = 12 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedPairedKeyhandshake = 13 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedNullConnection = 14 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedNoPayload = 15 + + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedWriteIntroduction = 16 /// The remote response is either missing or has an unknown type. - case failedUnknownRemoteResponse // = 17 + /// + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedUnknownRemoteResponse = 17 /// Breakdowns of FAILED_NULL_CONNECTION (Desktop side) - case failedNullConnectionInitOutgoing // = 18 - case failedNullConnectionDisconnected // = 19 + case failedNullConnectionInitOutgoing = 18 + case failedNullConnectionDisconnected = 19 /// Breakdowns of FAILED_NULL_CONNECTION (android side) /// Connection failed due to Wifi is disconnected or Bluetooth setting is off /// or user turn on airplane mode. - case failedNullConnectionLostConnectivity // = 20 + /// + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedNullConnectionLostConnectivity = 20 /// Unexpected connection failure. - case failedNullConnectionFailure // = 21 - case rejectedAttachmentTransmissionStatus // = 22 - case timedOutAttachmentTransmissionStatus // = 23 - case notEnoughSpaceAttachmentTransmissionStatus // = 24 - case unsupportedAttachmentTypeAttachmentTransmissionStatus // = 25 - case failedUnknownRemoteResponseTransmissionStatus // = 26 + /// + /// NOTE: This enum value was marked as deprecated in the .proto file + case failedNullConnectionFailure = 21 + case rejectedAttachmentTransmissionStatus = 22 + case timedOutAttachmentTransmissionStatus = 23 + case notEnoughSpaceAttachmentTransmissionStatus = 24 + case unsupportedAttachmentTypeAttachmentTransmissionStatus = 25 + case failedUnknownRemoteResponseTransmissionStatus = 26 /// Connection failed due to Wifi is disconnected or Bluetooth setting is off /// or user turn on airplane mode. - case noResponseFrameConnectionClosedLostConnectivityTransmissionStatus // = 27 + /// + /// NOTE: This enum value was marked as deprecated in the .proto file + case noResponseFrameConnectionClosedLostConnectivityTransmissionStatus = 27 /// Unexpected connection failure due to no response frame. - case noResponseFrameConnectionClosedTransmissionStatus // = 28 + case noResponseFrameConnectionClosedTransmissionStatus = 28 /// Connection failed due to Wifi is disconnected or Bluetooth setting is off /// or user turn on airplane mode. - case lostConnectivityTransmissionStatus // = 29 + case lostConnectivityTransmissionStatus = 29 /// Connection failed due to the medium is not allowed. - case failedDisallowedMedium // = 30 + case failedDisallowedMedium = 30 init() { self = .unknownAttachmentTransmissionStatus } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownAttachmentTransmissionStatus - case 1: self = .completeAttachmentTransmissionStatus - case 2: self = .canceledAttachmentTransmissionStatus - case 3: self = .failedAttachmentTransmissionStatus - case 4: self = .rejectedAttachment - case 5: self = .timedOutAttachment - case 6: self = .awaitingRemoteAcceptanceFailedAttachment - case 7: self = .notEnoughSpaceAttachment - case 8: self = .failedNoTransferUpdateCallback - case 9: self = .mediaUnavailableAttachment - case 10: self = .unsupportedAttachmentTypeAttachment - case 11: self = .noAttachmentFound - case 12: self = .failedNoShareTargetEndpoint - case 13: self = .failedPairedKeyhandshake - case 14: self = .failedNullConnection - case 15: self = .failedNoPayload - case 16: self = .failedWriteIntroduction - case 17: self = .failedUnknownRemoteResponse - case 18: self = .failedNullConnectionInitOutgoing - case 19: self = .failedNullConnectionDisconnected - case 20: self = .failedNullConnectionLostConnectivity - case 21: self = .failedNullConnectionFailure - case 22: self = .rejectedAttachmentTransmissionStatus - case 23: self = .timedOutAttachmentTransmissionStatus - case 24: self = .notEnoughSpaceAttachmentTransmissionStatus - case 25: self = .unsupportedAttachmentTypeAttachmentTransmissionStatus - case 26: self = .failedUnknownRemoteResponseTransmissionStatus - case 27: self = .noResponseFrameConnectionClosedLostConnectivityTransmissionStatus - case 28: self = .noResponseFrameConnectionClosedTransmissionStatus - case 29: self = .lostConnectivityTransmissionStatus - case 30: self = .failedDisallowedMedium - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownAttachmentTransmissionStatus: return 0 - case .completeAttachmentTransmissionStatus: return 1 - case .canceledAttachmentTransmissionStatus: return 2 - case .failedAttachmentTransmissionStatus: return 3 - case .rejectedAttachment: return 4 - case .timedOutAttachment: return 5 - case .awaitingRemoteAcceptanceFailedAttachment: return 6 - case .notEnoughSpaceAttachment: return 7 - case .failedNoTransferUpdateCallback: return 8 - case .mediaUnavailableAttachment: return 9 - case .unsupportedAttachmentTypeAttachment: return 10 - case .noAttachmentFound: return 11 - case .failedNoShareTargetEndpoint: return 12 - case .failedPairedKeyhandshake: return 13 - case .failedNullConnection: return 14 - case .failedNoPayload: return 15 - case .failedWriteIntroduction: return 16 - case .failedUnknownRemoteResponse: return 17 - case .failedNullConnectionInitOutgoing: return 18 - case .failedNullConnectionDisconnected: return 19 - case .failedNullConnectionLostConnectivity: return 20 - case .failedNullConnectionFailure: return 21 - case .rejectedAttachmentTransmissionStatus: return 22 - case .timedOutAttachmentTransmissionStatus: return 23 - case .notEnoughSpaceAttachmentTransmissionStatus: return 24 - case .unsupportedAttachmentTypeAttachmentTransmissionStatus: return 25 - case .failedUnknownRemoteResponseTransmissionStatus: return 26 - case .noResponseFrameConnectionClosedLostConnectivityTransmissionStatus: return 27 - case .noResponseFrameConnectionClosedTransmissionStatus: return 28 - case .lostConnectivityTransmissionStatus: return 29 - case .failedDisallowedMedium: return 30 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Generic result status of NearbyConnections API calls. -enum Location_Nearby_Proto_Sharing_ConnectionLayerStatus: SwiftProtobuf.Enum { - typealias RawValue = Int +enum Location_Nearby_Proto_Sharing_ConnectionLayerStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { /// No status is available - case unknown // = 0 + case unknown = 0 /// The operation was successful. - case success // = 1 + case success = 1 /// The operation failed, without any more information. - case error // = 2 + case error = 2 /// The app called an API method out of order (i.e. another method is expected /// to be called first). - case outOfOrderApiCall // = 3 + case outOfOrderApiCall = 3 /// The app already has active operations (advertising, discovering, or /// connected to other devices) with another Strategy. Stop these operations on /// the current Strategy before trying to advertise or discover with a new /// Strategy. - case alreadyHaveActiveStrategy // = 4 + case alreadyHaveActiveStrategy = 4 /// The app is already advertising; call StopAdvertising() before trying to /// advertise again. - case alreadyAdvertising // = 5 + case alreadyAdvertising = 5 /// The app is already discovering; call StopDiscovery() before trying to /// discover again. - case alreadyDiscovering // = 6 + case alreadyDiscovering = 6 /// NC is already listening for incoming connections from remote endpoints. - case alreadyListening // = 7 + case alreadyListening = 7 /// An attempt to read from/write to a connected remote endpoint failed. If /// this occurs repeatedly, consider invoking DisconnectFromEndpoint(). - case endPointIoError // = 8 + case endPointIoError = 8 /// An attempt to interact with a remote endpoint failed because it's unknown /// to us -- it's either an endpoint that was never discovered, or an endpoint /// that never connected to us (both of which are indicative of bad input from /// the client app). - case endPointUnknown // = 9 + case endPointUnknown = 9 /// The remote endpoint rejected the connection request. - case connectionRejected // = 10 + case connectionRejected = 10 /// The app is already connected to the specified endpoint. Multiple /// connections to a remote endpoint cannot be maintained simultaneously. - case alreadyConnectedToEndPoint // = 11 + case alreadyConnectedToEndPoint = 11 /// The remote endpoint is not connected; messages cannot be sent to it. - case notConnectedToEndPoint // = 12 + case notConnectedToEndPoint = 12 /// There was an error trying to use the device's Bluetooth capabilities. - case bluetoothError // = 13 + case bluetoothError = 13 /// There was an error trying to use the device's Bluetooth Low Energy /// capabilities. - case bleError // = 14 + case bleError = 14 /// There was an error trying to use the device's Wi-Fi capabilities. - case wifiLanError // = 15 + case wifiLanError = 15 /// An attempt to interact with an in-flight Payload failed because it's /// unknown to us. - case payloadUnknown // = 16 + case payloadUnknown = 16 /// The connection was reset - case reset // = 17 + case reset = 17 /// The connection timed out - case timeout // = 18 + case timeout = 18 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .success - case 2: self = .error - case 3: self = .outOfOrderApiCall - case 4: self = .alreadyHaveActiveStrategy - case 5: self = .alreadyAdvertising - case 6: self = .alreadyDiscovering - case 7: self = .alreadyListening - case 8: self = .endPointIoError - case 9: self = .endPointUnknown - case 10: self = .connectionRejected - case 11: self = .alreadyConnectedToEndPoint - case 12: self = .notConnectedToEndPoint - case 13: self = .bluetoothError - case 14: self = .bleError - case 15: self = .wifiLanError - case 16: self = .payloadUnknown - case 17: self = .reset - case 18: self = .timeout - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .success: return 1 - case .error: return 2 - case .outOfOrderApiCall: return 3 - case .alreadyHaveActiveStrategy: return 4 - case .alreadyAdvertising: return 5 - case .alreadyDiscovering: return 6 - case .alreadyListening: return 7 - case .endPointIoError: return 8 - case .endPointUnknown: return 9 - case .connectionRejected: return 10 - case .alreadyConnectedToEndPoint: return 11 - case .notConnectedToEndPoint: return 12 - case .bluetoothError: return 13 - case .bleError: return 14 - case .wifiLanError: return 15 - case .payloadUnknown: return 16 - case .reset: return 17 - case .timeout: return 18 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ConnectionLayerStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The status of processing attachments after receiver received payloads /// successfully. -enum Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case processingStatusUnknown // = 0 - case processingStatusCompleteProcessingAttachments // = 1 - case processingStatusFailedMovingFiles // = 2 - case processingStatusFailedReceivingApk // = 3 - case processingStatusFailedReceivingText // = 4 - case processingStatusFailedReceivingWifiCredentials // = 5 +enum Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case processingStatusUnknown = 0 + case processingStatusCompleteProcessingAttachments = 1 + case processingStatusFailedMovingFiles = 2 + case processingStatusFailedReceivingApk = 3 + case processingStatusFailedReceivingText = 4 + case processingStatusFailedReceivingWifiCredentials = 5 init() { self = .processingStatusUnknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .processingStatusUnknown - case 1: self = .processingStatusCompleteProcessingAttachments - case 2: self = .processingStatusFailedMovingFiles - case 3: self = .processingStatusFailedReceivingApk - case 4: self = .processingStatusFailedReceivingText - case 5: self = .processingStatusFailedReceivingWifiCredentials - default: return nil - } - } - - var rawValue: Int { - switch self { - case .processingStatusUnknown: return 0 - case .processingStatusCompleteProcessingAttachments: return 1 - case .processingStatusFailedMovingFiles: return 2 - case .processingStatusFailedReceivingApk: return 3 - case .processingStatusFailedReceivingText: return 4 - case .processingStatusFailedReceivingWifiCredentials: return 5 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The status of advertising and discovering sessions. Used by /// SCAN_FOR_SHARE_TARGETS and ADVERTISE_DEVICE_PRESENCE. -enum Location_Nearby_Proto_Sharing_SessionStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownSessionStatus // = 0 - case succeededSessionStatus // = 1 +enum Location_Nearby_Proto_Sharing_SessionStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownSessionStatus = 0 + case succeededSessionStatus = 1 /// TODO: b/341782941 - FAILED_SESSION_STATUS occurs when the status of /// advertising or discovering sessions is not successful. It can be /// due to STATUS_INTERNAL_ERROR, STATUS_INTERRUPTION, STATUS_CANCELLED. /// More session statuses should be logged to determine the status. - case failedSessionStatus // = 2 + case failedSessionStatus = 2 init() { self = .unknownSessionStatus } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownSessionStatus - case 1: self = .succeededSessionStatus - case 2: self = .failedSessionStatus - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownSessionStatus: return 0 - case .succeededSessionStatus: return 1 - case .failedSessionStatus: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_SessionStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// User's response to introductions. -enum Location_Nearby_Proto_Sharing_ResponseToIntroduction: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownResponseToIntroduction // = 0 - case acceptIntroduction // = 1 - case rejectIntroduction // = 2 - case failIntroduction // = 3 +enum Location_Nearby_Proto_Sharing_ResponseToIntroduction: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownResponseToIntroduction = 0 + case acceptIntroduction = 1 + case rejectIntroduction = 2 + case failIntroduction = 3 init() { self = .unknownResponseToIntroduction } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownResponseToIntroduction - case 1: self = .acceptIntroduction - case 2: self = .rejectIntroduction - case 3: self = .failIntroduction - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownResponseToIntroduction: return 0 - case .acceptIntroduction: return 1 - case .rejectIntroduction: return 2 - case .failIntroduction: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ResponseToIntroduction: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// TODO(fdi): may eventually include desktop, etc. /// The type of a remote device. -enum Location_Nearby_Proto_Sharing_DeviceType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownDeviceType // = 0 - case phone // = 1 - case tablet // = 2 - case laptop // = 3 - case car // = 4 - case foldable // = 5 - case xr // = 6 +enum Location_Nearby_Proto_Sharing_DeviceType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownDeviceType = 0 + case phone = 1 + case tablet = 2 + case laptop = 3 + case car = 4 + case foldable = 5 + case xr = 6 init() { self = .unknownDeviceType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownDeviceType - case 1: self = .phone - case 2: self = .tablet - case 3: self = .laptop - case 4: self = .car - case 5: self = .foldable - case 6: self = .xr - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownDeviceType: return 0 - case .phone: return 1 - case .tablet: return 2 - case .laptop: return 3 - case .car: return 4 - case .foldable: return 5 - case .xr: return 6 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_DeviceType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// TODO(fdi): may eventually include windows, iOS, etc. /// The OS type of a remote device. -enum Location_Nearby_Proto_Sharing_OSType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownOsType // = 0 - case android // = 1 - case chromeOs // = 2 - case ios // = 3 - case windows // = 4 - case macos // = 5 +enum Location_Nearby_Proto_Sharing_OSType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownOsType = 0 + case android = 1 + case chromeOs = 2 + case ios = 3 + case windows = 4 + case macos = 5 init() { self = .unknownOsType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownOsType - case 1: self = .android - case 2: self = .chromeOs - case 3: self = .ios - case 4: self = .windows - case 5: self = .macos - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownOsType: return 0 - case .android: return 1 - case .chromeOs: return 2 - case .ios: return 3 - case .windows: return 4 - case .macos: return 5 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_OSType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Relationship of remote device to sender device. -enum Location_Nearby_Proto_Sharing_DeviceRelationship: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownDeviceRelationship // = 0 +enum Location_Nearby_Proto_Sharing_DeviceRelationship: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownDeviceRelationship = 0 /// The remote device belongs to the same owner as sender device. - case isSelf // = 1 + case isSelf = 1 /// The remote device is a contact of sender. - case isContact // = 2 + case isContact = 2 /// The remote device is a stranger. - case isStranger // = 3 + case isStranger = 3 init() { self = .unknownDeviceRelationship } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownDeviceRelationship - case 1: self = .isSelf - case 2: self = .isContact - case 3: self = .isStranger - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownDeviceRelationship: return 0 - case .isSelf: return 1 - case .isContact: return 2 - case .isStranger: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_DeviceRelationship: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The device sources of the clearcut log. -enum Location_Nearby_Proto_Sharing_LogSource: SwiftProtobuf.Enum { - typealias RawValue = Int - case unspecifiedSource // = 0 +enum Location_Nearby_Proto_Sharing_LogSource: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unspecifiedSource = 0 /// Represents the devices in Nearby labs. - case labDevices // = 1 + case labDevices = 1 /// Represents the devices tested by Nearby engs, in the long term can include /// any devices with newest feature flags. - case internalDevices // = 2 + case internalDevices = 2 /// Represents the devices testing our in-development features before they're /// released to the greater public. - case betaTesterDevices // = 3 + case betaTesterDevices = 3 /// Represents the OEM partners (like Samsung) that we're working with to /// verify functionality on their devices. - case oemDevices // = 4 + case oemDevices = 4 /// Represents the device for debugging. - case debugDevices // = 5 + case debugDevices = 5 /// Represents the device for Nearby Module Food. - case nearbyModuleFoodDevices // = 6 + case nearbyModuleFoodDevices = 6 /// Represents the device for BeTo Team Food. - case betoDogfoodDevices // = 7 + case betoDogfoodDevices = 7 /// Represents the device for Nearby dog Food. - case nearbyDogfoodDevices // = 8 + case nearbyDogfoodDevices = 8 /// Represents the device for Nearby Team Food. - case nearbyTeamfoodDevices // = 9 + case nearbyTeamfoodDevices = 9 init() { self = .unspecifiedSource } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unspecifiedSource - case 1: self = .labDevices - case 2: self = .internalDevices - case 3: self = .betaTesterDevices - case 4: self = .oemDevices - case 5: self = .debugDevices - case 6: self = .nearbyModuleFoodDevices - case 7: self = .betoDogfoodDevices - case 8: self = .nearbyDogfoodDevices - case 9: self = .nearbyTeamfoodDevices - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unspecifiedSource: return 0 - case .labDevices: return 1 - case .internalDevices: return 2 - case .betaTesterDevices: return 3 - case .oemDevices: return 4 - case .debugDevices: return 5 - case .nearbyModuleFoodDevices: return 6 - case .betoDogfoodDevices: return 7 - case .nearbyDogfoodDevices: return 8 - case .nearbyTeamfoodDevices: return 9 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_LogSource: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The Fast Share server action name. -enum Location_Nearby_Proto_Sharing_ServerActionName: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownServerAction // = 0 - case uploadCertificates // = 1 - case downloadCertificates // = 2 - case checkReachability // = 3 - case uploadContacts // = 4 - case updateDeviceName // = 5 - case uploadSenderCertificates // = 6 - case downloadSenderCertificates // = 7 - case uploadContactsAndCertificates // = 8 - case listReachablePhoneNumbers // = 9 - case listMyDevices // = 10 - case listContactPeople // = 11 +enum Location_Nearby_Proto_Sharing_ServerActionName: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownServerAction = 0 + case uploadCertificates = 1 + case downloadCertificates = 2 + case checkReachability = 3 + case uploadContacts = 4 + case updateDeviceName = 5 + case uploadSenderCertificates = 6 + case downloadSenderCertificates = 7 + case uploadContactsAndCertificates = 8 + case listReachablePhoneNumbers = 9 + case listMyDevices = 10 + case listContactPeople = 11 /// used for analytics logger to record action name. - case downloadCertificatesInfo // = 12 + case downloadCertificatesInfo = 12 init() { self = .unknownServerAction } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownServerAction - case 1: self = .uploadCertificates - case 2: self = .downloadCertificates - case 3: self = .checkReachability - case 4: self = .uploadContacts - case 5: self = .updateDeviceName - case 6: self = .uploadSenderCertificates - case 7: self = .downloadSenderCertificates - case 8: self = .uploadContactsAndCertificates - case 9: self = .listReachablePhoneNumbers - case 10: self = .listMyDevices - case 11: self = .listContactPeople - case 12: self = .downloadCertificatesInfo - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownServerAction: return 0 - case .uploadCertificates: return 1 - case .downloadCertificates: return 2 - case .checkReachability: return 3 - case .uploadContacts: return 4 - case .updateDeviceName: return 5 - case .uploadSenderCertificates: return 6 - case .downloadSenderCertificates: return 7 - case .uploadContactsAndCertificates: return 8 - case .listReachablePhoneNumbers: return 9 - case .listMyDevices: return 10 - case .listContactPeople: return 11 - case .downloadCertificatesInfo: return 12 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ServerActionName: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The Fast Share server response state. -enum Location_Nearby_Proto_Sharing_ServerResponseState: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownServerResponseState // = 0 - case serverResponseSuccess // = 1 - case serverResponseUnknownFailure // = 2 +enum Location_Nearby_Proto_Sharing_ServerResponseState: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownServerResponseState = 0 + case serverResponseSuccess = 1 + case serverResponseUnknownFailure = 2 /// For StatusException. - case serverResponseStatusOtherFailure // = 3 - case serverResponseStatusDeadlineExceeded // = 4 - case serverResponseStatusPermissionDenied // = 5 - case serverResponseStatusUnavailable // = 6 - case serverResponseStatusUnauthenticated // = 7 - case serverResponseStatusInvalidArgument // = 9 + case serverResponseStatusOtherFailure = 3 + case serverResponseStatusDeadlineExceeded = 4 + case serverResponseStatusPermissionDenied = 5 + case serverResponseStatusUnavailable = 6 + case serverResponseStatusUnauthenticated = 7 + case serverResponseStatusInvalidArgument = 9 /// For GoogleAuthException. - case serverResponseGoogleAuthFailure // = 8 + case serverResponseGoogleAuthFailure = 8 /// For Internet connect status. - case serverResponseNotConnectedToInternet // = 10 + case serverResponseNotConnectedToInternet = 10 init() { self = .unknownServerResponseState } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownServerResponseState - case 1: self = .serverResponseSuccess - case 2: self = .serverResponseUnknownFailure - case 3: self = .serverResponseStatusOtherFailure - case 4: self = .serverResponseStatusDeadlineExceeded - case 5: self = .serverResponseStatusPermissionDenied - case 6: self = .serverResponseStatusUnavailable - case 7: self = .serverResponseStatusUnauthenticated - case 8: self = .serverResponseGoogleAuthFailure - case 9: self = .serverResponseStatusInvalidArgument - case 10: self = .serverResponseNotConnectedToInternet - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownServerResponseState: return 0 - case .serverResponseSuccess: return 1 - case .serverResponseUnknownFailure: return 2 - case .serverResponseStatusOtherFailure: return 3 - case .serverResponseStatusDeadlineExceeded: return 4 - case .serverResponseStatusPermissionDenied: return 5 - case .serverResponseStatusUnavailable: return 6 - case .serverResponseStatusUnauthenticated: return 7 - case .serverResponseGoogleAuthFailure: return 8 - case .serverResponseStatusInvalidArgument: return 9 - case .serverResponseNotConnectedToInternet: return 10 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ServerResponseState: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The purpose of requesting the server request. -enum Location_Nearby_Proto_Sharing_SyncPurpose: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 +enum Location_Nearby_Proto_Sharing_SyncPurpose: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 /// When NearbySharingChimeraService#sync() is called. - case onDemandSync // = 1 + case onDemandSync = 1 /// Requested by chime notification. - case chimeNotification // = 2 + case chimeNotification = 2 /// For reqular daily sync. - case dailySync // = 3 + case dailySync = 3 /// Wen a device opts into Nearby Share. - case optInFirstSync // = 4 + case optInFirstSync = 4 /// Requested when Nearby Share automatically enables a device that shares /// a single account that has already opted in on another device. - case checkDefaultOptIn // = 5 + case checkDefaultOptIn = 5 /// When a device enables Nearby Share. - case nearbyShareEnabled // = 6 + case nearbyShareEnabled = 6 /// When a device is in fast init advertising. - case syncAtFastInit // = 7 + case syncAtFastInit = 7 /// When device start discovery. - case syncAtDiscovery // = 8 + case syncAtDiscovery = 8 /// When device tries to load valid private certificate. - case syncAtLoadPrivateCertificate // = 9 + case syncAtLoadPrivateCertificate = 9 /// When device start advertiseement. - case syncAtAdvertisement // = 10 + case syncAtAdvertisement = 10 /// When device contacts list changes. - case contactListChange // = 11 + case contactListChange = 11 /// When showing the C11 banner in Neary Share setting. - case showC11NView // = 12 + case showC11NView = 12 /// For regular check contact reachability. - case regularCheckContactReachability // = 13 + case regularCheckContactReachability = 13 /// When selected contacts list changes in visibility setting. - case visibilitySelectedContactChange // = 14 + case visibilitySelectedContactChange = 14 /// When switching account. - case accountChange // = 15 + case accountChange = 15 /// When regenerate certificates - case regenerateCertificates // = 16 + case regenerateCertificates = 16 /// When Device Contacts consent changes - case deviceContactsConsentChange // = 17 + case deviceContactsConsentChange = 17 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .onDemandSync - case 2: self = .chimeNotification - case 3: self = .dailySync - case 4: self = .optInFirstSync - case 5: self = .checkDefaultOptIn - case 6: self = .nearbyShareEnabled - case 7: self = .syncAtFastInit - case 8: self = .syncAtDiscovery - case 9: self = .syncAtLoadPrivateCertificate - case 10: self = .syncAtAdvertisement - case 11: self = .contactListChange - case 12: self = .showC11NView - case 13: self = .regularCheckContactReachability - case 14: self = .visibilitySelectedContactChange - case 15: self = .accountChange - case 16: self = .regenerateCertificates - case 17: self = .deviceContactsConsentChange - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .onDemandSync: return 1 - case .chimeNotification: return 2 - case .dailySync: return 3 - case .optInFirstSync: return 4 - case .checkDefaultOptIn: return 5 - case .nearbyShareEnabled: return 6 - case .syncAtFastInit: return 7 - case .syncAtDiscovery: return 8 - case .syncAtLoadPrivateCertificate: return 9 - case .syncAtAdvertisement: return 10 - case .contactListChange: return 11 - case .showC11NView: return 12 - case .regularCheckContactReachability: return 13 - case .visibilitySelectedContactChange: return 14 - case .accountChange: return 15 - case .regenerateCertificates: return 16 - case .deviceContactsConsentChange: return 17 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_SyncPurpose: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The device role to trigger the server request. -enum Location_Nearby_Proto_Sharing_ClientRole: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case sender // = 1 - case receiver // = 2 +enum Location_Nearby_Proto_Sharing_ClientRole: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case sender = 1 + case receiver = 2 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .sender - case 2: self = .receiver - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .sender: return 1 - case .receiver: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ClientRole: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The type of Nearby Sharing scanning. -enum Location_Nearby_Proto_Sharing_ScanType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownScanType // = 0 - case foregroundScan // = 1 - case foregroundRetryScan // = 2 - case directShareScan // = 3 - case backgroundScan // = 4 +enum Location_Nearby_Proto_Sharing_ScanType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownScanType = 0 + case foregroundScan = 1 + case foregroundRetryScan = 2 + case directShareScan = 3 + case backgroundScan = 4 init() { self = .unknownScanType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownScanType - case 1: self = .foregroundScan - case 2: self = .foregroundRetryScan - case 3: self = .directShareScan - case 4: self = .backgroundScan - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownScanType: return 0 - case .foregroundScan: return 1 - case .foregroundRetryScan: return 2 - case .directShareScan: return 3 - case .backgroundScan: return 4 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ScanType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The type of parsing endpoint id failed type. -enum Location_Nearby_Proto_Sharing_ParsingFailedType: SwiftProtobuf.Enum { - typealias RawValue = Int - case failedUnknownType // = 0 +enum Location_Nearby_Proto_Sharing_ParsingFailedType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case failedUnknownType = 0 /// NULL advertisement is returned due to sender failing to parse advertisement /// from endpointInfo byte stream from receiver advertisement. - case failedParseAdvertisement // = 1 + case failedParseAdvertisement = 1 /// NULL shareTarget is returned due to sender failing to create shareTarget /// from a valid parsed advertisement stemming from issues in certificates, QR /// code tokens or device names. - case failedConvertShareTarget // = 2 + case failedConvertShareTarget = 2 init() { self = .failedUnknownType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .failedUnknownType - case 1: self = .failedParseAdvertisement - case 2: self = .failedConvertShareTarget - default: return nil - } - } - - var rawValue: Int { - switch self { - case .failedUnknownType: return 0 - case .failedParseAdvertisement: return 1 - case .failedConvertShareTarget: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ParsingFailedType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The Nearby Sharing advertising mode. -enum Location_Nearby_Proto_Sharing_AdvertisingMode: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownAdvertisingMode // = 0 - case screenOffAdvertisingMode // = 1 - case backgroundAdvertisingMode // = 2 - case midgroundAdvertisingMode // = 3 - case foregroundAdvertisingMode // = 4 - case suspendedAdvertisingMode // = 5 +enum Location_Nearby_Proto_Sharing_AdvertisingMode: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownAdvertisingMode = 0 + case screenOffAdvertisingMode = 1 + case backgroundAdvertisingMode = 2 + case midgroundAdvertisingMode = 3 + case foregroundAdvertisingMode = 4 + case suspendedAdvertisingMode = 5 init() { self = .unknownAdvertisingMode } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownAdvertisingMode - case 1: self = .screenOffAdvertisingMode - case 2: self = .backgroundAdvertisingMode - case 3: self = .midgroundAdvertisingMode - case 4: self = .foregroundAdvertisingMode - case 5: self = .suspendedAdvertisingMode - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownAdvertisingMode: return 0 - case .screenOffAdvertisingMode: return 1 - case .backgroundAdvertisingMode: return 2 - case .midgroundAdvertisingMode: return 3 - case .foregroundAdvertisingMode: return 4 - case .suspendedAdvertisingMode: return 5 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_AdvertisingMode: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The Nearby Sharing discovery mode. -enum Location_Nearby_Proto_Sharing_DiscoveryMode: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownDiscoveryMode // = 0 - case screenOffDiscoveryMode // = 1 - case backgroundDiscoveryMode // = 2 - case midgroundDiscoveryMode // = 3 - case foregroundDiscoveryMode // = 4 - case suspendedDiscoveryMode // = 5 +enum Location_Nearby_Proto_Sharing_DiscoveryMode: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownDiscoveryMode = 0 + case screenOffDiscoveryMode = 1 + case backgroundDiscoveryMode = 2 + case midgroundDiscoveryMode = 3 + case foregroundDiscoveryMode = 4 + case suspendedDiscoveryMode = 5 init() { self = .unknownDiscoveryMode } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownDiscoveryMode - case 1: self = .screenOffDiscoveryMode - case 2: self = .backgroundDiscoveryMode - case 3: self = .midgroundDiscoveryMode - case 4: self = .foregroundDiscoveryMode - case 5: self = .suspendedDiscoveryMode - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownDiscoveryMode: return 0 - case .screenOffDiscoveryMode: return 1 - case .backgroundDiscoveryMode: return 2 - case .midgroundDiscoveryMode: return 3 - case .foregroundDiscoveryMode: return 4 - case .suspendedDiscoveryMode: return 5 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_DiscoveryMode: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The class name of chimera activity. -enum Location_Nearby_Proto_Sharing_ActivityName: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownActivity // = 0 - case shareSheetActivity // = 1 - case settingsActivity // = 2 - case receiveSurfaceActivity // = 3 - case setupActivity // = 4 - case deviceVisibilityActivity // = 5 - case consentsActivity // = 6 - case setDeviceNameDialog // = 7 - case setDataUsageDialog // = 8 - case quickSettingsActivity // = 9 - case remoteCopyShareSheetActivity // = 10 - case setupWizardActivity // = 11 - case settingsReviewActivity // = 12 +enum Location_Nearby_Proto_Sharing_ActivityName: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownActivity = 0 + case shareSheetActivity = 1 + case settingsActivity = 2 + case receiveSurfaceActivity = 3 + case setupActivity = 4 + case deviceVisibilityActivity = 5 + case consentsActivity = 6 + case setDeviceNameDialog = 7 + case setDataUsageDialog = 8 + case quickSettingsActivity = 9 + case remoteCopyShareSheetActivity = 10 + case setupWizardActivity = 11 + case settingsReviewActivity = 12 init() { self = .unknownActivity } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownActivity - case 1: self = .shareSheetActivity - case 2: self = .settingsActivity - case 3: self = .receiveSurfaceActivity - case 4: self = .setupActivity - case 5: self = .deviceVisibilityActivity - case 6: self = .consentsActivity - case 7: self = .setDeviceNameDialog - case 8: self = .setDataUsageDialog - case 9: self = .quickSettingsActivity - case 10: self = .remoteCopyShareSheetActivity - case 11: self = .setupWizardActivity - case 12: self = .settingsReviewActivity - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownActivity: return 0 - case .shareSheetActivity: return 1 - case .settingsActivity: return 2 - case .receiveSurfaceActivity: return 3 - case .setupActivity: return 4 - case .deviceVisibilityActivity: return 5 - case .consentsActivity: return 6 - case .setDeviceNameDialog: return 7 - case .setDataUsageDialog: return 8 - case .quickSettingsActivity: return 9 - case .remoteCopyShareSheetActivity: return 10 - case .setupWizardActivity: return 11 - case .settingsReviewActivity: return 12 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ActivityName: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The type of consent page user launches. -enum Location_Nearby_Proto_Sharing_ConsentType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 +enum Location_Nearby_Proto_Sharing_ConsentType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 /// launch Constellation consent page. - case c11N // = 1 + case c11N = 1 /// launch device contact consent page. - case deviceContact // = 2 + case deviceContact = 2 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .c11N - case 2: self = .deviceContact - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .c11N: return 1 - case .deviceContact: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ConsentType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case consentUnknownAcceptStatus // = 0 - case consentAccepted // = 1 - case consentDeclined // = 2 +enum Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case consentUnknownAcceptStatus = 0 + case consentAccepted = 1 + case consentDeclined = 2 /// unable to enable consent. - case consentUnableToEnable // = 3 + case consentUnableToEnable = 3 init() { self = .consentUnknownAcceptStatus } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .consentUnknownAcceptStatus - case 1: self = .consentAccepted - case 2: self = .consentDeclined - case 3: self = .consentUnableToEnable - default: return nil - } - } - - var rawValue: Int { - switch self { - case .consentUnknownAcceptStatus: return 0 - case .consentAccepted: return 1 - case .consentDeclined: return 2 - case .consentUnableToEnable: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_ApkSource: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownApkSource // = 0 - case apkFromSdCard // = 1 - case installedApp // = 2 +enum Location_Nearby_Proto_Sharing_ApkSource: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownApkSource = 0 + case apkFromSdCard = 1 + case installedApp = 2 init() { self = .unknownApkSource } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownApkSource - case 1: self = .apkFromSdCard - case 2: self = .installedApp - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownApkSource: return 0 - case .apkFromSdCard: return 1 - case .installedApp: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ApkSource: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The Installation status of APK. -enum Location_Nearby_Proto_Sharing_InstallAPKStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownInstallApkStatus // = 0 - case failInstallation // = 1 - case successInstallation // = 2 +enum Location_Nearby_Proto_Sharing_InstallAPKStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownInstallApkStatus = 0 + case failInstallation = 1 + case successInstallation = 2 init() { self = .unknownInstallApkStatus } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownInstallApkStatus - case 1: self = .failInstallation - case 2: self = .successInstallation - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownInstallApkStatus: return 0 - case .failInstallation: return 1 - case .successInstallation: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_InstallAPKStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The verification status of APK. -enum Location_Nearby_Proto_Sharing_VerifyAPKStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownVerifyApkStatus // = 0 - case notInstallable // = 1 - case installable // = 2 - case alreadyInstalled // = 3 +enum Location_Nearby_Proto_Sharing_VerifyAPKStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownVerifyApkStatus = 0 + case notInstallable = 1 + case installable = 2 + case alreadyInstalled = 3 init() { self = .unknownVerifyApkStatus } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownVerifyApkStatus - case 1: self = .notInstallable - case 2: self = .installable - case 3: self = .alreadyInstalled - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownVerifyApkStatus: return 0 - case .notInstallable: return 1 - case .installable: return 2 - case .alreadyInstalled: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_VerifyAPKStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_ShowNotificationStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownShowNotificationStatus // = 0 - case show // = 1 - case notShow // = 2 +enum Location_Nearby_Proto_Sharing_ShowNotificationStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownShowNotificationStatus = 0 + case show = 1 + case notShow = 2 init() { self = .unknownShowNotificationStatus } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownShowNotificationStatus - case 1: self = .show - case 2: self = .notShow - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownShowNotificationStatus: return 0 - case .show: return 1 - case .notShow: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ShowNotificationStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_PermissionRequestResult: SwiftProtobuf.Enum { - typealias RawValue = Int - case permissionUnknownRequestResult // = 0 - case permissionGranted // = 1 - case permissionRejected // = 2 - case permissionUnableToGrant // = 3 +enum Location_Nearby_Proto_Sharing_PermissionRequestResult: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case permissionUnknownRequestResult = 0 + case permissionGranted = 1 + case permissionRejected = 2 + case permissionUnableToGrant = 3 init() { self = .permissionUnknownRequestResult } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .permissionUnknownRequestResult - case 1: self = .permissionGranted - case 2: self = .permissionRejected - case 3: self = .permissionUnableToGrant - default: return nil - } - } - - var rawValue: Int { - switch self { - case .permissionUnknownRequestResult: return 0 - case .permissionGranted: return 1 - case .permissionRejected: return 2 - case .permissionUnableToGrant: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_PermissionRequestResult: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_PermissionRequestType: SwiftProtobuf.Enum { - typealias RawValue = Int - case permissionUnknownType // = 0 - case permissionAirplaneModeOff // = 1 - case permissionWifi // = 2 - case permissionBluetooth // = 3 - case permissionLocation // = 4 - case permissionWifiHotspot // = 5 +enum Location_Nearby_Proto_Sharing_PermissionRequestType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case permissionUnknownType = 0 + case permissionAirplaneModeOff = 1 + case permissionWifi = 2 + case permissionBluetooth = 3 + case permissionLocation = 4 + case permissionWifiHotspot = 5 init() { self = .permissionUnknownType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .permissionUnknownType - case 1: self = .permissionAirplaneModeOff - case 2: self = .permissionWifi - case 3: self = .permissionBluetooth - case 4: self = .permissionLocation - case 5: self = .permissionWifiHotspot - default: return nil - } - } - - var rawValue: Int { - switch self { - case .permissionUnknownType: return 0 - case .permissionAirplaneModeOff: return 1 - case .permissionWifi: return 2 - case .permissionBluetooth: return 3 - case .permissionLocation: return 4 - case .permissionWifiHotspot: return 5 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_PermissionRequestType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_SharingUseCase: SwiftProtobuf.Enum { - typealias RawValue = Int - case useCaseUnknown // = 0 - case useCaseNearbyShare // = 1 - case useCaseRemoteCopyPaste // = 2 - case useCaseWifiCredential // = 3 - case useCaseAppShare // = 4 - case useCaseQuickSettingFileShare // = 5 - case useCaseSetupWizard // = 6 +enum Location_Nearby_Proto_Sharing_SharingUseCase: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case useCaseUnknown = 0 + case useCaseNearbyShare = 1 + case useCaseRemoteCopyPaste = 2 + case useCaseWifiCredential = 3 + case useCaseAppShare = 4 + case useCaseQuickSettingFileShare = 5 + case useCaseSetupWizard = 6 /// Deprecated. QR code is an addition to existing use cases rather than being /// a separate use case. - case useCaseNearbyShareWithQrCode // = 7 + /// + /// NOTE: This enum value was marked as deprecated in the .proto file + case useCaseNearbyShareWithQrCode = 7 /// The user was redirected from Bluetooth sharing UI to Nearby Share - case useCaseRedirectedFromBluetoothShare // = 8 + case useCaseRedirectedFromBluetoothShare = 8 init() { self = .useCaseUnknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .useCaseUnknown - case 1: self = .useCaseNearbyShare - case 2: self = .useCaseRemoteCopyPaste - case 3: self = .useCaseWifiCredential - case 4: self = .useCaseAppShare - case 5: self = .useCaseQuickSettingFileShare - case 6: self = .useCaseSetupWizard - case 7: self = .useCaseNearbyShareWithQrCode - case 8: self = .useCaseRedirectedFromBluetoothShare - default: return nil - } - } - - var rawValue: Int { - switch self { - case .useCaseUnknown: return 0 - case .useCaseNearbyShare: return 1 - case .useCaseRemoteCopyPaste: return 2 - case .useCaseWifiCredential: return 3 - case .useCaseAppShare: return 4 - case .useCaseQuickSettingFileShare: return 5 - case .useCaseSetupWizard: return 6 - case .useCaseNearbyShareWithQrCode: return 7 - case .useCaseRedirectedFromBluetoothShare: return 8 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_SharingUseCase: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Used only for Windows App now. -enum Location_Nearby_Proto_Sharing_AppCrashReason: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 +enum Location_Nearby_Proto_Sharing_AppCrashReason: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_AppCrashReason: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Thes source where the attachemnt comes from. It can be an action, app name, /// etc. The first 6 source types are being used as FileSenderType in Nearby /// Share Windows app. -enum Location_Nearby_Proto_Sharing_AttachmentSourceType: SwiftProtobuf.Enum { - typealias RawValue = Int - case attachmentSourceUnknown // = 0 - case attachmentSourceContextMenu // = 1 - case attachmentSourceDragAndDrop // = 2 - case attachmentSourceSelectFilesButton // = 3 - case attachmentSourcePaste // = 4 - case attachmentSourceSelectFoldersButton // = 5 - case attachmentSourceShareActivation // = 6 +enum Location_Nearby_Proto_Sharing_AttachmentSourceType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case attachmentSourceUnknown = 0 + case attachmentSourceContextMenu = 1 + case attachmentSourceDragAndDrop = 2 + case attachmentSourceSelectFilesButton = 3 + case attachmentSourcePaste = 4 + case attachmentSourceSelectFoldersButton = 5 + case attachmentSourceShareActivation = 6 init() { self = .attachmentSourceUnknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .attachmentSourceUnknown - case 1: self = .attachmentSourceContextMenu - case 2: self = .attachmentSourceDragAndDrop - case 3: self = .attachmentSourceSelectFilesButton - case 4: self = .attachmentSourcePaste - case 5: self = .attachmentSourceSelectFoldersButton - case 6: self = .attachmentSourceShareActivation - default: return nil - } - } - - var rawValue: Int { - switch self { - case .attachmentSourceUnknown: return 0 - case .attachmentSourceContextMenu: return 1 - case .attachmentSourceDragAndDrop: return 2 - case .attachmentSourceSelectFilesButton: return 3 - case .attachmentSourcePaste: return 4 - case .attachmentSourceSelectFoldersButton: return 5 - case .attachmentSourceShareActivation: return 6 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_AttachmentSourceType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The action to interact with preferences. /// Used only for Windows App now. -enum Location_Nearby_Proto_Sharing_PreferencesAction: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case noAction // = 1 +enum Location_Nearby_Proto_Sharing_PreferencesAction: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case noAction = 1 /// Primary actions/functions towards preferences - case loadPreferences // = 2 - case savePreferencess // = 3 - case attemptLoad // = 4 - case restoreFromBackup // = 5 + case loadPreferences = 2 + case savePreferencess = 3 + case attemptLoad = 4 + case restoreFromBackup = 5 /// Other actions within the 4 actions above - case createPreferencesPath // = 6 - case makePreferencesBackupFile // = 7 - case checkIfPreferencesPathExists // = 8 - case checkIfPreferencesInputStreamStatus // = 9 - case checkIfPreferencesFileIsCorrupted // = 10 - case checkIfPreferencesBackupFileExists // = 11 + case createPreferencesPath = 6 + case makePreferencesBackupFile = 7 + case checkIfPreferencesPathExists = 8 + case checkIfPreferencesInputStreamStatus = 9 + case checkIfPreferencesFileIsCorrupted = 10 + case checkIfPreferencesBackupFileExists = 11 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .noAction - case 2: self = .loadPreferences - case 3: self = .savePreferencess - case 4: self = .attemptLoad - case 5: self = .restoreFromBackup - case 6: self = .createPreferencesPath - case 7: self = .makePreferencesBackupFile - case 8: self = .checkIfPreferencesPathExists - case 9: self = .checkIfPreferencesInputStreamStatus - case 10: self = .checkIfPreferencesFileIsCorrupted - case 11: self = .checkIfPreferencesBackupFileExists - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .noAction: return 1 - case .loadPreferences: return 2 - case .savePreferencess: return 3 - case .attemptLoad: return 4 - case .restoreFromBackup: return 5 - case .createPreferencesPath: return 6 - case .makePreferencesBackupFile: return 7 - case .checkIfPreferencesPathExists: return 8 - case .checkIfPreferencesInputStreamStatus: return 9 - case .checkIfPreferencesFileIsCorrupted: return 10 - case .checkIfPreferencesBackupFileExists: return 11 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_PreferencesAction: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// The status of the action to interact with preferences. /// Used only for Windows App now. -enum Location_Nearby_Proto_Sharing_PreferencesActionStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case success // = 1 - case fail // = 2 +enum Location_Nearby_Proto_Sharing_PreferencesActionStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case success = 1 + case fail = 2 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .success - case 2: self = .fail - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .success: return 1 - case .fail: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_PreferencesActionStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - ///* The distance of the found nearby fast init advertisement. -enum Location_Nearby_Proto_Sharing_FastInitState: SwiftProtobuf.Enum { - typealias RawValue = Int - case fastInitUnknownState // = 0 +enum Location_Nearby_Proto_Sharing_FastInitState: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case fastInitUnknownState = 0 /// A device was found in close proximity. /// distance < fast_init_distance_close_centimeters(50 cm) - case fastInitCloseState // = 1 + case fastInitCloseState = 1 /// A device was found in far proximity. /// distance < fast_init_distance_close_centimeters(10 m) - case fastInitFarState // = 2 + case fastInitFarState = 2 /// No devices have been found nearby. The default state. - case fastInitLostState // = 3 + case fastInitLostState = 3 init() { self = .fastInitUnknownState } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .fastInitUnknownState - case 1: self = .fastInitCloseState - case 2: self = .fastInitFarState - case 3: self = .fastInitLostState - default: return nil - } - } - - var rawValue: Int { - switch self { - case .fastInitUnknownState: return 0 - case .fastInitCloseState: return 1 - case .fastInitFarState: return 2 - case .fastInitLostState: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_FastInitState: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - ///* The type of FastInit advertisement. -enum Location_Nearby_Proto_Sharing_FastInitType: SwiftProtobuf.Enum { - typealias RawValue = Int - case fastInitUnknownType // = 0 +enum Location_Nearby_Proto_Sharing_FastInitType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case fastInitUnknownType = 0 /// Show HUN to notify the user. - case fastInitNotifyType // = 1 + case fastInitNotifyType = 1 /// Not notify the user. - case fastInitSilentType // = 2 + case fastInitSilentType = 2 init() { self = .fastInitUnknownType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .fastInitUnknownType - case 1: self = .fastInitNotifyType - case 2: self = .fastInitSilentType - default: return nil - } - } - - var rawValue: Int { - switch self { - case .fastInitUnknownType: return 0 - case .fastInitNotifyType: return 1 - case .fastInitSilentType: return 2 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_FastInitType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - ///* The type of desktop notification event. -enum Location_Nearby_Proto_Sharing_DesktopNotification: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case connecting // = 1 - case progress // = 2 - case accept // = 3 - case received // = 4 - case error // = 5 +enum Location_Nearby_Proto_Sharing_DesktopNotification: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case connecting = 1 + case progress = 2 + case accept = 3 + case received = 4 + case error = 5 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .connecting - case 2: self = .progress - case 3: self = .accept - case 4: self = .received - case 5: self = .error - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .connecting: return 1 - case .progress: return 2 - case .accept: return 3 - case .received: return 4 - case .error: return 5 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_DesktopNotification: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_DesktopTransferEventType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 +enum Location_Nearby_Proto_Sharing_DesktopTransferEventType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 /// Receive attachments. - case desktopTransferEventReceiveTypeAccept // = 1 - case desktopTransferEventReceiveTypeProgress // = 2 - case desktopTransferEventReceiveTypeReceived // = 3 - case desktopTransferEventReceiveTypeError // = 4 + case desktopTransferEventReceiveTypeAccept = 1 + case desktopTransferEventReceiveTypeProgress = 2 + case desktopTransferEventReceiveTypeReceived = 3 + case desktopTransferEventReceiveTypeError = 4 /// Send attachments. - case desktopTransferEventSendTypeStart // = 5 - case desktopTransferEventSendTypeSelectADevice // = 6 - case desktopTransferEventSendTypeProgress // = 7 - case desktopTransferEventSendTypeSent // = 8 - case desktopTransferEventSendTypeError // = 9 + case desktopTransferEventSendTypeStart = 5 + case desktopTransferEventSendTypeSelectADevice = 6 + case desktopTransferEventSendTypeProgress = 7 + case desktopTransferEventSendTypeSent = 8 + case desktopTransferEventSendTypeError = 9 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .desktopTransferEventReceiveTypeAccept - case 2: self = .desktopTransferEventReceiveTypeProgress - case 3: self = .desktopTransferEventReceiveTypeReceived - case 4: self = .desktopTransferEventReceiveTypeError - case 5: self = .desktopTransferEventSendTypeStart - case 6: self = .desktopTransferEventSendTypeSelectADevice - case 7: self = .desktopTransferEventSendTypeProgress - case 8: self = .desktopTransferEventSendTypeSent - case 9: self = .desktopTransferEventSendTypeError - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .desktopTransferEventReceiveTypeAccept: return 1 - case .desktopTransferEventReceiveTypeProgress: return 2 - case .desktopTransferEventReceiveTypeReceived: return 3 - case .desktopTransferEventReceiveTypeError: return 4 - case .desktopTransferEventSendTypeStart: return 5 - case .desktopTransferEventSendTypeSelectADevice: return 6 - case .desktopTransferEventSendTypeProgress: return 7 - case .desktopTransferEventSendTypeSent: return 8 - case .desktopTransferEventSendTypeError: return 9 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_DesktopTransferEventType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case decryptCertUnknownFailure // = 0 - case decryptCertNoSuchAlgorithmFailure // = 1 - case decryptCertNoSuchPaddingFailure // = 2 - case decryptCertInvalidKeyFailure // = 3 - case decryptCertInvalidAlgorithmParameterFailure // = 4 - case decryptCertIllegalBlockSizeFailure // = 5 - case decryptCertBadPaddingFailure // = 6 +enum Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case decryptCertUnknownFailure = 0 + case decryptCertNoSuchAlgorithmFailure = 1 + case decryptCertNoSuchPaddingFailure = 2 + case decryptCertInvalidKeyFailure = 3 + case decryptCertInvalidAlgorithmParameterFailure = 4 + case decryptCertIllegalBlockSizeFailure = 5 + case decryptCertBadPaddingFailure = 6 init() { self = .decryptCertUnknownFailure } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .decryptCertUnknownFailure - case 1: self = .decryptCertNoSuchAlgorithmFailure - case 2: self = .decryptCertNoSuchPaddingFailure - case 3: self = .decryptCertInvalidKeyFailure - case 4: self = .decryptCertInvalidAlgorithmParameterFailure - case 5: self = .decryptCertIllegalBlockSizeFailure - case 6: self = .decryptCertBadPaddingFailure - default: return nil - } - } - - var rawValue: Int { - switch self { - case .decryptCertUnknownFailure: return 0 - case .decryptCertNoSuchAlgorithmFailure: return 1 - case .decryptCertNoSuchPaddingFailure: return 2 - case .decryptCertInvalidKeyFailure: return 3 - case .decryptCertInvalidAlgorithmParameterFailure: return 4 - case .decryptCertIllegalBlockSizeFailure: return 5 - case .decryptCertBadPaddingFailure: return 6 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Refer to go/qs-contacts-consent-2024 for the detail. -enum Location_Nearby_Proto_Sharing_ContactAccess: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case noContactUploaded // = 1 - case onlyUploadGoogleContact // = 2 - case uploadContactForDeviceContactConsent // = 3 - case uploadContactForQuickShareConsent // = 4 +enum Location_Nearby_Proto_Sharing_ContactAccess: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case noContactUploaded = 1 + case onlyUploadGoogleContact = 2 + case uploadContactForDeviceContactConsent = 3 + case uploadContactForQuickShareConsent = 4 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .noContactUploaded - case 2: self = .onlyUploadGoogleContact - case 3: self = .uploadContactForDeviceContactConsent - case 4: self = .uploadContactForQuickShareConsent - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .noContactUploaded: return 1 - case .onlyUploadGoogleContact: return 2 - case .uploadContactForDeviceContactConsent: return 3 - case .uploadContactForQuickShareConsent: return 4 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ContactAccess: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Refer to go/qs-contacts-consent-2024 for the detail. -enum Location_Nearby_Proto_Sharing_IdentityVerification: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case noPhoneNumberVerified // = 1 - case phoneNumberVerifiedNotLinkedToGaia // = 2 - case phoneNumberVerifiedLinkedToQsGaia // = 3 +enum Location_Nearby_Proto_Sharing_IdentityVerification: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case noPhoneNumberVerified = 1 + case phoneNumberVerifiedNotLinkedToGaia = 2 + case phoneNumberVerifiedLinkedToQsGaia = 3 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .noPhoneNumberVerified - case 2: self = .phoneNumberVerifiedNotLinkedToGaia - case 3: self = .phoneNumberVerifiedLinkedToQsGaia - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .noPhoneNumberVerified: return 1 - case .phoneNumberVerifiedNotLinkedToGaia: return 2 - case .phoneNumberVerifiedLinkedToQsGaia: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_IdentityVerification: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -enum Location_Nearby_Proto_Sharing_ButtonStatus: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case clickAccept // = 1 - case clickReject // = 2 - case ignore // = 3 +enum Location_Nearby_Proto_Sharing_ButtonStatus: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case clickAccept = 1 + case clickReject = 2 + case ignore = 3 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .clickAccept - case 2: self = .clickReject - case 3: self = .ignore - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .clickAccept: return 1 - case .clickReject: return 2 - case .ignore: return 3 - } - } - } -#if swift(>=4.2) - -extension Location_Nearby_Proto_Sharing_ButtonStatus: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -#if swift(>=5.5) && canImport(_Concurrency) -extension Location_Nearby_Proto_Sharing_EventType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_EventCategory: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_NearbySharingStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_Visibility: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_DataUsage: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_EstablishConnectionStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ConnectionLayerStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_SessionStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ResponseToIntroduction: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_DeviceType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_OSType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_DeviceRelationship: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_LogSource: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ServerActionName: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ServerResponseState: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_SyncPurpose: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ClientRole: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ScanType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ParsingFailedType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_AdvertisingMode: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_DiscoveryMode: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ActivityName: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ConsentType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ApkSource: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_InstallAPKStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_VerifyAPKStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ShowNotificationStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_PermissionRequestResult: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_PermissionRequestType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_SharingUseCase: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_AppCrashReason: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_AttachmentSourceType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_PreferencesAction: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_PreferencesActionStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_FastInitState: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_FastInitType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_DesktopNotification: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_DesktopTransferEventType: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ContactAccess: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_IdentityVerification: @unchecked Sendable {} -extension Location_Nearby_Proto_Sharing_ButtonStatus: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. extension Location_Nearby_Proto_Sharing_EventType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_EVENT_TYPE"), - 1: .same(proto: "ACCEPT_AGREEMENTS"), - 2: .same(proto: "ENABLE_NEARBY_SHARING"), - 3: .same(proto: "SET_VISIBILITY"), - 4: .same(proto: "DESCRIBE_ATTACHMENTS"), - 5: .same(proto: "SCAN_FOR_SHARE_TARGETS_START"), - 6: .same(proto: "SCAN_FOR_SHARE_TARGETS_END"), - 7: .same(proto: "ADVERTISE_DEVICE_PRESENCE_START"), - 8: .same(proto: "ADVERTISE_DEVICE_PRESENCE_END"), - 9: .same(proto: "SEND_FAST_INITIALIZATION"), - 10: .same(proto: "RECEIVE_FAST_INITIALIZATION"), - 11: .same(proto: "DISCOVER_SHARE_TARGET"), - 12: .same(proto: "SEND_INTRODUCTION"), - 13: .same(proto: "RECEIVE_INTRODUCTION"), - 14: .same(proto: "RESPOND_TO_INTRODUCTION"), - 15: .same(proto: "SEND_ATTACHMENTS_START"), - 16: .same(proto: "SEND_ATTACHMENTS_END"), - 17: .same(proto: "RECEIVE_ATTACHMENTS_START"), - 18: .same(proto: "RECEIVE_ATTACHMENTS_END"), - 19: .same(proto: "CANCEL_SENDING_ATTACHMENTS"), - 20: .same(proto: "CANCEL_RECEIVING_ATTACHMENTS"), - 21: .same(proto: "OPEN_RECEIVED_ATTACHMENTS"), - 22: .same(proto: "LAUNCH_SETUP_ACTIVITY"), - 23: .same(proto: "ADD_CONTACT"), - 24: .same(proto: "REMOVE_CONTACT"), - 25: .same(proto: "FAST_SHARE_SERVER_RESPONSE"), - 26: .same(proto: "SEND_START"), - 27: .same(proto: "ACCEPT_FAST_INITIALIZATION"), - 28: .same(proto: "SET_DATA_USAGE"), - 29: .same(proto: "DISMISS_FAST_INITIALIZATION"), - 30: .same(proto: "CANCEL_CONNECTION"), - 31: .same(proto: "LAUNCH_ACTIVITY"), - 32: .same(proto: "DISMISS_PRIVACY_NOTIFICATION"), - 33: .same(proto: "TAP_PRIVACY_NOTIFICATION"), - 34: .same(proto: "TAP_HELP"), - 35: .same(proto: "TAP_FEEDBACK"), - 36: .same(proto: "ADD_QUICK_SETTINGS_TILE"), - 37: .same(proto: "REMOVE_QUICK_SETTINGS_TILE"), - 38: .same(proto: "LAUNCH_PHONE_CONSENT"), - 39: .same(proto: "TAP_QUICK_SETTINGS_TILE"), - 40: .same(proto: "INSTALL_APK"), - 41: .same(proto: "VERIFY_APK"), - 42: .same(proto: "LAUNCH_CONSENT"), - 43: .same(proto: "PROCESS_RECEIVED_ATTACHMENTS_END"), - 44: .same(proto: "TOGGLE_SHOW_NOTIFICATION"), - 45: .same(proto: "SET_DEVICE_NAME"), - 46: .same(proto: "DECLINE_AGREEMENTS"), - 47: .same(proto: "REQUEST_SETTING_PERMISSIONS"), - 48: .same(proto: "ESTABLISH_CONNECTION"), - 49: .same(proto: "DEVICE_SETTINGS"), - 50: .same(proto: "AUTO_DISMISS_FAST_INITIALIZATION"), - 51: .same(proto: "APP_CRASH"), - 52: .same(proto: "TAP_QUICK_SETTINGS_FILE_SHARE"), - 53: .same(proto: "DISPLAY_PRIVACY_NOTIFICATION"), - 54: .same(proto: "DISPLAY_PHONE_CONSENT"), - 55: .same(proto: "PREFERENCES_USAGE"), - 56: .same(proto: "DEFAULT_OPT_IN"), - 57: .same(proto: "SETUP_WIZARD"), - 58: .same(proto: "TAP_QR_CODE"), - 59: .same(proto: "QR_CODE_LINK_SHOWN"), - 60: .same(proto: "PARSING_FAILED_ENDPOINT_ID"), - 61: .same(proto: "FAST_INIT_DISCOVER_DEVICE"), - 62: .same(proto: "SEND_DESKTOP_NOTIFICATION"), - 63: .same(proto: "SET_ACCOUNT"), - 64: .same(proto: "DECRYPT_CERTIFICATE_FAILURE"), - 65: .same(proto: "SHOW_ALLOW_PERMISSION_AUTO_ACCESS"), - 66: .same(proto: "SEND_DESKTOP_TRANSFER_EVENT"), - 67: .same(proto: "WAITING_FOR_ACCEPT"), - 68: .same(proto: "HIGH_QUALITY_MEDIUM_SETUP"), - 69: .same(proto: "RPC_CALL_STATUS"), - 70: .same(proto: "START_QR_CODE_SESSION"), - 71: .same(proto: "QR_CODE_OPENED_IN_WEB_CLIENT"), - 72: .same(proto: "HATS_JOINT_EVENT"), - 73: .same(proto: "RECEIVE_PREVIEWS"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_EVENT_TYPE\0\u{1}ACCEPT_AGREEMENTS\0\u{1}ENABLE_NEARBY_SHARING\0\u{1}SET_VISIBILITY\0\u{1}DESCRIBE_ATTACHMENTS\0\u{1}SCAN_FOR_SHARE_TARGETS_START\0\u{1}SCAN_FOR_SHARE_TARGETS_END\0\u{1}ADVERTISE_DEVICE_PRESENCE_START\0\u{1}ADVERTISE_DEVICE_PRESENCE_END\0\u{1}SEND_FAST_INITIALIZATION\0\u{1}RECEIVE_FAST_INITIALIZATION\0\u{1}DISCOVER_SHARE_TARGET\0\u{1}SEND_INTRODUCTION\0\u{1}RECEIVE_INTRODUCTION\0\u{1}RESPOND_TO_INTRODUCTION\0\u{1}SEND_ATTACHMENTS_START\0\u{1}SEND_ATTACHMENTS_END\0\u{1}RECEIVE_ATTACHMENTS_START\0\u{1}RECEIVE_ATTACHMENTS_END\0\u{1}CANCEL_SENDING_ATTACHMENTS\0\u{1}CANCEL_RECEIVING_ATTACHMENTS\0\u{1}OPEN_RECEIVED_ATTACHMENTS\0\u{1}LAUNCH_SETUP_ACTIVITY\0\u{1}ADD_CONTACT\0\u{1}REMOVE_CONTACT\0\u{1}FAST_SHARE_SERVER_RESPONSE\0\u{1}SEND_START\0\u{1}ACCEPT_FAST_INITIALIZATION\0\u{1}SET_DATA_USAGE\0\u{1}DISMISS_FAST_INITIALIZATION\0\u{1}CANCEL_CONNECTION\0\u{1}LAUNCH_ACTIVITY\0\u{1}DISMISS_PRIVACY_NOTIFICATION\0\u{1}TAP_PRIVACY_NOTIFICATION\0\u{1}TAP_HELP\0\u{1}TAP_FEEDBACK\0\u{1}ADD_QUICK_SETTINGS_TILE\0\u{1}REMOVE_QUICK_SETTINGS_TILE\0\u{1}LAUNCH_PHONE_CONSENT\0\u{1}TAP_QUICK_SETTINGS_TILE\0\u{1}INSTALL_APK\0\u{1}VERIFY_APK\0\u{1}LAUNCH_CONSENT\0\u{1}PROCESS_RECEIVED_ATTACHMENTS_END\0\u{1}TOGGLE_SHOW_NOTIFICATION\0\u{1}SET_DEVICE_NAME\0\u{1}DECLINE_AGREEMENTS\0\u{1}REQUEST_SETTING_PERMISSIONS\0\u{1}ESTABLISH_CONNECTION\0\u{1}DEVICE_SETTINGS\0\u{1}AUTO_DISMISS_FAST_INITIALIZATION\0\u{1}APP_CRASH\0\u{1}TAP_QUICK_SETTINGS_FILE_SHARE\0\u{1}DISPLAY_PRIVACY_NOTIFICATION\0\u{1}DISPLAY_PHONE_CONSENT\0\u{1}PREFERENCES_USAGE\0\u{1}DEFAULT_OPT_IN\0\u{1}SETUP_WIZARD\0\u{1}TAP_QR_CODE\0\u{1}QR_CODE_LINK_SHOWN\0\u{1}PARSING_FAILED_ENDPOINT_ID\0\u{1}FAST_INIT_DISCOVER_DEVICE\0\u{1}SEND_DESKTOP_NOTIFICATION\0\u{1}SET_ACCOUNT\0\u{1}DECRYPT_CERTIFICATE_FAILURE\0\u{1}SHOW_ALLOW_PERMISSION_AUTO_ACCESS\0\u{1}SEND_DESKTOP_TRANSFER_EVENT\0\u{1}WAITING_FOR_ACCEPT\0\u{1}HIGH_QUALITY_MEDIUM_SETUP\0\u{1}RPC_CALL_STATUS\0\u{1}START_QR_CODE_SESSION\0\u{1}QR_CODE_OPENED_IN_WEB_CLIENT\0\u{1}HATS_JOINT_EVENT\0\u{1}RECEIVE_PREVIEWS\0") } extension Location_Nearby_Proto_Sharing_EventCategory: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_EVENT_CATEGORY"), - 1: .same(proto: "SENDING_EVENT"), - 2: .same(proto: "RECEIVING_EVENT"), - 3: .same(proto: "SETTINGS_EVENT"), - 4: .same(proto: "RPC_EVENT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_EVENT_CATEGORY\0\u{1}SENDING_EVENT\0\u{1}RECEIVING_EVENT\0\u{1}SETTINGS_EVENT\0\u{1}RPC_EVENT\0") } extension Location_Nearby_Proto_Sharing_NearbySharingStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_NEARBY_SHARING_STATUS"), - 1: .same(proto: "ON"), - 2: .same(proto: "OFF"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_NEARBY_SHARING_STATUS\0\u{1}ON\0\u{1}OFF\0") } extension Location_Nearby_Proto_Sharing_Visibility: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_VISIBILITY"), - 1: .same(proto: "CONTACTS_ONLY"), - 2: .same(proto: "EVERYONE"), - 3: .same(proto: "SELECTED_CONTACTS_ONLY"), - 4: .same(proto: "HIDDEN"), - 5: .same(proto: "SELF_SHARE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_VISIBILITY\0\u{1}CONTACTS_ONLY\0\u{1}EVERYONE\0\u{1}SELECTED_CONTACTS_ONLY\0\u{1}HIDDEN\0\u{1}SELF_SHARE\0") } extension Location_Nearby_Proto_Sharing_DataUsage: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_DATA_USAGE"), - 1: .same(proto: "ONLINE"), - 2: .same(proto: "WIFI_ONLY"), - 3: .same(proto: "OFFLINE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_DATA_USAGE\0\u{1}ONLINE\0\u{1}WIFI_ONLY\0\u{1}OFFLINE\0") } extension Location_Nearby_Proto_Sharing_EstablishConnectionStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "CONNECTION_STATUS_UNKNOWN"), - 1: .same(proto: "CONNECTION_STATUS_SUCCESS"), - 2: .same(proto: "CONNECTION_STATUS_FAILURE"), - 3: .same(proto: "CONNECTION_STATUS_CANCELLATION"), - 4: .same(proto: "CONNECTION_STATUS_MEDIA_UNAVAILABLE_ATTACHMENT"), - 5: .same(proto: "CONNECTION_STATUS_FAILED_PAIRED_KEYHANDSHAKE"), - 6: .same(proto: "CONNECTION_STATUS_FAILED_WRITE_INTRODUCTION"), - 7: .same(proto: "CONNECTION_STATUS_FAILED_NULL_CONNECTION"), - 8: .same(proto: "CONNECTION_STATUS_FAILED_NO_TRANSFER_UPDATE_CALLBACK"), - 9: .same(proto: "CONNECTION_STATUS_LOST_CONNECTIVITY"), - 10: .same(proto: "CONNECTION_STATUS_INVALID_ADVERTISEMENT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0CONNECTION_STATUS_UNKNOWN\0\u{1}CONNECTION_STATUS_SUCCESS\0\u{1}CONNECTION_STATUS_FAILURE\0\u{1}CONNECTION_STATUS_CANCELLATION\0\u{1}CONNECTION_STATUS_MEDIA_UNAVAILABLE_ATTACHMENT\0\u{1}CONNECTION_STATUS_FAILED_PAIRED_KEYHANDSHAKE\0\u{1}CONNECTION_STATUS_FAILED_WRITE_INTRODUCTION\0\u{1}CONNECTION_STATUS_FAILED_NULL_CONNECTION\0\u{1}CONNECTION_STATUS_FAILED_NO_TRANSFER_UPDATE_CALLBACK\0\u{1}CONNECTION_STATUS_LOST_CONNECTIVITY\0\u{1}CONNECTION_STATUS_INVALID_ADVERTISEMENT\0") } extension Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_ATTACHMENT_TRANSMISSION_STATUS"), - 1: .same(proto: "COMPLETE_ATTACHMENT_TRANSMISSION_STATUS"), - 2: .same(proto: "CANCELED_ATTACHMENT_TRANSMISSION_STATUS"), - 3: .same(proto: "FAILED_ATTACHMENT_TRANSMISSION_STATUS"), - 4: .same(proto: "REJECTED_ATTACHMENT"), - 5: .same(proto: "TIMED_OUT_ATTACHMENT"), - 6: .same(proto: "AWAITING_REMOTE_ACCEPTANCE_FAILED_ATTACHMENT"), - 7: .same(proto: "NOT_ENOUGH_SPACE_ATTACHMENT"), - 8: .same(proto: "FAILED_NO_TRANSFER_UPDATE_CALLBACK"), - 9: .same(proto: "MEDIA_UNAVAILABLE_ATTACHMENT"), - 10: .same(proto: "UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT"), - 11: .same(proto: "NO_ATTACHMENT_FOUND"), - 12: .same(proto: "FAILED_NO_SHARE_TARGET_ENDPOINT"), - 13: .same(proto: "FAILED_PAIRED_KEYHANDSHAKE"), - 14: .same(proto: "FAILED_NULL_CONNECTION"), - 15: .same(proto: "FAILED_NO_PAYLOAD"), - 16: .same(proto: "FAILED_WRITE_INTRODUCTION"), - 17: .same(proto: "FAILED_UNKNOWN_REMOTE_RESPONSE"), - 18: .same(proto: "FAILED_NULL_CONNECTION_INIT_OUTGOING"), - 19: .same(proto: "FAILED_NULL_CONNECTION_DISCONNECTED"), - 20: .same(proto: "FAILED_NULL_CONNECTION_LOST_CONNECTIVITY"), - 21: .same(proto: "FAILED_NULL_CONNECTION_FAILURE"), - 22: .same(proto: "REJECTED_ATTACHMENT_TRANSMISSION_STATUS"), - 23: .same(proto: "TIMED_OUT_ATTACHMENT_TRANSMISSION_STATUS"), - 24: .same(proto: "NOT_ENOUGH_SPACE_ATTACHMENT_TRANSMISSION_STATUS"), - 25: .same(proto: "UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT_TRANSMISSION_STATUS"), - 26: .same(proto: "FAILED_UNKNOWN_REMOTE_RESPONSE_TRANSMISSION_STATUS"), - 27: .same(proto: "NO_RESPONSE_FRAME_CONNECTION_CLOSED_LOST_CONNECTIVITY_TRANSMISSION_STATUS"), - 28: .same(proto: "NO_RESPONSE_FRAME_CONNECTION_CLOSED_TRANSMISSION_STATUS"), - 29: .same(proto: "LOST_CONNECTIVITY_TRANSMISSION_STATUS"), - 30: .same(proto: "FAILED_DISALLOWED_MEDIUM"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_ATTACHMENT_TRANSMISSION_STATUS\0\u{1}COMPLETE_ATTACHMENT_TRANSMISSION_STATUS\0\u{1}CANCELED_ATTACHMENT_TRANSMISSION_STATUS\0\u{1}FAILED_ATTACHMENT_TRANSMISSION_STATUS\0\u{1}REJECTED_ATTACHMENT\0\u{1}TIMED_OUT_ATTACHMENT\0\u{1}AWAITING_REMOTE_ACCEPTANCE_FAILED_ATTACHMENT\0\u{1}NOT_ENOUGH_SPACE_ATTACHMENT\0\u{1}FAILED_NO_TRANSFER_UPDATE_CALLBACK\0\u{1}MEDIA_UNAVAILABLE_ATTACHMENT\0\u{1}UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT\0\u{1}NO_ATTACHMENT_FOUND\0\u{1}FAILED_NO_SHARE_TARGET_ENDPOINT\0\u{1}FAILED_PAIRED_KEYHANDSHAKE\0\u{1}FAILED_NULL_CONNECTION\0\u{1}FAILED_NO_PAYLOAD\0\u{1}FAILED_WRITE_INTRODUCTION\0\u{1}FAILED_UNKNOWN_REMOTE_RESPONSE\0\u{1}FAILED_NULL_CONNECTION_INIT_OUTGOING\0\u{1}FAILED_NULL_CONNECTION_DISCONNECTED\0\u{1}FAILED_NULL_CONNECTION_LOST_CONNECTIVITY\0\u{1}FAILED_NULL_CONNECTION_FAILURE\0\u{1}REJECTED_ATTACHMENT_TRANSMISSION_STATUS\0\u{1}TIMED_OUT_ATTACHMENT_TRANSMISSION_STATUS\0\u{1}NOT_ENOUGH_SPACE_ATTACHMENT_TRANSMISSION_STATUS\0\u{1}UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT_TRANSMISSION_STATUS\0\u{1}FAILED_UNKNOWN_REMOTE_RESPONSE_TRANSMISSION_STATUS\0\u{1}NO_RESPONSE_FRAME_CONNECTION_CLOSED_LOST_CONNECTIVITY_TRANSMISSION_STATUS\0\u{1}NO_RESPONSE_FRAME_CONNECTION_CLOSED_TRANSMISSION_STATUS\0\u{1}LOST_CONNECTIVITY_TRANSMISSION_STATUS\0\u{1}FAILED_DISALLOWED_MEDIUM\0") } extension Location_Nearby_Proto_Sharing_ConnectionLayerStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "CONNECTION_LAYER_STATUS_UNKNOWN"), - 1: .same(proto: "CONNECTION_LAYER_STATUS_SUCCESS"), - 2: .same(proto: "CONNECTION_LAYER_STATUS_ERROR"), - 3: .same(proto: "CONNECTION_LAYER_STATUS_OUT_OF_ORDER_API_CALL"), - 4: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_HAVE_ACTIVE_STRATEGY"), - 5: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_ADVERTISING"), - 6: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_DISCOVERING"), - 7: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_LISTENING"), - 8: .same(proto: "CONNECTION_LAYER_STATUS_END_POINT_IO_ERROR"), - 9: .same(proto: "CONNECTION_LAYER_STATUS_END_POINT_UNKNOWN"), - 10: .same(proto: "CONNECTION_LAYER_STATUS_CONNECTION_REJECTED"), - 11: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_CONNECTED_TO_END_POINT"), - 12: .same(proto: "CONNECTION_LAYER_STATUS_NOT_CONNECTED_TO_END_POINT"), - 13: .same(proto: "CONNECTION_LAYER_STATUS_BLUETOOTH_ERROR"), - 14: .same(proto: "CONNECTION_LAYER_STATUS_BLE_ERROR"), - 15: .same(proto: "CONNECTION_LAYER_STATUS_WIFI_LAN_ERROR"), - 16: .same(proto: "CONNECTION_LAYER_STATUS_PAYLOAD_UNKNOWN"), - 17: .same(proto: "CONNECTION_LAYER_STATUS_RESET"), - 18: .same(proto: "CONNECTION_LAYER_STATUS_TIMEOUT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0CONNECTION_LAYER_STATUS_UNKNOWN\0\u{1}CONNECTION_LAYER_STATUS_SUCCESS\0\u{1}CONNECTION_LAYER_STATUS_ERROR\0\u{1}CONNECTION_LAYER_STATUS_OUT_OF_ORDER_API_CALL\0\u{1}CONNECTION_LAYER_STATUS_ALREADY_HAVE_ACTIVE_STRATEGY\0\u{1}CONNECTION_LAYER_STATUS_ALREADY_ADVERTISING\0\u{1}CONNECTION_LAYER_STATUS_ALREADY_DISCOVERING\0\u{1}CONNECTION_LAYER_STATUS_ALREADY_LISTENING\0\u{1}CONNECTION_LAYER_STATUS_END_POINT_IO_ERROR\0\u{1}CONNECTION_LAYER_STATUS_END_POINT_UNKNOWN\0\u{1}CONNECTION_LAYER_STATUS_CONNECTION_REJECTED\0\u{1}CONNECTION_LAYER_STATUS_ALREADY_CONNECTED_TO_END_POINT\0\u{1}CONNECTION_LAYER_STATUS_NOT_CONNECTED_TO_END_POINT\0\u{1}CONNECTION_LAYER_STATUS_BLUETOOTH_ERROR\0\u{1}CONNECTION_LAYER_STATUS_BLE_ERROR\0\u{1}CONNECTION_LAYER_STATUS_WIFI_LAN_ERROR\0\u{1}CONNECTION_LAYER_STATUS_PAYLOAD_UNKNOWN\0\u{1}CONNECTION_LAYER_STATUS_RESET\0\u{1}CONNECTION_LAYER_STATUS_TIMEOUT\0") } extension Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "PROCESSING_STATUS_UNKNOWN"), - 1: .same(proto: "PROCESSING_STATUS_COMPLETE_PROCESSING_ATTACHMENTS"), - 2: .same(proto: "PROCESSING_STATUS_FAILED_MOVING_FILES"), - 3: .same(proto: "PROCESSING_STATUS_FAILED_RECEIVING_APK"), - 4: .same(proto: "PROCESSING_STATUS_FAILED_RECEIVING_TEXT"), - 5: .same(proto: "PROCESSING_STATUS_FAILED_RECEIVING_WIFI_CREDENTIALS"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0PROCESSING_STATUS_UNKNOWN\0\u{1}PROCESSING_STATUS_COMPLETE_PROCESSING_ATTACHMENTS\0\u{1}PROCESSING_STATUS_FAILED_MOVING_FILES\0\u{1}PROCESSING_STATUS_FAILED_RECEIVING_APK\0\u{1}PROCESSING_STATUS_FAILED_RECEIVING_TEXT\0\u{1}PROCESSING_STATUS_FAILED_RECEIVING_WIFI_CREDENTIALS\0") } extension Location_Nearby_Proto_Sharing_SessionStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_SESSION_STATUS"), - 1: .same(proto: "SUCCEEDED_SESSION_STATUS"), - 2: .same(proto: "FAILED_SESSION_STATUS"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_SESSION_STATUS\0\u{1}SUCCEEDED_SESSION_STATUS\0\u{1}FAILED_SESSION_STATUS\0") } extension Location_Nearby_Proto_Sharing_ResponseToIntroduction: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_RESPONSE_TO_INTRODUCTION"), - 1: .same(proto: "ACCEPT_INTRODUCTION"), - 2: .same(proto: "REJECT_INTRODUCTION"), - 3: .same(proto: "FAIL_INTRODUCTION"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_RESPONSE_TO_INTRODUCTION\0\u{1}ACCEPT_INTRODUCTION\0\u{1}REJECT_INTRODUCTION\0\u{1}FAIL_INTRODUCTION\0") } extension Location_Nearby_Proto_Sharing_DeviceType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_DEVICE_TYPE"), - 1: .same(proto: "PHONE"), - 2: .same(proto: "TABLET"), - 3: .same(proto: "LAPTOP"), - 4: .same(proto: "CAR"), - 5: .same(proto: "FOLDABLE"), - 6: .same(proto: "XR"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_DEVICE_TYPE\0\u{1}PHONE\0\u{1}TABLET\0\u{1}LAPTOP\0\u{1}CAR\0\u{1}FOLDABLE\0\u{1}XR\0") } extension Location_Nearby_Proto_Sharing_OSType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_OS_TYPE"), - 1: .same(proto: "ANDROID"), - 2: .same(proto: "CHROME_OS"), - 3: .same(proto: "IOS"), - 4: .same(proto: "WINDOWS"), - 5: .same(proto: "MACOS"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_OS_TYPE\0\u{1}ANDROID\0\u{1}CHROME_OS\0\u{1}IOS\0\u{1}WINDOWS\0\u{1}MACOS\0") } extension Location_Nearby_Proto_Sharing_DeviceRelationship: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_DEVICE_RELATIONSHIP"), - 1: .same(proto: "IS_SELF"), - 2: .same(proto: "IS_CONTACT"), - 3: .same(proto: "IS_STRANGER"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_DEVICE_RELATIONSHIP\0\u{1}IS_SELF\0\u{1}IS_CONTACT\0\u{1}IS_STRANGER\0") } extension Location_Nearby_Proto_Sharing_LogSource: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNSPECIFIED_SOURCE"), - 1: .same(proto: "LAB_DEVICES"), - 2: .same(proto: "INTERNAL_DEVICES"), - 3: .same(proto: "BETA_TESTER_DEVICES"), - 4: .same(proto: "OEM_DEVICES"), - 5: .same(proto: "DEBUG_DEVICES"), - 6: .same(proto: "NEARBY_MODULE_FOOD_DEVICES"), - 7: .same(proto: "BETO_DOGFOOD_DEVICES"), - 8: .same(proto: "NEARBY_DOGFOOD_DEVICES"), - 9: .same(proto: "NEARBY_TEAMFOOD_DEVICES"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNSPECIFIED_SOURCE\0\u{1}LAB_DEVICES\0\u{1}INTERNAL_DEVICES\0\u{1}BETA_TESTER_DEVICES\0\u{1}OEM_DEVICES\0\u{1}DEBUG_DEVICES\0\u{1}NEARBY_MODULE_FOOD_DEVICES\0\u{1}BETO_DOGFOOD_DEVICES\0\u{1}NEARBY_DOGFOOD_DEVICES\0\u{1}NEARBY_TEAMFOOD_DEVICES\0") } extension Location_Nearby_Proto_Sharing_ServerActionName: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_SERVER_ACTION"), - 1: .same(proto: "UPLOAD_CERTIFICATES"), - 2: .same(proto: "DOWNLOAD_CERTIFICATES"), - 3: .same(proto: "CHECK_REACHABILITY"), - 4: .same(proto: "UPLOAD_CONTACTS"), - 5: .same(proto: "UPDATE_DEVICE_NAME"), - 6: .same(proto: "UPLOAD_SENDER_CERTIFICATES"), - 7: .same(proto: "DOWNLOAD_SENDER_CERTIFICATES"), - 8: .same(proto: "UPLOAD_CONTACTS_AND_CERTIFICATES"), - 9: .same(proto: "LIST_REACHABLE_PHONE_NUMBERS"), - 10: .same(proto: "LIST_MY_DEVICES"), - 11: .same(proto: "LIST_CONTACT_PEOPLE"), - 12: .same(proto: "DOWNLOAD_CERTIFICATES_INFO"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_SERVER_ACTION\0\u{1}UPLOAD_CERTIFICATES\0\u{1}DOWNLOAD_CERTIFICATES\0\u{1}CHECK_REACHABILITY\0\u{1}UPLOAD_CONTACTS\0\u{1}UPDATE_DEVICE_NAME\0\u{1}UPLOAD_SENDER_CERTIFICATES\0\u{1}DOWNLOAD_SENDER_CERTIFICATES\0\u{1}UPLOAD_CONTACTS_AND_CERTIFICATES\0\u{1}LIST_REACHABLE_PHONE_NUMBERS\0\u{1}LIST_MY_DEVICES\0\u{1}LIST_CONTACT_PEOPLE\0\u{1}DOWNLOAD_CERTIFICATES_INFO\0") } extension Location_Nearby_Proto_Sharing_ServerResponseState: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_SERVER_RESPONSE_STATE"), - 1: .same(proto: "SERVER_RESPONSE_SUCCESS"), - 2: .same(proto: "SERVER_RESPONSE_UNKNOWN_FAILURE"), - 3: .same(proto: "SERVER_RESPONSE_STATUS_OTHER_FAILURE"), - 4: .same(proto: "SERVER_RESPONSE_STATUS_DEADLINE_EXCEEDED"), - 5: .same(proto: "SERVER_RESPONSE_STATUS_PERMISSION_DENIED"), - 6: .same(proto: "SERVER_RESPONSE_STATUS_UNAVAILABLE"), - 7: .same(proto: "SERVER_RESPONSE_STATUS_UNAUTHENTICATED"), - 8: .same(proto: "SERVER_RESPONSE_GOOGLE_AUTH_FAILURE"), - 9: .same(proto: "SERVER_RESPONSE_STATUS_INVALID_ARGUMENT"), - 10: .same(proto: "SERVER_RESPONSE_NOT_CONNECTED_TO_INTERNET"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_SERVER_RESPONSE_STATE\0\u{1}SERVER_RESPONSE_SUCCESS\0\u{1}SERVER_RESPONSE_UNKNOWN_FAILURE\0\u{1}SERVER_RESPONSE_STATUS_OTHER_FAILURE\0\u{1}SERVER_RESPONSE_STATUS_DEADLINE_EXCEEDED\0\u{1}SERVER_RESPONSE_STATUS_PERMISSION_DENIED\0\u{1}SERVER_RESPONSE_STATUS_UNAVAILABLE\0\u{1}SERVER_RESPONSE_STATUS_UNAUTHENTICATED\0\u{1}SERVER_RESPONSE_GOOGLE_AUTH_FAILURE\0\u{1}SERVER_RESPONSE_STATUS_INVALID_ARGUMENT\0\u{1}SERVER_RESPONSE_NOT_CONNECTED_TO_INTERNET\0") } extension Location_Nearby_Proto_Sharing_SyncPurpose: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "SYNC_PURPOSE_UNKNOWN"), - 1: .same(proto: "SYNC_PURPOSE_ON_DEMAND_SYNC"), - 2: .same(proto: "SYNC_PURPOSE_CHIME_NOTIFICATION"), - 3: .same(proto: "SYNC_PURPOSE_DAILY_SYNC"), - 4: .same(proto: "SYNC_PURPOSE_OPT_IN_FIRST_SYNC"), - 5: .same(proto: "SYNC_PURPOSE_CHECK_DEFAULT_OPT_IN"), - 6: .same(proto: "SYNC_PURPOSE_NEARBY_SHARE_ENABLED"), - 7: .same(proto: "SYNC_PURPOSE_SYNC_AT_FAST_INIT"), - 8: .same(proto: "SYNC_PURPOSE_SYNC_AT_DISCOVERY"), - 9: .same(proto: "SYNC_PURPOSE_SYNC_AT_LOAD_PRIVATE_CERTIFICATE"), - 10: .same(proto: "SYNC_PURPOSE_SYNC_AT_ADVERTISEMENT"), - 11: .same(proto: "SYNC_PURPOSE_CONTACT_LIST_CHANGE"), - 12: .same(proto: "SYNC_PURPOSE_SHOW_C11N_VIEW"), - 13: .same(proto: "SYNC_PURPOSE_REGULAR_CHECK_CONTACT_REACHABILITY"), - 14: .same(proto: "SYNC_PURPOSE_VISIBILITY_SELECTED_CONTACT_CHANGE"), - 15: .same(proto: "SYNC_PURPOSE_ACCOUNT_CHANGE"), - 16: .same(proto: "SYNC_PURPOSE_REGENERATE_CERTIFICATES"), - 17: .same(proto: "SYNC_PURPOSE_DEVICE_CONTACTS_CONSENT_CHANGE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0SYNC_PURPOSE_UNKNOWN\0\u{1}SYNC_PURPOSE_ON_DEMAND_SYNC\0\u{1}SYNC_PURPOSE_CHIME_NOTIFICATION\0\u{1}SYNC_PURPOSE_DAILY_SYNC\0\u{1}SYNC_PURPOSE_OPT_IN_FIRST_SYNC\0\u{1}SYNC_PURPOSE_CHECK_DEFAULT_OPT_IN\0\u{1}SYNC_PURPOSE_NEARBY_SHARE_ENABLED\0\u{1}SYNC_PURPOSE_SYNC_AT_FAST_INIT\0\u{1}SYNC_PURPOSE_SYNC_AT_DISCOVERY\0\u{1}SYNC_PURPOSE_SYNC_AT_LOAD_PRIVATE_CERTIFICATE\0\u{1}SYNC_PURPOSE_SYNC_AT_ADVERTISEMENT\0\u{1}SYNC_PURPOSE_CONTACT_LIST_CHANGE\0\u{1}SYNC_PURPOSE_SHOW_C11N_VIEW\0\u{1}SYNC_PURPOSE_REGULAR_CHECK_CONTACT_REACHABILITY\0\u{1}SYNC_PURPOSE_VISIBILITY_SELECTED_CONTACT_CHANGE\0\u{1}SYNC_PURPOSE_ACCOUNT_CHANGE\0\u{1}SYNC_PURPOSE_REGENERATE_CERTIFICATES\0\u{1}SYNC_PURPOSE_DEVICE_CONTACTS_CONSENT_CHANGE\0") } extension Location_Nearby_Proto_Sharing_ClientRole: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "CLIENT_ROLE_UNKNOWN"), - 1: .same(proto: "CLIENT_ROLE_SENDER"), - 2: .same(proto: "CLIENT_ROLE_RECEIVER"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0CLIENT_ROLE_UNKNOWN\0\u{1}CLIENT_ROLE_SENDER\0\u{1}CLIENT_ROLE_RECEIVER\0") } extension Location_Nearby_Proto_Sharing_ScanType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_SCAN_TYPE"), - 1: .same(proto: "FOREGROUND_SCAN"), - 2: .same(proto: "FOREGROUND_RETRY_SCAN"), - 3: .same(proto: "DIRECT_SHARE_SCAN"), - 4: .same(proto: "BACKGROUND_SCAN"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_SCAN_TYPE\0\u{1}FOREGROUND_SCAN\0\u{1}FOREGROUND_RETRY_SCAN\0\u{1}DIRECT_SHARE_SCAN\0\u{1}BACKGROUND_SCAN\0") } extension Location_Nearby_Proto_Sharing_ParsingFailedType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "FAILED_UNKNOWN_TYPE"), - 1: .same(proto: "FAILED_PARSE_ADVERTISEMENT"), - 2: .same(proto: "FAILED_CONVERT_SHARE_TARGET"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0FAILED_UNKNOWN_TYPE\0\u{1}FAILED_PARSE_ADVERTISEMENT\0\u{1}FAILED_CONVERT_SHARE_TARGET\0") } extension Location_Nearby_Proto_Sharing_AdvertisingMode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_ADVERTISING_MODE"), - 1: .same(proto: "SCREEN_OFF_ADVERTISING_MODE"), - 2: .same(proto: "BACKGROUND_ADVERTISING_MODE"), - 3: .same(proto: "MIDGROUND_ADVERTISING_MODE"), - 4: .same(proto: "FOREGROUND_ADVERTISING_MODE"), - 5: .same(proto: "SUSPENDED_ADVERTISING_MODE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_ADVERTISING_MODE\0\u{1}SCREEN_OFF_ADVERTISING_MODE\0\u{1}BACKGROUND_ADVERTISING_MODE\0\u{1}MIDGROUND_ADVERTISING_MODE\0\u{1}FOREGROUND_ADVERTISING_MODE\0\u{1}SUSPENDED_ADVERTISING_MODE\0") } extension Location_Nearby_Proto_Sharing_DiscoveryMode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_DISCOVERY_MODE"), - 1: .same(proto: "SCREEN_OFF_DISCOVERY_MODE"), - 2: .same(proto: "BACKGROUND_DISCOVERY_MODE"), - 3: .same(proto: "MIDGROUND_DISCOVERY_MODE"), - 4: .same(proto: "FOREGROUND_DISCOVERY_MODE"), - 5: .same(proto: "SUSPENDED_DISCOVERY_MODE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_DISCOVERY_MODE\0\u{1}SCREEN_OFF_DISCOVERY_MODE\0\u{1}BACKGROUND_DISCOVERY_MODE\0\u{1}MIDGROUND_DISCOVERY_MODE\0\u{1}FOREGROUND_DISCOVERY_MODE\0\u{1}SUSPENDED_DISCOVERY_MODE\0") } extension Location_Nearby_Proto_Sharing_ActivityName: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_ACTIVITY"), - 1: .same(proto: "SHARE_SHEET_ACTIVITY"), - 2: .same(proto: "SETTINGS_ACTIVITY"), - 3: .same(proto: "RECEIVE_SURFACE_ACTIVITY"), - 4: .same(proto: "SETUP_ACTIVITY"), - 5: .same(proto: "DEVICE_VISIBILITY_ACTIVITY"), - 6: .same(proto: "CONSENTS_ACTIVITY"), - 7: .same(proto: "SET_DEVICE_NAME_DIALOG"), - 8: .same(proto: "SET_DATA_USAGE_DIALOG"), - 9: .same(proto: "QUICK_SETTINGS_ACTIVITY"), - 10: .same(proto: "REMOTE_COPY_SHARE_SHEET_ACTIVITY"), - 11: .same(proto: "SETUP_WIZARD_ACTIVITY"), - 12: .same(proto: "SETTINGS_REVIEW_ACTIVITY"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_ACTIVITY\0\u{1}SHARE_SHEET_ACTIVITY\0\u{1}SETTINGS_ACTIVITY\0\u{1}RECEIVE_SURFACE_ACTIVITY\0\u{1}SETUP_ACTIVITY\0\u{1}DEVICE_VISIBILITY_ACTIVITY\0\u{1}CONSENTS_ACTIVITY\0\u{1}SET_DEVICE_NAME_DIALOG\0\u{1}SET_DATA_USAGE_DIALOG\0\u{1}QUICK_SETTINGS_ACTIVITY\0\u{1}REMOTE_COPY_SHARE_SHEET_ACTIVITY\0\u{1}SETUP_WIZARD_ACTIVITY\0\u{1}SETTINGS_REVIEW_ACTIVITY\0") } extension Location_Nearby_Proto_Sharing_ConsentType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "CONSENT_TYPE_UNKNOWN"), - 1: .same(proto: "CONSENT_TYPE_C11N"), - 2: .same(proto: "CONSENT_TYPE_DEVICE_CONTACT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0CONSENT_TYPE_UNKNOWN\0\u{1}CONSENT_TYPE_C11N\0\u{1}CONSENT_TYPE_DEVICE_CONTACT\0") } extension Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "CONSENT_UNKNOWN_ACCEPT_STATUS"), - 1: .same(proto: "CONSENT_ACCEPTED"), - 2: .same(proto: "CONSENT_DECLINED"), - 3: .same(proto: "CONSENT_UNABLE_TO_ENABLE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0CONSENT_UNKNOWN_ACCEPT_STATUS\0\u{1}CONSENT_ACCEPTED\0\u{1}CONSENT_DECLINED\0\u{1}CONSENT_UNABLE_TO_ENABLE\0") } extension Location_Nearby_Proto_Sharing_ApkSource: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_APK_SOURCE"), - 1: .same(proto: "APK_FROM_SD_CARD"), - 2: .same(proto: "INSTALLED_APP"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_APK_SOURCE\0\u{1}APK_FROM_SD_CARD\0\u{1}INSTALLED_APP\0") } extension Location_Nearby_Proto_Sharing_InstallAPKStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_INSTALL_APK_STATUS"), - 1: .same(proto: "FAIL_INSTALLATION"), - 2: .same(proto: "SUCCESS_INSTALLATION"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_INSTALL_APK_STATUS\0\u{1}FAIL_INSTALLATION\0\u{1}SUCCESS_INSTALLATION\0") } extension Location_Nearby_Proto_Sharing_VerifyAPKStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_VERIFY_APK_STATUS"), - 1: .same(proto: "NOT_INSTALLABLE"), - 2: .same(proto: "INSTALLABLE"), - 3: .same(proto: "ALREADY_INSTALLED"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_VERIFY_APK_STATUS\0\u{1}NOT_INSTALLABLE\0\u{1}INSTALLABLE\0\u{1}ALREADY_INSTALLED\0") } extension Location_Nearby_Proto_Sharing_ShowNotificationStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_SHOW_NOTIFICATION_STATUS"), - 1: .same(proto: "SHOW"), - 2: .same(proto: "NOT_SHOW"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_SHOW_NOTIFICATION_STATUS\0\u{1}SHOW\0\u{1}NOT_SHOW\0") } extension Location_Nearby_Proto_Sharing_PermissionRequestResult: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "PERMISSION_UNKNOWN_REQUEST_RESULT"), - 1: .same(proto: "PERMISSION_GRANTED"), - 2: .same(proto: "PERMISSION_REJECTED"), - 3: .same(proto: "PERMISSION_UNABLE_TO_GRANT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0PERMISSION_UNKNOWN_REQUEST_RESULT\0\u{1}PERMISSION_GRANTED\0\u{1}PERMISSION_REJECTED\0\u{1}PERMISSION_UNABLE_TO_GRANT\0") } extension Location_Nearby_Proto_Sharing_PermissionRequestType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "PERMISSION_UNKNOWN_TYPE"), - 1: .same(proto: "PERMISSION_AIRPLANE_MODE_OFF"), - 2: .same(proto: "PERMISSION_WIFI"), - 3: .same(proto: "PERMISSION_BLUETOOTH"), - 4: .same(proto: "PERMISSION_LOCATION"), - 5: .same(proto: "PERMISSION_WIFI_HOTSPOT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0PERMISSION_UNKNOWN_TYPE\0\u{1}PERMISSION_AIRPLANE_MODE_OFF\0\u{1}PERMISSION_WIFI\0\u{1}PERMISSION_BLUETOOTH\0\u{1}PERMISSION_LOCATION\0\u{1}PERMISSION_WIFI_HOTSPOT\0") } extension Location_Nearby_Proto_Sharing_SharingUseCase: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "USE_CASE_UNKNOWN"), - 1: .same(proto: "USE_CASE_NEARBY_SHARE"), - 2: .same(proto: "USE_CASE_REMOTE_COPY_PASTE"), - 3: .same(proto: "USE_CASE_WIFI_CREDENTIAL"), - 4: .same(proto: "USE_CASE_APP_SHARE"), - 5: .same(proto: "USE_CASE_QUICK_SETTING_FILE_SHARE"), - 6: .same(proto: "USE_CASE_SETUP_WIZARD"), - 7: .same(proto: "USE_CASE_NEARBY_SHARE_WITH_QR_CODE"), - 8: .same(proto: "USE_CASE_REDIRECTED_FROM_BLUETOOTH_SHARE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0USE_CASE_UNKNOWN\0\u{1}USE_CASE_NEARBY_SHARE\0\u{1}USE_CASE_REMOTE_COPY_PASTE\0\u{1}USE_CASE_WIFI_CREDENTIAL\0\u{1}USE_CASE_APP_SHARE\0\u{1}USE_CASE_QUICK_SETTING_FILE_SHARE\0\u{1}USE_CASE_SETUP_WIZARD\0\u{1}USE_CASE_NEARBY_SHARE_WITH_QR_CODE\0\u{1}USE_CASE_REDIRECTED_FROM_BLUETOOTH_SHARE\0") } extension Location_Nearby_Proto_Sharing_AppCrashReason: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "APP_CRASH_REASON_UNKNOWN"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0APP_CRASH_REASON_UNKNOWN\0") } extension Location_Nearby_Proto_Sharing_AttachmentSourceType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "ATTACHMENT_SOURCE_UNKNOWN"), - 1: .same(proto: "ATTACHMENT_SOURCE_CONTEXT_MENU"), - 2: .same(proto: "ATTACHMENT_SOURCE_DRAG_AND_DROP"), - 3: .same(proto: "ATTACHMENT_SOURCE_SELECT_FILES_BUTTON"), - 4: .same(proto: "ATTACHMENT_SOURCE_PASTE"), - 5: .same(proto: "ATTACHMENT_SOURCE_SELECT_FOLDERS_BUTTON"), - 6: .same(proto: "ATTACHMENT_SOURCE_SHARE_ACTIVATION"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0ATTACHMENT_SOURCE_UNKNOWN\0\u{1}ATTACHMENT_SOURCE_CONTEXT_MENU\0\u{1}ATTACHMENT_SOURCE_DRAG_AND_DROP\0\u{1}ATTACHMENT_SOURCE_SELECT_FILES_BUTTON\0\u{1}ATTACHMENT_SOURCE_PASTE\0\u{1}ATTACHMENT_SOURCE_SELECT_FOLDERS_BUTTON\0\u{1}ATTACHMENT_SOURCE_SHARE_ACTIVATION\0") } extension Location_Nearby_Proto_Sharing_PreferencesAction: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "PREFERENCES_ACTION_UNKNOWN"), - 1: .same(proto: "PREFERENCES_ACTION_NO_ACTION"), - 2: .same(proto: "PREFERENCES_ACTION_LOAD_PREFERENCES"), - 3: .same(proto: "PREFERENCES_ACTION_SAVE_PREFERENCESS"), - 4: .same(proto: "PREFERENCES_ACTION_ATTEMPT_LOAD"), - 5: .same(proto: "PREFERENCES_ACTION_RESTORE_FROM_BACKUP"), - 6: .same(proto: "PREFERENCES_ACTION_CREATE_PREFERENCES_PATH"), - 7: .same(proto: "PREFERENCES_ACTION_MAKE_PREFERENCES_BACKUP_FILE"), - 8: .same(proto: "PREFERENCES_ACTION_CHECK_IF_PREFERENCES_PATH_EXISTS"), - 9: .same(proto: "PREFERENCES_ACTION_CHECK_IF_PREFERENCES_INPUT_STREAM_STATUS"), - 10: .same(proto: "PREFERENCES_ACTION_CHECK_IF_PREFERENCES_FILE_IS_CORRUPTED"), - 11: .same(proto: "PREFERENCES_ACTION_CHECK_IF_PREFERENCES_BACKUP_FILE_EXISTS"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0PREFERENCES_ACTION_UNKNOWN\0\u{1}PREFERENCES_ACTION_NO_ACTION\0\u{1}PREFERENCES_ACTION_LOAD_PREFERENCES\0\u{1}PREFERENCES_ACTION_SAVE_PREFERENCESS\0\u{1}PREFERENCES_ACTION_ATTEMPT_LOAD\0\u{1}PREFERENCES_ACTION_RESTORE_FROM_BACKUP\0\u{1}PREFERENCES_ACTION_CREATE_PREFERENCES_PATH\0\u{1}PREFERENCES_ACTION_MAKE_PREFERENCES_BACKUP_FILE\0\u{1}PREFERENCES_ACTION_CHECK_IF_PREFERENCES_PATH_EXISTS\0\u{1}PREFERENCES_ACTION_CHECK_IF_PREFERENCES_INPUT_STREAM_STATUS\0\u{1}PREFERENCES_ACTION_CHECK_IF_PREFERENCES_FILE_IS_CORRUPTED\0\u{1}PREFERENCES_ACTION_CHECK_IF_PREFERENCES_BACKUP_FILE_EXISTS\0") } extension Location_Nearby_Proto_Sharing_PreferencesActionStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "PREFERENCES_ACTION_STATUS_UNKNOWN"), - 1: .same(proto: "PREFERENCES_ACTION_STATUS_SUCCESS"), - 2: .same(proto: "PREFERENCES_ACTION_STATUS_FAIL"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0PREFERENCES_ACTION_STATUS_UNKNOWN\0\u{1}PREFERENCES_ACTION_STATUS_SUCCESS\0\u{1}PREFERENCES_ACTION_STATUS_FAIL\0") } extension Location_Nearby_Proto_Sharing_FastInitState: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "FAST_INIT_UNKNOWN_STATE"), - 1: .same(proto: "FAST_INIT_CLOSE_STATE"), - 2: .same(proto: "FAST_INIT_FAR_STATE"), - 3: .same(proto: "FAST_INIT_LOST_STATE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0FAST_INIT_UNKNOWN_STATE\0\u{1}FAST_INIT_CLOSE_STATE\0\u{1}FAST_INIT_FAR_STATE\0\u{1}FAST_INIT_LOST_STATE\0") } extension Location_Nearby_Proto_Sharing_FastInitType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "FAST_INIT_UNKNOWN_TYPE"), - 1: .same(proto: "FAST_INIT_NOTIFY_TYPE"), - 2: .same(proto: "FAST_INIT_SILENT_TYPE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0FAST_INIT_UNKNOWN_TYPE\0\u{1}FAST_INIT_NOTIFY_TYPE\0\u{1}FAST_INIT_SILENT_TYPE\0") } extension Location_Nearby_Proto_Sharing_DesktopNotification: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "DESKTOP_NOTIFICATION_UNKNOWN"), - 1: .same(proto: "DESKTOP_NOTIFICATION_CONNECTING"), - 2: .same(proto: "DESKTOP_NOTIFICATION_PROGRESS"), - 3: .same(proto: "DESKTOP_NOTIFICATION_ACCEPT"), - 4: .same(proto: "DESKTOP_NOTIFICATION_RECEIVED"), - 5: .same(proto: "DESKTOP_NOTIFICATION_ERROR"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DESKTOP_NOTIFICATION_UNKNOWN\0\u{1}DESKTOP_NOTIFICATION_CONNECTING\0\u{1}DESKTOP_NOTIFICATION_PROGRESS\0\u{1}DESKTOP_NOTIFICATION_ACCEPT\0\u{1}DESKTOP_NOTIFICATION_RECEIVED\0\u{1}DESKTOP_NOTIFICATION_ERROR\0") } extension Location_Nearby_Proto_Sharing_DesktopTransferEventType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "DESKTOP_TRANSFER_EVENT_TYPE_UNKNOWN"), - 1: .same(proto: "DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ACCEPT"), - 2: .same(proto: "DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_PROGRESS"), - 3: .same(proto: "DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_RECEIVED"), - 4: .same(proto: "DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ERROR"), - 5: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_START"), - 6: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_SELECT_A_DEVICE"), - 7: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_PROGRESS"), - 8: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_SENT"), - 9: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_ERROR"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DESKTOP_TRANSFER_EVENT_TYPE_UNKNOWN\0\u{1}DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ACCEPT\0\u{1}DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_PROGRESS\0\u{1}DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_RECEIVED\0\u{1}DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ERROR\0\u{1}DESKTOP_TRANSFER_EVENT_SEND_TYPE_START\0\u{1}DESKTOP_TRANSFER_EVENT_SEND_TYPE_SELECT_A_DEVICE\0\u{1}DESKTOP_TRANSFER_EVENT_SEND_TYPE_PROGRESS\0\u{1}DESKTOP_TRANSFER_EVENT_SEND_TYPE_SENT\0\u{1}DESKTOP_TRANSFER_EVENT_SEND_TYPE_ERROR\0") } extension Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "DECRYPT_CERT_UNKNOWN_FAILURE"), - 1: .same(proto: "DECRYPT_CERT_NO_SUCH_ALGORITHM_FAILURE"), - 2: .same(proto: "DECRYPT_CERT_NO_SUCH_PADDING_FAILURE"), - 3: .same(proto: "DECRYPT_CERT_INVALID_KEY_FAILURE"), - 4: .same(proto: "DECRYPT_CERT_INVALID_ALGORITHM_PARAMETER_FAILURE"), - 5: .same(proto: "DECRYPT_CERT_ILLEGAL_BLOCK_SIZE_FAILURE"), - 6: .same(proto: "DECRYPT_CERT_BAD_PADDING_FAILURE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DECRYPT_CERT_UNKNOWN_FAILURE\0\u{1}DECRYPT_CERT_NO_SUCH_ALGORITHM_FAILURE\0\u{1}DECRYPT_CERT_NO_SUCH_PADDING_FAILURE\0\u{1}DECRYPT_CERT_INVALID_KEY_FAILURE\0\u{1}DECRYPT_CERT_INVALID_ALGORITHM_PARAMETER_FAILURE\0\u{1}DECRYPT_CERT_ILLEGAL_BLOCK_SIZE_FAILURE\0\u{1}DECRYPT_CERT_BAD_PADDING_FAILURE\0") } extension Location_Nearby_Proto_Sharing_ContactAccess: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "CONTACT_ACCESS_UNKNOWN"), - 1: .same(proto: "CONTACT_ACCESS_NO_CONTACT_UPLOADED"), - 2: .same(proto: "CONTACT_ACCESS_ONLY_UPLOAD_GOOGLE_CONTACT"), - 3: .same(proto: "CONTACT_ACCESS_UPLOAD_CONTACT_FOR_DEVICE_CONTACT_CONSENT"), - 4: .same(proto: "CONTACT_ACCESS_UPLOAD_CONTACT_FOR_QUICK_SHARE_CONSENT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0CONTACT_ACCESS_UNKNOWN\0\u{1}CONTACT_ACCESS_NO_CONTACT_UPLOADED\0\u{1}CONTACT_ACCESS_ONLY_UPLOAD_GOOGLE_CONTACT\0\u{1}CONTACT_ACCESS_UPLOAD_CONTACT_FOR_DEVICE_CONTACT_CONSENT\0\u{1}CONTACT_ACCESS_UPLOAD_CONTACT_FOR_QUICK_SHARE_CONSENT\0") } extension Location_Nearby_Proto_Sharing_IdentityVerification: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "IDENTITY_VERIFICATION_UNKNOWN"), - 1: .same(proto: "IDENTITY_VERIFICATION_NO_PHONE_NUMBER_VERIFIED"), - 2: .same(proto: "IDENTITY_VERIFICATION_PHONE_NUMBER_VERIFIED_NOT_LINKED_TO_GAIA"), - 3: .same(proto: "IDENTITY_VERIFICATION_PHONE_NUMBER_VERIFIED_LINKED_TO_QS_GAIA"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0IDENTITY_VERIFICATION_UNKNOWN\0\u{1}IDENTITY_VERIFICATION_NO_PHONE_NUMBER_VERIFIED\0\u{1}IDENTITY_VERIFICATION_PHONE_NUMBER_VERIFIED_NOT_LINKED_TO_GAIA\0\u{1}IDENTITY_VERIFICATION_PHONE_NUMBER_VERIFIED_LINKED_TO_QS_GAIA\0") } extension Location_Nearby_Proto_Sharing_ButtonStatus: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "BUTTON_STATUS_UNKNOWN"), - 1: .same(proto: "BUTTON_STATUS_CLICK_ACCEPT"), - 2: .same(proto: "BUTTON_STATUS_CLICK_REJECT"), - 3: .same(proto: "BUTTON_STATUS_IGNORE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0BUTTON_STATUS_UNKNOWN\0\u{1}BUTTON_STATUS_CLICK_ACCEPT\0\u{1}BUTTON_STATUS_CLICK_REJECT\0\u{1}BUTTON_STATUS_IGNORE\0") } diff --git a/NearbyShare/Model/Protobuf/ukey.pb.swift b/NearbyShare/Model/Protobuf/ukey.pb.swift index 3cbbf2b..36de860 100644 --- a/NearbyShare/Model/Protobuf/ukey.pb.swift +++ b/NearbyShare/Model/Protobuf/ukey.pb.swift @@ -1,5 +1,6 @@ // DO NOT EDIT. // swift-format-ignore-file +// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: ukey.proto @@ -34,48 +35,22 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -enum Securegcm_Ukey2HandshakeCipher: SwiftProtobuf.Enum { - typealias RawValue = Int - case reserved // = 0 +enum Securegcm_Ukey2HandshakeCipher: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case reserved = 0 /// NIST P-256 used for ECDH, SHA512 used for - case p256Sha512 // = 100 + case p256Sha512 = 100 /// commitment - case curve25519Sha512 // = 200 + case curve25519Sha512 = 200 init() { self = .reserved } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .reserved - case 100: self = .p256Sha512 - case 200: self = .curve25519Sha512 - default: return nil - } - } - - var rawValue: Int { - switch self { - case .reserved: return 0 - case .p256Sha512: return 100 - case .curve25519Sha512: return 200 - } - } - } -#if swift(>=4.2) - -extension Securegcm_Ukey2HandshakeCipher: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Securegcm_Ukey2Message { +struct Securegcm_Ukey2Message: Sendable { // 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. @@ -102,39 +77,17 @@ struct Securegcm_Ukey2Message { var unknownFields = SwiftProtobuf.UnknownStorage() - enum TypeEnum: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownDoNotUse // = 0 - case alert // = 1 - case clientInit // = 2 - case serverInit // = 3 - case clientFinish // = 4 + enum TypeEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownDoNotUse = 0 + case alert = 1 + case clientInit = 2 + case serverInit = 3 + case clientFinish = 4 init() { self = .unknownDoNotUse } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownDoNotUse - case 1: self = .alert - case 2: self = .clientInit - case 3: self = .serverInit - case 4: self = .clientFinish - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownDoNotUse: return 0 - case .alert: return 1 - case .clientInit: return 2 - case .serverInit: return 3 - case .clientFinish: return 4 - } - } - } init() {} @@ -143,15 +96,7 @@ struct Securegcm_Ukey2Message { fileprivate var _messageData: Data? = nil } -#if swift(>=4.2) - -extension Securegcm_Ukey2Message.TypeEnum: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Securegcm_Ukey2Alert { +struct Securegcm_Ukey2Alert: Sendable { // 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. @@ -176,74 +121,42 @@ struct Securegcm_Ukey2Alert { var unknownFields = SwiftProtobuf.UnknownStorage() - enum AlertType: SwiftProtobuf.Enum { - typealias RawValue = Int + enum AlertType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { /// Framing errors - case badMessage // = 1 + case badMessage = 1 /// message_type has an undefined value - case badMessageType // = 2 + case badMessageType = 2 /// message_type received does not correspond to - case incorrectMessage // = 3 + case incorrectMessage = 3 /// expected type at this stage of the protocol - case badMessageData // = 4 + case badMessageData = 4 /// ClientInit and ServerInit errors - case badVersion // = 100 + case badVersion = 100 /// suitable version to speak with client. - case badRandom // = 101 + case badRandom = 101 /// length - case badHandshakeCipher // = 102 + case badHandshakeCipher = 102 /// The next protocol is missing, unknown, or - case badNextProtocol // = 103 + case badNextProtocol = 103 /// unsupported - case badPublicKey // = 104 + case badPublicKey = 104 /// Other errors - case internalError // = 200 + case internalError = 200 init() { self = .badMessage } - init?(rawValue: Int) { - switch rawValue { - case 1: self = .badMessage - case 2: self = .badMessageType - case 3: self = .incorrectMessage - case 4: self = .badMessageData - case 100: self = .badVersion - case 101: self = .badRandom - case 102: self = .badHandshakeCipher - case 103: self = .badNextProtocol - case 104: self = .badPublicKey - case 200: self = .internalError - default: return nil - } - } - - var rawValue: Int { - switch self { - case .badMessage: return 1 - case .badMessageType: return 2 - case .incorrectMessage: return 3 - case .badMessageData: return 4 - case .badVersion: return 100 - case .badRandom: return 101 - case .badHandshakeCipher: return 102 - case .badNextProtocol: return 103 - case .badPublicKey: return 104 - case .internalError: return 200 - } - } - } init() {} @@ -252,15 +165,7 @@ struct Securegcm_Ukey2Alert { fileprivate var _errorMessage: String? = nil } -#if swift(>=4.2) - -extension Securegcm_Ukey2Alert.AlertType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -struct Securegcm_Ukey2ClientInit { +struct Securegcm_Ukey2ClientInit: Sendable { // 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. @@ -301,7 +206,7 @@ struct Securegcm_Ukey2ClientInit { /// One commitment (hash of ClientFinished containing public key) per supported /// cipher - struct CipherCommitment { + struct CipherCommitment: Sendable { // 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. @@ -339,7 +244,7 @@ struct Securegcm_Ukey2ClientInit { fileprivate var _nextProtocol: String? = nil } -struct Securegcm_Ukey2ServerInit { +struct Securegcm_Ukey2ServerInit: Sendable { // 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. @@ -393,7 +298,7 @@ struct Securegcm_Ukey2ServerInit { fileprivate var _publicKey: Data? = nil } -struct Securegcm_Ukey2ClientFinished { +struct Securegcm_Ukey2ClientFinished: Sendable { // 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. @@ -415,36 +320,17 @@ struct Securegcm_Ukey2ClientFinished { fileprivate var _publicKey: Data? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Securegcm_Ukey2HandshakeCipher: @unchecked Sendable {} -extension Securegcm_Ukey2Message: @unchecked Sendable {} -extension Securegcm_Ukey2Message.TypeEnum: @unchecked Sendable {} -extension Securegcm_Ukey2Alert: @unchecked Sendable {} -extension Securegcm_Ukey2Alert.AlertType: @unchecked Sendable {} -extension Securegcm_Ukey2ClientInit: @unchecked Sendable {} -extension Securegcm_Ukey2ClientInit.CipherCommitment: @unchecked Sendable {} -extension Securegcm_Ukey2ServerInit: @unchecked Sendable {} -extension Securegcm_Ukey2ClientFinished: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "securegcm" extension Securegcm_Ukey2HandshakeCipher: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "RESERVED"), - 100: .same(proto: "P256_SHA512"), - 200: .same(proto: "CURVE25519_SHA512"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0RESERVED\0\u{2}d\u{1}P256_SHA512\0\u{2}d\u{1}CURVE25519_SHA512\0") } extension Securegcm_Ukey2Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Ukey2Message" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "message_type"), - 2: .standard(proto: "message_data"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}message_type\0\u{3}message_data\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -482,21 +368,12 @@ extension Securegcm_Ukey2Message: SwiftProtobuf.Message, SwiftProtobuf._MessageI } extension Securegcm_Ukey2Message.TypeEnum: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_DO_NOT_USE"), - 1: .same(proto: "ALERT"), - 2: .same(proto: "CLIENT_INIT"), - 3: .same(proto: "SERVER_INIT"), - 4: .same(proto: "CLIENT_FINISH"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_DO_NOT_USE\0\u{1}ALERT\0\u{1}CLIENT_INIT\0\u{1}SERVER_INIT\0\u{1}CLIENT_FINISH\0") } extension Securegcm_Ukey2Alert: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Ukey2Alert" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .standard(proto: "error_message"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}error_message\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -534,28 +411,12 @@ extension Securegcm_Ukey2Alert: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } extension Securegcm_Ukey2Alert.AlertType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "BAD_MESSAGE"), - 2: .same(proto: "BAD_MESSAGE_TYPE"), - 3: .same(proto: "INCORRECT_MESSAGE"), - 4: .same(proto: "BAD_MESSAGE_DATA"), - 100: .same(proto: "BAD_VERSION"), - 101: .same(proto: "BAD_RANDOM"), - 102: .same(proto: "BAD_HANDSHAKE_CIPHER"), - 103: .same(proto: "BAD_NEXT_PROTOCOL"), - 104: .same(proto: "BAD_PUBLIC_KEY"), - 200: .same(proto: "INTERNAL_ERROR"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}BAD_MESSAGE\0\u{1}BAD_MESSAGE_TYPE\0\u{1}INCORRECT_MESSAGE\0\u{1}BAD_MESSAGE_DATA\0\u{2}`\u{1}BAD_VERSION\0\u{1}BAD_RANDOM\0\u{1}BAD_HANDSHAKE_CIPHER\0\u{1}BAD_NEXT_PROTOCOL\0\u{1}BAD_PUBLIC_KEY\0\u{2}`\u{1}INTERNAL_ERROR\0") } extension Securegcm_Ukey2ClientInit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Ukey2ClientInit" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .same(proto: "random"), - 3: .standard(proto: "cipher_commitments"), - 4: .standard(proto: "next_protocol"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}random\0\u{3}cipher_commitments\0\u{3}next_protocol\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -604,10 +465,7 @@ extension Securegcm_Ukey2ClientInit: SwiftProtobuf.Message, SwiftProtobuf._Messa extension Securegcm_Ukey2ClientInit.CipherCommitment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Securegcm_Ukey2ClientInit.protoMessageName + ".CipherCommitment" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "handshake_cipher"), - 2: .same(proto: "commitment"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}handshake_cipher\0\u{1}commitment\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -646,12 +504,7 @@ extension Securegcm_Ukey2ClientInit.CipherCommitment: SwiftProtobuf.Message, Swi extension Securegcm_Ukey2ServerInit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Ukey2ServerInit" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .same(proto: "random"), - 3: .standard(proto: "handshake_cipher"), - 4: .standard(proto: "public_key"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}random\0\u{3}handshake_cipher\0\u{3}public_key\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -700,9 +553,7 @@ extension Securegcm_Ukey2ServerInit: SwiftProtobuf.Message, SwiftProtobuf._Messa extension Securegcm_Ukey2ClientFinished: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Ukey2ClientFinished" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "public_key"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_key\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { diff --git a/NearbyShare/Model/Protobuf/wire_format.pb.swift b/NearbyShare/Model/Protobuf/wire_format.pb.swift index a99c16f..7e35737 100644 --- a/NearbyShare/Model/Protobuf/wire_format.pb.swift +++ b/NearbyShare/Model/Protobuf/wire_format.pb.swift @@ -1,5 +1,6 @@ // DO NOT EDIT. // swift-format-ignore-file +// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: wire_format.proto @@ -36,7 +37,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// File metadata. Does not include the actual bytes of the file. /// NEXT_ID=10 -struct Sharing_Nearby_FileMetadata { +struct Sharing_Nearby_FileMetadata: Sendable { // 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. @@ -137,45 +138,19 @@ struct Sharing_Nearby_FileMetadata { var unknownFields = SwiftProtobuf.UnknownStorage() - enum TypeEnum: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case image // = 1 - case video // = 2 - case androidApp // = 3 - case audio // = 4 - case document // = 5 - case contactCard // = 6 + enum TypeEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case image = 1 + case video = 2 + case androidApp = 3 + case audio = 4 + case document = 5 + case contactCard = 6 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .image - case 2: self = .video - case 3: self = .androidApp - case 4: self = .audio - case 5: self = .document - case 6: self = .contactCard - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .image: return 1 - case .video: return 2 - case .androidApp: return 3 - case .audio: return 4 - case .document: return 5 - case .contactCard: return 6 - } - } - } init() {} @@ -191,16 +166,8 @@ struct Sharing_Nearby_FileMetadata { fileprivate var _isSensitiveContent: Bool? = nil } -#if swift(>=4.2) - -extension Sharing_Nearby_FileMetadata.TypeEnum: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// NEXT_ID=8 -struct Sharing_Nearby_TextMetadata { +struct Sharing_Nearby_TextMetadata: Sendable { // 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. @@ -268,45 +235,23 @@ struct Sharing_Nearby_TextMetadata { var unknownFields = SwiftProtobuf.UnknownStorage() - enum TypeEnum: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case text // = 1 + enum TypeEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case text = 1 /// Open with browsers. - case url // = 2 + case url = 2 /// Open with map apps. - case address // = 3 + case address = 3 /// Dial. - case phoneNumber // = 4 + case phoneNumber = 4 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .text - case 2: self = .url - case 3: self = .address - case 4: self = .phoneNumber - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .text: return 1 - case .url: return 2 - case .address: return 3 - case .phoneNumber: return 4 - } - } - } init() {} @@ -319,16 +264,8 @@ struct Sharing_Nearby_TextMetadata { fileprivate var _isSensitiveText: Bool? = nil } -#if swift(>=4.2) - -extension Sharing_Nearby_TextMetadata.TypeEnum: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// NEXT_ID=6 -struct Sharing_Nearby_WifiCredentialsMetadata { +struct Sharing_Nearby_WifiCredentialsMetadata: Sendable { // 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. @@ -376,39 +313,17 @@ struct Sharing_Nearby_WifiCredentialsMetadata { var unknownFields = SwiftProtobuf.UnknownStorage() - enum SecurityType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownSecurityType // = 0 - case `open` // = 1 - case wpaPsk // = 2 - case wep // = 3 - case sae // = 4 + enum SecurityType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownSecurityType = 0 + case `open` = 1 + case wpaPsk = 2 + case wep = 3 + case sae = 4 init() { self = .unknownSecurityType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownSecurityType - case 1: self = .open - case 2: self = .wpaPsk - case 3: self = .wep - case 4: self = .sae - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownSecurityType: return 0 - case .open: return 1 - case .wpaPsk: return 2 - case .wep: return 3 - case .sae: return 4 - } - } - } init() {} @@ -419,16 +334,8 @@ struct Sharing_Nearby_WifiCredentialsMetadata { fileprivate var _id: Int64? = nil } -#if swift(>=4.2) - -extension Sharing_Nearby_WifiCredentialsMetadata.SecurityType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// NEXT_ID=8 -struct Sharing_Nearby_AppMetadata { +struct Sharing_Nearby_AppMetadata: Sendable { // 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. @@ -494,7 +401,7 @@ struct Sharing_Nearby_AppMetadata { } /// NEXT_ID=5 -struct Sharing_Nearby_StreamMetadata { +struct Sharing_Nearby_StreamMetadata: Sendable { // 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. @@ -554,7 +461,7 @@ struct Sharing_Nearby_StreamMetadata { /// A frame used when sending messages over the wire. /// NEXT_ID=3 -struct Sharing_Nearby_Frame { +struct Sharing_Nearby_Frame: Sendable { // 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. @@ -581,30 +488,14 @@ struct Sharing_Nearby_Frame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Version: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownVersion // = 0 - case v1 // = 1 + enum Version: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownVersion = 0 + case v1 = 1 init() { self = .unknownVersion } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownVersion - case 1: self = .v1 - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownVersion: return 0 - case .v1: return 1 - } - } - } init() {} @@ -613,16 +504,8 @@ struct Sharing_Nearby_Frame { fileprivate var _v1: Sharing_Nearby_V1Frame? = nil } -#if swift(>=4.2) - -extension Sharing_Nearby_Frame.Version: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// NEXT_ID=8 -struct Sharing_Nearby_V1Frame { +struct Sharing_Nearby_V1Frame: @unchecked Sendable { // 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. @@ -673,6 +556,7 @@ struct Sharing_Nearby_V1Frame { /// Clears the value of `pairedKeyResult`. Subsequent reads from it will return its default value. mutating func clearPairedKeyResult() {_uniqueStorage()._pairedKeyResult = nil} + /// NOTE: This field was marked as deprecated in the .proto file. var certificateInfo: Sharing_Nearby_CertificateInfoFrame { get {return _storage._certificateInfo ?? Sharing_Nearby_CertificateInfoFrame()} set {_uniqueStorage()._certificateInfo = newValue} @@ -682,6 +566,7 @@ struct Sharing_Nearby_V1Frame { /// Clears the value of `certificateInfo`. Subsequent reads from it will return its default value. mutating func clearCertificateInfo() {_uniqueStorage()._certificateInfo = nil} + /// NOTE: This field was marked as deprecated in the .proto file. var progressUpdate: Sharing_Nearby_ProgressUpdateFrame { get {return _storage._progressUpdate ?? Sharing_Nearby_ProgressUpdateFrame()} set {_uniqueStorage()._progressUpdate = newValue} @@ -693,52 +578,24 @@ struct Sharing_Nearby_V1Frame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum FrameType: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknownFrameType // = 0 - case introduction // = 1 - case response // = 2 - case pairedKeyEncryption // = 3 - case pairedKeyResult // = 4 + enum FrameType: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknownFrameType = 0 + case introduction = 1 + case response = 2 + case pairedKeyEncryption = 3 + case pairedKeyResult = 4 /// No longer used. - case certificateInfo // = 5 - case cancel // = 6 + case certificateInfo = 5 + case cancel = 6 /// No longer used. - case progressUpdate // = 7 + case progressUpdate = 7 init() { self = .unknownFrameType } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknownFrameType - case 1: self = .introduction - case 2: self = .response - case 3: self = .pairedKeyEncryption - case 4: self = .pairedKeyResult - case 5: self = .certificateInfo - case 6: self = .cancel - case 7: self = .progressUpdate - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknownFrameType: return 0 - case .introduction: return 1 - case .response: return 2 - case .pairedKeyEncryption: return 3 - case .pairedKeyResult: return 4 - case .certificateInfo: return 5 - case .cancel: return 6 - case .progressUpdate: return 7 - } - } - } init() {} @@ -746,18 +603,10 @@ struct Sharing_Nearby_V1Frame { fileprivate var _storage = _StorageClass.defaultInstance } -#if swift(>=4.2) - -extension Sharing_Nearby_V1Frame.FrameType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// An introduction packet sent by the sending side. Contains a list of files /// they'd like to share. /// NEXT_ID=10 -struct Sharing_Nearby_IntroductionFrame { +struct Sharing_Nearby_IntroductionFrame: Sendable { // 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. @@ -804,33 +653,15 @@ struct Sharing_Nearby_IntroductionFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum SharingUseCase: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case nearbyShare // = 1 - case remoteCopy // = 2 + enum SharingUseCase: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case nearbyShare = 1 + case remoteCopy = 2 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .nearbyShare - case 2: self = .remoteCopy - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .nearbyShare: return 1 - case .remoteCopy: return 2 - } - } - } init() {} @@ -840,17 +671,9 @@ struct Sharing_Nearby_IntroductionFrame { fileprivate var _useCase: Sharing_Nearby_IntroductionFrame.SharingUseCase? = nil } -#if swift(>=4.2) - -extension Sharing_Nearby_IntroductionFrame.SharingUseCase: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// A progress update packet sent by the sending side. Contains transfer progress /// value. NEXT_ID=3 -struct Sharing_Nearby_ProgressUpdateFrame { +struct Sharing_Nearby_ProgressUpdateFrame: Sendable { // 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. @@ -886,7 +709,7 @@ struct Sharing_Nearby_ProgressUpdateFrame { /// A response packet sent by the receiving side. Accepts or rejects the list of /// files. /// NEXT_ID=4 -struct Sharing_Nearby_ConnectionResponseFrame { +struct Sharing_Nearby_ConnectionResponseFrame: Sendable { // 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. @@ -910,42 +733,18 @@ struct Sharing_Nearby_ConnectionResponseFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Status: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case accept // = 1 - case reject // = 2 - case notEnoughSpace // = 3 - case unsupportedAttachmentType // = 4 - case timedOut // = 5 + enum Status: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case accept = 1 + case reject = 2 + case notEnoughSpace = 3 + case unsupportedAttachmentType = 4 + case timedOut = 5 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .accept - case 2: self = .reject - case 3: self = .notEnoughSpace - case 4: self = .unsupportedAttachmentType - case 5: self = .timedOut - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .accept: return 1 - case .reject: return 2 - case .notEnoughSpace: return 3 - case .unsupportedAttachmentType: return 4 - case .timedOut: return 5 - } - } - } init() {} @@ -953,17 +752,9 @@ struct Sharing_Nearby_ConnectionResponseFrame { fileprivate var _status: Sharing_Nearby_ConnectionResponseFrame.Status? = nil } -#if swift(>=4.2) - -extension Sharing_Nearby_ConnectionResponseFrame.Status: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// Attachment details that sent in ConnectionResponseFrame. /// NEXT_ID=3 -struct Sharing_Nearby_AttachmentDetails { +struct Sharing_Nearby_AttachmentDetails: Sendable { // 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. @@ -991,52 +782,28 @@ struct Sharing_Nearby_AttachmentDetails { var unknownFields = SwiftProtobuf.UnknownStorage() /// LINT.IfChange - enum TypeEnum: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 + enum TypeEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 /// Represents FileAttachment. - case file // = 1 + case file = 1 /// Represents TextAttachment. - case text // = 2 + case text = 2 /// Represents WifiCredentialsAttachment. - case wifiCredentials // = 3 + case wifiCredentials = 3 /// Represents AppAttachment. - case app // = 4 + case app = 4 /// Represents StreamAttachment. - case stream // = 5 + case stream = 5 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .file - case 2: self = .text - case 3: self = .wifiCredentials - case 4: self = .app - case 5: self = .stream - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .file: return 1 - case .text: return 2 - case .wifiCredentials: return 3 - case .app: return 4 - case .stream: return 5 - } - } - } init() {} @@ -1045,17 +812,9 @@ struct Sharing_Nearby_AttachmentDetails { fileprivate var _fileAttachmentDetails: Sharing_Nearby_FileAttachmentDetails? = nil } -#if swift(>=4.2) - -extension Sharing_Nearby_AttachmentDetails.TypeEnum: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// File attachment details included in ConnectionResponseFrame. /// NEXT_ID=3 -struct Sharing_Nearby_FileAttachmentDetails { +struct Sharing_Nearby_FileAttachmentDetails: Sendable { // 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. @@ -1082,7 +841,7 @@ struct Sharing_Nearby_FileAttachmentDetails { } /// NEXT_ID=2 -struct Sharing_Nearby_PayloadsDetails { +struct Sharing_Nearby_PayloadsDetails: Sendable { // 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. @@ -1097,7 +856,7 @@ struct Sharing_Nearby_PayloadsDetails { /// Metadata of a payload file created by Nearby Connections. /// NEXT_ID=4 -struct Sharing_Nearby_PayloadDetails { +struct Sharing_Nearby_PayloadDetails: Sendable { // 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. @@ -1140,7 +899,7 @@ struct Sharing_Nearby_PayloadDetails { /// A paired key encryption packet sent between devices, contains signed data. /// NEXT_ID=5 -struct Sharing_Nearby_PairedKeyEncryptionFrame { +struct Sharing_Nearby_PairedKeyEncryptionFrame: Sendable { // 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. @@ -1201,7 +960,7 @@ struct Sharing_Nearby_PairedKeyEncryptionFrame { /// A paired key verification result packet sent between devices. /// NEXT_ID=3 -struct Sharing_Nearby_PairedKeyResultFrame { +struct Sharing_Nearby_PairedKeyResultFrame: Sendable { // 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. @@ -1228,36 +987,16 @@ struct Sharing_Nearby_PairedKeyResultFrame { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Status: SwiftProtobuf.Enum { - typealias RawValue = Int - case unknown // = 0 - case success // = 1 - case fail // = 2 - case unable // = 3 + enum Status: Int, SwiftProtobuf.Enum, Swift.CaseIterable { + case unknown = 0 + case success = 1 + case fail = 2 + case unable = 3 init() { self = .unknown } - init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .success - case 2: self = .fail - case 3: self = .unable - default: return nil - } - } - - var rawValue: Int { - switch self { - case .unknown: return 0 - case .success: return 1 - case .fail: return 2 - case .unable: return 3 - } - } - } init() {} @@ -1266,17 +1005,9 @@ struct Sharing_Nearby_PairedKeyResultFrame { fileprivate var _osType: Location_Nearby_Proto_Sharing_OSType? = nil } -#if swift(>=4.2) - -extension Sharing_Nearby_PairedKeyResultFrame.Status: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - /// A package containing certificate info to be shared to remote device offline. /// NEXT_ID=2 -struct Sharing_Nearby_CertificateInfoFrame { +struct Sharing_Nearby_CertificateInfoFrame: Sendable { // 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. @@ -1291,7 +1022,7 @@ struct Sharing_Nearby_CertificateInfoFrame { /// A public certificate from the local device. /// NEXT_ID=8 -struct Sharing_Nearby_PublicCertificate { +struct Sharing_Nearby_PublicCertificate: Sendable { // 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. @@ -1385,7 +1116,7 @@ struct Sharing_Nearby_PublicCertificate { } /// NEXT_ID=3 -struct Sharing_Nearby_WifiCredentials { +struct Sharing_Nearby_WifiCredentials: Sendable { // 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. @@ -1420,7 +1151,7 @@ struct Sharing_Nearby_WifiCredentials { } /// NEXT_ID=2 -struct Sharing_Nearby_StreamDetails { +struct Sharing_Nearby_StreamDetails: Sendable { // 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. @@ -1442,55 +1173,13 @@ struct Sharing_Nearby_StreamDetails { fileprivate var _inputStreamParcelFileDescriptorBytes: Data? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Sharing_Nearby_FileMetadata: @unchecked Sendable {} -extension Sharing_Nearby_FileMetadata.TypeEnum: @unchecked Sendable {} -extension Sharing_Nearby_TextMetadata: @unchecked Sendable {} -extension Sharing_Nearby_TextMetadata.TypeEnum: @unchecked Sendable {} -extension Sharing_Nearby_WifiCredentialsMetadata: @unchecked Sendable {} -extension Sharing_Nearby_WifiCredentialsMetadata.SecurityType: @unchecked Sendable {} -extension Sharing_Nearby_AppMetadata: @unchecked Sendable {} -extension Sharing_Nearby_StreamMetadata: @unchecked Sendable {} -extension Sharing_Nearby_Frame: @unchecked Sendable {} -extension Sharing_Nearby_Frame.Version: @unchecked Sendable {} -extension Sharing_Nearby_V1Frame: @unchecked Sendable {} -extension Sharing_Nearby_V1Frame.FrameType: @unchecked Sendable {} -extension Sharing_Nearby_IntroductionFrame: @unchecked Sendable {} -extension Sharing_Nearby_IntroductionFrame.SharingUseCase: @unchecked Sendable {} -extension Sharing_Nearby_ProgressUpdateFrame: @unchecked Sendable {} -extension Sharing_Nearby_ConnectionResponseFrame: @unchecked Sendable {} -extension Sharing_Nearby_ConnectionResponseFrame.Status: @unchecked Sendable {} -extension Sharing_Nearby_AttachmentDetails: @unchecked Sendable {} -extension Sharing_Nearby_AttachmentDetails.TypeEnum: @unchecked Sendable {} -extension Sharing_Nearby_FileAttachmentDetails: @unchecked Sendable {} -extension Sharing_Nearby_PayloadsDetails: @unchecked Sendable {} -extension Sharing_Nearby_PayloadDetails: @unchecked Sendable {} -extension Sharing_Nearby_PairedKeyEncryptionFrame: @unchecked Sendable {} -extension Sharing_Nearby_PairedKeyResultFrame: @unchecked Sendable {} -extension Sharing_Nearby_PairedKeyResultFrame.Status: @unchecked Sendable {} -extension Sharing_Nearby_CertificateInfoFrame: @unchecked Sendable {} -extension Sharing_Nearby_PublicCertificate: @unchecked Sendable {} -extension Sharing_Nearby_WifiCredentials: @unchecked Sendable {} -extension Sharing_Nearby_StreamDetails: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "sharing.nearby" extension Sharing_Nearby_FileMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".FileMetadata" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "type"), - 3: .standard(proto: "payload_id"), - 4: .same(proto: "size"), - 5: .standard(proto: "mime_type"), - 6: .same(proto: "id"), - 7: .standard(proto: "parent_folder"), - 8: .standard(proto: "attachment_hash"), - 9: .standard(proto: "is_sensitive_content"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}name\0\u{1}type\0\u{3}payload_id\0\u{1}size\0\u{3}mime_type\0\u{1}id\0\u{3}parent_folder\0\u{3}attachment_hash\0\u{3}is_sensitive_content\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1563,27 +1252,12 @@ extension Sharing_Nearby_FileMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes } extension Sharing_Nearby_FileMetadata.TypeEnum: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "IMAGE"), - 2: .same(proto: "VIDEO"), - 3: .same(proto: "ANDROID_APP"), - 4: .same(proto: "AUDIO"), - 5: .same(proto: "DOCUMENT"), - 6: .same(proto: "CONTACT_CARD"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}IMAGE\0\u{1}VIDEO\0\u{1}ANDROID_APP\0\u{1}AUDIO\0\u{1}DOCUMENT\0\u{1}CONTACT_CARD\0") } extension Sharing_Nearby_TextMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".TextMetadata" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 2: .standard(proto: "text_title"), - 3: .same(proto: "type"), - 4: .standard(proto: "payload_id"), - 5: .same(proto: "size"), - 6: .same(proto: "id"), - 7: .standard(proto: "is_sensitive_text"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{4}\u{2}text_title\0\u{1}type\0\u{3}payload_id\0\u{1}size\0\u{1}id\0\u{3}is_sensitive_text\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1641,23 +1315,12 @@ extension Sharing_Nearby_TextMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes } extension Sharing_Nearby_TextMetadata.TypeEnum: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "TEXT"), - 2: .same(proto: "URL"), - 3: .same(proto: "ADDRESS"), - 4: .same(proto: "PHONE_NUMBER"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}TEXT\0\u{1}URL\0\u{1}ADDRESS\0\u{1}PHONE_NUMBER\0") } extension Sharing_Nearby_WifiCredentialsMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".WifiCredentialsMetadata" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 2: .same(proto: "ssid"), - 3: .standard(proto: "security_type"), - 4: .standard(proto: "payload_id"), - 5: .same(proto: "id"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\u{2}ssid\0\u{3}security_type\0\u{3}payload_id\0\u{1}id\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1705,26 +1368,12 @@ extension Sharing_Nearby_WifiCredentialsMetadata: SwiftProtobuf.Message, SwiftPr } extension Sharing_Nearby_WifiCredentialsMetadata.SecurityType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_SECURITY_TYPE"), - 1: .same(proto: "OPEN"), - 2: .same(proto: "WPA_PSK"), - 3: .same(proto: "WEP"), - 4: .same(proto: "SAE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_SECURITY_TYPE\0\u{1}OPEN\0\u{1}WPA_PSK\0\u{1}WEP\0\u{1}SAE\0") } extension Sharing_Nearby_AppMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AppMetadata" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "app_name"), - 2: .same(proto: "size"), - 3: .standard(proto: "payload_id"), - 4: .same(proto: "id"), - 5: .standard(proto: "file_name"), - 6: .standard(proto: "file_size"), - 7: .standard(proto: "package_name"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}app_name\0\u{1}size\0\u{3}payload_id\0\u{1}id\0\u{3}file_name\0\u{3}file_size\0\u{3}package_name\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1788,12 +1437,7 @@ extension Sharing_Nearby_AppMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mess extension Sharing_Nearby_StreamMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".StreamMetadata" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "description"), - 2: .standard(proto: "package_name"), - 3: .standard(proto: "payload_id"), - 4: .standard(proto: "attributed_app_name"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}description\0\u{3}package_name\0\u{3}payload_id\0\u{3}attributed_app_name\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1842,10 +1486,7 @@ extension Sharing_Nearby_StreamMetadata: SwiftProtobuf.Message, SwiftProtobuf._M extension Sharing_Nearby_Frame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Frame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .same(proto: "v1"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}v1\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1883,23 +1524,12 @@ extension Sharing_Nearby_Frame: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } extension Sharing_Nearby_Frame.Version: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_VERSION"), - 1: .same(proto: "V1"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_VERSION\0\u{1}V1\0") } extension Sharing_Nearby_V1Frame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".V1Frame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .same(proto: "introduction"), - 3: .standard(proto: "connection_response"), - 4: .standard(proto: "paired_key_encryption"), - 5: .standard(proto: "paired_key_result"), - 6: .standard(proto: "certificate_info"), - 7: .standard(proto: "progress_update"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{1}introduction\0\u{3}connection_response\0\u{3}paired_key_encryption\0\u{3}paired_key_result\0\u{3}certificate_info\0\u{3}progress_update\0") fileprivate class _StorageClass { var _type: Sharing_Nearby_V1Frame.FrameType? = nil @@ -1910,7 +1540,11 @@ extension Sharing_Nearby_V1Frame: SwiftProtobuf.Message, SwiftProtobuf._MessageI var _certificateInfo: Sharing_Nearby_CertificateInfoFrame? = nil var _progressUpdate: Sharing_Nearby_ProgressUpdateFrame? = nil - static let defaultInstance = _StorageClass() + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() private init() {} @@ -2006,31 +1640,12 @@ extension Sharing_Nearby_V1Frame: SwiftProtobuf.Message, SwiftProtobuf._MessageI } extension Sharing_Nearby_V1Frame.FrameType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN_FRAME_TYPE"), - 1: .same(proto: "INTRODUCTION"), - 2: .same(proto: "RESPONSE"), - 3: .same(proto: "PAIRED_KEY_ENCRYPTION"), - 4: .same(proto: "PAIRED_KEY_RESULT"), - 5: .same(proto: "CERTIFICATE_INFO"), - 6: .same(proto: "CANCEL"), - 7: .same(proto: "PROGRESS_UPDATE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_FRAME_TYPE\0\u{1}INTRODUCTION\0\u{1}RESPONSE\0\u{1}PAIRED_KEY_ENCRYPTION\0\u{1}PAIRED_KEY_RESULT\0\u{1}CERTIFICATE_INFO\0\u{1}CANCEL\0\u{1}PROGRESS_UPDATE\0") } extension Sharing_Nearby_IntroductionFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".IntroductionFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "file_metadata"), - 2: .standard(proto: "text_metadata"), - 3: .standard(proto: "required_package"), - 4: .standard(proto: "wifi_credentials_metadata"), - 5: .standard(proto: "app_metadata"), - 6: .standard(proto: "start_transfer"), - 7: .standard(proto: "stream_metadata"), - 8: .standard(proto: "use_case"), - 9: .standard(proto: "preview_payload_ids"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}file_metadata\0\u{3}text_metadata\0\u{3}required_package\0\u{3}wifi_credentials_metadata\0\u{3}app_metadata\0\u{3}start_transfer\0\u{3}stream_metadata\0\u{3}use_case\0\u{3}preview_payload_ids\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2103,19 +1718,12 @@ extension Sharing_Nearby_IntroductionFrame: SwiftProtobuf.Message, SwiftProtobuf } extension Sharing_Nearby_IntroductionFrame.SharingUseCase: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "NEARBY_SHARE"), - 2: .same(proto: "REMOTE_COPY"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}NEARBY_SHARE\0\u{1}REMOTE_COPY\0") } extension Sharing_Nearby_ProgressUpdateFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ProgressUpdateFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "progress"), - 2: .standard(proto: "start_transfer"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}progress\0\u{3}start_transfer\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2154,11 +1762,7 @@ extension Sharing_Nearby_ProgressUpdateFrame: SwiftProtobuf.Message, SwiftProtob extension Sharing_Nearby_ConnectionResponseFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ConnectionResponseFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "status"), - 2: .standard(proto: "attachment_details"), - 3: .standard(proto: "stream_metadata"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0\u{3}attachment_details\0\u{3}stream_metadata\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2201,22 +1805,12 @@ extension Sharing_Nearby_ConnectionResponseFrame: SwiftProtobuf.Message, SwiftPr } extension Sharing_Nearby_ConnectionResponseFrame.Status: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "ACCEPT"), - 2: .same(proto: "REJECT"), - 3: .same(proto: "NOT_ENOUGH_SPACE"), - 4: .same(proto: "UNSUPPORTED_ATTACHMENT_TYPE"), - 5: .same(proto: "TIMED_OUT"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}ACCEPT\0\u{1}REJECT\0\u{1}NOT_ENOUGH_SPACE\0\u{1}UNSUPPORTED_ATTACHMENT_TYPE\0\u{1}TIMED_OUT\0") } extension Sharing_Nearby_AttachmentDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AttachmentDetails" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .standard(proto: "file_attachment_details"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}file_attachment_details\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2254,22 +1848,12 @@ extension Sharing_Nearby_AttachmentDetails: SwiftProtobuf.Message, SwiftProtobuf } extension Sharing_Nearby_AttachmentDetails.TypeEnum: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "FILE"), - 2: .same(proto: "TEXT"), - 3: .same(proto: "WIFI_CREDENTIALS"), - 4: .same(proto: "APP"), - 5: .same(proto: "STREAM"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}FILE\0\u{1}TEXT\0\u{1}WIFI_CREDENTIALS\0\u{1}APP\0\u{1}STREAM\0") } extension Sharing_Nearby_FileAttachmentDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".FileAttachmentDetails" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "receiver_existing_file_size"), - 2: .standard(proto: "attachment_hash_payloads"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}receiver_existing_file_size\0\u{3}attachment_hash_payloads\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2308,9 +1892,7 @@ extension Sharing_Nearby_FileAttachmentDetails: SwiftProtobuf.Message, SwiftProt extension Sharing_Nearby_PayloadsDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PayloadsDetails" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "payload_details"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}payload_details\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2340,11 +1922,7 @@ extension Sharing_Nearby_PayloadsDetails: SwiftProtobuf.Message, SwiftProtobuf._ extension Sharing_Nearby_PayloadDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PayloadDetails" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .standard(proto: "creation_timestamp_millis"), - 3: .same(proto: "size"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{3}creation_timestamp_millis\0\u{1}size\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2388,12 +1966,7 @@ extension Sharing_Nearby_PayloadDetails: SwiftProtobuf.Message, SwiftProtobuf._M extension Sharing_Nearby_PairedKeyEncryptionFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PairedKeyEncryptionFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "signed_data"), - 2: .standard(proto: "secret_id_hash"), - 3: .standard(proto: "optional_signed_data"), - 4: .standard(proto: "qr_code_handshake_data"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}signed_data\0\u{3}secret_id_hash\0\u{3}optional_signed_data\0\u{3}qr_code_handshake_data\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2442,10 +2015,7 @@ extension Sharing_Nearby_PairedKeyEncryptionFrame: SwiftProtobuf.Message, SwiftP extension Sharing_Nearby_PairedKeyResultFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PairedKeyResultFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "status"), - 2: .standard(proto: "os_type"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0\u{3}os_type\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2483,19 +2053,12 @@ extension Sharing_Nearby_PairedKeyResultFrame: SwiftProtobuf.Message, SwiftProto } extension Sharing_Nearby_PairedKeyResultFrame.Status: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "SUCCESS"), - 2: .same(proto: "FAIL"), - 3: .same(proto: "UNABLE"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}SUCCESS\0\u{1}FAIL\0\u{1}UNABLE\0") } extension Sharing_Nearby_CertificateInfoFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".CertificateInfoFrame" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "public_certificate"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_certificate\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2525,15 +2088,7 @@ extension Sharing_Nearby_CertificateInfoFrame: SwiftProtobuf.Message, SwiftProto extension Sharing_Nearby_PublicCertificate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PublicCertificate" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "secret_id"), - 2: .standard(proto: "authenticity_key"), - 3: .standard(proto: "public_key"), - 4: .standard(proto: "start_time"), - 5: .standard(proto: "end_time"), - 6: .standard(proto: "encrypted_metadata_bytes"), - 7: .standard(proto: "metadata_encryption_key_tag"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}secret_id\0\u{3}authenticity_key\0\u{3}public_key\0\u{3}start_time\0\u{3}end_time\0\u{3}encrypted_metadata_bytes\0\u{3}metadata_encryption_key_tag\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2597,10 +2152,7 @@ extension Sharing_Nearby_PublicCertificate: SwiftProtobuf.Message, SwiftProtobuf extension Sharing_Nearby_WifiCredentials: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".WifiCredentials" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "password"), - 2: .standard(proto: "hidden_ssid"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}password\0\u{3}hidden_ssid\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2639,9 +2191,7 @@ extension Sharing_Nearby_WifiCredentials: SwiftProtobuf.Message, SwiftProtobuf._ extension Sharing_Nearby_StreamDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".StreamDetails" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "input_stream_parcel_file_descriptor_bytes"), - ] + static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}input_stream_parcel_file_descriptor_bytes\0") mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { diff --git a/QuickDrop.xcodeproj/project.pbxproj b/QuickDrop.xcodeproj/project.pbxproj index 4cf0de6..a071f7a 100644 --- a/QuickDrop.xcodeproj/project.pbxproj +++ b/QuickDrop.xcodeproj/project.pbxproj @@ -1242,7 +1242,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; SHARED_BUILD = 63; - SHARED_VERSION = 2.1; + SHARED_VERSION = 2.2; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -1304,7 +1304,7 @@ MTL_FAST_MATH = YES; SDKROOT = macosx; SHARED_BUILD = 63; - SHARED_VERSION = 2.1; + SHARED_VERSION = 2.2; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OPTIMIZATION_LEVEL = "-O"; diff --git a/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index eb207ac..598e961 100644 --- a/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -87,8 +87,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "102a647b573f60f73afdce5613a51d71349fe507", - "version" : "1.30.0" + "revision" : "e3f69fd321d0c9fcdc16fb576a0cdd956675face", + "version" : "1.31.0" } }, { diff --git a/QuickDropiOS/ContentView.swift b/QuickDropiOS/ContentView.swift index 430ba5f..49c6842 100644 --- a/QuickDropiOS/ContentView.swift +++ b/QuickDropiOS/ContentView.swift @@ -56,7 +56,7 @@ struct DeviceListView: View { let attachments = nearbyConnectionManager.attachments - FooterView(text: attachments == nil ? "YouAreVisibleAs".localized() : "YouAreSending".localized()) + FormHeader(name: attachments == nil ? "YouAreVisibleAs".localized() : "YouAreSending".localized()) HStack { @@ -74,8 +74,8 @@ struct DeviceListView: View { .padding(.vertical, 6) .background(Color.defaultForegroundColor) .cornerRadius(24) - .padding(.horizontal) } + .padding(.horizontal) .padding(.top, 8) .frame(maxWidth: .infinity, alignment: .leading)