| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093 |
- // DO NOT EDIT.
- // swift-format-ignore-file
- // swiftlint:disable all
- //
- // Generated by the Swift generator plugin for the protocol buffer compiler.
- // Source: google/protobuf/map_lite_unittest.proto
- //
- // For information on using the generated types, please see the documentation:
- // https://github.com/apple/swift-protobuf/
- // Protocol Buffers - Google's data interchange format
- // Copyright 2008 Google Inc. All rights reserved.
- //
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file or at
- // https://developers.google.com/open-source/licenses/bsd
- import Foundation
- import SwiftProtobuf
- // If the compiler emits an error on this type, it is because this file
- // was generated by a version of the `protoc` Swift plug-in that is
- // incompatible with the version of SwiftProtobuf to which you are linking.
- // Please ensure that you are building against the same version of the API
- // that was used to generate this file.
- fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
- struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
- typealias Version = _2
- }
- enum Proto2Unittest_Proto2MapEnumLite: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
- case proto2MapEnumFooLite = 0
- case proto2MapEnumBarLite = 1
- case proto2MapEnumBazLite = 2
- init() {
- self = .proto2MapEnumFooLite
- }
- }
- enum Proto2Unittest_Proto2MapEnumPlusExtraLite: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
- case eProto2MapEnumFooLite = 0
- case eProto2MapEnumBarLite = 1
- case eProto2MapEnumBazLite = 2
- case eProto2MapEnumExtraLite = 3
- init() {
- self = .eProto2MapEnumFooLite
- }
- }
- enum Proto2Unittest_MapEnumLite: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
- case mapEnumFooLite = 0
- case mapEnumBarLite = 1
- case mapEnumBazLite = 2
- init() {
- self = .mapEnumFooLite
- }
- }
- struct Proto2Unittest_TestMapLite: @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.
- var mapInt32Int32: Dictionary<Int32,Int32> {
- get {return _storage._mapInt32Int32}
- set {_uniqueStorage()._mapInt32Int32 = newValue}
- }
- var mapInt64Int64: Dictionary<Int64,Int64> {
- get {return _storage._mapInt64Int64}
- set {_uniqueStorage()._mapInt64Int64 = newValue}
- }
- var mapUint32Uint32: Dictionary<UInt32,UInt32> {
- get {return _storage._mapUint32Uint32}
- set {_uniqueStorage()._mapUint32Uint32 = newValue}
- }
- var mapUint64Uint64: Dictionary<UInt64,UInt64> {
- get {return _storage._mapUint64Uint64}
- set {_uniqueStorage()._mapUint64Uint64 = newValue}
- }
- var mapSint32Sint32: Dictionary<Int32,Int32> {
- get {return _storage._mapSint32Sint32}
- set {_uniqueStorage()._mapSint32Sint32 = newValue}
- }
- var mapSint64Sint64: Dictionary<Int64,Int64> {
- get {return _storage._mapSint64Sint64}
- set {_uniqueStorage()._mapSint64Sint64 = newValue}
- }
- var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
- get {return _storage._mapFixed32Fixed32}
- set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
- }
- var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
- get {return _storage._mapFixed64Fixed64}
- set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
- }
- var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
- get {return _storage._mapSfixed32Sfixed32}
- set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
- }
- var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
- get {return _storage._mapSfixed64Sfixed64}
- set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
- }
- var mapInt32Float: Dictionary<Int32,Float> {
- get {return _storage._mapInt32Float}
- set {_uniqueStorage()._mapInt32Float = newValue}
- }
- var mapInt32Double: Dictionary<Int32,Double> {
- get {return _storage._mapInt32Double}
- set {_uniqueStorage()._mapInt32Double = newValue}
- }
- var mapBoolBool: Dictionary<Bool,Bool> {
- get {return _storage._mapBoolBool}
- set {_uniqueStorage()._mapBoolBool = newValue}
- }
- var mapStringString: Dictionary<String,String> {
- get {return _storage._mapStringString}
- set {_uniqueStorage()._mapStringString = newValue}
- }
- var mapInt32Bytes: Dictionary<Int32,Data> {
- get {return _storage._mapInt32Bytes}
- set {_uniqueStorage()._mapInt32Bytes = newValue}
- }
- var mapInt32Enum: Dictionary<Int32,Proto2Unittest_MapEnumLite> {
- get {return _storage._mapInt32Enum}
- set {_uniqueStorage()._mapInt32Enum = newValue}
- }
- var mapInt32ForeignMessage: Dictionary<Int32,Proto2Unittest_ForeignMessageLite> {
- get {return _storage._mapInt32ForeignMessage}
- set {_uniqueStorage()._mapInt32ForeignMessage = newValue}
- }
- var teboring: Dictionary<Int32,Int32> {
- get {return _storage._teboring}
- set {_uniqueStorage()._teboring = newValue}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- struct Proto2Unittest_TestArenaMapLite: @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.
- var mapInt32Int32: Dictionary<Int32,Int32> {
- get {return _storage._mapInt32Int32}
- set {_uniqueStorage()._mapInt32Int32 = newValue}
- }
- var mapInt64Int64: Dictionary<Int64,Int64> {
- get {return _storage._mapInt64Int64}
- set {_uniqueStorage()._mapInt64Int64 = newValue}
- }
- var mapUint32Uint32: Dictionary<UInt32,UInt32> {
- get {return _storage._mapUint32Uint32}
- set {_uniqueStorage()._mapUint32Uint32 = newValue}
- }
- var mapUint64Uint64: Dictionary<UInt64,UInt64> {
- get {return _storage._mapUint64Uint64}
- set {_uniqueStorage()._mapUint64Uint64 = newValue}
- }
- var mapSint32Sint32: Dictionary<Int32,Int32> {
- get {return _storage._mapSint32Sint32}
- set {_uniqueStorage()._mapSint32Sint32 = newValue}
- }
- var mapSint64Sint64: Dictionary<Int64,Int64> {
- get {return _storage._mapSint64Sint64}
- set {_uniqueStorage()._mapSint64Sint64 = newValue}
- }
- var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
- get {return _storage._mapFixed32Fixed32}
- set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
- }
- var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
- get {return _storage._mapFixed64Fixed64}
- set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
- }
- var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
- get {return _storage._mapSfixed32Sfixed32}
- set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
- }
- var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
- get {return _storage._mapSfixed64Sfixed64}
- set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
- }
- var mapInt32Float: Dictionary<Int32,Float> {
- get {return _storage._mapInt32Float}
- set {_uniqueStorage()._mapInt32Float = newValue}
- }
- var mapInt32Double: Dictionary<Int32,Double> {
- get {return _storage._mapInt32Double}
- set {_uniqueStorage()._mapInt32Double = newValue}
- }
- var mapBoolBool: Dictionary<Bool,Bool> {
- get {return _storage._mapBoolBool}
- set {_uniqueStorage()._mapBoolBool = newValue}
- }
- var mapStringString: Dictionary<String,String> {
- get {return _storage._mapStringString}
- set {_uniqueStorage()._mapStringString = newValue}
- }
- var mapInt32Bytes: Dictionary<Int32,Data> {
- get {return _storage._mapInt32Bytes}
- set {_uniqueStorage()._mapInt32Bytes = newValue}
- }
- var mapInt32Enum: Dictionary<Int32,Proto2Unittest_MapEnumLite> {
- get {return _storage._mapInt32Enum}
- set {_uniqueStorage()._mapInt32Enum = newValue}
- }
- var mapInt32ForeignMessage: Dictionary<Int32,Proto2Unittest_ForeignMessageArenaLite> {
- get {return _storage._mapInt32ForeignMessage}
- set {_uniqueStorage()._mapInt32ForeignMessage = newValue}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- /// Test embedded message with required fields
- struct Proto2Unittest_TestRequiredMessageMapLite: 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 mapField: Dictionary<Int32,Proto2Unittest_TestRequiredLite> = [:]
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct Proto2Unittest_TestEnumMapLite: 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 knownMapField: Dictionary<Int32,Proto2Unittest_Proto2MapEnumLite> = [:]
- var unknownMapField: Dictionary<Int32,Proto2Unittest_Proto2MapEnumLite> = [:]
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct Proto2Unittest_TestEnumMapPlusExtraLite: 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 knownMapField: Dictionary<Int32,Proto2Unittest_Proto2MapEnumPlusExtraLite> = [:]
- var unknownMapField: Dictionary<Int32,Proto2Unittest_Proto2MapEnumPlusExtraLite> = [:]
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct Proto2Unittest_TestMessageMapLite: 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 mapInt32Message: Dictionary<Int32,Proto2Unittest_TestAllTypesLite> = [:]
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct Proto2Unittest_TestRequiredLite: 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 a: Int32 {
- get {return _a ?? 0}
- set {_a = newValue}
- }
- /// Returns true if `a` has been explicitly set.
- var hasA: Bool {return self._a != nil}
- /// Clears the value of `a`. Subsequent reads from it will return its default value.
- mutating func clearA() {self._a = nil}
- var b: Int32 {
- get {return _b ?? 0}
- set {_b = newValue}
- }
- /// Returns true if `b` has been explicitly set.
- var hasB: Bool {return self._b != nil}
- /// Clears the value of `b`. Subsequent reads from it will return its default value.
- mutating func clearB() {self._b = nil}
- var c: Int32 {
- get {return _c ?? 0}
- set {_c = newValue}
- }
- /// Returns true if `c` has been explicitly set.
- var hasC: Bool {return self._c != nil}
- /// Clears the value of `c`. Subsequent reads from it will return its default value.
- mutating func clearC() {self._c = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _a: Int32? = nil
- fileprivate var _b: Int32? = nil
- fileprivate var _c: Int32? = nil
- }
- struct Proto2Unittest_ForeignMessageArenaLite: 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 c: Int32 {
- get {return _c ?? 0}
- set {_c = newValue}
- }
- /// Returns true if `c` has been explicitly set.
- var hasC: Bool {return self._c != nil}
- /// Clears the value of `c`. Subsequent reads from it will return its default value.
- mutating func clearC() {self._c = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _c: Int32? = nil
- }
- // MARK: - Extension support defined in map_lite_unittest.proto.
- // MARK: - Extension Properties
- // Swift Extensions on the extended Messages to add easy access to the declared
- // extension fields. The names are based on the extension field name from the proto
- // declaration. To avoid naming collisions, the names are prefixed with the name of
- // the scope where the extend directive occurs.
- extension Proto2Unittest_TestAllExtensionsLite {
- var Proto2Unittest_TestRequiredLite_single: Proto2Unittest_TestRequiredLite {
- get {return getExtensionValue(ext: Proto2Unittest_TestRequiredLite.Extensions.single) ?? Proto2Unittest_TestRequiredLite()}
- set {setExtensionValue(ext: Proto2Unittest_TestRequiredLite.Extensions.single, value: newValue)}
- }
- /// Returns true if extension `Proto2Unittest_TestRequiredLite.Extensions.single`
- /// has been explicitly set.
- var hasProto2Unittest_TestRequiredLite_single: Bool {
- return hasExtensionValue(ext: Proto2Unittest_TestRequiredLite.Extensions.single)
- }
- /// Clears the value of extension `Proto2Unittest_TestRequiredLite.Extensions.single`.
- /// Subsequent reads from it will return its default value.
- mutating func clearProto2Unittest_TestRequiredLite_single() {
- clearExtensionValue(ext: Proto2Unittest_TestRequiredLite.Extensions.single)
- }
- }
- // MARK: - File's ExtensionMap: Proto2Unittest_MapLiteUnittest_Extensions
- /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
- /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
- /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
- /// a larger `SwiftProtobuf.SimpleExtensionMap`.
- let Proto2Unittest_MapLiteUnittest_Extensions: SwiftProtobuf.SimpleExtensionMap = [
- Proto2Unittest_TestRequiredLite.Extensions.single
- ]
- // Extension Objects - The only reason these might be needed is when manually
- // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
- // accessors for the extension fields on the messages directly.
- extension Proto2Unittest_TestRequiredLite {
- enum Extensions {
- static let single = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestRequiredLite>, Proto2Unittest_TestAllExtensionsLite>(
- _protobuf_fieldNumber: 1000,
- fieldName: "proto2_unittest.TestRequiredLite.single"
- )
- }
- }
- // MARK: - Code below here is support for the SwiftProtobuf runtime.
- fileprivate let _protobuf_package = "proto2_unittest"
- extension Proto2Unittest_Proto2MapEnumLite: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "PROTO2_MAP_ENUM_FOO_LITE"),
- 1: .same(proto: "PROTO2_MAP_ENUM_BAR_LITE"),
- 2: .same(proto: "PROTO2_MAP_ENUM_BAZ_LITE"),
- ]
- }
- extension Proto2Unittest_Proto2MapEnumPlusExtraLite: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "E_PROTO2_MAP_ENUM_FOO_LITE"),
- 1: .same(proto: "E_PROTO2_MAP_ENUM_BAR_LITE"),
- 2: .same(proto: "E_PROTO2_MAP_ENUM_BAZ_LITE"),
- 3: .same(proto: "E_PROTO2_MAP_ENUM_EXTRA_LITE"),
- ]
- }
- extension Proto2Unittest_MapEnumLite: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "MAP_ENUM_FOO_LITE"),
- 1: .same(proto: "MAP_ENUM_BAR_LITE"),
- 2: .same(proto: "MAP_ENUM_BAZ_LITE"),
- ]
- }
- extension Proto2Unittest_TestMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestMapLite"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "map_int32_int32"),
- 2: .standard(proto: "map_int64_int64"),
- 3: .standard(proto: "map_uint32_uint32"),
- 4: .standard(proto: "map_uint64_uint64"),
- 5: .standard(proto: "map_sint32_sint32"),
- 6: .standard(proto: "map_sint64_sint64"),
- 7: .standard(proto: "map_fixed32_fixed32"),
- 8: .standard(proto: "map_fixed64_fixed64"),
- 9: .standard(proto: "map_sfixed32_sfixed32"),
- 10: .standard(proto: "map_sfixed64_sfixed64"),
- 11: .standard(proto: "map_int32_float"),
- 12: .standard(proto: "map_int32_double"),
- 13: .standard(proto: "map_bool_bool"),
- 14: .standard(proto: "map_string_string"),
- 15: .standard(proto: "map_int32_bytes"),
- 16: .standard(proto: "map_int32_enum"),
- 17: .standard(proto: "map_int32_foreign_message"),
- 18: .same(proto: "teboring"),
- ]
- fileprivate class _StorageClass {
- var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
- var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
- var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
- var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
- var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
- var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
- var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
- var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
- var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
- var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
- var _mapInt32Float: Dictionary<Int32,Float> = [:]
- var _mapInt32Double: Dictionary<Int32,Double> = [:]
- var _mapBoolBool: Dictionary<Bool,Bool> = [:]
- var _mapStringString: Dictionary<String,String> = [:]
- var _mapInt32Bytes: Dictionary<Int32,Data> = [:]
- var _mapInt32Enum: Dictionary<Int32,Proto2Unittest_MapEnumLite> = [:]
- var _mapInt32ForeignMessage: Dictionary<Int32,Proto2Unittest_ForeignMessageLite> = [:]
- var _teboring: Dictionary<Int32,Int32> = [:]
- // 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() {}
- init(copying source: _StorageClass) {
- _mapInt32Int32 = source._mapInt32Int32
- _mapInt64Int64 = source._mapInt64Int64
- _mapUint32Uint32 = source._mapUint32Uint32
- _mapUint64Uint64 = source._mapUint64Uint64
- _mapSint32Sint32 = source._mapSint32Sint32
- _mapSint64Sint64 = source._mapSint64Sint64
- _mapFixed32Fixed32 = source._mapFixed32Fixed32
- _mapFixed64Fixed64 = source._mapFixed64Fixed64
- _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
- _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
- _mapInt32Float = source._mapInt32Float
- _mapInt32Double = source._mapInt32Double
- _mapBoolBool = source._mapBoolBool
- _mapStringString = source._mapStringString
- _mapInt32Bytes = source._mapInt32Bytes
- _mapInt32Enum = source._mapInt32Enum
- _mapInt32ForeignMessage = source._mapInt32ForeignMessage
- _teboring = source._teboring
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
- case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
- case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
- case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
- case 5: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
- case 6: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
- case 7: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
- case 8: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
- case 9: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
- case 10: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
- case 11: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
- case 12: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
- case 13: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
- case 14: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
- case 15: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapInt32Bytes) }()
- case 16: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_MapEnumLite>.self, value: &_storage._mapInt32Enum) }()
- case 17: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_ForeignMessageLite>.self, value: &_storage._mapInt32ForeignMessage) }()
- case 18: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._teboring) }()
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if !_storage._mapInt32Int32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 1)
- }
- if !_storage._mapInt64Int64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 2)
- }
- if !_storage._mapUint32Uint32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 3)
- }
- if !_storage._mapUint64Uint64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 4)
- }
- if !_storage._mapSint32Sint32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 5)
- }
- if !_storage._mapSint64Sint64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 6)
- }
- if !_storage._mapFixed32Fixed32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 7)
- }
- if !_storage._mapFixed64Fixed64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 8)
- }
- if !_storage._mapSfixed32Sfixed32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 9)
- }
- if !_storage._mapSfixed64Sfixed64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 10)
- }
- if !_storage._mapInt32Float.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 11)
- }
- if !_storage._mapInt32Double.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 12)
- }
- if !_storage._mapBoolBool.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 13)
- }
- if !_storage._mapStringString.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 14)
- }
- if !_storage._mapInt32Bytes.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapInt32Bytes, fieldNumber: 15)
- }
- if !_storage._mapInt32Enum.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_MapEnumLite>.self, value: _storage._mapInt32Enum, fieldNumber: 16)
- }
- if !_storage._mapInt32ForeignMessage.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_ForeignMessageLite>.self, value: _storage._mapInt32ForeignMessage, fieldNumber: 17)
- }
- if !_storage._teboring.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._teboring, fieldNumber: 18)
- }
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto2Unittest_TestMapLite, rhs: Proto2Unittest_TestMapLite) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
- if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
- if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
- if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
- if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
- if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
- if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
- if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
- if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
- if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
- if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
- if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
- if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
- if _storage._mapStringString != rhs_storage._mapStringString {return false}
- if _storage._mapInt32Bytes != rhs_storage._mapInt32Bytes {return false}
- if _storage._mapInt32Enum != rhs_storage._mapInt32Enum {return false}
- if _storage._mapInt32ForeignMessage != rhs_storage._mapInt32ForeignMessage {return false}
- if _storage._teboring != rhs_storage._teboring {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto2Unittest_TestArenaMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestArenaMapLite"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "map_int32_int32"),
- 2: .standard(proto: "map_int64_int64"),
- 3: .standard(proto: "map_uint32_uint32"),
- 4: .standard(proto: "map_uint64_uint64"),
- 5: .standard(proto: "map_sint32_sint32"),
- 6: .standard(proto: "map_sint64_sint64"),
- 7: .standard(proto: "map_fixed32_fixed32"),
- 8: .standard(proto: "map_fixed64_fixed64"),
- 9: .standard(proto: "map_sfixed32_sfixed32"),
- 10: .standard(proto: "map_sfixed64_sfixed64"),
- 11: .standard(proto: "map_int32_float"),
- 12: .standard(proto: "map_int32_double"),
- 13: .standard(proto: "map_bool_bool"),
- 14: .standard(proto: "map_string_string"),
- 15: .standard(proto: "map_int32_bytes"),
- 16: .standard(proto: "map_int32_enum"),
- 17: .standard(proto: "map_int32_foreign_message"),
- ]
- fileprivate class _StorageClass {
- var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
- var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
- var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
- var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
- var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
- var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
- var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
- var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
- var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
- var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
- var _mapInt32Float: Dictionary<Int32,Float> = [:]
- var _mapInt32Double: Dictionary<Int32,Double> = [:]
- var _mapBoolBool: Dictionary<Bool,Bool> = [:]
- var _mapStringString: Dictionary<String,String> = [:]
- var _mapInt32Bytes: Dictionary<Int32,Data> = [:]
- var _mapInt32Enum: Dictionary<Int32,Proto2Unittest_MapEnumLite> = [:]
- var _mapInt32ForeignMessage: Dictionary<Int32,Proto2Unittest_ForeignMessageArenaLite> = [:]
- // 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() {}
- init(copying source: _StorageClass) {
- _mapInt32Int32 = source._mapInt32Int32
- _mapInt64Int64 = source._mapInt64Int64
- _mapUint32Uint32 = source._mapUint32Uint32
- _mapUint64Uint64 = source._mapUint64Uint64
- _mapSint32Sint32 = source._mapSint32Sint32
- _mapSint64Sint64 = source._mapSint64Sint64
- _mapFixed32Fixed32 = source._mapFixed32Fixed32
- _mapFixed64Fixed64 = source._mapFixed64Fixed64
- _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
- _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
- _mapInt32Float = source._mapInt32Float
- _mapInt32Double = source._mapInt32Double
- _mapBoolBool = source._mapBoolBool
- _mapStringString = source._mapStringString
- _mapInt32Bytes = source._mapInt32Bytes
- _mapInt32Enum = source._mapInt32Enum
- _mapInt32ForeignMessage = source._mapInt32ForeignMessage
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
- case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
- case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
- case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
- case 5: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
- case 6: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
- case 7: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
- case 8: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
- case 9: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
- case 10: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
- case 11: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
- case 12: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
- case 13: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
- case 14: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
- case 15: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapInt32Bytes) }()
- case 16: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_MapEnumLite>.self, value: &_storage._mapInt32Enum) }()
- case 17: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_ForeignMessageArenaLite>.self, value: &_storage._mapInt32ForeignMessage) }()
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if !_storage._mapInt32Int32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 1)
- }
- if !_storage._mapInt64Int64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 2)
- }
- if !_storage._mapUint32Uint32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 3)
- }
- if !_storage._mapUint64Uint64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 4)
- }
- if !_storage._mapSint32Sint32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 5)
- }
- if !_storage._mapSint64Sint64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 6)
- }
- if !_storage._mapFixed32Fixed32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 7)
- }
- if !_storage._mapFixed64Fixed64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 8)
- }
- if !_storage._mapSfixed32Sfixed32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 9)
- }
- if !_storage._mapSfixed64Sfixed64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 10)
- }
- if !_storage._mapInt32Float.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 11)
- }
- if !_storage._mapInt32Double.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 12)
- }
- if !_storage._mapBoolBool.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 13)
- }
- if !_storage._mapStringString.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 14)
- }
- if !_storage._mapInt32Bytes.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapInt32Bytes, fieldNumber: 15)
- }
- if !_storage._mapInt32Enum.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_MapEnumLite>.self, value: _storage._mapInt32Enum, fieldNumber: 16)
- }
- if !_storage._mapInt32ForeignMessage.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_ForeignMessageArenaLite>.self, value: _storage._mapInt32ForeignMessage, fieldNumber: 17)
- }
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto2Unittest_TestArenaMapLite, rhs: Proto2Unittest_TestArenaMapLite) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
- if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
- if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
- if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
- if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
- if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
- if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
- if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
- if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
- if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
- if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
- if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
- if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
- if _storage._mapStringString != rhs_storage._mapStringString {return false}
- if _storage._mapInt32Bytes != rhs_storage._mapInt32Bytes {return false}
- if _storage._mapInt32Enum != rhs_storage._mapInt32Enum {return false}
- if _storage._mapInt32ForeignMessage != rhs_storage._mapInt32ForeignMessage {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto2Unittest_TestRequiredMessageMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestRequiredMessageMapLite"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "map_field"),
- ]
- public var isInitialized: Bool {
- if !SwiftProtobuf.Internal.areAllInitialized(self.mapField) {return false}
- return true
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_TestRequiredLite>.self, value: &self.mapField) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.mapField.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_TestRequiredLite>.self, value: self.mapField, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto2Unittest_TestRequiredMessageMapLite, rhs: Proto2Unittest_TestRequiredMessageMapLite) -> Bool {
- if lhs.mapField != rhs.mapField {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto2Unittest_TestEnumMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestEnumMapLite"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 101: .standard(proto: "known_map_field"),
- 102: .standard(proto: "unknown_map_field"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 101: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumLite>.self, value: &self.knownMapField) }()
- case 102: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumLite>.self, value: &self.unknownMapField) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.knownMapField.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumLite>.self, value: self.knownMapField, fieldNumber: 101)
- }
- if !self.unknownMapField.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumLite>.self, value: self.unknownMapField, fieldNumber: 102)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto2Unittest_TestEnumMapLite, rhs: Proto2Unittest_TestEnumMapLite) -> Bool {
- if lhs.knownMapField != rhs.knownMapField {return false}
- if lhs.unknownMapField != rhs.unknownMapField {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto2Unittest_TestEnumMapPlusExtraLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestEnumMapPlusExtraLite"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 101: .standard(proto: "known_map_field"),
- 102: .standard(proto: "unknown_map_field"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 101: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumPlusExtraLite>.self, value: &self.knownMapField) }()
- case 102: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumPlusExtraLite>.self, value: &self.unknownMapField) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.knownMapField.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumPlusExtraLite>.self, value: self.knownMapField, fieldNumber: 101)
- }
- if !self.unknownMapField.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumPlusExtraLite>.self, value: self.unknownMapField, fieldNumber: 102)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto2Unittest_TestEnumMapPlusExtraLite, rhs: Proto2Unittest_TestEnumMapPlusExtraLite) -> Bool {
- if lhs.knownMapField != rhs.knownMapField {return false}
- if lhs.unknownMapField != rhs.unknownMapField {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto2Unittest_TestMessageMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestMessageMapLite"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "map_int32_message"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_TestAllTypesLite>.self, value: &self.mapInt32Message) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.mapInt32Message.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_TestAllTypesLite>.self, value: self.mapInt32Message, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto2Unittest_TestMessageMapLite, rhs: Proto2Unittest_TestMessageMapLite) -> Bool {
- if lhs.mapInt32Message != rhs.mapInt32Message {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto2Unittest_TestRequiredLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestRequiredLite"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "a"),
- 2: .same(proto: "b"),
- 3: .same(proto: "c"),
- ]
- public var isInitialized: Bool {
- if self._a == nil {return false}
- if self._b == nil {return false}
- if self._c == nil {return false}
- return true
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
- case 2: try { try decoder.decodeSingularInt32Field(value: &self._b) }()
- case 3: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._a {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._b {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._c {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto2Unittest_TestRequiredLite, rhs: Proto2Unittest_TestRequiredLite) -> Bool {
- if lhs._a != rhs._a {return false}
- if lhs._b != rhs._b {return false}
- if lhs._c != rhs._c {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto2Unittest_ForeignMessageArenaLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ForeignMessageArenaLite"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "c"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._c {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto2Unittest_ForeignMessageArenaLite, rhs: Proto2Unittest_ForeignMessageArenaLite) -> Bool {
- if lhs._c != rhs._c {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
|