map_lite_unittest.pb.swift 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. // swiftlint:disable all
  4. //
  5. // Generated by the Swift generator plugin for the protocol buffer compiler.
  6. // Source: google/protobuf/map_lite_unittest.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. // Protocol Buffers - Google's data interchange format
  11. // Copyright 2008 Google Inc. All rights reserved.
  12. //
  13. // Use of this source code is governed by a BSD-style
  14. // license that can be found in the LICENSE file or at
  15. // https://developers.google.com/open-source/licenses/bsd
  16. import Foundation
  17. import SwiftProtobuf
  18. // If the compiler emits an error on this type, it is because this file
  19. // was generated by a version of the `protoc` Swift plug-in that is
  20. // incompatible with the version of SwiftProtobuf to which you are linking.
  21. // Please ensure that you are building against the same version of the API
  22. // that was used to generate this file.
  23. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  24. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  25. typealias Version = _2
  26. }
  27. enum Proto2Unittest_Proto2MapEnumLite: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  28. case proto2MapEnumFooLite = 0
  29. case proto2MapEnumBarLite = 1
  30. case proto2MapEnumBazLite = 2
  31. init() {
  32. self = .proto2MapEnumFooLite
  33. }
  34. }
  35. enum Proto2Unittest_Proto2MapEnumPlusExtraLite: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  36. case eProto2MapEnumFooLite = 0
  37. case eProto2MapEnumBarLite = 1
  38. case eProto2MapEnumBazLite = 2
  39. case eProto2MapEnumExtraLite = 3
  40. init() {
  41. self = .eProto2MapEnumFooLite
  42. }
  43. }
  44. enum Proto2Unittest_MapEnumLite: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  45. case mapEnumFooLite = 0
  46. case mapEnumBarLite = 1
  47. case mapEnumBazLite = 2
  48. init() {
  49. self = .mapEnumFooLite
  50. }
  51. }
  52. struct Proto2Unittest_TestMapLite: @unchecked Sendable {
  53. // SwiftProtobuf.Message conformance is added in an extension below. See the
  54. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  55. // methods supported on all messages.
  56. var mapInt32Int32: Dictionary<Int32,Int32> {
  57. get {return _storage._mapInt32Int32}
  58. set {_uniqueStorage()._mapInt32Int32 = newValue}
  59. }
  60. var mapInt64Int64: Dictionary<Int64,Int64> {
  61. get {return _storage._mapInt64Int64}
  62. set {_uniqueStorage()._mapInt64Int64 = newValue}
  63. }
  64. var mapUint32Uint32: Dictionary<UInt32,UInt32> {
  65. get {return _storage._mapUint32Uint32}
  66. set {_uniqueStorage()._mapUint32Uint32 = newValue}
  67. }
  68. var mapUint64Uint64: Dictionary<UInt64,UInt64> {
  69. get {return _storage._mapUint64Uint64}
  70. set {_uniqueStorage()._mapUint64Uint64 = newValue}
  71. }
  72. var mapSint32Sint32: Dictionary<Int32,Int32> {
  73. get {return _storage._mapSint32Sint32}
  74. set {_uniqueStorage()._mapSint32Sint32 = newValue}
  75. }
  76. var mapSint64Sint64: Dictionary<Int64,Int64> {
  77. get {return _storage._mapSint64Sint64}
  78. set {_uniqueStorage()._mapSint64Sint64 = newValue}
  79. }
  80. var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
  81. get {return _storage._mapFixed32Fixed32}
  82. set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
  83. }
  84. var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
  85. get {return _storage._mapFixed64Fixed64}
  86. set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
  87. }
  88. var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
  89. get {return _storage._mapSfixed32Sfixed32}
  90. set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
  91. }
  92. var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
  93. get {return _storage._mapSfixed64Sfixed64}
  94. set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
  95. }
  96. var mapInt32Float: Dictionary<Int32,Float> {
  97. get {return _storage._mapInt32Float}
  98. set {_uniqueStorage()._mapInt32Float = newValue}
  99. }
  100. var mapInt32Double: Dictionary<Int32,Double> {
  101. get {return _storage._mapInt32Double}
  102. set {_uniqueStorage()._mapInt32Double = newValue}
  103. }
  104. var mapBoolBool: Dictionary<Bool,Bool> {
  105. get {return _storage._mapBoolBool}
  106. set {_uniqueStorage()._mapBoolBool = newValue}
  107. }
  108. var mapStringString: Dictionary<String,String> {
  109. get {return _storage._mapStringString}
  110. set {_uniqueStorage()._mapStringString = newValue}
  111. }
  112. var mapInt32Bytes: Dictionary<Int32,Data> {
  113. get {return _storage._mapInt32Bytes}
  114. set {_uniqueStorage()._mapInt32Bytes = newValue}
  115. }
  116. var mapInt32Enum: Dictionary<Int32,Proto2Unittest_MapEnumLite> {
  117. get {return _storage._mapInt32Enum}
  118. set {_uniqueStorage()._mapInt32Enum = newValue}
  119. }
  120. var mapInt32ForeignMessage: Dictionary<Int32,Proto2Unittest_ForeignMessageLite> {
  121. get {return _storage._mapInt32ForeignMessage}
  122. set {_uniqueStorage()._mapInt32ForeignMessage = newValue}
  123. }
  124. var teboring: Dictionary<Int32,Int32> {
  125. get {return _storage._teboring}
  126. set {_uniqueStorage()._teboring = newValue}
  127. }
  128. var unknownFields = SwiftProtobuf.UnknownStorage()
  129. init() {}
  130. fileprivate var _storage = _StorageClass.defaultInstance
  131. }
  132. struct Proto2Unittest_TestArenaMapLite: @unchecked Sendable {
  133. // SwiftProtobuf.Message conformance is added in an extension below. See the
  134. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  135. // methods supported on all messages.
  136. var mapInt32Int32: Dictionary<Int32,Int32> {
  137. get {return _storage._mapInt32Int32}
  138. set {_uniqueStorage()._mapInt32Int32 = newValue}
  139. }
  140. var mapInt64Int64: Dictionary<Int64,Int64> {
  141. get {return _storage._mapInt64Int64}
  142. set {_uniqueStorage()._mapInt64Int64 = newValue}
  143. }
  144. var mapUint32Uint32: Dictionary<UInt32,UInt32> {
  145. get {return _storage._mapUint32Uint32}
  146. set {_uniqueStorage()._mapUint32Uint32 = newValue}
  147. }
  148. var mapUint64Uint64: Dictionary<UInt64,UInt64> {
  149. get {return _storage._mapUint64Uint64}
  150. set {_uniqueStorage()._mapUint64Uint64 = newValue}
  151. }
  152. var mapSint32Sint32: Dictionary<Int32,Int32> {
  153. get {return _storage._mapSint32Sint32}
  154. set {_uniqueStorage()._mapSint32Sint32 = newValue}
  155. }
  156. var mapSint64Sint64: Dictionary<Int64,Int64> {
  157. get {return _storage._mapSint64Sint64}
  158. set {_uniqueStorage()._mapSint64Sint64 = newValue}
  159. }
  160. var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
  161. get {return _storage._mapFixed32Fixed32}
  162. set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
  163. }
  164. var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
  165. get {return _storage._mapFixed64Fixed64}
  166. set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
  167. }
  168. var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
  169. get {return _storage._mapSfixed32Sfixed32}
  170. set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
  171. }
  172. var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
  173. get {return _storage._mapSfixed64Sfixed64}
  174. set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
  175. }
  176. var mapInt32Float: Dictionary<Int32,Float> {
  177. get {return _storage._mapInt32Float}
  178. set {_uniqueStorage()._mapInt32Float = newValue}
  179. }
  180. var mapInt32Double: Dictionary<Int32,Double> {
  181. get {return _storage._mapInt32Double}
  182. set {_uniqueStorage()._mapInt32Double = newValue}
  183. }
  184. var mapBoolBool: Dictionary<Bool,Bool> {
  185. get {return _storage._mapBoolBool}
  186. set {_uniqueStorage()._mapBoolBool = newValue}
  187. }
  188. var mapStringString: Dictionary<String,String> {
  189. get {return _storage._mapStringString}
  190. set {_uniqueStorage()._mapStringString = newValue}
  191. }
  192. var mapInt32Bytes: Dictionary<Int32,Data> {
  193. get {return _storage._mapInt32Bytes}
  194. set {_uniqueStorage()._mapInt32Bytes = newValue}
  195. }
  196. var mapInt32Enum: Dictionary<Int32,Proto2Unittest_MapEnumLite> {
  197. get {return _storage._mapInt32Enum}
  198. set {_uniqueStorage()._mapInt32Enum = newValue}
  199. }
  200. var mapInt32ForeignMessage: Dictionary<Int32,Proto2Unittest_ForeignMessageArenaLite> {
  201. get {return _storage._mapInt32ForeignMessage}
  202. set {_uniqueStorage()._mapInt32ForeignMessage = newValue}
  203. }
  204. var unknownFields = SwiftProtobuf.UnknownStorage()
  205. init() {}
  206. fileprivate var _storage = _StorageClass.defaultInstance
  207. }
  208. /// Test embedded message with required fields
  209. struct Proto2Unittest_TestRequiredMessageMapLite: Sendable {
  210. // SwiftProtobuf.Message conformance is added in an extension below. See the
  211. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  212. // methods supported on all messages.
  213. var mapField: Dictionary<Int32,Proto2Unittest_TestRequiredLite> = [:]
  214. var unknownFields = SwiftProtobuf.UnknownStorage()
  215. init() {}
  216. }
  217. struct Proto2Unittest_TestEnumMapLite: Sendable {
  218. // SwiftProtobuf.Message conformance is added in an extension below. See the
  219. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  220. // methods supported on all messages.
  221. var knownMapField: Dictionary<Int32,Proto2Unittest_Proto2MapEnumLite> = [:]
  222. var unknownMapField: Dictionary<Int32,Proto2Unittest_Proto2MapEnumLite> = [:]
  223. var unknownFields = SwiftProtobuf.UnknownStorage()
  224. init() {}
  225. }
  226. struct Proto2Unittest_TestEnumMapPlusExtraLite: Sendable {
  227. // SwiftProtobuf.Message conformance is added in an extension below. See the
  228. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  229. // methods supported on all messages.
  230. var knownMapField: Dictionary<Int32,Proto2Unittest_Proto2MapEnumPlusExtraLite> = [:]
  231. var unknownMapField: Dictionary<Int32,Proto2Unittest_Proto2MapEnumPlusExtraLite> = [:]
  232. var unknownFields = SwiftProtobuf.UnknownStorage()
  233. init() {}
  234. }
  235. struct Proto2Unittest_TestMessageMapLite: Sendable {
  236. // SwiftProtobuf.Message conformance is added in an extension below. See the
  237. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  238. // methods supported on all messages.
  239. var mapInt32Message: Dictionary<Int32,Proto2Unittest_TestAllTypesLite> = [:]
  240. var unknownFields = SwiftProtobuf.UnknownStorage()
  241. init() {}
  242. }
  243. struct Proto2Unittest_TestRequiredLite: Sendable {
  244. // SwiftProtobuf.Message conformance is added in an extension below. See the
  245. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  246. // methods supported on all messages.
  247. var a: Int32 {
  248. get {return _a ?? 0}
  249. set {_a = newValue}
  250. }
  251. /// Returns true if `a` has been explicitly set.
  252. var hasA: Bool {return self._a != nil}
  253. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  254. mutating func clearA() {self._a = nil}
  255. var b: Int32 {
  256. get {return _b ?? 0}
  257. set {_b = newValue}
  258. }
  259. /// Returns true if `b` has been explicitly set.
  260. var hasB: Bool {return self._b != nil}
  261. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  262. mutating func clearB() {self._b = nil}
  263. var c: Int32 {
  264. get {return _c ?? 0}
  265. set {_c = newValue}
  266. }
  267. /// Returns true if `c` has been explicitly set.
  268. var hasC: Bool {return self._c != nil}
  269. /// Clears the value of `c`. Subsequent reads from it will return its default value.
  270. mutating func clearC() {self._c = nil}
  271. var unknownFields = SwiftProtobuf.UnknownStorage()
  272. init() {}
  273. fileprivate var _a: Int32? = nil
  274. fileprivate var _b: Int32? = nil
  275. fileprivate var _c: Int32? = nil
  276. }
  277. struct Proto2Unittest_ForeignMessageArenaLite: Sendable {
  278. // SwiftProtobuf.Message conformance is added in an extension below. See the
  279. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  280. // methods supported on all messages.
  281. var c: Int32 {
  282. get {return _c ?? 0}
  283. set {_c = newValue}
  284. }
  285. /// Returns true if `c` has been explicitly set.
  286. var hasC: Bool {return self._c != nil}
  287. /// Clears the value of `c`. Subsequent reads from it will return its default value.
  288. mutating func clearC() {self._c = nil}
  289. var unknownFields = SwiftProtobuf.UnknownStorage()
  290. init() {}
  291. fileprivate var _c: Int32? = nil
  292. }
  293. // MARK: - Extension support defined in map_lite_unittest.proto.
  294. // MARK: - Extension Properties
  295. // Swift Extensions on the extended Messages to add easy access to the declared
  296. // extension fields. The names are based on the extension field name from the proto
  297. // declaration. To avoid naming collisions, the names are prefixed with the name of
  298. // the scope where the extend directive occurs.
  299. extension Proto2Unittest_TestAllExtensionsLite {
  300. var Proto2Unittest_TestRequiredLite_single: Proto2Unittest_TestRequiredLite {
  301. get {return getExtensionValue(ext: Proto2Unittest_TestRequiredLite.Extensions.single) ?? Proto2Unittest_TestRequiredLite()}
  302. set {setExtensionValue(ext: Proto2Unittest_TestRequiredLite.Extensions.single, value: newValue)}
  303. }
  304. /// Returns true if extension `Proto2Unittest_TestRequiredLite.Extensions.single`
  305. /// has been explicitly set.
  306. var hasProto2Unittest_TestRequiredLite_single: Bool {
  307. return hasExtensionValue(ext: Proto2Unittest_TestRequiredLite.Extensions.single)
  308. }
  309. /// Clears the value of extension `Proto2Unittest_TestRequiredLite.Extensions.single`.
  310. /// Subsequent reads from it will return its default value.
  311. mutating func clearProto2Unittest_TestRequiredLite_single() {
  312. clearExtensionValue(ext: Proto2Unittest_TestRequiredLite.Extensions.single)
  313. }
  314. }
  315. // MARK: - File's ExtensionMap: Proto2Unittest_MapLiteUnittest_Extensions
  316. /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
  317. /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
  318. /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
  319. /// a larger `SwiftProtobuf.SimpleExtensionMap`.
  320. let Proto2Unittest_MapLiteUnittest_Extensions: SwiftProtobuf.SimpleExtensionMap = [
  321. Proto2Unittest_TestRequiredLite.Extensions.single
  322. ]
  323. // Extension Objects - The only reason these might be needed is when manually
  324. // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
  325. // accessors for the extension fields on the messages directly.
  326. extension Proto2Unittest_TestRequiredLite {
  327. enum Extensions {
  328. static let single = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestRequiredLite>, Proto2Unittest_TestAllExtensionsLite>(
  329. _protobuf_fieldNumber: 1000,
  330. fieldName: "proto2_unittest.TestRequiredLite.single"
  331. )
  332. }
  333. }
  334. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  335. fileprivate let _protobuf_package = "proto2_unittest"
  336. extension Proto2Unittest_Proto2MapEnumLite: SwiftProtobuf._ProtoNameProviding {
  337. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  338. 0: .same(proto: "PROTO2_MAP_ENUM_FOO_LITE"),
  339. 1: .same(proto: "PROTO2_MAP_ENUM_BAR_LITE"),
  340. 2: .same(proto: "PROTO2_MAP_ENUM_BAZ_LITE"),
  341. ]
  342. }
  343. extension Proto2Unittest_Proto2MapEnumPlusExtraLite: SwiftProtobuf._ProtoNameProviding {
  344. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  345. 0: .same(proto: "E_PROTO2_MAP_ENUM_FOO_LITE"),
  346. 1: .same(proto: "E_PROTO2_MAP_ENUM_BAR_LITE"),
  347. 2: .same(proto: "E_PROTO2_MAP_ENUM_BAZ_LITE"),
  348. 3: .same(proto: "E_PROTO2_MAP_ENUM_EXTRA_LITE"),
  349. ]
  350. }
  351. extension Proto2Unittest_MapEnumLite: SwiftProtobuf._ProtoNameProviding {
  352. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  353. 0: .same(proto: "MAP_ENUM_FOO_LITE"),
  354. 1: .same(proto: "MAP_ENUM_BAR_LITE"),
  355. 2: .same(proto: "MAP_ENUM_BAZ_LITE"),
  356. ]
  357. }
  358. extension Proto2Unittest_TestMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  359. static let protoMessageName: String = _protobuf_package + ".TestMapLite"
  360. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  361. 1: .standard(proto: "map_int32_int32"),
  362. 2: .standard(proto: "map_int64_int64"),
  363. 3: .standard(proto: "map_uint32_uint32"),
  364. 4: .standard(proto: "map_uint64_uint64"),
  365. 5: .standard(proto: "map_sint32_sint32"),
  366. 6: .standard(proto: "map_sint64_sint64"),
  367. 7: .standard(proto: "map_fixed32_fixed32"),
  368. 8: .standard(proto: "map_fixed64_fixed64"),
  369. 9: .standard(proto: "map_sfixed32_sfixed32"),
  370. 10: .standard(proto: "map_sfixed64_sfixed64"),
  371. 11: .standard(proto: "map_int32_float"),
  372. 12: .standard(proto: "map_int32_double"),
  373. 13: .standard(proto: "map_bool_bool"),
  374. 14: .standard(proto: "map_string_string"),
  375. 15: .standard(proto: "map_int32_bytes"),
  376. 16: .standard(proto: "map_int32_enum"),
  377. 17: .standard(proto: "map_int32_foreign_message"),
  378. 18: .same(proto: "teboring"),
  379. ]
  380. fileprivate class _StorageClass {
  381. var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
  382. var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
  383. var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
  384. var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
  385. var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
  386. var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
  387. var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
  388. var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
  389. var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
  390. var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
  391. var _mapInt32Float: Dictionary<Int32,Float> = [:]
  392. var _mapInt32Double: Dictionary<Int32,Double> = [:]
  393. var _mapBoolBool: Dictionary<Bool,Bool> = [:]
  394. var _mapStringString: Dictionary<String,String> = [:]
  395. var _mapInt32Bytes: Dictionary<Int32,Data> = [:]
  396. var _mapInt32Enum: Dictionary<Int32,Proto2Unittest_MapEnumLite> = [:]
  397. var _mapInt32ForeignMessage: Dictionary<Int32,Proto2Unittest_ForeignMessageLite> = [:]
  398. var _teboring: Dictionary<Int32,Int32> = [:]
  399. // This property is used as the initial default value for new instances of the type.
  400. // The type itself is protecting the reference to its storage via CoW semantics.
  401. // This will force a copy to be made of this reference when the first mutation occurs;
  402. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  403. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  404. private init() {}
  405. init(copying source: _StorageClass) {
  406. _mapInt32Int32 = source._mapInt32Int32
  407. _mapInt64Int64 = source._mapInt64Int64
  408. _mapUint32Uint32 = source._mapUint32Uint32
  409. _mapUint64Uint64 = source._mapUint64Uint64
  410. _mapSint32Sint32 = source._mapSint32Sint32
  411. _mapSint64Sint64 = source._mapSint64Sint64
  412. _mapFixed32Fixed32 = source._mapFixed32Fixed32
  413. _mapFixed64Fixed64 = source._mapFixed64Fixed64
  414. _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
  415. _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
  416. _mapInt32Float = source._mapInt32Float
  417. _mapInt32Double = source._mapInt32Double
  418. _mapBoolBool = source._mapBoolBool
  419. _mapStringString = source._mapStringString
  420. _mapInt32Bytes = source._mapInt32Bytes
  421. _mapInt32Enum = source._mapInt32Enum
  422. _mapInt32ForeignMessage = source._mapInt32ForeignMessage
  423. _teboring = source._teboring
  424. }
  425. }
  426. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  427. if !isKnownUniquelyReferenced(&_storage) {
  428. _storage = _StorageClass(copying: _storage)
  429. }
  430. return _storage
  431. }
  432. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  433. _ = _uniqueStorage()
  434. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  435. while let fieldNumber = try decoder.nextFieldNumber() {
  436. // The use of inline closures is to circumvent an issue where the compiler
  437. // allocates stack space for every case branch when no optimizations are
  438. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  439. switch fieldNumber {
  440. case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
  441. case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
  442. case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
  443. case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
  444. case 5: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
  445. case 6: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
  446. case 7: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
  447. case 8: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
  448. case 9: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
  449. case 10: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
  450. case 11: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
  451. case 12: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
  452. case 13: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
  453. case 14: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
  454. case 15: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapInt32Bytes) }()
  455. case 16: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_MapEnumLite>.self, value: &_storage._mapInt32Enum) }()
  456. case 17: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_ForeignMessageLite>.self, value: &_storage._mapInt32ForeignMessage) }()
  457. case 18: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._teboring) }()
  458. default: break
  459. }
  460. }
  461. }
  462. }
  463. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  464. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  465. if !_storage._mapInt32Int32.isEmpty {
  466. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 1)
  467. }
  468. if !_storage._mapInt64Int64.isEmpty {
  469. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 2)
  470. }
  471. if !_storage._mapUint32Uint32.isEmpty {
  472. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 3)
  473. }
  474. if !_storage._mapUint64Uint64.isEmpty {
  475. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 4)
  476. }
  477. if !_storage._mapSint32Sint32.isEmpty {
  478. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 5)
  479. }
  480. if !_storage._mapSint64Sint64.isEmpty {
  481. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 6)
  482. }
  483. if !_storage._mapFixed32Fixed32.isEmpty {
  484. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 7)
  485. }
  486. if !_storage._mapFixed64Fixed64.isEmpty {
  487. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 8)
  488. }
  489. if !_storage._mapSfixed32Sfixed32.isEmpty {
  490. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 9)
  491. }
  492. if !_storage._mapSfixed64Sfixed64.isEmpty {
  493. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 10)
  494. }
  495. if !_storage._mapInt32Float.isEmpty {
  496. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 11)
  497. }
  498. if !_storage._mapInt32Double.isEmpty {
  499. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 12)
  500. }
  501. if !_storage._mapBoolBool.isEmpty {
  502. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 13)
  503. }
  504. if !_storage._mapStringString.isEmpty {
  505. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 14)
  506. }
  507. if !_storage._mapInt32Bytes.isEmpty {
  508. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapInt32Bytes, fieldNumber: 15)
  509. }
  510. if !_storage._mapInt32Enum.isEmpty {
  511. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_MapEnumLite>.self, value: _storage._mapInt32Enum, fieldNumber: 16)
  512. }
  513. if !_storage._mapInt32ForeignMessage.isEmpty {
  514. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_ForeignMessageLite>.self, value: _storage._mapInt32ForeignMessage, fieldNumber: 17)
  515. }
  516. if !_storage._teboring.isEmpty {
  517. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._teboring, fieldNumber: 18)
  518. }
  519. }
  520. try unknownFields.traverse(visitor: &visitor)
  521. }
  522. static func ==(lhs: Proto2Unittest_TestMapLite, rhs: Proto2Unittest_TestMapLite) -> Bool {
  523. if lhs._storage !== rhs._storage {
  524. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  525. let _storage = _args.0
  526. let rhs_storage = _args.1
  527. if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
  528. if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
  529. if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
  530. if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
  531. if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
  532. if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
  533. if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
  534. if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
  535. if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
  536. if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
  537. if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
  538. if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
  539. if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
  540. if _storage._mapStringString != rhs_storage._mapStringString {return false}
  541. if _storage._mapInt32Bytes != rhs_storage._mapInt32Bytes {return false}
  542. if _storage._mapInt32Enum != rhs_storage._mapInt32Enum {return false}
  543. if _storage._mapInt32ForeignMessage != rhs_storage._mapInt32ForeignMessage {return false}
  544. if _storage._teboring != rhs_storage._teboring {return false}
  545. return true
  546. }
  547. if !storagesAreEqual {return false}
  548. }
  549. if lhs.unknownFields != rhs.unknownFields {return false}
  550. return true
  551. }
  552. }
  553. extension Proto2Unittest_TestArenaMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  554. static let protoMessageName: String = _protobuf_package + ".TestArenaMapLite"
  555. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  556. 1: .standard(proto: "map_int32_int32"),
  557. 2: .standard(proto: "map_int64_int64"),
  558. 3: .standard(proto: "map_uint32_uint32"),
  559. 4: .standard(proto: "map_uint64_uint64"),
  560. 5: .standard(proto: "map_sint32_sint32"),
  561. 6: .standard(proto: "map_sint64_sint64"),
  562. 7: .standard(proto: "map_fixed32_fixed32"),
  563. 8: .standard(proto: "map_fixed64_fixed64"),
  564. 9: .standard(proto: "map_sfixed32_sfixed32"),
  565. 10: .standard(proto: "map_sfixed64_sfixed64"),
  566. 11: .standard(proto: "map_int32_float"),
  567. 12: .standard(proto: "map_int32_double"),
  568. 13: .standard(proto: "map_bool_bool"),
  569. 14: .standard(proto: "map_string_string"),
  570. 15: .standard(proto: "map_int32_bytes"),
  571. 16: .standard(proto: "map_int32_enum"),
  572. 17: .standard(proto: "map_int32_foreign_message"),
  573. ]
  574. fileprivate class _StorageClass {
  575. var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
  576. var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
  577. var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
  578. var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
  579. var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
  580. var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
  581. var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
  582. var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
  583. var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
  584. var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
  585. var _mapInt32Float: Dictionary<Int32,Float> = [:]
  586. var _mapInt32Double: Dictionary<Int32,Double> = [:]
  587. var _mapBoolBool: Dictionary<Bool,Bool> = [:]
  588. var _mapStringString: Dictionary<String,String> = [:]
  589. var _mapInt32Bytes: Dictionary<Int32,Data> = [:]
  590. var _mapInt32Enum: Dictionary<Int32,Proto2Unittest_MapEnumLite> = [:]
  591. var _mapInt32ForeignMessage: Dictionary<Int32,Proto2Unittest_ForeignMessageArenaLite> = [:]
  592. // This property is used as the initial default value for new instances of the type.
  593. // The type itself is protecting the reference to its storage via CoW semantics.
  594. // This will force a copy to be made of this reference when the first mutation occurs;
  595. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  596. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  597. private init() {}
  598. init(copying source: _StorageClass) {
  599. _mapInt32Int32 = source._mapInt32Int32
  600. _mapInt64Int64 = source._mapInt64Int64
  601. _mapUint32Uint32 = source._mapUint32Uint32
  602. _mapUint64Uint64 = source._mapUint64Uint64
  603. _mapSint32Sint32 = source._mapSint32Sint32
  604. _mapSint64Sint64 = source._mapSint64Sint64
  605. _mapFixed32Fixed32 = source._mapFixed32Fixed32
  606. _mapFixed64Fixed64 = source._mapFixed64Fixed64
  607. _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
  608. _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
  609. _mapInt32Float = source._mapInt32Float
  610. _mapInt32Double = source._mapInt32Double
  611. _mapBoolBool = source._mapBoolBool
  612. _mapStringString = source._mapStringString
  613. _mapInt32Bytes = source._mapInt32Bytes
  614. _mapInt32Enum = source._mapInt32Enum
  615. _mapInt32ForeignMessage = source._mapInt32ForeignMessage
  616. }
  617. }
  618. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  619. if !isKnownUniquelyReferenced(&_storage) {
  620. _storage = _StorageClass(copying: _storage)
  621. }
  622. return _storage
  623. }
  624. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  625. _ = _uniqueStorage()
  626. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  627. while let fieldNumber = try decoder.nextFieldNumber() {
  628. // The use of inline closures is to circumvent an issue where the compiler
  629. // allocates stack space for every case branch when no optimizations are
  630. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  631. switch fieldNumber {
  632. case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
  633. case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
  634. case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
  635. case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
  636. case 5: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
  637. case 6: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
  638. case 7: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
  639. case 8: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
  640. case 9: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
  641. case 10: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
  642. case 11: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
  643. case 12: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
  644. case 13: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
  645. case 14: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
  646. case 15: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapInt32Bytes) }()
  647. case 16: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_MapEnumLite>.self, value: &_storage._mapInt32Enum) }()
  648. case 17: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_ForeignMessageArenaLite>.self, value: &_storage._mapInt32ForeignMessage) }()
  649. default: break
  650. }
  651. }
  652. }
  653. }
  654. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  655. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  656. if !_storage._mapInt32Int32.isEmpty {
  657. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 1)
  658. }
  659. if !_storage._mapInt64Int64.isEmpty {
  660. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 2)
  661. }
  662. if !_storage._mapUint32Uint32.isEmpty {
  663. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 3)
  664. }
  665. if !_storage._mapUint64Uint64.isEmpty {
  666. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 4)
  667. }
  668. if !_storage._mapSint32Sint32.isEmpty {
  669. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 5)
  670. }
  671. if !_storage._mapSint64Sint64.isEmpty {
  672. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 6)
  673. }
  674. if !_storage._mapFixed32Fixed32.isEmpty {
  675. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 7)
  676. }
  677. if !_storage._mapFixed64Fixed64.isEmpty {
  678. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 8)
  679. }
  680. if !_storage._mapSfixed32Sfixed32.isEmpty {
  681. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 9)
  682. }
  683. if !_storage._mapSfixed64Sfixed64.isEmpty {
  684. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 10)
  685. }
  686. if !_storage._mapInt32Float.isEmpty {
  687. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 11)
  688. }
  689. if !_storage._mapInt32Double.isEmpty {
  690. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 12)
  691. }
  692. if !_storage._mapBoolBool.isEmpty {
  693. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 13)
  694. }
  695. if !_storage._mapStringString.isEmpty {
  696. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 14)
  697. }
  698. if !_storage._mapInt32Bytes.isEmpty {
  699. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapInt32Bytes, fieldNumber: 15)
  700. }
  701. if !_storage._mapInt32Enum.isEmpty {
  702. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_MapEnumLite>.self, value: _storage._mapInt32Enum, fieldNumber: 16)
  703. }
  704. if !_storage._mapInt32ForeignMessage.isEmpty {
  705. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_ForeignMessageArenaLite>.self, value: _storage._mapInt32ForeignMessage, fieldNumber: 17)
  706. }
  707. }
  708. try unknownFields.traverse(visitor: &visitor)
  709. }
  710. static func ==(lhs: Proto2Unittest_TestArenaMapLite, rhs: Proto2Unittest_TestArenaMapLite) -> Bool {
  711. if lhs._storage !== rhs._storage {
  712. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  713. let _storage = _args.0
  714. let rhs_storage = _args.1
  715. if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
  716. if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
  717. if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
  718. if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
  719. if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
  720. if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
  721. if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
  722. if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
  723. if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
  724. if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
  725. if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
  726. if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
  727. if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
  728. if _storage._mapStringString != rhs_storage._mapStringString {return false}
  729. if _storage._mapInt32Bytes != rhs_storage._mapInt32Bytes {return false}
  730. if _storage._mapInt32Enum != rhs_storage._mapInt32Enum {return false}
  731. if _storage._mapInt32ForeignMessage != rhs_storage._mapInt32ForeignMessage {return false}
  732. return true
  733. }
  734. if !storagesAreEqual {return false}
  735. }
  736. if lhs.unknownFields != rhs.unknownFields {return false}
  737. return true
  738. }
  739. }
  740. extension Proto2Unittest_TestRequiredMessageMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  741. static let protoMessageName: String = _protobuf_package + ".TestRequiredMessageMapLite"
  742. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  743. 1: .standard(proto: "map_field"),
  744. ]
  745. public var isInitialized: Bool {
  746. if !SwiftProtobuf.Internal.areAllInitialized(self.mapField) {return false}
  747. return true
  748. }
  749. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  750. while let fieldNumber = try decoder.nextFieldNumber() {
  751. // The use of inline closures is to circumvent an issue where the compiler
  752. // allocates stack space for every case branch when no optimizations are
  753. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  754. switch fieldNumber {
  755. case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_TestRequiredLite>.self, value: &self.mapField) }()
  756. default: break
  757. }
  758. }
  759. }
  760. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  761. if !self.mapField.isEmpty {
  762. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_TestRequiredLite>.self, value: self.mapField, fieldNumber: 1)
  763. }
  764. try unknownFields.traverse(visitor: &visitor)
  765. }
  766. static func ==(lhs: Proto2Unittest_TestRequiredMessageMapLite, rhs: Proto2Unittest_TestRequiredMessageMapLite) -> Bool {
  767. if lhs.mapField != rhs.mapField {return false}
  768. if lhs.unknownFields != rhs.unknownFields {return false}
  769. return true
  770. }
  771. }
  772. extension Proto2Unittest_TestEnumMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  773. static let protoMessageName: String = _protobuf_package + ".TestEnumMapLite"
  774. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  775. 101: .standard(proto: "known_map_field"),
  776. 102: .standard(proto: "unknown_map_field"),
  777. ]
  778. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  779. while let fieldNumber = try decoder.nextFieldNumber() {
  780. // The use of inline closures is to circumvent an issue where the compiler
  781. // allocates stack space for every case branch when no optimizations are
  782. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  783. switch fieldNumber {
  784. case 101: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumLite>.self, value: &self.knownMapField) }()
  785. case 102: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumLite>.self, value: &self.unknownMapField) }()
  786. default: break
  787. }
  788. }
  789. }
  790. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  791. if !self.knownMapField.isEmpty {
  792. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumLite>.self, value: self.knownMapField, fieldNumber: 101)
  793. }
  794. if !self.unknownMapField.isEmpty {
  795. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumLite>.self, value: self.unknownMapField, fieldNumber: 102)
  796. }
  797. try unknownFields.traverse(visitor: &visitor)
  798. }
  799. static func ==(lhs: Proto2Unittest_TestEnumMapLite, rhs: Proto2Unittest_TestEnumMapLite) -> Bool {
  800. if lhs.knownMapField != rhs.knownMapField {return false}
  801. if lhs.unknownMapField != rhs.unknownMapField {return false}
  802. if lhs.unknownFields != rhs.unknownFields {return false}
  803. return true
  804. }
  805. }
  806. extension Proto2Unittest_TestEnumMapPlusExtraLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  807. static let protoMessageName: String = _protobuf_package + ".TestEnumMapPlusExtraLite"
  808. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  809. 101: .standard(proto: "known_map_field"),
  810. 102: .standard(proto: "unknown_map_field"),
  811. ]
  812. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  813. while let fieldNumber = try decoder.nextFieldNumber() {
  814. // The use of inline closures is to circumvent an issue where the compiler
  815. // allocates stack space for every case branch when no optimizations are
  816. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  817. switch fieldNumber {
  818. case 101: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumPlusExtraLite>.self, value: &self.knownMapField) }()
  819. case 102: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumPlusExtraLite>.self, value: &self.unknownMapField) }()
  820. default: break
  821. }
  822. }
  823. }
  824. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  825. if !self.knownMapField.isEmpty {
  826. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumPlusExtraLite>.self, value: self.knownMapField, fieldNumber: 101)
  827. }
  828. if !self.unknownMapField.isEmpty {
  829. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_Proto2MapEnumPlusExtraLite>.self, value: self.unknownMapField, fieldNumber: 102)
  830. }
  831. try unknownFields.traverse(visitor: &visitor)
  832. }
  833. static func ==(lhs: Proto2Unittest_TestEnumMapPlusExtraLite, rhs: Proto2Unittest_TestEnumMapPlusExtraLite) -> Bool {
  834. if lhs.knownMapField != rhs.knownMapField {return false}
  835. if lhs.unknownMapField != rhs.unknownMapField {return false}
  836. if lhs.unknownFields != rhs.unknownFields {return false}
  837. return true
  838. }
  839. }
  840. extension Proto2Unittest_TestMessageMapLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  841. static let protoMessageName: String = _protobuf_package + ".TestMessageMapLite"
  842. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  843. 1: .standard(proto: "map_int32_message"),
  844. ]
  845. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  846. while let fieldNumber = try decoder.nextFieldNumber() {
  847. // The use of inline closures is to circumvent an issue where the compiler
  848. // allocates stack space for every case branch when no optimizations are
  849. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  850. switch fieldNumber {
  851. case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_TestAllTypesLite>.self, value: &self.mapInt32Message) }()
  852. default: break
  853. }
  854. }
  855. }
  856. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  857. if !self.mapInt32Message.isEmpty {
  858. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,Proto2Unittest_TestAllTypesLite>.self, value: self.mapInt32Message, fieldNumber: 1)
  859. }
  860. try unknownFields.traverse(visitor: &visitor)
  861. }
  862. static func ==(lhs: Proto2Unittest_TestMessageMapLite, rhs: Proto2Unittest_TestMessageMapLite) -> Bool {
  863. if lhs.mapInt32Message != rhs.mapInt32Message {return false}
  864. if lhs.unknownFields != rhs.unknownFields {return false}
  865. return true
  866. }
  867. }
  868. extension Proto2Unittest_TestRequiredLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  869. static let protoMessageName: String = _protobuf_package + ".TestRequiredLite"
  870. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  871. 1: .same(proto: "a"),
  872. 2: .same(proto: "b"),
  873. 3: .same(proto: "c"),
  874. ]
  875. public var isInitialized: Bool {
  876. if self._a == nil {return false}
  877. if self._b == nil {return false}
  878. if self._c == nil {return false}
  879. return true
  880. }
  881. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  882. while let fieldNumber = try decoder.nextFieldNumber() {
  883. // The use of inline closures is to circumvent an issue where the compiler
  884. // allocates stack space for every case branch when no optimizations are
  885. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  886. switch fieldNumber {
  887. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  888. case 2: try { try decoder.decodeSingularInt32Field(value: &self._b) }()
  889. case 3: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
  890. default: break
  891. }
  892. }
  893. }
  894. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  895. // The use of inline closures is to circumvent an issue where the compiler
  896. // allocates stack space for every if/case branch local when no optimizations
  897. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  898. // https://github.com/apple/swift-protobuf/issues/1182
  899. try { if let v = self._a {
  900. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  901. } }()
  902. try { if let v = self._b {
  903. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  904. } }()
  905. try { if let v = self._c {
  906. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  907. } }()
  908. try unknownFields.traverse(visitor: &visitor)
  909. }
  910. static func ==(lhs: Proto2Unittest_TestRequiredLite, rhs: Proto2Unittest_TestRequiredLite) -> Bool {
  911. if lhs._a != rhs._a {return false}
  912. if lhs._b != rhs._b {return false}
  913. if lhs._c != rhs._c {return false}
  914. if lhs.unknownFields != rhs.unknownFields {return false}
  915. return true
  916. }
  917. }
  918. extension Proto2Unittest_ForeignMessageArenaLite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  919. static let protoMessageName: String = _protobuf_package + ".ForeignMessageArenaLite"
  920. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  921. 1: .same(proto: "c"),
  922. ]
  923. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  924. while let fieldNumber = try decoder.nextFieldNumber() {
  925. // The use of inline closures is to circumvent an issue where the compiler
  926. // allocates stack space for every case branch when no optimizations are
  927. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  928. switch fieldNumber {
  929. case 1: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
  930. default: break
  931. }
  932. }
  933. }
  934. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  935. // The use of inline closures is to circumvent an issue where the compiler
  936. // allocates stack space for every if/case branch local when no optimizations
  937. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  938. // https://github.com/apple/swift-protobuf/issues/1182
  939. try { if let v = self._c {
  940. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  941. } }()
  942. try unknownFields.traverse(visitor: &visitor)
  943. }
  944. static func ==(lhs: Proto2Unittest_ForeignMessageArenaLite, rhs: Proto2Unittest_ForeignMessageArenaLite) -> Bool {
  945. if lhs._c != rhs._c {return false}
  946. if lhs.unknownFields != rhs.unknownFields {return false}
  947. return true
  948. }
  949. }