unittest_swift_runtime_proto3.pb.swift 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533
  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: unittest_swift_runtime_proto3.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 2015 Google Inc. All rights reserved.
  12. //
  13. // Redistribution and use in source and binary forms, with or without
  14. // modification, are permitted provided that the following conditions are
  15. // met:
  16. //
  17. // * Redistributions of source code must retain the above copyright
  18. // notice, this list of conditions and the following disclaimer.
  19. // * Redistributions in binary form must reproduce the above
  20. // copyright notice, this list of conditions and the following disclaimer
  21. // in the documentation and/or other materials provided with the
  22. // distribution.
  23. // * Neither the name of Google Inc. nor the names of its
  24. // contributors may be used to endorse or promote products derived from
  25. // this software without specific prior written permission.
  26. //
  27. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  28. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  29. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  30. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  31. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  32. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  33. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  34. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  35. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  36. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  37. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. import Foundation
  39. import SwiftProtobuf
  40. // If the compiler emits an error on this type, it is because this file
  41. // was generated by a version of the `protoc` Swift plug-in that is
  42. // incompatible with the version of SwiftProtobuf to which you are linking.
  43. // Please ensure that you are building against the same version of the API
  44. // that was used to generate this file.
  45. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  46. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  47. typealias Version = _2
  48. }
  49. struct SwiftProtoTesting_Message3: @unchecked Sendable {
  50. // SwiftProtobuf.Message conformance is added in an extension below. See the
  51. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  52. // methods supported on all messages.
  53. var optionalInt32: Int32 {
  54. get {return _storage._optionalInt32}
  55. set {_uniqueStorage()._optionalInt32 = newValue}
  56. }
  57. var optionalInt64: Int64 {
  58. get {return _storage._optionalInt64}
  59. set {_uniqueStorage()._optionalInt64 = newValue}
  60. }
  61. var optionalUint32: UInt32 {
  62. get {return _storage._optionalUint32}
  63. set {_uniqueStorage()._optionalUint32 = newValue}
  64. }
  65. var optionalUint64: UInt64 {
  66. get {return _storage._optionalUint64}
  67. set {_uniqueStorage()._optionalUint64 = newValue}
  68. }
  69. var optionalSint32: Int32 {
  70. get {return _storage._optionalSint32}
  71. set {_uniqueStorage()._optionalSint32 = newValue}
  72. }
  73. var optionalSint64: Int64 {
  74. get {return _storage._optionalSint64}
  75. set {_uniqueStorage()._optionalSint64 = newValue}
  76. }
  77. var optionalFixed32: UInt32 {
  78. get {return _storage._optionalFixed32}
  79. set {_uniqueStorage()._optionalFixed32 = newValue}
  80. }
  81. var optionalFixed64: UInt64 {
  82. get {return _storage._optionalFixed64}
  83. set {_uniqueStorage()._optionalFixed64 = newValue}
  84. }
  85. var optionalSfixed32: Int32 {
  86. get {return _storage._optionalSfixed32}
  87. set {_uniqueStorage()._optionalSfixed32 = newValue}
  88. }
  89. var optionalSfixed64: Int64 {
  90. get {return _storage._optionalSfixed64}
  91. set {_uniqueStorage()._optionalSfixed64 = newValue}
  92. }
  93. var optionalFloat: Float {
  94. get {return _storage._optionalFloat}
  95. set {_uniqueStorage()._optionalFloat = newValue}
  96. }
  97. var optionalDouble: Double {
  98. get {return _storage._optionalDouble}
  99. set {_uniqueStorage()._optionalDouble = newValue}
  100. }
  101. var optionalBool: Bool {
  102. get {return _storage._optionalBool}
  103. set {_uniqueStorage()._optionalBool = newValue}
  104. }
  105. var optionalString: String {
  106. get {return _storage._optionalString}
  107. set {_uniqueStorage()._optionalString = newValue}
  108. }
  109. var optionalBytes: Data {
  110. get {return _storage._optionalBytes}
  111. set {_uniqueStorage()._optionalBytes = newValue}
  112. }
  113. /// No 'group' in proto3.
  114. var optionalMessage: SwiftProtoTesting_Message3 {
  115. get {return _storage._optionalMessage ?? SwiftProtoTesting_Message3()}
  116. set {_uniqueStorage()._optionalMessage = newValue}
  117. }
  118. /// Returns true if `optionalMessage` has been explicitly set.
  119. var hasOptionalMessage: Bool {return _storage._optionalMessage != nil}
  120. /// Clears the value of `optionalMessage`. Subsequent reads from it will return its default value.
  121. mutating func clearOptionalMessage() {_uniqueStorage()._optionalMessage = nil}
  122. var optionalEnum: SwiftProtoTesting_Message3.Enum {
  123. get {return _storage._optionalEnum}
  124. set {_uniqueStorage()._optionalEnum = newValue}
  125. }
  126. var repeatedInt32: [Int32] {
  127. get {return _storage._repeatedInt32}
  128. set {_uniqueStorage()._repeatedInt32 = newValue}
  129. }
  130. var repeatedInt64: [Int64] {
  131. get {return _storage._repeatedInt64}
  132. set {_uniqueStorage()._repeatedInt64 = newValue}
  133. }
  134. var repeatedUint32: [UInt32] {
  135. get {return _storage._repeatedUint32}
  136. set {_uniqueStorage()._repeatedUint32 = newValue}
  137. }
  138. var repeatedUint64: [UInt64] {
  139. get {return _storage._repeatedUint64}
  140. set {_uniqueStorage()._repeatedUint64 = newValue}
  141. }
  142. var repeatedSint32: [Int32] {
  143. get {return _storage._repeatedSint32}
  144. set {_uniqueStorage()._repeatedSint32 = newValue}
  145. }
  146. var repeatedSint64: [Int64] {
  147. get {return _storage._repeatedSint64}
  148. set {_uniqueStorage()._repeatedSint64 = newValue}
  149. }
  150. var repeatedFixed32: [UInt32] {
  151. get {return _storage._repeatedFixed32}
  152. set {_uniqueStorage()._repeatedFixed32 = newValue}
  153. }
  154. var repeatedFixed64: [UInt64] {
  155. get {return _storage._repeatedFixed64}
  156. set {_uniqueStorage()._repeatedFixed64 = newValue}
  157. }
  158. var repeatedSfixed32: [Int32] {
  159. get {return _storage._repeatedSfixed32}
  160. set {_uniqueStorage()._repeatedSfixed32 = newValue}
  161. }
  162. var repeatedSfixed64: [Int64] {
  163. get {return _storage._repeatedSfixed64}
  164. set {_uniqueStorage()._repeatedSfixed64 = newValue}
  165. }
  166. var repeatedFloat: [Float] {
  167. get {return _storage._repeatedFloat}
  168. set {_uniqueStorage()._repeatedFloat = newValue}
  169. }
  170. var repeatedDouble: [Double] {
  171. get {return _storage._repeatedDouble}
  172. set {_uniqueStorage()._repeatedDouble = newValue}
  173. }
  174. var repeatedBool: [Bool] {
  175. get {return _storage._repeatedBool}
  176. set {_uniqueStorage()._repeatedBool = newValue}
  177. }
  178. var repeatedString: [String] {
  179. get {return _storage._repeatedString}
  180. set {_uniqueStorage()._repeatedString = newValue}
  181. }
  182. var repeatedBytes: [Data] {
  183. get {return _storage._repeatedBytes}
  184. set {_uniqueStorage()._repeatedBytes = newValue}
  185. }
  186. /// No 'group' in proto3.
  187. var repeatedMessage: [SwiftProtoTesting_Message3] {
  188. get {return _storage._repeatedMessage}
  189. set {_uniqueStorage()._repeatedMessage = newValue}
  190. }
  191. var repeatedEnum: [SwiftProtoTesting_Message3.Enum] {
  192. get {return _storage._repeatedEnum}
  193. set {_uniqueStorage()._repeatedEnum = newValue}
  194. }
  195. var o: OneOf_O? {
  196. get {return _storage._o}
  197. set {_uniqueStorage()._o = newValue}
  198. }
  199. var oneofInt32: Int32 {
  200. get {
  201. if case .oneofInt32(let v)? = _storage._o {return v}
  202. return 0
  203. }
  204. set {_uniqueStorage()._o = .oneofInt32(newValue)}
  205. }
  206. var oneofInt64: Int64 {
  207. get {
  208. if case .oneofInt64(let v)? = _storage._o {return v}
  209. return 0
  210. }
  211. set {_uniqueStorage()._o = .oneofInt64(newValue)}
  212. }
  213. var oneofUint32: UInt32 {
  214. get {
  215. if case .oneofUint32(let v)? = _storage._o {return v}
  216. return 0
  217. }
  218. set {_uniqueStorage()._o = .oneofUint32(newValue)}
  219. }
  220. var oneofUint64: UInt64 {
  221. get {
  222. if case .oneofUint64(let v)? = _storage._o {return v}
  223. return 0
  224. }
  225. set {_uniqueStorage()._o = .oneofUint64(newValue)}
  226. }
  227. var oneofSint32: Int32 {
  228. get {
  229. if case .oneofSint32(let v)? = _storage._o {return v}
  230. return 0
  231. }
  232. set {_uniqueStorage()._o = .oneofSint32(newValue)}
  233. }
  234. var oneofSint64: Int64 {
  235. get {
  236. if case .oneofSint64(let v)? = _storage._o {return v}
  237. return 0
  238. }
  239. set {_uniqueStorage()._o = .oneofSint64(newValue)}
  240. }
  241. var oneofFixed32: UInt32 {
  242. get {
  243. if case .oneofFixed32(let v)? = _storage._o {return v}
  244. return 0
  245. }
  246. set {_uniqueStorage()._o = .oneofFixed32(newValue)}
  247. }
  248. var oneofFixed64: UInt64 {
  249. get {
  250. if case .oneofFixed64(let v)? = _storage._o {return v}
  251. return 0
  252. }
  253. set {_uniqueStorage()._o = .oneofFixed64(newValue)}
  254. }
  255. var oneofSfixed32: Int32 {
  256. get {
  257. if case .oneofSfixed32(let v)? = _storage._o {return v}
  258. return 0
  259. }
  260. set {_uniqueStorage()._o = .oneofSfixed32(newValue)}
  261. }
  262. var oneofSfixed64: Int64 {
  263. get {
  264. if case .oneofSfixed64(let v)? = _storage._o {return v}
  265. return 0
  266. }
  267. set {_uniqueStorage()._o = .oneofSfixed64(newValue)}
  268. }
  269. var oneofFloat: Float {
  270. get {
  271. if case .oneofFloat(let v)? = _storage._o {return v}
  272. return 0
  273. }
  274. set {_uniqueStorage()._o = .oneofFloat(newValue)}
  275. }
  276. var oneofDouble: Double {
  277. get {
  278. if case .oneofDouble(let v)? = _storage._o {return v}
  279. return 0
  280. }
  281. set {_uniqueStorage()._o = .oneofDouble(newValue)}
  282. }
  283. var oneofBool: Bool {
  284. get {
  285. if case .oneofBool(let v)? = _storage._o {return v}
  286. return false
  287. }
  288. set {_uniqueStorage()._o = .oneofBool(newValue)}
  289. }
  290. var oneofString: String {
  291. get {
  292. if case .oneofString(let v)? = _storage._o {return v}
  293. return String()
  294. }
  295. set {_uniqueStorage()._o = .oneofString(newValue)}
  296. }
  297. var oneofBytes: Data {
  298. get {
  299. if case .oneofBytes(let v)? = _storage._o {return v}
  300. return Data()
  301. }
  302. set {_uniqueStorage()._o = .oneofBytes(newValue)}
  303. }
  304. /// No 'group' in proto3.
  305. var oneofMessage: SwiftProtoTesting_Message3 {
  306. get {
  307. if case .oneofMessage(let v)? = _storage._o {return v}
  308. return SwiftProtoTesting_Message3()
  309. }
  310. set {_uniqueStorage()._o = .oneofMessage(newValue)}
  311. }
  312. var oneofEnum: SwiftProtoTesting_Message3.Enum {
  313. get {
  314. if case .oneofEnum(let v)? = _storage._o {return v}
  315. return .foo
  316. }
  317. set {_uniqueStorage()._o = .oneofEnum(newValue)}
  318. }
  319. /// Some token map cases, too many combinations to list them all.
  320. var mapInt32Int32: Dictionary<Int32,Int32> {
  321. get {return _storage._mapInt32Int32}
  322. set {_uniqueStorage()._mapInt32Int32 = newValue}
  323. }
  324. var mapInt64Int64: Dictionary<Int64,Int64> {
  325. get {return _storage._mapInt64Int64}
  326. set {_uniqueStorage()._mapInt64Int64 = newValue}
  327. }
  328. var mapUint32Uint32: Dictionary<UInt32,UInt32> {
  329. get {return _storage._mapUint32Uint32}
  330. set {_uniqueStorage()._mapUint32Uint32 = newValue}
  331. }
  332. var mapUint64Uint64: Dictionary<UInt64,UInt64> {
  333. get {return _storage._mapUint64Uint64}
  334. set {_uniqueStorage()._mapUint64Uint64 = newValue}
  335. }
  336. var mapSint32Sint32: Dictionary<Int32,Int32> {
  337. get {return _storage._mapSint32Sint32}
  338. set {_uniqueStorage()._mapSint32Sint32 = newValue}
  339. }
  340. var mapSint64Sint64: Dictionary<Int64,Int64> {
  341. get {return _storage._mapSint64Sint64}
  342. set {_uniqueStorage()._mapSint64Sint64 = newValue}
  343. }
  344. var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
  345. get {return _storage._mapFixed32Fixed32}
  346. set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
  347. }
  348. var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
  349. get {return _storage._mapFixed64Fixed64}
  350. set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
  351. }
  352. var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
  353. get {return _storage._mapSfixed32Sfixed32}
  354. set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
  355. }
  356. var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
  357. get {return _storage._mapSfixed64Sfixed64}
  358. set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
  359. }
  360. var mapInt32Float: Dictionary<Int32,Float> {
  361. get {return _storage._mapInt32Float}
  362. set {_uniqueStorage()._mapInt32Float = newValue}
  363. }
  364. var mapInt32Double: Dictionary<Int32,Double> {
  365. get {return _storage._mapInt32Double}
  366. set {_uniqueStorage()._mapInt32Double = newValue}
  367. }
  368. var mapBoolBool: Dictionary<Bool,Bool> {
  369. get {return _storage._mapBoolBool}
  370. set {_uniqueStorage()._mapBoolBool = newValue}
  371. }
  372. var mapStringString: Dictionary<String,String> {
  373. get {return _storage._mapStringString}
  374. set {_uniqueStorage()._mapStringString = newValue}
  375. }
  376. var mapStringBytes: Dictionary<String,Data> {
  377. get {return _storage._mapStringBytes}
  378. set {_uniqueStorage()._mapStringBytes = newValue}
  379. }
  380. var mapStringMessage: Dictionary<String,SwiftProtoTesting_Message3> {
  381. get {return _storage._mapStringMessage}
  382. set {_uniqueStorage()._mapStringMessage = newValue}
  383. }
  384. var mapInt32Bytes: Dictionary<Int32,Data> {
  385. get {return _storage._mapInt32Bytes}
  386. set {_uniqueStorage()._mapInt32Bytes = newValue}
  387. }
  388. var mapInt32Enum: Dictionary<Int32,SwiftProtoTesting_Message3.Enum> {
  389. get {return _storage._mapInt32Enum}
  390. set {_uniqueStorage()._mapInt32Enum = newValue}
  391. }
  392. var mapInt32Message: Dictionary<Int32,SwiftProtoTesting_Message3> {
  393. get {return _storage._mapInt32Message}
  394. set {_uniqueStorage()._mapInt32Message = newValue}
  395. }
  396. var unknownFields = SwiftProtobuf.UnknownStorage()
  397. enum OneOf_O: Equatable, @unchecked Sendable {
  398. case oneofInt32(Int32)
  399. case oneofInt64(Int64)
  400. case oneofUint32(UInt32)
  401. case oneofUint64(UInt64)
  402. case oneofSint32(Int32)
  403. case oneofSint64(Int64)
  404. case oneofFixed32(UInt32)
  405. case oneofFixed64(UInt64)
  406. case oneofSfixed32(Int32)
  407. case oneofSfixed64(Int64)
  408. case oneofFloat(Float)
  409. case oneofDouble(Double)
  410. case oneofBool(Bool)
  411. case oneofString(String)
  412. case oneofBytes(Data)
  413. /// No 'group' in proto3.
  414. case oneofMessage(SwiftProtoTesting_Message3)
  415. case oneofEnum(SwiftProtoTesting_Message3.Enum)
  416. }
  417. enum Enum: SwiftProtobuf.Enum, Swift.CaseIterable {
  418. typealias RawValue = Int
  419. case foo // = 0
  420. case bar // = 1
  421. case baz // = 2
  422. case extra3 // = 30
  423. case UNRECOGNIZED(Int)
  424. init() {
  425. self = .foo
  426. }
  427. init?(rawValue: Int) {
  428. switch rawValue {
  429. case 0: self = .foo
  430. case 1: self = .bar
  431. case 2: self = .baz
  432. case 30: self = .extra3
  433. default: self = .UNRECOGNIZED(rawValue)
  434. }
  435. }
  436. var rawValue: Int {
  437. switch self {
  438. case .foo: return 0
  439. case .bar: return 1
  440. case .baz: return 2
  441. case .extra3: return 30
  442. case .UNRECOGNIZED(let i): return i
  443. }
  444. }
  445. // The compiler won't synthesize support with the UNRECOGNIZED case.
  446. static let allCases: [SwiftProtoTesting_Message3.Enum] = [
  447. .foo,
  448. .bar,
  449. .baz,
  450. .extra3,
  451. ]
  452. }
  453. init() {}
  454. fileprivate var _storage = _StorageClass.defaultInstance
  455. }
  456. struct SwiftProtoTesting_Msg3NoStorage: Sendable {
  457. // SwiftProtobuf.Message conformance is added in an extension below. See the
  458. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  459. // methods supported on all messages.
  460. var unknownFields = SwiftProtobuf.UnknownStorage()
  461. init() {}
  462. }
  463. struct SwiftProtoTesting_Msg3UsesStorage: @unchecked Sendable {
  464. // SwiftProtobuf.Message conformance is added in an extension below. See the
  465. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  466. // methods supported on all messages.
  467. /// Recursive class (i.e. - can build a graph), forces _StorageClass.
  468. var y: SwiftProtoTesting_Msg3UsesStorage {
  469. get {return _storage._y ?? SwiftProtoTesting_Msg3UsesStorage()}
  470. set {_uniqueStorage()._y = newValue}
  471. }
  472. /// Returns true if `y` has been explicitly set.
  473. var hasY: Bool {return _storage._y != nil}
  474. /// Clears the value of `y`. Subsequent reads from it will return its default value.
  475. mutating func clearY() {_uniqueStorage()._y = nil}
  476. var unknownFields = SwiftProtobuf.UnknownStorage()
  477. init() {}
  478. fileprivate var _storage = _StorageClass.defaultInstance
  479. }
  480. /// Names that match protocols - No Storage
  481. struct SwiftProtoTesting_Msg3NamesNoStorage: Sendable {
  482. // SwiftProtobuf.Message conformance is added in an extension below. See the
  483. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  484. // methods supported on all messages.
  485. var isInitialized_p: Int32 = 0
  486. var debugDescription_p: Int32 = 0
  487. var hasValue_p: Int32 = 0
  488. var unknownFields = SwiftProtobuf.UnknownStorage()
  489. init() {}
  490. }
  491. /// Names that match protocols - No Storage
  492. struct SwiftProtoTesting_Msg3NamesUsesStorage: Sendable {
  493. // SwiftProtobuf.Message conformance is added in an extension below. See the
  494. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  495. // methods supported on all messages.
  496. var isInitialized_p: Int32 = 0
  497. var debugDescription_p: Int32 = 0
  498. /// Recursive class, forces _StorageClass
  499. var value: SwiftProtoTesting_Msg3UsesStorage {
  500. get {return _value ?? SwiftProtoTesting_Msg3UsesStorage()}
  501. set {_value = newValue}
  502. }
  503. /// Returns true if `value` has been explicitly set.
  504. var hasValue: Bool {return self._value != nil}
  505. /// Clears the value of `value`. Subsequent reads from it will return its default value.
  506. mutating func clearValue() {self._value = nil}
  507. var unknownFields = SwiftProtobuf.UnknownStorage()
  508. init() {}
  509. fileprivate var _value: SwiftProtoTesting_Msg3UsesStorage? = nil
  510. }
  511. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  512. fileprivate let _protobuf_package = "swift_proto_testing"
  513. extension SwiftProtoTesting_Message3: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  514. static let protoMessageName: String = _protobuf_package + ".Message3"
  515. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  516. 1: .standard(proto: "optional_int32"),
  517. 2: .standard(proto: "optional_int64"),
  518. 3: .standard(proto: "optional_uint32"),
  519. 4: .standard(proto: "optional_uint64"),
  520. 5: .standard(proto: "optional_sint32"),
  521. 6: .standard(proto: "optional_sint64"),
  522. 7: .standard(proto: "optional_fixed32"),
  523. 8: .standard(proto: "optional_fixed64"),
  524. 9: .standard(proto: "optional_sfixed32"),
  525. 10: .standard(proto: "optional_sfixed64"),
  526. 11: .standard(proto: "optional_float"),
  527. 12: .standard(proto: "optional_double"),
  528. 13: .standard(proto: "optional_bool"),
  529. 14: .standard(proto: "optional_string"),
  530. 15: .standard(proto: "optional_bytes"),
  531. 18: .standard(proto: "optional_message"),
  532. 19: .standard(proto: "optional_enum"),
  533. 31: .standard(proto: "repeated_int32"),
  534. 32: .standard(proto: "repeated_int64"),
  535. 33: .standard(proto: "repeated_uint32"),
  536. 34: .standard(proto: "repeated_uint64"),
  537. 35: .standard(proto: "repeated_sint32"),
  538. 36: .standard(proto: "repeated_sint64"),
  539. 37: .standard(proto: "repeated_fixed32"),
  540. 38: .standard(proto: "repeated_fixed64"),
  541. 39: .standard(proto: "repeated_sfixed32"),
  542. 40: .standard(proto: "repeated_sfixed64"),
  543. 41: .standard(proto: "repeated_float"),
  544. 42: .standard(proto: "repeated_double"),
  545. 43: .standard(proto: "repeated_bool"),
  546. 44: .standard(proto: "repeated_string"),
  547. 45: .standard(proto: "repeated_bytes"),
  548. 48: .standard(proto: "repeated_message"),
  549. 49: .standard(proto: "repeated_enum"),
  550. 51: .standard(proto: "oneof_int32"),
  551. 52: .standard(proto: "oneof_int64"),
  552. 53: .standard(proto: "oneof_uint32"),
  553. 54: .standard(proto: "oneof_uint64"),
  554. 55: .standard(proto: "oneof_sint32"),
  555. 56: .standard(proto: "oneof_sint64"),
  556. 57: .standard(proto: "oneof_fixed32"),
  557. 58: .standard(proto: "oneof_fixed64"),
  558. 59: .standard(proto: "oneof_sfixed32"),
  559. 60: .standard(proto: "oneof_sfixed64"),
  560. 61: .standard(proto: "oneof_float"),
  561. 62: .standard(proto: "oneof_double"),
  562. 63: .standard(proto: "oneof_bool"),
  563. 64: .standard(proto: "oneof_string"),
  564. 65: .standard(proto: "oneof_bytes"),
  565. 68: .standard(proto: "oneof_message"),
  566. 69: .standard(proto: "oneof_enum"),
  567. 70: .standard(proto: "map_int32_int32"),
  568. 71: .standard(proto: "map_int64_int64"),
  569. 72: .standard(proto: "map_uint32_uint32"),
  570. 73: .standard(proto: "map_uint64_uint64"),
  571. 74: .standard(proto: "map_sint32_sint32"),
  572. 75: .standard(proto: "map_sint64_sint64"),
  573. 76: .standard(proto: "map_fixed32_fixed32"),
  574. 77: .standard(proto: "map_fixed64_fixed64"),
  575. 78: .standard(proto: "map_sfixed32_sfixed32"),
  576. 79: .standard(proto: "map_sfixed64_sfixed64"),
  577. 80: .standard(proto: "map_int32_float"),
  578. 81: .standard(proto: "map_int32_double"),
  579. 82: .standard(proto: "map_bool_bool"),
  580. 83: .standard(proto: "map_string_string"),
  581. 84: .standard(proto: "map_string_bytes"),
  582. 85: .standard(proto: "map_string_message"),
  583. 86: .standard(proto: "map_int32_bytes"),
  584. 87: .standard(proto: "map_int32_enum"),
  585. 88: .standard(proto: "map_int32_message"),
  586. ]
  587. fileprivate class _StorageClass {
  588. var _optionalInt32: Int32 = 0
  589. var _optionalInt64: Int64 = 0
  590. var _optionalUint32: UInt32 = 0
  591. var _optionalUint64: UInt64 = 0
  592. var _optionalSint32: Int32 = 0
  593. var _optionalSint64: Int64 = 0
  594. var _optionalFixed32: UInt32 = 0
  595. var _optionalFixed64: UInt64 = 0
  596. var _optionalSfixed32: Int32 = 0
  597. var _optionalSfixed64: Int64 = 0
  598. var _optionalFloat: Float = 0
  599. var _optionalDouble: Double = 0
  600. var _optionalBool: Bool = false
  601. var _optionalString: String = String()
  602. var _optionalBytes: Data = Data()
  603. var _optionalMessage: SwiftProtoTesting_Message3? = nil
  604. var _optionalEnum: SwiftProtoTesting_Message3.Enum = .foo
  605. var _repeatedInt32: [Int32] = []
  606. var _repeatedInt64: [Int64] = []
  607. var _repeatedUint32: [UInt32] = []
  608. var _repeatedUint64: [UInt64] = []
  609. var _repeatedSint32: [Int32] = []
  610. var _repeatedSint64: [Int64] = []
  611. var _repeatedFixed32: [UInt32] = []
  612. var _repeatedFixed64: [UInt64] = []
  613. var _repeatedSfixed32: [Int32] = []
  614. var _repeatedSfixed64: [Int64] = []
  615. var _repeatedFloat: [Float] = []
  616. var _repeatedDouble: [Double] = []
  617. var _repeatedBool: [Bool] = []
  618. var _repeatedString: [String] = []
  619. var _repeatedBytes: [Data] = []
  620. var _repeatedMessage: [SwiftProtoTesting_Message3] = []
  621. var _repeatedEnum: [SwiftProtoTesting_Message3.Enum] = []
  622. var _o: SwiftProtoTesting_Message3.OneOf_O?
  623. var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
  624. var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
  625. var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
  626. var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
  627. var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
  628. var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
  629. var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
  630. var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
  631. var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
  632. var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
  633. var _mapInt32Float: Dictionary<Int32,Float> = [:]
  634. var _mapInt32Double: Dictionary<Int32,Double> = [:]
  635. var _mapBoolBool: Dictionary<Bool,Bool> = [:]
  636. var _mapStringString: Dictionary<String,String> = [:]
  637. var _mapStringBytes: Dictionary<String,Data> = [:]
  638. var _mapStringMessage: Dictionary<String,SwiftProtoTesting_Message3> = [:]
  639. var _mapInt32Bytes: Dictionary<Int32,Data> = [:]
  640. var _mapInt32Enum: Dictionary<Int32,SwiftProtoTesting_Message3.Enum> = [:]
  641. var _mapInt32Message: Dictionary<Int32,SwiftProtoTesting_Message3> = [:]
  642. // This property is used as the initial default value for new instances of the type.
  643. // The type itself is protecting the reference to its storage via CoW semantics.
  644. // This will force a copy to be made of this reference when the first mutation occurs;
  645. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  646. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  647. private init() {}
  648. init(copying source: _StorageClass) {
  649. _optionalInt32 = source._optionalInt32
  650. _optionalInt64 = source._optionalInt64
  651. _optionalUint32 = source._optionalUint32
  652. _optionalUint64 = source._optionalUint64
  653. _optionalSint32 = source._optionalSint32
  654. _optionalSint64 = source._optionalSint64
  655. _optionalFixed32 = source._optionalFixed32
  656. _optionalFixed64 = source._optionalFixed64
  657. _optionalSfixed32 = source._optionalSfixed32
  658. _optionalSfixed64 = source._optionalSfixed64
  659. _optionalFloat = source._optionalFloat
  660. _optionalDouble = source._optionalDouble
  661. _optionalBool = source._optionalBool
  662. _optionalString = source._optionalString
  663. _optionalBytes = source._optionalBytes
  664. _optionalMessage = source._optionalMessage
  665. _optionalEnum = source._optionalEnum
  666. _repeatedInt32 = source._repeatedInt32
  667. _repeatedInt64 = source._repeatedInt64
  668. _repeatedUint32 = source._repeatedUint32
  669. _repeatedUint64 = source._repeatedUint64
  670. _repeatedSint32 = source._repeatedSint32
  671. _repeatedSint64 = source._repeatedSint64
  672. _repeatedFixed32 = source._repeatedFixed32
  673. _repeatedFixed64 = source._repeatedFixed64
  674. _repeatedSfixed32 = source._repeatedSfixed32
  675. _repeatedSfixed64 = source._repeatedSfixed64
  676. _repeatedFloat = source._repeatedFloat
  677. _repeatedDouble = source._repeatedDouble
  678. _repeatedBool = source._repeatedBool
  679. _repeatedString = source._repeatedString
  680. _repeatedBytes = source._repeatedBytes
  681. _repeatedMessage = source._repeatedMessage
  682. _repeatedEnum = source._repeatedEnum
  683. _o = source._o
  684. _mapInt32Int32 = source._mapInt32Int32
  685. _mapInt64Int64 = source._mapInt64Int64
  686. _mapUint32Uint32 = source._mapUint32Uint32
  687. _mapUint64Uint64 = source._mapUint64Uint64
  688. _mapSint32Sint32 = source._mapSint32Sint32
  689. _mapSint64Sint64 = source._mapSint64Sint64
  690. _mapFixed32Fixed32 = source._mapFixed32Fixed32
  691. _mapFixed64Fixed64 = source._mapFixed64Fixed64
  692. _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
  693. _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
  694. _mapInt32Float = source._mapInt32Float
  695. _mapInt32Double = source._mapInt32Double
  696. _mapBoolBool = source._mapBoolBool
  697. _mapStringString = source._mapStringString
  698. _mapStringBytes = source._mapStringBytes
  699. _mapStringMessage = source._mapStringMessage
  700. _mapInt32Bytes = source._mapInt32Bytes
  701. _mapInt32Enum = source._mapInt32Enum
  702. _mapInt32Message = source._mapInt32Message
  703. }
  704. }
  705. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  706. if !isKnownUniquelyReferenced(&_storage) {
  707. _storage = _StorageClass(copying: _storage)
  708. }
  709. return _storage
  710. }
  711. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  712. _ = _uniqueStorage()
  713. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  714. while let fieldNumber = try decoder.nextFieldNumber() {
  715. // The use of inline closures is to circumvent an issue where the compiler
  716. // allocates stack space for every case branch when no optimizations are
  717. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  718. switch fieldNumber {
  719. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) }()
  720. case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) }()
  721. case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) }()
  722. case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) }()
  723. case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) }()
  724. case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) }()
  725. case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) }()
  726. case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) }()
  727. case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) }()
  728. case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) }()
  729. case 11: try { try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) }()
  730. case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) }()
  731. case 13: try { try decoder.decodeSingularBoolField(value: &_storage._optionalBool) }()
  732. case 14: try { try decoder.decodeSingularStringField(value: &_storage._optionalString) }()
  733. case 15: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) }()
  734. case 18: try { try decoder.decodeSingularMessageField(value: &_storage._optionalMessage) }()
  735. case 19: try { try decoder.decodeSingularEnumField(value: &_storage._optionalEnum) }()
  736. case 31: try { try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) }()
  737. case 32: try { try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) }()
  738. case 33: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) }()
  739. case 34: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) }()
  740. case 35: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) }()
  741. case 36: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) }()
  742. case 37: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) }()
  743. case 38: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) }()
  744. case 39: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) }()
  745. case 40: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) }()
  746. case 41: try { try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) }()
  747. case 42: try { try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) }()
  748. case 43: try { try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) }()
  749. case 44: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) }()
  750. case 45: try { try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) }()
  751. case 48: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedMessage) }()
  752. case 49: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedEnum) }()
  753. case 51: try {
  754. var v: Int32?
  755. try decoder.decodeSingularInt32Field(value: &v)
  756. if let v = v {
  757. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  758. _storage._o = .oneofInt32(v)
  759. }
  760. }()
  761. case 52: try {
  762. var v: Int64?
  763. try decoder.decodeSingularInt64Field(value: &v)
  764. if let v = v {
  765. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  766. _storage._o = .oneofInt64(v)
  767. }
  768. }()
  769. case 53: try {
  770. var v: UInt32?
  771. try decoder.decodeSingularUInt32Field(value: &v)
  772. if let v = v {
  773. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  774. _storage._o = .oneofUint32(v)
  775. }
  776. }()
  777. case 54: try {
  778. var v: UInt64?
  779. try decoder.decodeSingularUInt64Field(value: &v)
  780. if let v = v {
  781. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  782. _storage._o = .oneofUint64(v)
  783. }
  784. }()
  785. case 55: try {
  786. var v: Int32?
  787. try decoder.decodeSingularSInt32Field(value: &v)
  788. if let v = v {
  789. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  790. _storage._o = .oneofSint32(v)
  791. }
  792. }()
  793. case 56: try {
  794. var v: Int64?
  795. try decoder.decodeSingularSInt64Field(value: &v)
  796. if let v = v {
  797. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  798. _storage._o = .oneofSint64(v)
  799. }
  800. }()
  801. case 57: try {
  802. var v: UInt32?
  803. try decoder.decodeSingularFixed32Field(value: &v)
  804. if let v = v {
  805. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  806. _storage._o = .oneofFixed32(v)
  807. }
  808. }()
  809. case 58: try {
  810. var v: UInt64?
  811. try decoder.decodeSingularFixed64Field(value: &v)
  812. if let v = v {
  813. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  814. _storage._o = .oneofFixed64(v)
  815. }
  816. }()
  817. case 59: try {
  818. var v: Int32?
  819. try decoder.decodeSingularSFixed32Field(value: &v)
  820. if let v = v {
  821. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  822. _storage._o = .oneofSfixed32(v)
  823. }
  824. }()
  825. case 60: try {
  826. var v: Int64?
  827. try decoder.decodeSingularSFixed64Field(value: &v)
  828. if let v = v {
  829. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  830. _storage._o = .oneofSfixed64(v)
  831. }
  832. }()
  833. case 61: try {
  834. var v: Float?
  835. try decoder.decodeSingularFloatField(value: &v)
  836. if let v = v {
  837. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  838. _storage._o = .oneofFloat(v)
  839. }
  840. }()
  841. case 62: try {
  842. var v: Double?
  843. try decoder.decodeSingularDoubleField(value: &v)
  844. if let v = v {
  845. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  846. _storage._o = .oneofDouble(v)
  847. }
  848. }()
  849. case 63: try {
  850. var v: Bool?
  851. try decoder.decodeSingularBoolField(value: &v)
  852. if let v = v {
  853. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  854. _storage._o = .oneofBool(v)
  855. }
  856. }()
  857. case 64: try {
  858. var v: String?
  859. try decoder.decodeSingularStringField(value: &v)
  860. if let v = v {
  861. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  862. _storage._o = .oneofString(v)
  863. }
  864. }()
  865. case 65: try {
  866. var v: Data?
  867. try decoder.decodeSingularBytesField(value: &v)
  868. if let v = v {
  869. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  870. _storage._o = .oneofBytes(v)
  871. }
  872. }()
  873. case 68: try {
  874. var v: SwiftProtoTesting_Message3?
  875. var hadOneofValue = false
  876. if let current = _storage._o {
  877. hadOneofValue = true
  878. if case .oneofMessage(let m) = current {v = m}
  879. }
  880. try decoder.decodeSingularMessageField(value: &v)
  881. if let v = v {
  882. if hadOneofValue {try decoder.handleConflictingOneOf()}
  883. _storage._o = .oneofMessage(v)
  884. }
  885. }()
  886. case 69: try {
  887. var v: SwiftProtoTesting_Message3.Enum?
  888. try decoder.decodeSingularEnumField(value: &v)
  889. if let v = v {
  890. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  891. _storage._o = .oneofEnum(v)
  892. }
  893. }()
  894. case 70: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
  895. case 71: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
  896. case 72: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
  897. case 73: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
  898. case 74: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
  899. case 75: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
  900. case 76: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
  901. case 77: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
  902. case 78: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
  903. case 79: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
  904. case 80: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
  905. case 81: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
  906. case 82: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
  907. case 83: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
  908. case 84: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapStringBytes) }()
  909. case 85: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,SwiftProtoTesting_Message3>.self, value: &_storage._mapStringMessage) }()
  910. case 86: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapInt32Bytes) }()
  911. case 87: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,SwiftProtoTesting_Message3.Enum>.self, value: &_storage._mapInt32Enum) }()
  912. case 88: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,SwiftProtoTesting_Message3>.self, value: &_storage._mapInt32Message) }()
  913. default: break
  914. }
  915. }
  916. }
  917. }
  918. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  919. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  920. // The use of inline closures is to circumvent an issue where the compiler
  921. // allocates stack space for every if/case branch local when no optimizations
  922. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  923. // https://github.com/apple/swift-protobuf/issues/1182
  924. if _storage._optionalInt32 != 0 {
  925. try visitor.visitSingularInt32Field(value: _storage._optionalInt32, fieldNumber: 1)
  926. }
  927. if _storage._optionalInt64 != 0 {
  928. try visitor.visitSingularInt64Field(value: _storage._optionalInt64, fieldNumber: 2)
  929. }
  930. if _storage._optionalUint32 != 0 {
  931. try visitor.visitSingularUInt32Field(value: _storage._optionalUint32, fieldNumber: 3)
  932. }
  933. if _storage._optionalUint64 != 0 {
  934. try visitor.visitSingularUInt64Field(value: _storage._optionalUint64, fieldNumber: 4)
  935. }
  936. if _storage._optionalSint32 != 0 {
  937. try visitor.visitSingularSInt32Field(value: _storage._optionalSint32, fieldNumber: 5)
  938. }
  939. if _storage._optionalSint64 != 0 {
  940. try visitor.visitSingularSInt64Field(value: _storage._optionalSint64, fieldNumber: 6)
  941. }
  942. if _storage._optionalFixed32 != 0 {
  943. try visitor.visitSingularFixed32Field(value: _storage._optionalFixed32, fieldNumber: 7)
  944. }
  945. if _storage._optionalFixed64 != 0 {
  946. try visitor.visitSingularFixed64Field(value: _storage._optionalFixed64, fieldNumber: 8)
  947. }
  948. if _storage._optionalSfixed32 != 0 {
  949. try visitor.visitSingularSFixed32Field(value: _storage._optionalSfixed32, fieldNumber: 9)
  950. }
  951. if _storage._optionalSfixed64 != 0 {
  952. try visitor.visitSingularSFixed64Field(value: _storage._optionalSfixed64, fieldNumber: 10)
  953. }
  954. if _storage._optionalFloat.bitPattern != 0 {
  955. try visitor.visitSingularFloatField(value: _storage._optionalFloat, fieldNumber: 11)
  956. }
  957. if _storage._optionalDouble.bitPattern != 0 {
  958. try visitor.visitSingularDoubleField(value: _storage._optionalDouble, fieldNumber: 12)
  959. }
  960. if _storage._optionalBool != false {
  961. try visitor.visitSingularBoolField(value: _storage._optionalBool, fieldNumber: 13)
  962. }
  963. if !_storage._optionalString.isEmpty {
  964. try visitor.visitSingularStringField(value: _storage._optionalString, fieldNumber: 14)
  965. }
  966. if !_storage._optionalBytes.isEmpty {
  967. try visitor.visitSingularBytesField(value: _storage._optionalBytes, fieldNumber: 15)
  968. }
  969. try { if let v = _storage._optionalMessage {
  970. try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
  971. } }()
  972. if _storage._optionalEnum != .foo {
  973. try visitor.visitSingularEnumField(value: _storage._optionalEnum, fieldNumber: 19)
  974. }
  975. if !_storage._repeatedInt32.isEmpty {
  976. try visitor.visitPackedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31)
  977. }
  978. if !_storage._repeatedInt64.isEmpty {
  979. try visitor.visitPackedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32)
  980. }
  981. if !_storage._repeatedUint32.isEmpty {
  982. try visitor.visitPackedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33)
  983. }
  984. if !_storage._repeatedUint64.isEmpty {
  985. try visitor.visitPackedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34)
  986. }
  987. if !_storage._repeatedSint32.isEmpty {
  988. try visitor.visitPackedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35)
  989. }
  990. if !_storage._repeatedSint64.isEmpty {
  991. try visitor.visitPackedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36)
  992. }
  993. if !_storage._repeatedFixed32.isEmpty {
  994. try visitor.visitPackedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37)
  995. }
  996. if !_storage._repeatedFixed64.isEmpty {
  997. try visitor.visitPackedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38)
  998. }
  999. if !_storage._repeatedSfixed32.isEmpty {
  1000. try visitor.visitPackedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39)
  1001. }
  1002. if !_storage._repeatedSfixed64.isEmpty {
  1003. try visitor.visitPackedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40)
  1004. }
  1005. if !_storage._repeatedFloat.isEmpty {
  1006. try visitor.visitPackedFloatField(value: _storage._repeatedFloat, fieldNumber: 41)
  1007. }
  1008. if !_storage._repeatedDouble.isEmpty {
  1009. try visitor.visitPackedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42)
  1010. }
  1011. if !_storage._repeatedBool.isEmpty {
  1012. try visitor.visitPackedBoolField(value: _storage._repeatedBool, fieldNumber: 43)
  1013. }
  1014. if !_storage._repeatedString.isEmpty {
  1015. try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44)
  1016. }
  1017. if !_storage._repeatedBytes.isEmpty {
  1018. try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45)
  1019. }
  1020. if !_storage._repeatedMessage.isEmpty {
  1021. try visitor.visitRepeatedMessageField(value: _storage._repeatedMessage, fieldNumber: 48)
  1022. }
  1023. if !_storage._repeatedEnum.isEmpty {
  1024. try visitor.visitPackedEnumField(value: _storage._repeatedEnum, fieldNumber: 49)
  1025. }
  1026. switch _storage._o {
  1027. case .oneofInt32?: try {
  1028. guard case .oneofInt32(let v)? = _storage._o else { preconditionFailure() }
  1029. try visitor.visitSingularInt32Field(value: v, fieldNumber: 51)
  1030. }()
  1031. case .oneofInt64?: try {
  1032. guard case .oneofInt64(let v)? = _storage._o else { preconditionFailure() }
  1033. try visitor.visitSingularInt64Field(value: v, fieldNumber: 52)
  1034. }()
  1035. case .oneofUint32?: try {
  1036. guard case .oneofUint32(let v)? = _storage._o else { preconditionFailure() }
  1037. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 53)
  1038. }()
  1039. case .oneofUint64?: try {
  1040. guard case .oneofUint64(let v)? = _storage._o else { preconditionFailure() }
  1041. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 54)
  1042. }()
  1043. case .oneofSint32?: try {
  1044. guard case .oneofSint32(let v)? = _storage._o else { preconditionFailure() }
  1045. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 55)
  1046. }()
  1047. case .oneofSint64?: try {
  1048. guard case .oneofSint64(let v)? = _storage._o else { preconditionFailure() }
  1049. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 56)
  1050. }()
  1051. case .oneofFixed32?: try {
  1052. guard case .oneofFixed32(let v)? = _storage._o else { preconditionFailure() }
  1053. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 57)
  1054. }()
  1055. case .oneofFixed64?: try {
  1056. guard case .oneofFixed64(let v)? = _storage._o else { preconditionFailure() }
  1057. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 58)
  1058. }()
  1059. case .oneofSfixed32?: try {
  1060. guard case .oneofSfixed32(let v)? = _storage._o else { preconditionFailure() }
  1061. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 59)
  1062. }()
  1063. case .oneofSfixed64?: try {
  1064. guard case .oneofSfixed64(let v)? = _storage._o else { preconditionFailure() }
  1065. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 60)
  1066. }()
  1067. case .oneofFloat?: try {
  1068. guard case .oneofFloat(let v)? = _storage._o else { preconditionFailure() }
  1069. try visitor.visitSingularFloatField(value: v, fieldNumber: 61)
  1070. }()
  1071. case .oneofDouble?: try {
  1072. guard case .oneofDouble(let v)? = _storage._o else { preconditionFailure() }
  1073. try visitor.visitSingularDoubleField(value: v, fieldNumber: 62)
  1074. }()
  1075. case .oneofBool?: try {
  1076. guard case .oneofBool(let v)? = _storage._o else { preconditionFailure() }
  1077. try visitor.visitSingularBoolField(value: v, fieldNumber: 63)
  1078. }()
  1079. case .oneofString?: try {
  1080. guard case .oneofString(let v)? = _storage._o else { preconditionFailure() }
  1081. try visitor.visitSingularStringField(value: v, fieldNumber: 64)
  1082. }()
  1083. case .oneofBytes?: try {
  1084. guard case .oneofBytes(let v)? = _storage._o else { preconditionFailure() }
  1085. try visitor.visitSingularBytesField(value: v, fieldNumber: 65)
  1086. }()
  1087. case .oneofMessage?: try {
  1088. guard case .oneofMessage(let v)? = _storage._o else { preconditionFailure() }
  1089. try visitor.visitSingularMessageField(value: v, fieldNumber: 68)
  1090. }()
  1091. case .oneofEnum?: try {
  1092. guard case .oneofEnum(let v)? = _storage._o else { preconditionFailure() }
  1093. try visitor.visitSingularEnumField(value: v, fieldNumber: 69)
  1094. }()
  1095. case nil: break
  1096. }
  1097. if !_storage._mapInt32Int32.isEmpty {
  1098. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 70)
  1099. }
  1100. if !_storage._mapInt64Int64.isEmpty {
  1101. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 71)
  1102. }
  1103. if !_storage._mapUint32Uint32.isEmpty {
  1104. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 72)
  1105. }
  1106. if !_storage._mapUint64Uint64.isEmpty {
  1107. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 73)
  1108. }
  1109. if !_storage._mapSint32Sint32.isEmpty {
  1110. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 74)
  1111. }
  1112. if !_storage._mapSint64Sint64.isEmpty {
  1113. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 75)
  1114. }
  1115. if !_storage._mapFixed32Fixed32.isEmpty {
  1116. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 76)
  1117. }
  1118. if !_storage._mapFixed64Fixed64.isEmpty {
  1119. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 77)
  1120. }
  1121. if !_storage._mapSfixed32Sfixed32.isEmpty {
  1122. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 78)
  1123. }
  1124. if !_storage._mapSfixed64Sfixed64.isEmpty {
  1125. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 79)
  1126. }
  1127. if !_storage._mapInt32Float.isEmpty {
  1128. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 80)
  1129. }
  1130. if !_storage._mapInt32Double.isEmpty {
  1131. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 81)
  1132. }
  1133. if !_storage._mapBoolBool.isEmpty {
  1134. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 82)
  1135. }
  1136. if !_storage._mapStringString.isEmpty {
  1137. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 83)
  1138. }
  1139. if !_storage._mapStringBytes.isEmpty {
  1140. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapStringBytes, fieldNumber: 84)
  1141. }
  1142. if !_storage._mapStringMessage.isEmpty {
  1143. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,SwiftProtoTesting_Message3>.self, value: _storage._mapStringMessage, fieldNumber: 85)
  1144. }
  1145. if !_storage._mapInt32Bytes.isEmpty {
  1146. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapInt32Bytes, fieldNumber: 86)
  1147. }
  1148. if !_storage._mapInt32Enum.isEmpty {
  1149. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,SwiftProtoTesting_Message3.Enum>.self, value: _storage._mapInt32Enum, fieldNumber: 87)
  1150. }
  1151. if !_storage._mapInt32Message.isEmpty {
  1152. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,SwiftProtoTesting_Message3>.self, value: _storage._mapInt32Message, fieldNumber: 88)
  1153. }
  1154. }
  1155. try unknownFields.traverse(visitor: &visitor)
  1156. }
  1157. static func ==(lhs: SwiftProtoTesting_Message3, rhs: SwiftProtoTesting_Message3) -> Bool {
  1158. if lhs._storage !== rhs._storage {
  1159. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  1160. let _storage = _args.0
  1161. let rhs_storage = _args.1
  1162. if _storage._optionalInt32 != rhs_storage._optionalInt32 {return false}
  1163. if _storage._optionalInt64 != rhs_storage._optionalInt64 {return false}
  1164. if _storage._optionalUint32 != rhs_storage._optionalUint32 {return false}
  1165. if _storage._optionalUint64 != rhs_storage._optionalUint64 {return false}
  1166. if _storage._optionalSint32 != rhs_storage._optionalSint32 {return false}
  1167. if _storage._optionalSint64 != rhs_storage._optionalSint64 {return false}
  1168. if _storage._optionalFixed32 != rhs_storage._optionalFixed32 {return false}
  1169. if _storage._optionalFixed64 != rhs_storage._optionalFixed64 {return false}
  1170. if _storage._optionalSfixed32 != rhs_storage._optionalSfixed32 {return false}
  1171. if _storage._optionalSfixed64 != rhs_storage._optionalSfixed64 {return false}
  1172. if _storage._optionalFloat != rhs_storage._optionalFloat {return false}
  1173. if _storage._optionalDouble != rhs_storage._optionalDouble {return false}
  1174. if _storage._optionalBool != rhs_storage._optionalBool {return false}
  1175. if _storage._optionalString != rhs_storage._optionalString {return false}
  1176. if _storage._optionalBytes != rhs_storage._optionalBytes {return false}
  1177. if _storage._optionalMessage != rhs_storage._optionalMessage {return false}
  1178. if _storage._optionalEnum != rhs_storage._optionalEnum {return false}
  1179. if _storage._repeatedInt32 != rhs_storage._repeatedInt32 {return false}
  1180. if _storage._repeatedInt64 != rhs_storage._repeatedInt64 {return false}
  1181. if _storage._repeatedUint32 != rhs_storage._repeatedUint32 {return false}
  1182. if _storage._repeatedUint64 != rhs_storage._repeatedUint64 {return false}
  1183. if _storage._repeatedSint32 != rhs_storage._repeatedSint32 {return false}
  1184. if _storage._repeatedSint64 != rhs_storage._repeatedSint64 {return false}
  1185. if _storage._repeatedFixed32 != rhs_storage._repeatedFixed32 {return false}
  1186. if _storage._repeatedFixed64 != rhs_storage._repeatedFixed64 {return false}
  1187. if _storage._repeatedSfixed32 != rhs_storage._repeatedSfixed32 {return false}
  1188. if _storage._repeatedSfixed64 != rhs_storage._repeatedSfixed64 {return false}
  1189. if _storage._repeatedFloat != rhs_storage._repeatedFloat {return false}
  1190. if _storage._repeatedDouble != rhs_storage._repeatedDouble {return false}
  1191. if _storage._repeatedBool != rhs_storage._repeatedBool {return false}
  1192. if _storage._repeatedString != rhs_storage._repeatedString {return false}
  1193. if _storage._repeatedBytes != rhs_storage._repeatedBytes {return false}
  1194. if _storage._repeatedMessage != rhs_storage._repeatedMessage {return false}
  1195. if _storage._repeatedEnum != rhs_storage._repeatedEnum {return false}
  1196. if _storage._o != rhs_storage._o {return false}
  1197. if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
  1198. if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
  1199. if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
  1200. if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
  1201. if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
  1202. if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
  1203. if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
  1204. if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
  1205. if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
  1206. if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
  1207. if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
  1208. if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
  1209. if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
  1210. if _storage._mapStringString != rhs_storage._mapStringString {return false}
  1211. if _storage._mapStringBytes != rhs_storage._mapStringBytes {return false}
  1212. if _storage._mapStringMessage != rhs_storage._mapStringMessage {return false}
  1213. if _storage._mapInt32Bytes != rhs_storage._mapInt32Bytes {return false}
  1214. if _storage._mapInt32Enum != rhs_storage._mapInt32Enum {return false}
  1215. if _storage._mapInt32Message != rhs_storage._mapInt32Message {return false}
  1216. return true
  1217. }
  1218. if !storagesAreEqual {return false}
  1219. }
  1220. if lhs.unknownFields != rhs.unknownFields {return false}
  1221. return true
  1222. }
  1223. }
  1224. extension SwiftProtoTesting_Message3.Enum: SwiftProtobuf._ProtoNameProviding {
  1225. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1226. 0: .same(proto: "FOO"),
  1227. 1: .same(proto: "BAR"),
  1228. 2: .same(proto: "BAZ"),
  1229. 30: .same(proto: "EXTRA_3"),
  1230. ]
  1231. }
  1232. extension SwiftProtoTesting_Msg3NoStorage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1233. static let protoMessageName: String = _protobuf_package + ".Msg3NoStorage"
  1234. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  1235. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1236. // Load everything into unknown fields
  1237. while try decoder.nextFieldNumber() != nil {}
  1238. }
  1239. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1240. try unknownFields.traverse(visitor: &visitor)
  1241. }
  1242. static func ==(lhs: SwiftProtoTesting_Msg3NoStorage, rhs: SwiftProtoTesting_Msg3NoStorage) -> Bool {
  1243. if lhs.unknownFields != rhs.unknownFields {return false}
  1244. return true
  1245. }
  1246. }
  1247. extension SwiftProtoTesting_Msg3UsesStorage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1248. static let protoMessageName: String = _protobuf_package + ".Msg3UsesStorage"
  1249. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1250. 999: .same(proto: "y"),
  1251. ]
  1252. fileprivate class _StorageClass {
  1253. var _y: SwiftProtoTesting_Msg3UsesStorage? = nil
  1254. // This property is used as the initial default value for new instances of the type.
  1255. // The type itself is protecting the reference to its storage via CoW semantics.
  1256. // This will force a copy to be made of this reference when the first mutation occurs;
  1257. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  1258. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  1259. private init() {}
  1260. init(copying source: _StorageClass) {
  1261. _y = source._y
  1262. }
  1263. }
  1264. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  1265. if !isKnownUniquelyReferenced(&_storage) {
  1266. _storage = _StorageClass(copying: _storage)
  1267. }
  1268. return _storage
  1269. }
  1270. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1271. _ = _uniqueStorage()
  1272. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1273. while let fieldNumber = try decoder.nextFieldNumber() {
  1274. // The use of inline closures is to circumvent an issue where the compiler
  1275. // allocates stack space for every case branch when no optimizations are
  1276. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1277. switch fieldNumber {
  1278. case 999: try { try decoder.decodeSingularMessageField(value: &_storage._y) }()
  1279. default: break
  1280. }
  1281. }
  1282. }
  1283. }
  1284. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1285. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1286. // The use of inline closures is to circumvent an issue where the compiler
  1287. // allocates stack space for every if/case branch local when no optimizations
  1288. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1289. // https://github.com/apple/swift-protobuf/issues/1182
  1290. try { if let v = _storage._y {
  1291. try visitor.visitSingularMessageField(value: v, fieldNumber: 999)
  1292. } }()
  1293. }
  1294. try unknownFields.traverse(visitor: &visitor)
  1295. }
  1296. static func ==(lhs: SwiftProtoTesting_Msg3UsesStorage, rhs: SwiftProtoTesting_Msg3UsesStorage) -> Bool {
  1297. if lhs._storage !== rhs._storage {
  1298. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  1299. let _storage = _args.0
  1300. let rhs_storage = _args.1
  1301. if _storage._y != rhs_storage._y {return false}
  1302. return true
  1303. }
  1304. if !storagesAreEqual {return false}
  1305. }
  1306. if lhs.unknownFields != rhs.unknownFields {return false}
  1307. return true
  1308. }
  1309. }
  1310. extension SwiftProtoTesting_Msg3NamesNoStorage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1311. static let protoMessageName: String = _protobuf_package + ".Msg3NamesNoStorage"
  1312. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1313. 1: .standard(proto: "is_initialized"),
  1314. 2: .standard(proto: "debug_description"),
  1315. 3: .standard(proto: "has_value"),
  1316. ]
  1317. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1318. while let fieldNumber = try decoder.nextFieldNumber() {
  1319. // The use of inline closures is to circumvent an issue where the compiler
  1320. // allocates stack space for every case branch when no optimizations are
  1321. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1322. switch fieldNumber {
  1323. case 1: try { try decoder.decodeSingularInt32Field(value: &self.isInitialized_p) }()
  1324. case 2: try { try decoder.decodeSingularInt32Field(value: &self.debugDescription_p) }()
  1325. case 3: try { try decoder.decodeSingularInt32Field(value: &self.hasValue_p) }()
  1326. default: break
  1327. }
  1328. }
  1329. }
  1330. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1331. if self.isInitialized_p != 0 {
  1332. try visitor.visitSingularInt32Field(value: self.isInitialized_p, fieldNumber: 1)
  1333. }
  1334. if self.debugDescription_p != 0 {
  1335. try visitor.visitSingularInt32Field(value: self.debugDescription_p, fieldNumber: 2)
  1336. }
  1337. if self.hasValue_p != 0 {
  1338. try visitor.visitSingularInt32Field(value: self.hasValue_p, fieldNumber: 3)
  1339. }
  1340. try unknownFields.traverse(visitor: &visitor)
  1341. }
  1342. static func ==(lhs: SwiftProtoTesting_Msg3NamesNoStorage, rhs: SwiftProtoTesting_Msg3NamesNoStorage) -> Bool {
  1343. if lhs.isInitialized_p != rhs.isInitialized_p {return false}
  1344. if lhs.debugDescription_p != rhs.debugDescription_p {return false}
  1345. if lhs.hasValue_p != rhs.hasValue_p {return false}
  1346. if lhs.unknownFields != rhs.unknownFields {return false}
  1347. return true
  1348. }
  1349. }
  1350. extension SwiftProtoTesting_Msg3NamesUsesStorage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1351. static let protoMessageName: String = _protobuf_package + ".Msg3NamesUsesStorage"
  1352. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1353. 1: .standard(proto: "is_initialized"),
  1354. 2: .standard(proto: "debug_description"),
  1355. 3: .same(proto: "value"),
  1356. ]
  1357. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1358. while let fieldNumber = try decoder.nextFieldNumber() {
  1359. // The use of inline closures is to circumvent an issue where the compiler
  1360. // allocates stack space for every case branch when no optimizations are
  1361. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1362. switch fieldNumber {
  1363. case 1: try { try decoder.decodeSingularInt32Field(value: &self.isInitialized_p) }()
  1364. case 2: try { try decoder.decodeSingularInt32Field(value: &self.debugDescription_p) }()
  1365. case 3: try { try decoder.decodeSingularMessageField(value: &self._value) }()
  1366. default: break
  1367. }
  1368. }
  1369. }
  1370. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1371. // The use of inline closures is to circumvent an issue where the compiler
  1372. // allocates stack space for every if/case branch local when no optimizations
  1373. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1374. // https://github.com/apple/swift-protobuf/issues/1182
  1375. if self.isInitialized_p != 0 {
  1376. try visitor.visitSingularInt32Field(value: self.isInitialized_p, fieldNumber: 1)
  1377. }
  1378. if self.debugDescription_p != 0 {
  1379. try visitor.visitSingularInt32Field(value: self.debugDescription_p, fieldNumber: 2)
  1380. }
  1381. try { if let v = self._value {
  1382. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  1383. } }()
  1384. try unknownFields.traverse(visitor: &visitor)
  1385. }
  1386. static func ==(lhs: SwiftProtoTesting_Msg3NamesUsesStorage, rhs: SwiftProtoTesting_Msg3NamesUsesStorage) -> Bool {
  1387. if lhs.isInitialized_p != rhs.isInitialized_p {return false}
  1388. if lhs.debugDescription_p != rhs.debugDescription_p {return false}
  1389. if lhs._value != rhs._value {return false}
  1390. if lhs.unknownFields != rhs.unknownFields {return false}
  1391. return true
  1392. }
  1393. }