unittest_swift_runtime_proto2.pb.swift 82 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855
  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_proto2.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_Message2: @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 ?? 0}
  55. set {_uniqueStorage()._optionalInt32 = newValue}
  56. }
  57. /// Returns true if `optionalInt32` has been explicitly set.
  58. var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil}
  59. /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  60. mutating func clearOptionalInt32() {_uniqueStorage()._optionalInt32 = nil}
  61. var optionalInt64: Int64 {
  62. get {return _storage._optionalInt64 ?? 0}
  63. set {_uniqueStorage()._optionalInt64 = newValue}
  64. }
  65. /// Returns true if `optionalInt64` has been explicitly set.
  66. var hasOptionalInt64: Bool {return _storage._optionalInt64 != nil}
  67. /// Clears the value of `optionalInt64`. Subsequent reads from it will return its default value.
  68. mutating func clearOptionalInt64() {_uniqueStorage()._optionalInt64 = nil}
  69. var optionalUint32: UInt32 {
  70. get {return _storage._optionalUint32 ?? 0}
  71. set {_uniqueStorage()._optionalUint32 = newValue}
  72. }
  73. /// Returns true if `optionalUint32` has been explicitly set.
  74. var hasOptionalUint32: Bool {return _storage._optionalUint32 != nil}
  75. /// Clears the value of `optionalUint32`. Subsequent reads from it will return its default value.
  76. mutating func clearOptionalUint32() {_uniqueStorage()._optionalUint32 = nil}
  77. var optionalUint64: UInt64 {
  78. get {return _storage._optionalUint64 ?? 0}
  79. set {_uniqueStorage()._optionalUint64 = newValue}
  80. }
  81. /// Returns true if `optionalUint64` has been explicitly set.
  82. var hasOptionalUint64: Bool {return _storage._optionalUint64 != nil}
  83. /// Clears the value of `optionalUint64`. Subsequent reads from it will return its default value.
  84. mutating func clearOptionalUint64() {_uniqueStorage()._optionalUint64 = nil}
  85. var optionalSint32: Int32 {
  86. get {return _storage._optionalSint32 ?? 0}
  87. set {_uniqueStorage()._optionalSint32 = newValue}
  88. }
  89. /// Returns true if `optionalSint32` has been explicitly set.
  90. var hasOptionalSint32: Bool {return _storage._optionalSint32 != nil}
  91. /// Clears the value of `optionalSint32`. Subsequent reads from it will return its default value.
  92. mutating func clearOptionalSint32() {_uniqueStorage()._optionalSint32 = nil}
  93. var optionalSint64: Int64 {
  94. get {return _storage._optionalSint64 ?? 0}
  95. set {_uniqueStorage()._optionalSint64 = newValue}
  96. }
  97. /// Returns true if `optionalSint64` has been explicitly set.
  98. var hasOptionalSint64: Bool {return _storage._optionalSint64 != nil}
  99. /// Clears the value of `optionalSint64`. Subsequent reads from it will return its default value.
  100. mutating func clearOptionalSint64() {_uniqueStorage()._optionalSint64 = nil}
  101. var optionalFixed32: UInt32 {
  102. get {return _storage._optionalFixed32 ?? 0}
  103. set {_uniqueStorage()._optionalFixed32 = newValue}
  104. }
  105. /// Returns true if `optionalFixed32` has been explicitly set.
  106. var hasOptionalFixed32: Bool {return _storage._optionalFixed32 != nil}
  107. /// Clears the value of `optionalFixed32`. Subsequent reads from it will return its default value.
  108. mutating func clearOptionalFixed32() {_uniqueStorage()._optionalFixed32 = nil}
  109. var optionalFixed64: UInt64 {
  110. get {return _storage._optionalFixed64 ?? 0}
  111. set {_uniqueStorage()._optionalFixed64 = newValue}
  112. }
  113. /// Returns true if `optionalFixed64` has been explicitly set.
  114. var hasOptionalFixed64: Bool {return _storage._optionalFixed64 != nil}
  115. /// Clears the value of `optionalFixed64`. Subsequent reads from it will return its default value.
  116. mutating func clearOptionalFixed64() {_uniqueStorage()._optionalFixed64 = nil}
  117. var optionalSfixed32: Int32 {
  118. get {return _storage._optionalSfixed32 ?? 0}
  119. set {_uniqueStorage()._optionalSfixed32 = newValue}
  120. }
  121. /// Returns true if `optionalSfixed32` has been explicitly set.
  122. var hasOptionalSfixed32: Bool {return _storage._optionalSfixed32 != nil}
  123. /// Clears the value of `optionalSfixed32`. Subsequent reads from it will return its default value.
  124. mutating func clearOptionalSfixed32() {_uniqueStorage()._optionalSfixed32 = nil}
  125. var optionalSfixed64: Int64 {
  126. get {return _storage._optionalSfixed64 ?? 0}
  127. set {_uniqueStorage()._optionalSfixed64 = newValue}
  128. }
  129. /// Returns true if `optionalSfixed64` has been explicitly set.
  130. var hasOptionalSfixed64: Bool {return _storage._optionalSfixed64 != nil}
  131. /// Clears the value of `optionalSfixed64`. Subsequent reads from it will return its default value.
  132. mutating func clearOptionalSfixed64() {_uniqueStorage()._optionalSfixed64 = nil}
  133. var optionalFloat: Float {
  134. get {return _storage._optionalFloat ?? 0}
  135. set {_uniqueStorage()._optionalFloat = newValue}
  136. }
  137. /// Returns true if `optionalFloat` has been explicitly set.
  138. var hasOptionalFloat: Bool {return _storage._optionalFloat != nil}
  139. /// Clears the value of `optionalFloat`. Subsequent reads from it will return its default value.
  140. mutating func clearOptionalFloat() {_uniqueStorage()._optionalFloat = nil}
  141. var optionalDouble: Double {
  142. get {return _storage._optionalDouble ?? 0}
  143. set {_uniqueStorage()._optionalDouble = newValue}
  144. }
  145. /// Returns true if `optionalDouble` has been explicitly set.
  146. var hasOptionalDouble: Bool {return _storage._optionalDouble != nil}
  147. /// Clears the value of `optionalDouble`. Subsequent reads from it will return its default value.
  148. mutating func clearOptionalDouble() {_uniqueStorage()._optionalDouble = nil}
  149. var optionalBool: Bool {
  150. get {return _storage._optionalBool ?? false}
  151. set {_uniqueStorage()._optionalBool = newValue}
  152. }
  153. /// Returns true if `optionalBool` has been explicitly set.
  154. var hasOptionalBool: Bool {return _storage._optionalBool != nil}
  155. /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
  156. mutating func clearOptionalBool() {_uniqueStorage()._optionalBool = nil}
  157. var optionalString: String {
  158. get {return _storage._optionalString ?? String()}
  159. set {_uniqueStorage()._optionalString = newValue}
  160. }
  161. /// Returns true if `optionalString` has been explicitly set.
  162. var hasOptionalString: Bool {return _storage._optionalString != nil}
  163. /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  164. mutating func clearOptionalString() {_uniqueStorage()._optionalString = nil}
  165. var optionalBytes: Data {
  166. get {return _storage._optionalBytes ?? Data()}
  167. set {_uniqueStorage()._optionalBytes = newValue}
  168. }
  169. /// Returns true if `optionalBytes` has been explicitly set.
  170. var hasOptionalBytes: Bool {return _storage._optionalBytes != nil}
  171. /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value.
  172. mutating func clearOptionalBytes() {_uniqueStorage()._optionalBytes = nil}
  173. var optionalGroup: SwiftProtoTesting_Message2.OptionalGroup {
  174. get {return _storage._optionalGroup ?? SwiftProtoTesting_Message2.OptionalGroup()}
  175. set {_uniqueStorage()._optionalGroup = newValue}
  176. }
  177. /// Returns true if `optionalGroup` has been explicitly set.
  178. var hasOptionalGroup: Bool {return _storage._optionalGroup != nil}
  179. /// Clears the value of `optionalGroup`. Subsequent reads from it will return its default value.
  180. mutating func clearOptionalGroup() {_uniqueStorage()._optionalGroup = nil}
  181. var optionalMessage: SwiftProtoTesting_Message2 {
  182. get {return _storage._optionalMessage ?? SwiftProtoTesting_Message2()}
  183. set {_uniqueStorage()._optionalMessage = newValue}
  184. }
  185. /// Returns true if `optionalMessage` has been explicitly set.
  186. var hasOptionalMessage: Bool {return _storage._optionalMessage != nil}
  187. /// Clears the value of `optionalMessage`. Subsequent reads from it will return its default value.
  188. mutating func clearOptionalMessage() {_uniqueStorage()._optionalMessage = nil}
  189. var optionalEnum: SwiftProtoTesting_Message2.Enum {
  190. get {return _storage._optionalEnum ?? .foo}
  191. set {_uniqueStorage()._optionalEnum = newValue}
  192. }
  193. /// Returns true if `optionalEnum` has been explicitly set.
  194. var hasOptionalEnum: Bool {return _storage._optionalEnum != nil}
  195. /// Clears the value of `optionalEnum`. Subsequent reads from it will return its default value.
  196. mutating func clearOptionalEnum() {_uniqueStorage()._optionalEnum = nil}
  197. var repeatedInt32: [Int32] {
  198. get {return _storage._repeatedInt32}
  199. set {_uniqueStorage()._repeatedInt32 = newValue}
  200. }
  201. var repeatedInt64: [Int64] {
  202. get {return _storage._repeatedInt64}
  203. set {_uniqueStorage()._repeatedInt64 = newValue}
  204. }
  205. var repeatedUint32: [UInt32] {
  206. get {return _storage._repeatedUint32}
  207. set {_uniqueStorage()._repeatedUint32 = newValue}
  208. }
  209. var repeatedUint64: [UInt64] {
  210. get {return _storage._repeatedUint64}
  211. set {_uniqueStorage()._repeatedUint64 = newValue}
  212. }
  213. var repeatedSint32: [Int32] {
  214. get {return _storage._repeatedSint32}
  215. set {_uniqueStorage()._repeatedSint32 = newValue}
  216. }
  217. var repeatedSint64: [Int64] {
  218. get {return _storage._repeatedSint64}
  219. set {_uniqueStorage()._repeatedSint64 = newValue}
  220. }
  221. var repeatedFixed32: [UInt32] {
  222. get {return _storage._repeatedFixed32}
  223. set {_uniqueStorage()._repeatedFixed32 = newValue}
  224. }
  225. var repeatedFixed64: [UInt64] {
  226. get {return _storage._repeatedFixed64}
  227. set {_uniqueStorage()._repeatedFixed64 = newValue}
  228. }
  229. var repeatedSfixed32: [Int32] {
  230. get {return _storage._repeatedSfixed32}
  231. set {_uniqueStorage()._repeatedSfixed32 = newValue}
  232. }
  233. var repeatedSfixed64: [Int64] {
  234. get {return _storage._repeatedSfixed64}
  235. set {_uniqueStorage()._repeatedSfixed64 = newValue}
  236. }
  237. var repeatedFloat: [Float] {
  238. get {return _storage._repeatedFloat}
  239. set {_uniqueStorage()._repeatedFloat = newValue}
  240. }
  241. var repeatedDouble: [Double] {
  242. get {return _storage._repeatedDouble}
  243. set {_uniqueStorage()._repeatedDouble = newValue}
  244. }
  245. var repeatedBool: [Bool] {
  246. get {return _storage._repeatedBool}
  247. set {_uniqueStorage()._repeatedBool = newValue}
  248. }
  249. var repeatedString: [String] {
  250. get {return _storage._repeatedString}
  251. set {_uniqueStorage()._repeatedString = newValue}
  252. }
  253. var repeatedBytes: [Data] {
  254. get {return _storage._repeatedBytes}
  255. set {_uniqueStorage()._repeatedBytes = newValue}
  256. }
  257. var repeatedGroup: [SwiftProtoTesting_Message2.RepeatedGroup] {
  258. get {return _storage._repeatedGroup}
  259. set {_uniqueStorage()._repeatedGroup = newValue}
  260. }
  261. var repeatedMessage: [SwiftProtoTesting_Message2] {
  262. get {return _storage._repeatedMessage}
  263. set {_uniqueStorage()._repeatedMessage = newValue}
  264. }
  265. var repeatedEnum: [SwiftProtoTesting_Message2.Enum] {
  266. get {return _storage._repeatedEnum}
  267. set {_uniqueStorage()._repeatedEnum = newValue}
  268. }
  269. var o: OneOf_O? {
  270. get {return _storage._o}
  271. set {_uniqueStorage()._o = newValue}
  272. }
  273. var oneofInt32: Int32 {
  274. get {
  275. if case .oneofInt32(let v)? = _storage._o {return v}
  276. return 100
  277. }
  278. set {_uniqueStorage()._o = .oneofInt32(newValue)}
  279. }
  280. var oneofInt64: Int64 {
  281. get {
  282. if case .oneofInt64(let v)? = _storage._o {return v}
  283. return 101
  284. }
  285. set {_uniqueStorage()._o = .oneofInt64(newValue)}
  286. }
  287. var oneofUint32: UInt32 {
  288. get {
  289. if case .oneofUint32(let v)? = _storage._o {return v}
  290. return 102
  291. }
  292. set {_uniqueStorage()._o = .oneofUint32(newValue)}
  293. }
  294. var oneofUint64: UInt64 {
  295. get {
  296. if case .oneofUint64(let v)? = _storage._o {return v}
  297. return 103
  298. }
  299. set {_uniqueStorage()._o = .oneofUint64(newValue)}
  300. }
  301. var oneofSint32: Int32 {
  302. get {
  303. if case .oneofSint32(let v)? = _storage._o {return v}
  304. return 104
  305. }
  306. set {_uniqueStorage()._o = .oneofSint32(newValue)}
  307. }
  308. var oneofSint64: Int64 {
  309. get {
  310. if case .oneofSint64(let v)? = _storage._o {return v}
  311. return 105
  312. }
  313. set {_uniqueStorage()._o = .oneofSint64(newValue)}
  314. }
  315. var oneofFixed32: UInt32 {
  316. get {
  317. if case .oneofFixed32(let v)? = _storage._o {return v}
  318. return 106
  319. }
  320. set {_uniqueStorage()._o = .oneofFixed32(newValue)}
  321. }
  322. var oneofFixed64: UInt64 {
  323. get {
  324. if case .oneofFixed64(let v)? = _storage._o {return v}
  325. return 107
  326. }
  327. set {_uniqueStorage()._o = .oneofFixed64(newValue)}
  328. }
  329. var oneofSfixed32: Int32 {
  330. get {
  331. if case .oneofSfixed32(let v)? = _storage._o {return v}
  332. return 108
  333. }
  334. set {_uniqueStorage()._o = .oneofSfixed32(newValue)}
  335. }
  336. var oneofSfixed64: Int64 {
  337. get {
  338. if case .oneofSfixed64(let v)? = _storage._o {return v}
  339. return 109
  340. }
  341. set {_uniqueStorage()._o = .oneofSfixed64(newValue)}
  342. }
  343. var oneofFloat: Float {
  344. get {
  345. if case .oneofFloat(let v)? = _storage._o {return v}
  346. return 110
  347. }
  348. set {_uniqueStorage()._o = .oneofFloat(newValue)}
  349. }
  350. var oneofDouble: Double {
  351. get {
  352. if case .oneofDouble(let v)? = _storage._o {return v}
  353. return 111
  354. }
  355. set {_uniqueStorage()._o = .oneofDouble(newValue)}
  356. }
  357. var oneofBool: Bool {
  358. get {
  359. if case .oneofBool(let v)? = _storage._o {return v}
  360. return true
  361. }
  362. set {_uniqueStorage()._o = .oneofBool(newValue)}
  363. }
  364. var oneofString: String {
  365. get {
  366. if case .oneofString(let v)? = _storage._o {return v}
  367. return "string"
  368. }
  369. set {_uniqueStorage()._o = .oneofString(newValue)}
  370. }
  371. var oneofBytes: Data {
  372. get {
  373. if case .oneofBytes(let v)? = _storage._o {return v}
  374. return Data([100, 97, 116, 97])
  375. }
  376. set {_uniqueStorage()._o = .oneofBytes(newValue)}
  377. }
  378. var oneofGroup: SwiftProtoTesting_Message2.OneofGroup {
  379. get {
  380. if case .oneofGroup(let v)? = _storage._o {return v}
  381. return SwiftProtoTesting_Message2.OneofGroup()
  382. }
  383. set {_uniqueStorage()._o = .oneofGroup(newValue)}
  384. }
  385. var oneofMessage: SwiftProtoTesting_Message2 {
  386. get {
  387. if case .oneofMessage(let v)? = _storage._o {return v}
  388. return SwiftProtoTesting_Message2()
  389. }
  390. set {_uniqueStorage()._o = .oneofMessage(newValue)}
  391. }
  392. var oneofEnum: SwiftProtoTesting_Message2.Enum {
  393. get {
  394. if case .oneofEnum(let v)? = _storage._o {return v}
  395. return .baz
  396. }
  397. set {_uniqueStorage()._o = .oneofEnum(newValue)}
  398. }
  399. /// Some token map cases, too many combinations to list them all.
  400. var mapInt32Int32: Dictionary<Int32,Int32> {
  401. get {return _storage._mapInt32Int32}
  402. set {_uniqueStorage()._mapInt32Int32 = newValue}
  403. }
  404. var mapInt64Int64: Dictionary<Int64,Int64> {
  405. get {return _storage._mapInt64Int64}
  406. set {_uniqueStorage()._mapInt64Int64 = newValue}
  407. }
  408. var mapUint32Uint32: Dictionary<UInt32,UInt32> {
  409. get {return _storage._mapUint32Uint32}
  410. set {_uniqueStorage()._mapUint32Uint32 = newValue}
  411. }
  412. var mapUint64Uint64: Dictionary<UInt64,UInt64> {
  413. get {return _storage._mapUint64Uint64}
  414. set {_uniqueStorage()._mapUint64Uint64 = newValue}
  415. }
  416. var mapSint32Sint32: Dictionary<Int32,Int32> {
  417. get {return _storage._mapSint32Sint32}
  418. set {_uniqueStorage()._mapSint32Sint32 = newValue}
  419. }
  420. var mapSint64Sint64: Dictionary<Int64,Int64> {
  421. get {return _storage._mapSint64Sint64}
  422. set {_uniqueStorage()._mapSint64Sint64 = newValue}
  423. }
  424. var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
  425. get {return _storage._mapFixed32Fixed32}
  426. set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
  427. }
  428. var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
  429. get {return _storage._mapFixed64Fixed64}
  430. set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
  431. }
  432. var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
  433. get {return _storage._mapSfixed32Sfixed32}
  434. set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
  435. }
  436. var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
  437. get {return _storage._mapSfixed64Sfixed64}
  438. set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
  439. }
  440. var mapInt32Float: Dictionary<Int32,Float> {
  441. get {return _storage._mapInt32Float}
  442. set {_uniqueStorage()._mapInt32Float = newValue}
  443. }
  444. var mapInt32Double: Dictionary<Int32,Double> {
  445. get {return _storage._mapInt32Double}
  446. set {_uniqueStorage()._mapInt32Double = newValue}
  447. }
  448. var mapBoolBool: Dictionary<Bool,Bool> {
  449. get {return _storage._mapBoolBool}
  450. set {_uniqueStorage()._mapBoolBool = newValue}
  451. }
  452. var mapStringString: Dictionary<String,String> {
  453. get {return _storage._mapStringString}
  454. set {_uniqueStorage()._mapStringString = newValue}
  455. }
  456. var mapStringBytes: Dictionary<String,Data> {
  457. get {return _storage._mapStringBytes}
  458. set {_uniqueStorage()._mapStringBytes = newValue}
  459. }
  460. var mapStringMessage: Dictionary<String,SwiftProtoTesting_Message2> {
  461. get {return _storage._mapStringMessage}
  462. set {_uniqueStorage()._mapStringMessage = newValue}
  463. }
  464. var mapInt32Bytes: Dictionary<Int32,Data> {
  465. get {return _storage._mapInt32Bytes}
  466. set {_uniqueStorage()._mapInt32Bytes = newValue}
  467. }
  468. var mapInt32Enum: Dictionary<Int32,SwiftProtoTesting_Message2.Enum> {
  469. get {return _storage._mapInt32Enum}
  470. set {_uniqueStorage()._mapInt32Enum = newValue}
  471. }
  472. var mapInt32Message: Dictionary<Int32,SwiftProtoTesting_Message2> {
  473. get {return _storage._mapInt32Message}
  474. set {_uniqueStorage()._mapInt32Message = newValue}
  475. }
  476. var unknownFields = SwiftProtobuf.UnknownStorage()
  477. enum OneOf_O: Equatable, @unchecked Sendable {
  478. case oneofInt32(Int32)
  479. case oneofInt64(Int64)
  480. case oneofUint32(UInt32)
  481. case oneofUint64(UInt64)
  482. case oneofSint32(Int32)
  483. case oneofSint64(Int64)
  484. case oneofFixed32(UInt32)
  485. case oneofFixed64(UInt64)
  486. case oneofSfixed32(Int32)
  487. case oneofSfixed64(Int64)
  488. case oneofFloat(Float)
  489. case oneofDouble(Double)
  490. case oneofBool(Bool)
  491. case oneofString(String)
  492. case oneofBytes(Data)
  493. case oneofGroup(SwiftProtoTesting_Message2.OneofGroup)
  494. case oneofMessage(SwiftProtoTesting_Message2)
  495. case oneofEnum(SwiftProtoTesting_Message2.Enum)
  496. }
  497. enum Enum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  498. case foo = 0
  499. case bar = 1
  500. case baz = 2
  501. case extra2 = 20
  502. init() {
  503. self = .foo
  504. }
  505. }
  506. struct OptionalGroup: Sendable {
  507. // SwiftProtobuf.Message conformance is added in an extension below. See the
  508. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  509. // methods supported on all messages.
  510. var a: Int32 {
  511. get {return _a ?? 0}
  512. set {_a = newValue}
  513. }
  514. /// Returns true if `a` has been explicitly set.
  515. var hasA: Bool {return self._a != nil}
  516. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  517. mutating func clearA() {self._a = nil}
  518. var unknownFields = SwiftProtobuf.UnknownStorage()
  519. init() {}
  520. fileprivate var _a: Int32? = nil
  521. }
  522. struct RepeatedGroup: Sendable {
  523. // SwiftProtobuf.Message conformance is added in an extension below. See the
  524. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  525. // methods supported on all messages.
  526. var a: Int32 {
  527. get {return _a ?? 0}
  528. set {_a = newValue}
  529. }
  530. /// Returns true if `a` has been explicitly set.
  531. var hasA: Bool {return self._a != nil}
  532. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  533. mutating func clearA() {self._a = nil}
  534. var unknownFields = SwiftProtobuf.UnknownStorage()
  535. init() {}
  536. fileprivate var _a: Int32? = nil
  537. }
  538. struct OneofGroup: Sendable {
  539. // SwiftProtobuf.Message conformance is added in an extension below. See the
  540. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  541. // methods supported on all messages.
  542. var a: Int32 {
  543. get {return _a ?? 116}
  544. set {_a = newValue}
  545. }
  546. /// Returns true if `a` has been explicitly set.
  547. var hasA: Bool {return self._a != nil}
  548. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  549. mutating func clearA() {self._a = nil}
  550. var b: Int32 {
  551. get {return _b ?? 0}
  552. set {_b = newValue}
  553. }
  554. /// Returns true if `b` has been explicitly set.
  555. var hasB: Bool {return self._b != nil}
  556. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  557. mutating func clearB() {self._b = nil}
  558. var unknownFields = SwiftProtobuf.UnknownStorage()
  559. init() {}
  560. fileprivate var _a: Int32? = nil
  561. fileprivate var _b: Int32? = nil
  562. }
  563. init() {}
  564. fileprivate var _storage = _StorageClass.defaultInstance
  565. }
  566. struct SwiftProtoTesting_Msg2NoStorage: Sendable {
  567. // SwiftProtobuf.Message conformance is added in an extension below. See the
  568. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  569. // methods supported on all messages.
  570. var unknownFields = SwiftProtobuf.UnknownStorage()
  571. init() {}
  572. }
  573. struct SwiftProtoTesting_Msg2UsesStorage: @unchecked Sendable {
  574. // SwiftProtobuf.Message conformance is added in an extension below. See the
  575. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  576. // methods supported on all messages.
  577. /// Recursive class (i.e. - can build a graph), forces _StorageClass.
  578. var y: SwiftProtoTesting_Msg2UsesStorage {
  579. get {return _storage._y ?? SwiftProtoTesting_Msg2UsesStorage()}
  580. set {_uniqueStorage()._y = newValue}
  581. }
  582. /// Returns true if `y` has been explicitly set.
  583. var hasY: Bool {return _storage._y != nil}
  584. /// Clears the value of `y`. Subsequent reads from it will return its default value.
  585. mutating func clearY() {_uniqueStorage()._y = nil}
  586. var unknownFields = SwiftProtobuf.UnknownStorage()
  587. init() {}
  588. fileprivate var _storage = _StorageClass.defaultInstance
  589. }
  590. /// Names that match protocols - No Storage
  591. struct SwiftProtoTesting_Msg2NamesNoStorage: Sendable {
  592. // SwiftProtobuf.Message conformance is added in an extension below. See the
  593. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  594. // methods supported on all messages.
  595. var isInitialized_p: Int32 {
  596. get {return _isInitialized_p ?? 0}
  597. set {_isInitialized_p = newValue}
  598. }
  599. /// Returns true if `isInitialized_p` has been explicitly set.
  600. var hasIsInitialized_p: Bool {return self._isInitialized_p != nil}
  601. /// Clears the value of `isInitialized_p`. Subsequent reads from it will return its default value.
  602. mutating func clearIsInitialized_p() {self._isInitialized_p = nil}
  603. var debugDescription_p: Int32 {
  604. get {return _debugDescription_p ?? 0}
  605. set {_debugDescription_p = newValue}
  606. }
  607. /// Returns true if `debugDescription_p` has been explicitly set.
  608. var hasDebugDescription_p: Bool {return self._debugDescription_p != nil}
  609. /// Clears the value of `debugDescription_p`. Subsequent reads from it will return its default value.
  610. mutating func clearDebugDescription_p() {self._debugDescription_p = nil}
  611. var value: Int32 {
  612. get {return _value ?? 0}
  613. set {_value = newValue}
  614. }
  615. /// Returns true if `value` has been explicitly set.
  616. var hasValue: Bool {return self._value != nil}
  617. /// Clears the value of `value`. Subsequent reads from it will return its default value.
  618. mutating func clearValue() {self._value = nil}
  619. var unknownFields = SwiftProtobuf.UnknownStorage()
  620. init() {}
  621. fileprivate var _isInitialized_p: Int32? = nil
  622. fileprivate var _debugDescription_p: Int32? = nil
  623. fileprivate var _value: Int32? = nil
  624. }
  625. /// Names that match protocols - Storage
  626. struct SwiftProtoTesting_Msg2NamesUsesStorage: Sendable {
  627. // SwiftProtobuf.Message conformance is added in an extension below. See the
  628. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  629. // methods supported on all messages.
  630. var isInitialized_p: Int32 {
  631. get {return _isInitialized_p ?? 0}
  632. set {_isInitialized_p = newValue}
  633. }
  634. /// Returns true if `isInitialized_p` has been explicitly set.
  635. var hasIsInitialized_p: Bool {return self._isInitialized_p != nil}
  636. /// Clears the value of `isInitialized_p`. Subsequent reads from it will return its default value.
  637. mutating func clearIsInitialized_p() {self._isInitialized_p = nil}
  638. var debugDescription_p: Int32 {
  639. get {return _debugDescription_p ?? 0}
  640. set {_debugDescription_p = newValue}
  641. }
  642. /// Returns true if `debugDescription_p` has been explicitly set.
  643. var hasDebugDescription_p: Bool {return self._debugDescription_p != nil}
  644. /// Clears the value of `debugDescription_p`. Subsequent reads from it will return its default value.
  645. mutating func clearDebugDescription_p() {self._debugDescription_p = nil}
  646. /// Recursive class, forces _StorageClass
  647. var value: SwiftProtoTesting_Msg2UsesStorage {
  648. get {return _value ?? SwiftProtoTesting_Msg2UsesStorage()}
  649. set {_value = newValue}
  650. }
  651. /// Returns true if `value` has been explicitly set.
  652. var hasValue: Bool {return self._value != nil}
  653. /// Clears the value of `value`. Subsequent reads from it will return its default value.
  654. mutating func clearValue() {self._value = nil}
  655. var unknownFields = SwiftProtobuf.UnknownStorage()
  656. init() {}
  657. fileprivate var _isInitialized_p: Int32? = nil
  658. fileprivate var _debugDescription_p: Int32? = nil
  659. fileprivate var _value: SwiftProtoTesting_Msg2UsesStorage? = nil
  660. }
  661. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  662. fileprivate let _protobuf_package = "swift_proto_testing"
  663. extension SwiftProtoTesting_Message2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  664. static let protoMessageName: String = _protobuf_package + ".Message2"
  665. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  666. 1: .standard(proto: "optional_int32"),
  667. 2: .standard(proto: "optional_int64"),
  668. 3: .standard(proto: "optional_uint32"),
  669. 4: .standard(proto: "optional_uint64"),
  670. 5: .standard(proto: "optional_sint32"),
  671. 6: .standard(proto: "optional_sint64"),
  672. 7: .standard(proto: "optional_fixed32"),
  673. 8: .standard(proto: "optional_fixed64"),
  674. 9: .standard(proto: "optional_sfixed32"),
  675. 10: .standard(proto: "optional_sfixed64"),
  676. 11: .standard(proto: "optional_float"),
  677. 12: .standard(proto: "optional_double"),
  678. 13: .standard(proto: "optional_bool"),
  679. 14: .standard(proto: "optional_string"),
  680. 15: .standard(proto: "optional_bytes"),
  681. 16: .same(proto: "optionalgroup"),
  682. 16: .unique(proto: "OptionalGroup", json: "optionalgroup"),
  683. 18: .standard(proto: "optional_message"),
  684. 19: .standard(proto: "optional_enum"),
  685. 31: .standard(proto: "repeated_int32"),
  686. 32: .standard(proto: "repeated_int64"),
  687. 33: .standard(proto: "repeated_uint32"),
  688. 34: .standard(proto: "repeated_uint64"),
  689. 35: .standard(proto: "repeated_sint32"),
  690. 36: .standard(proto: "repeated_sint64"),
  691. 37: .standard(proto: "repeated_fixed32"),
  692. 38: .standard(proto: "repeated_fixed64"),
  693. 39: .standard(proto: "repeated_sfixed32"),
  694. 40: .standard(proto: "repeated_sfixed64"),
  695. 41: .standard(proto: "repeated_float"),
  696. 42: .standard(proto: "repeated_double"),
  697. 43: .standard(proto: "repeated_bool"),
  698. 44: .standard(proto: "repeated_string"),
  699. 45: .standard(proto: "repeated_bytes"),
  700. 46: .same(proto: "repeatedgroup"),
  701. 46: .unique(proto: "RepeatedGroup", json: "repeatedgroup"),
  702. 48: .standard(proto: "repeated_message"),
  703. 49: .standard(proto: "repeated_enum"),
  704. 51: .standard(proto: "oneof_int32"),
  705. 52: .standard(proto: "oneof_int64"),
  706. 53: .standard(proto: "oneof_uint32"),
  707. 54: .standard(proto: "oneof_uint64"),
  708. 55: .standard(proto: "oneof_sint32"),
  709. 56: .standard(proto: "oneof_sint64"),
  710. 57: .standard(proto: "oneof_fixed32"),
  711. 58: .standard(proto: "oneof_fixed64"),
  712. 59: .standard(proto: "oneof_sfixed32"),
  713. 60: .standard(proto: "oneof_sfixed64"),
  714. 61: .standard(proto: "oneof_float"),
  715. 62: .standard(proto: "oneof_double"),
  716. 63: .standard(proto: "oneof_bool"),
  717. 64: .standard(proto: "oneof_string"),
  718. 65: .standard(proto: "oneof_bytes"),
  719. 66: .same(proto: "oneofgroup"),
  720. 66: .unique(proto: "OneofGroup", json: "oneofgroup"),
  721. 68: .standard(proto: "oneof_message"),
  722. 69: .standard(proto: "oneof_enum"),
  723. 70: .standard(proto: "map_int32_int32"),
  724. 71: .standard(proto: "map_int64_int64"),
  725. 72: .standard(proto: "map_uint32_uint32"),
  726. 73: .standard(proto: "map_uint64_uint64"),
  727. 74: .standard(proto: "map_sint32_sint32"),
  728. 75: .standard(proto: "map_sint64_sint64"),
  729. 76: .standard(proto: "map_fixed32_fixed32"),
  730. 77: .standard(proto: "map_fixed64_fixed64"),
  731. 78: .standard(proto: "map_sfixed32_sfixed32"),
  732. 79: .standard(proto: "map_sfixed64_sfixed64"),
  733. 80: .standard(proto: "map_int32_float"),
  734. 81: .standard(proto: "map_int32_double"),
  735. 82: .standard(proto: "map_bool_bool"),
  736. 83: .standard(proto: "map_string_string"),
  737. 84: .standard(proto: "map_string_bytes"),
  738. 85: .standard(proto: "map_string_message"),
  739. 86: .standard(proto: "map_int32_bytes"),
  740. 87: .standard(proto: "map_int32_enum"),
  741. 88: .standard(proto: "map_int32_message"),
  742. ]
  743. fileprivate class _StorageClass {
  744. var _optionalInt32: Int32? = nil
  745. var _optionalInt64: Int64? = nil
  746. var _optionalUint32: UInt32? = nil
  747. var _optionalUint64: UInt64? = nil
  748. var _optionalSint32: Int32? = nil
  749. var _optionalSint64: Int64? = nil
  750. var _optionalFixed32: UInt32? = nil
  751. var _optionalFixed64: UInt64? = nil
  752. var _optionalSfixed32: Int32? = nil
  753. var _optionalSfixed64: Int64? = nil
  754. var _optionalFloat: Float? = nil
  755. var _optionalDouble: Double? = nil
  756. var _optionalBool: Bool? = nil
  757. var _optionalString: String? = nil
  758. var _optionalBytes: Data? = nil
  759. var _optionalGroup: SwiftProtoTesting_Message2.OptionalGroup? = nil
  760. var _optionalMessage: SwiftProtoTesting_Message2? = nil
  761. var _optionalEnum: SwiftProtoTesting_Message2.Enum? = nil
  762. var _repeatedInt32: [Int32] = []
  763. var _repeatedInt64: [Int64] = []
  764. var _repeatedUint32: [UInt32] = []
  765. var _repeatedUint64: [UInt64] = []
  766. var _repeatedSint32: [Int32] = []
  767. var _repeatedSint64: [Int64] = []
  768. var _repeatedFixed32: [UInt32] = []
  769. var _repeatedFixed64: [UInt64] = []
  770. var _repeatedSfixed32: [Int32] = []
  771. var _repeatedSfixed64: [Int64] = []
  772. var _repeatedFloat: [Float] = []
  773. var _repeatedDouble: [Double] = []
  774. var _repeatedBool: [Bool] = []
  775. var _repeatedString: [String] = []
  776. var _repeatedBytes: [Data] = []
  777. var _repeatedGroup: [SwiftProtoTesting_Message2.RepeatedGroup] = []
  778. var _repeatedMessage: [SwiftProtoTesting_Message2] = []
  779. var _repeatedEnum: [SwiftProtoTesting_Message2.Enum] = []
  780. var _o: SwiftProtoTesting_Message2.OneOf_O?
  781. var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
  782. var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
  783. var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
  784. var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
  785. var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
  786. var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
  787. var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
  788. var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
  789. var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
  790. var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
  791. var _mapInt32Float: Dictionary<Int32,Float> = [:]
  792. var _mapInt32Double: Dictionary<Int32,Double> = [:]
  793. var _mapBoolBool: Dictionary<Bool,Bool> = [:]
  794. var _mapStringString: Dictionary<String,String> = [:]
  795. var _mapStringBytes: Dictionary<String,Data> = [:]
  796. var _mapStringMessage: Dictionary<String,SwiftProtoTesting_Message2> = [:]
  797. var _mapInt32Bytes: Dictionary<Int32,Data> = [:]
  798. var _mapInt32Enum: Dictionary<Int32,SwiftProtoTesting_Message2.Enum> = [:]
  799. var _mapInt32Message: Dictionary<Int32,SwiftProtoTesting_Message2> = [:]
  800. // This property is used as the initial default value for new instances of the type.
  801. // The type itself is protecting the reference to its storage via CoW semantics.
  802. // This will force a copy to be made of this reference when the first mutation occurs;
  803. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  804. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  805. private init() {}
  806. init(copying source: _StorageClass) {
  807. _optionalInt32 = source._optionalInt32
  808. _optionalInt64 = source._optionalInt64
  809. _optionalUint32 = source._optionalUint32
  810. _optionalUint64 = source._optionalUint64
  811. _optionalSint32 = source._optionalSint32
  812. _optionalSint64 = source._optionalSint64
  813. _optionalFixed32 = source._optionalFixed32
  814. _optionalFixed64 = source._optionalFixed64
  815. _optionalSfixed32 = source._optionalSfixed32
  816. _optionalSfixed64 = source._optionalSfixed64
  817. _optionalFloat = source._optionalFloat
  818. _optionalDouble = source._optionalDouble
  819. _optionalBool = source._optionalBool
  820. _optionalString = source._optionalString
  821. _optionalBytes = source._optionalBytes
  822. _optionalGroup = source._optionalGroup
  823. _optionalMessage = source._optionalMessage
  824. _optionalEnum = source._optionalEnum
  825. _repeatedInt32 = source._repeatedInt32
  826. _repeatedInt64 = source._repeatedInt64
  827. _repeatedUint32 = source._repeatedUint32
  828. _repeatedUint64 = source._repeatedUint64
  829. _repeatedSint32 = source._repeatedSint32
  830. _repeatedSint64 = source._repeatedSint64
  831. _repeatedFixed32 = source._repeatedFixed32
  832. _repeatedFixed64 = source._repeatedFixed64
  833. _repeatedSfixed32 = source._repeatedSfixed32
  834. _repeatedSfixed64 = source._repeatedSfixed64
  835. _repeatedFloat = source._repeatedFloat
  836. _repeatedDouble = source._repeatedDouble
  837. _repeatedBool = source._repeatedBool
  838. _repeatedString = source._repeatedString
  839. _repeatedBytes = source._repeatedBytes
  840. _repeatedGroup = source._repeatedGroup
  841. _repeatedMessage = source._repeatedMessage
  842. _repeatedEnum = source._repeatedEnum
  843. _o = source._o
  844. _mapInt32Int32 = source._mapInt32Int32
  845. _mapInt64Int64 = source._mapInt64Int64
  846. _mapUint32Uint32 = source._mapUint32Uint32
  847. _mapUint64Uint64 = source._mapUint64Uint64
  848. _mapSint32Sint32 = source._mapSint32Sint32
  849. _mapSint64Sint64 = source._mapSint64Sint64
  850. _mapFixed32Fixed32 = source._mapFixed32Fixed32
  851. _mapFixed64Fixed64 = source._mapFixed64Fixed64
  852. _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
  853. _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
  854. _mapInt32Float = source._mapInt32Float
  855. _mapInt32Double = source._mapInt32Double
  856. _mapBoolBool = source._mapBoolBool
  857. _mapStringString = source._mapStringString
  858. _mapStringBytes = source._mapStringBytes
  859. _mapStringMessage = source._mapStringMessage
  860. _mapInt32Bytes = source._mapInt32Bytes
  861. _mapInt32Enum = source._mapInt32Enum
  862. _mapInt32Message = source._mapInt32Message
  863. }
  864. }
  865. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  866. if !isKnownUniquelyReferenced(&_storage) {
  867. _storage = _StorageClass(copying: _storage)
  868. }
  869. return _storage
  870. }
  871. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  872. _ = _uniqueStorage()
  873. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  874. while let fieldNumber = try decoder.nextFieldNumber() {
  875. // The use of inline closures is to circumvent an issue where the compiler
  876. // allocates stack space for every case branch when no optimizations are
  877. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  878. switch fieldNumber {
  879. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) }()
  880. case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) }()
  881. case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) }()
  882. case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) }()
  883. case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) }()
  884. case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) }()
  885. case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) }()
  886. case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) }()
  887. case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) }()
  888. case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) }()
  889. case 11: try { try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) }()
  890. case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) }()
  891. case 13: try { try decoder.decodeSingularBoolField(value: &_storage._optionalBool) }()
  892. case 14: try { try decoder.decodeSingularStringField(value: &_storage._optionalString) }()
  893. case 15: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) }()
  894. case 16: try { try decoder.decodeSingularGroupField(value: &_storage._optionalGroup) }()
  895. case 18: try { try decoder.decodeSingularMessageField(value: &_storage._optionalMessage) }()
  896. case 19: try { try decoder.decodeSingularEnumField(value: &_storage._optionalEnum) }()
  897. case 31: try { try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) }()
  898. case 32: try { try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) }()
  899. case 33: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) }()
  900. case 34: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) }()
  901. case 35: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) }()
  902. case 36: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) }()
  903. case 37: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) }()
  904. case 38: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) }()
  905. case 39: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) }()
  906. case 40: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) }()
  907. case 41: try { try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) }()
  908. case 42: try { try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) }()
  909. case 43: try { try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) }()
  910. case 44: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) }()
  911. case 45: try { try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) }()
  912. case 46: try { try decoder.decodeRepeatedGroupField(value: &_storage._repeatedGroup) }()
  913. case 48: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedMessage) }()
  914. case 49: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedEnum) }()
  915. case 51: try {
  916. var v: Int32?
  917. try decoder.decodeSingularInt32Field(value: &v)
  918. if let v = v {
  919. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  920. _storage._o = .oneofInt32(v)
  921. }
  922. }()
  923. case 52: try {
  924. var v: Int64?
  925. try decoder.decodeSingularInt64Field(value: &v)
  926. if let v = v {
  927. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  928. _storage._o = .oneofInt64(v)
  929. }
  930. }()
  931. case 53: try {
  932. var v: UInt32?
  933. try decoder.decodeSingularUInt32Field(value: &v)
  934. if let v = v {
  935. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  936. _storage._o = .oneofUint32(v)
  937. }
  938. }()
  939. case 54: try {
  940. var v: UInt64?
  941. try decoder.decodeSingularUInt64Field(value: &v)
  942. if let v = v {
  943. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  944. _storage._o = .oneofUint64(v)
  945. }
  946. }()
  947. case 55: try {
  948. var v: Int32?
  949. try decoder.decodeSingularSInt32Field(value: &v)
  950. if let v = v {
  951. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  952. _storage._o = .oneofSint32(v)
  953. }
  954. }()
  955. case 56: try {
  956. var v: Int64?
  957. try decoder.decodeSingularSInt64Field(value: &v)
  958. if let v = v {
  959. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  960. _storage._o = .oneofSint64(v)
  961. }
  962. }()
  963. case 57: try {
  964. var v: UInt32?
  965. try decoder.decodeSingularFixed32Field(value: &v)
  966. if let v = v {
  967. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  968. _storage._o = .oneofFixed32(v)
  969. }
  970. }()
  971. case 58: try {
  972. var v: UInt64?
  973. try decoder.decodeSingularFixed64Field(value: &v)
  974. if let v = v {
  975. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  976. _storage._o = .oneofFixed64(v)
  977. }
  978. }()
  979. case 59: try {
  980. var v: Int32?
  981. try decoder.decodeSingularSFixed32Field(value: &v)
  982. if let v = v {
  983. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  984. _storage._o = .oneofSfixed32(v)
  985. }
  986. }()
  987. case 60: try {
  988. var v: Int64?
  989. try decoder.decodeSingularSFixed64Field(value: &v)
  990. if let v = v {
  991. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  992. _storage._o = .oneofSfixed64(v)
  993. }
  994. }()
  995. case 61: try {
  996. var v: Float?
  997. try decoder.decodeSingularFloatField(value: &v)
  998. if let v = v {
  999. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  1000. _storage._o = .oneofFloat(v)
  1001. }
  1002. }()
  1003. case 62: try {
  1004. var v: Double?
  1005. try decoder.decodeSingularDoubleField(value: &v)
  1006. if let v = v {
  1007. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  1008. _storage._o = .oneofDouble(v)
  1009. }
  1010. }()
  1011. case 63: try {
  1012. var v: Bool?
  1013. try decoder.decodeSingularBoolField(value: &v)
  1014. if let v = v {
  1015. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  1016. _storage._o = .oneofBool(v)
  1017. }
  1018. }()
  1019. case 64: try {
  1020. var v: String?
  1021. try decoder.decodeSingularStringField(value: &v)
  1022. if let v = v {
  1023. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  1024. _storage._o = .oneofString(v)
  1025. }
  1026. }()
  1027. case 65: try {
  1028. var v: Data?
  1029. try decoder.decodeSingularBytesField(value: &v)
  1030. if let v = v {
  1031. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  1032. _storage._o = .oneofBytes(v)
  1033. }
  1034. }()
  1035. case 66: try {
  1036. var v: SwiftProtoTesting_Message2.OneofGroup?
  1037. var hadOneofValue = false
  1038. if let current = _storage._o {
  1039. hadOneofValue = true
  1040. if case .oneofGroup(let m) = current {v = m}
  1041. }
  1042. try decoder.decodeSingularGroupField(value: &v)
  1043. if let v = v {
  1044. if hadOneofValue {try decoder.handleConflictingOneOf()}
  1045. _storage._o = .oneofGroup(v)
  1046. }
  1047. }()
  1048. case 68: try {
  1049. var v: SwiftProtoTesting_Message2?
  1050. var hadOneofValue = false
  1051. if let current = _storage._o {
  1052. hadOneofValue = true
  1053. if case .oneofMessage(let m) = current {v = m}
  1054. }
  1055. try decoder.decodeSingularMessageField(value: &v)
  1056. if let v = v {
  1057. if hadOneofValue {try decoder.handleConflictingOneOf()}
  1058. _storage._o = .oneofMessage(v)
  1059. }
  1060. }()
  1061. case 69: try {
  1062. var v: SwiftProtoTesting_Message2.Enum?
  1063. try decoder.decodeSingularEnumField(value: &v)
  1064. if let v = v {
  1065. if _storage._o != nil {try decoder.handleConflictingOneOf()}
  1066. _storage._o = .oneofEnum(v)
  1067. }
  1068. }()
  1069. case 70: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
  1070. case 71: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
  1071. case 72: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
  1072. case 73: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
  1073. case 74: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
  1074. case 75: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
  1075. case 76: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
  1076. case 77: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
  1077. case 78: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
  1078. case 79: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
  1079. case 80: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
  1080. case 81: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
  1081. case 82: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
  1082. case 83: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
  1083. case 84: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapStringBytes) }()
  1084. case 85: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,SwiftProtoTesting_Message2>.self, value: &_storage._mapStringMessage) }()
  1085. case 86: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapInt32Bytes) }()
  1086. case 87: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,SwiftProtoTesting_Message2.Enum>.self, value: &_storage._mapInt32Enum) }()
  1087. case 88: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,SwiftProtoTesting_Message2>.self, value: &_storage._mapInt32Message) }()
  1088. default: break
  1089. }
  1090. }
  1091. }
  1092. }
  1093. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1094. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1095. // The use of inline closures is to circumvent an issue where the compiler
  1096. // allocates stack space for every if/case branch local when no optimizations
  1097. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1098. // https://github.com/apple/swift-protobuf/issues/1182
  1099. try { if let v = _storage._optionalInt32 {
  1100. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  1101. } }()
  1102. try { if let v = _storage._optionalInt64 {
  1103. try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
  1104. } }()
  1105. try { if let v = _storage._optionalUint32 {
  1106. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
  1107. } }()
  1108. try { if let v = _storage._optionalUint64 {
  1109. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
  1110. } }()
  1111. try { if let v = _storage._optionalSint32 {
  1112. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5)
  1113. } }()
  1114. try { if let v = _storage._optionalSint64 {
  1115. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6)
  1116. } }()
  1117. try { if let v = _storage._optionalFixed32 {
  1118. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7)
  1119. } }()
  1120. try { if let v = _storage._optionalFixed64 {
  1121. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8)
  1122. } }()
  1123. try { if let v = _storage._optionalSfixed32 {
  1124. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9)
  1125. } }()
  1126. try { if let v = _storage._optionalSfixed64 {
  1127. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10)
  1128. } }()
  1129. try { if let v = _storage._optionalFloat {
  1130. try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
  1131. } }()
  1132. try { if let v = _storage._optionalDouble {
  1133. try visitor.visitSingularDoubleField(value: v, fieldNumber: 12)
  1134. } }()
  1135. try { if let v = _storage._optionalBool {
  1136. try visitor.visitSingularBoolField(value: v, fieldNumber: 13)
  1137. } }()
  1138. try { if let v = _storage._optionalString {
  1139. try visitor.visitSingularStringField(value: v, fieldNumber: 14)
  1140. } }()
  1141. try { if let v = _storage._optionalBytes {
  1142. try visitor.visitSingularBytesField(value: v, fieldNumber: 15)
  1143. } }()
  1144. try { if let v = _storage._optionalGroup {
  1145. try visitor.visitSingularGroupField(value: v, fieldNumber: 16)
  1146. } }()
  1147. try { if let v = _storage._optionalMessage {
  1148. try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
  1149. } }()
  1150. try { if let v = _storage._optionalEnum {
  1151. try visitor.visitSingularEnumField(value: v, fieldNumber: 19)
  1152. } }()
  1153. if !_storage._repeatedInt32.isEmpty {
  1154. try visitor.visitRepeatedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31)
  1155. }
  1156. if !_storage._repeatedInt64.isEmpty {
  1157. try visitor.visitRepeatedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32)
  1158. }
  1159. if !_storage._repeatedUint32.isEmpty {
  1160. try visitor.visitRepeatedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33)
  1161. }
  1162. if !_storage._repeatedUint64.isEmpty {
  1163. try visitor.visitRepeatedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34)
  1164. }
  1165. if !_storage._repeatedSint32.isEmpty {
  1166. try visitor.visitRepeatedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35)
  1167. }
  1168. if !_storage._repeatedSint64.isEmpty {
  1169. try visitor.visitRepeatedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36)
  1170. }
  1171. if !_storage._repeatedFixed32.isEmpty {
  1172. try visitor.visitRepeatedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37)
  1173. }
  1174. if !_storage._repeatedFixed64.isEmpty {
  1175. try visitor.visitRepeatedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38)
  1176. }
  1177. if !_storage._repeatedSfixed32.isEmpty {
  1178. try visitor.visitRepeatedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39)
  1179. }
  1180. if !_storage._repeatedSfixed64.isEmpty {
  1181. try visitor.visitRepeatedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40)
  1182. }
  1183. if !_storage._repeatedFloat.isEmpty {
  1184. try visitor.visitRepeatedFloatField(value: _storage._repeatedFloat, fieldNumber: 41)
  1185. }
  1186. if !_storage._repeatedDouble.isEmpty {
  1187. try visitor.visitRepeatedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42)
  1188. }
  1189. if !_storage._repeatedBool.isEmpty {
  1190. try visitor.visitRepeatedBoolField(value: _storage._repeatedBool, fieldNumber: 43)
  1191. }
  1192. if !_storage._repeatedString.isEmpty {
  1193. try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44)
  1194. }
  1195. if !_storage._repeatedBytes.isEmpty {
  1196. try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45)
  1197. }
  1198. if !_storage._repeatedGroup.isEmpty {
  1199. try visitor.visitRepeatedGroupField(value: _storage._repeatedGroup, fieldNumber: 46)
  1200. }
  1201. if !_storage._repeatedMessage.isEmpty {
  1202. try visitor.visitRepeatedMessageField(value: _storage._repeatedMessage, fieldNumber: 48)
  1203. }
  1204. if !_storage._repeatedEnum.isEmpty {
  1205. try visitor.visitRepeatedEnumField(value: _storage._repeatedEnum, fieldNumber: 49)
  1206. }
  1207. switch _storage._o {
  1208. case .oneofInt32?: try {
  1209. guard case .oneofInt32(let v)? = _storage._o else { preconditionFailure() }
  1210. try visitor.visitSingularInt32Field(value: v, fieldNumber: 51)
  1211. }()
  1212. case .oneofInt64?: try {
  1213. guard case .oneofInt64(let v)? = _storage._o else { preconditionFailure() }
  1214. try visitor.visitSingularInt64Field(value: v, fieldNumber: 52)
  1215. }()
  1216. case .oneofUint32?: try {
  1217. guard case .oneofUint32(let v)? = _storage._o else { preconditionFailure() }
  1218. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 53)
  1219. }()
  1220. case .oneofUint64?: try {
  1221. guard case .oneofUint64(let v)? = _storage._o else { preconditionFailure() }
  1222. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 54)
  1223. }()
  1224. case .oneofSint32?: try {
  1225. guard case .oneofSint32(let v)? = _storage._o else { preconditionFailure() }
  1226. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 55)
  1227. }()
  1228. case .oneofSint64?: try {
  1229. guard case .oneofSint64(let v)? = _storage._o else { preconditionFailure() }
  1230. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 56)
  1231. }()
  1232. case .oneofFixed32?: try {
  1233. guard case .oneofFixed32(let v)? = _storage._o else { preconditionFailure() }
  1234. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 57)
  1235. }()
  1236. case .oneofFixed64?: try {
  1237. guard case .oneofFixed64(let v)? = _storage._o else { preconditionFailure() }
  1238. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 58)
  1239. }()
  1240. case .oneofSfixed32?: try {
  1241. guard case .oneofSfixed32(let v)? = _storage._o else { preconditionFailure() }
  1242. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 59)
  1243. }()
  1244. case .oneofSfixed64?: try {
  1245. guard case .oneofSfixed64(let v)? = _storage._o else { preconditionFailure() }
  1246. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 60)
  1247. }()
  1248. case .oneofFloat?: try {
  1249. guard case .oneofFloat(let v)? = _storage._o else { preconditionFailure() }
  1250. try visitor.visitSingularFloatField(value: v, fieldNumber: 61)
  1251. }()
  1252. case .oneofDouble?: try {
  1253. guard case .oneofDouble(let v)? = _storage._o else { preconditionFailure() }
  1254. try visitor.visitSingularDoubleField(value: v, fieldNumber: 62)
  1255. }()
  1256. case .oneofBool?: try {
  1257. guard case .oneofBool(let v)? = _storage._o else { preconditionFailure() }
  1258. try visitor.visitSingularBoolField(value: v, fieldNumber: 63)
  1259. }()
  1260. case .oneofString?: try {
  1261. guard case .oneofString(let v)? = _storage._o else { preconditionFailure() }
  1262. try visitor.visitSingularStringField(value: v, fieldNumber: 64)
  1263. }()
  1264. case .oneofBytes?: try {
  1265. guard case .oneofBytes(let v)? = _storage._o else { preconditionFailure() }
  1266. try visitor.visitSingularBytesField(value: v, fieldNumber: 65)
  1267. }()
  1268. case .oneofGroup?: try {
  1269. guard case .oneofGroup(let v)? = _storage._o else { preconditionFailure() }
  1270. try visitor.visitSingularGroupField(value: v, fieldNumber: 66)
  1271. }()
  1272. case .oneofMessage?: try {
  1273. guard case .oneofMessage(let v)? = _storage._o else { preconditionFailure() }
  1274. try visitor.visitSingularMessageField(value: v, fieldNumber: 68)
  1275. }()
  1276. case .oneofEnum?: try {
  1277. guard case .oneofEnum(let v)? = _storage._o else { preconditionFailure() }
  1278. try visitor.visitSingularEnumField(value: v, fieldNumber: 69)
  1279. }()
  1280. case nil: break
  1281. }
  1282. if !_storage._mapInt32Int32.isEmpty {
  1283. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 70)
  1284. }
  1285. if !_storage._mapInt64Int64.isEmpty {
  1286. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 71)
  1287. }
  1288. if !_storage._mapUint32Uint32.isEmpty {
  1289. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 72)
  1290. }
  1291. if !_storage._mapUint64Uint64.isEmpty {
  1292. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 73)
  1293. }
  1294. if !_storage._mapSint32Sint32.isEmpty {
  1295. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 74)
  1296. }
  1297. if !_storage._mapSint64Sint64.isEmpty {
  1298. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 75)
  1299. }
  1300. if !_storage._mapFixed32Fixed32.isEmpty {
  1301. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 76)
  1302. }
  1303. if !_storage._mapFixed64Fixed64.isEmpty {
  1304. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 77)
  1305. }
  1306. if !_storage._mapSfixed32Sfixed32.isEmpty {
  1307. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 78)
  1308. }
  1309. if !_storage._mapSfixed64Sfixed64.isEmpty {
  1310. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 79)
  1311. }
  1312. if !_storage._mapInt32Float.isEmpty {
  1313. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 80)
  1314. }
  1315. if !_storage._mapInt32Double.isEmpty {
  1316. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 81)
  1317. }
  1318. if !_storage._mapBoolBool.isEmpty {
  1319. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 82)
  1320. }
  1321. if !_storage._mapStringString.isEmpty {
  1322. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 83)
  1323. }
  1324. if !_storage._mapStringBytes.isEmpty {
  1325. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapStringBytes, fieldNumber: 84)
  1326. }
  1327. if !_storage._mapStringMessage.isEmpty {
  1328. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,SwiftProtoTesting_Message2>.self, value: _storage._mapStringMessage, fieldNumber: 85)
  1329. }
  1330. if !_storage._mapInt32Bytes.isEmpty {
  1331. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapInt32Bytes, fieldNumber: 86)
  1332. }
  1333. if !_storage._mapInt32Enum.isEmpty {
  1334. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufInt32,SwiftProtoTesting_Message2.Enum>.self, value: _storage._mapInt32Enum, fieldNumber: 87)
  1335. }
  1336. if !_storage._mapInt32Message.isEmpty {
  1337. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,SwiftProtoTesting_Message2>.self, value: _storage._mapInt32Message, fieldNumber: 88)
  1338. }
  1339. }
  1340. try unknownFields.traverse(visitor: &visitor)
  1341. }
  1342. static func ==(lhs: SwiftProtoTesting_Message2, rhs: SwiftProtoTesting_Message2) -> Bool {
  1343. if lhs._storage !== rhs._storage {
  1344. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  1345. let _storage = _args.0
  1346. let rhs_storage = _args.1
  1347. if _storage._optionalInt32 != rhs_storage._optionalInt32 {return false}
  1348. if _storage._optionalInt64 != rhs_storage._optionalInt64 {return false}
  1349. if _storage._optionalUint32 != rhs_storage._optionalUint32 {return false}
  1350. if _storage._optionalUint64 != rhs_storage._optionalUint64 {return false}
  1351. if _storage._optionalSint32 != rhs_storage._optionalSint32 {return false}
  1352. if _storage._optionalSint64 != rhs_storage._optionalSint64 {return false}
  1353. if _storage._optionalFixed32 != rhs_storage._optionalFixed32 {return false}
  1354. if _storage._optionalFixed64 != rhs_storage._optionalFixed64 {return false}
  1355. if _storage._optionalSfixed32 != rhs_storage._optionalSfixed32 {return false}
  1356. if _storage._optionalSfixed64 != rhs_storage._optionalSfixed64 {return false}
  1357. if _storage._optionalFloat != rhs_storage._optionalFloat {return false}
  1358. if _storage._optionalDouble != rhs_storage._optionalDouble {return false}
  1359. if _storage._optionalBool != rhs_storage._optionalBool {return false}
  1360. if _storage._optionalString != rhs_storage._optionalString {return false}
  1361. if _storage._optionalBytes != rhs_storage._optionalBytes {return false}
  1362. if _storage._optionalGroup != rhs_storage._optionalGroup {return false}
  1363. if _storage._optionalMessage != rhs_storage._optionalMessage {return false}
  1364. if _storage._optionalEnum != rhs_storage._optionalEnum {return false}
  1365. if _storage._repeatedInt32 != rhs_storage._repeatedInt32 {return false}
  1366. if _storage._repeatedInt64 != rhs_storage._repeatedInt64 {return false}
  1367. if _storage._repeatedUint32 != rhs_storage._repeatedUint32 {return false}
  1368. if _storage._repeatedUint64 != rhs_storage._repeatedUint64 {return false}
  1369. if _storage._repeatedSint32 != rhs_storage._repeatedSint32 {return false}
  1370. if _storage._repeatedSint64 != rhs_storage._repeatedSint64 {return false}
  1371. if _storage._repeatedFixed32 != rhs_storage._repeatedFixed32 {return false}
  1372. if _storage._repeatedFixed64 != rhs_storage._repeatedFixed64 {return false}
  1373. if _storage._repeatedSfixed32 != rhs_storage._repeatedSfixed32 {return false}
  1374. if _storage._repeatedSfixed64 != rhs_storage._repeatedSfixed64 {return false}
  1375. if _storage._repeatedFloat != rhs_storage._repeatedFloat {return false}
  1376. if _storage._repeatedDouble != rhs_storage._repeatedDouble {return false}
  1377. if _storage._repeatedBool != rhs_storage._repeatedBool {return false}
  1378. if _storage._repeatedString != rhs_storage._repeatedString {return false}
  1379. if _storage._repeatedBytes != rhs_storage._repeatedBytes {return false}
  1380. if _storage._repeatedGroup != rhs_storage._repeatedGroup {return false}
  1381. if _storage._repeatedMessage != rhs_storage._repeatedMessage {return false}
  1382. if _storage._repeatedEnum != rhs_storage._repeatedEnum {return false}
  1383. if _storage._o != rhs_storage._o {return false}
  1384. if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
  1385. if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
  1386. if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
  1387. if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
  1388. if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
  1389. if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
  1390. if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
  1391. if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
  1392. if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
  1393. if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
  1394. if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
  1395. if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
  1396. if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
  1397. if _storage._mapStringString != rhs_storage._mapStringString {return false}
  1398. if _storage._mapStringBytes != rhs_storage._mapStringBytes {return false}
  1399. if _storage._mapStringMessage != rhs_storage._mapStringMessage {return false}
  1400. if _storage._mapInt32Bytes != rhs_storage._mapInt32Bytes {return false}
  1401. if _storage._mapInt32Enum != rhs_storage._mapInt32Enum {return false}
  1402. if _storage._mapInt32Message != rhs_storage._mapInt32Message {return false}
  1403. return true
  1404. }
  1405. if !storagesAreEqual {return false}
  1406. }
  1407. if lhs.unknownFields != rhs.unknownFields {return false}
  1408. return true
  1409. }
  1410. }
  1411. extension SwiftProtoTesting_Message2.Enum: SwiftProtobuf._ProtoNameProviding {
  1412. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1413. 0: .same(proto: "FOO"),
  1414. 1: .same(proto: "BAR"),
  1415. 2: .same(proto: "BAZ"),
  1416. 20: .same(proto: "EXTRA_2"),
  1417. ]
  1418. }
  1419. extension SwiftProtoTesting_Message2.OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1420. static let protoMessageName: String = SwiftProtoTesting_Message2.protoMessageName + ".OptionalGroup"
  1421. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1422. 17: .same(proto: "a"),
  1423. ]
  1424. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1425. while let fieldNumber = try decoder.nextFieldNumber() {
  1426. // The use of inline closures is to circumvent an issue where the compiler
  1427. // allocates stack space for every case branch when no optimizations are
  1428. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1429. switch fieldNumber {
  1430. case 17: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  1431. default: break
  1432. }
  1433. }
  1434. }
  1435. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1436. // The use of inline closures is to circumvent an issue where the compiler
  1437. // allocates stack space for every if/case branch local when no optimizations
  1438. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1439. // https://github.com/apple/swift-protobuf/issues/1182
  1440. try { if let v = self._a {
  1441. try visitor.visitSingularInt32Field(value: v, fieldNumber: 17)
  1442. } }()
  1443. try unknownFields.traverse(visitor: &visitor)
  1444. }
  1445. static func ==(lhs: SwiftProtoTesting_Message2.OptionalGroup, rhs: SwiftProtoTesting_Message2.OptionalGroup) -> Bool {
  1446. if lhs._a != rhs._a {return false}
  1447. if lhs.unknownFields != rhs.unknownFields {return false}
  1448. return true
  1449. }
  1450. }
  1451. extension SwiftProtoTesting_Message2.RepeatedGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1452. static let protoMessageName: String = SwiftProtoTesting_Message2.protoMessageName + ".RepeatedGroup"
  1453. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1454. 47: .same(proto: "a"),
  1455. ]
  1456. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1457. while let fieldNumber = try decoder.nextFieldNumber() {
  1458. // The use of inline closures is to circumvent an issue where the compiler
  1459. // allocates stack space for every case branch when no optimizations are
  1460. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1461. switch fieldNumber {
  1462. case 47: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  1463. default: break
  1464. }
  1465. }
  1466. }
  1467. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1468. // The use of inline closures is to circumvent an issue where the compiler
  1469. // allocates stack space for every if/case branch local when no optimizations
  1470. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1471. // https://github.com/apple/swift-protobuf/issues/1182
  1472. try { if let v = self._a {
  1473. try visitor.visitSingularInt32Field(value: v, fieldNumber: 47)
  1474. } }()
  1475. try unknownFields.traverse(visitor: &visitor)
  1476. }
  1477. static func ==(lhs: SwiftProtoTesting_Message2.RepeatedGroup, rhs: SwiftProtoTesting_Message2.RepeatedGroup) -> Bool {
  1478. if lhs._a != rhs._a {return false}
  1479. if lhs.unknownFields != rhs.unknownFields {return false}
  1480. return true
  1481. }
  1482. }
  1483. extension SwiftProtoTesting_Message2.OneofGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1484. static let protoMessageName: String = SwiftProtoTesting_Message2.protoMessageName + ".OneofGroup"
  1485. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1486. 67: .same(proto: "a"),
  1487. 167: .same(proto: "b"),
  1488. ]
  1489. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1490. while let fieldNumber = try decoder.nextFieldNumber() {
  1491. // The use of inline closures is to circumvent an issue where the compiler
  1492. // allocates stack space for every case branch when no optimizations are
  1493. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1494. switch fieldNumber {
  1495. case 67: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  1496. case 167: try { try decoder.decodeSingularInt32Field(value: &self._b) }()
  1497. default: break
  1498. }
  1499. }
  1500. }
  1501. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1502. // The use of inline closures is to circumvent an issue where the compiler
  1503. // allocates stack space for every if/case branch local when no optimizations
  1504. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1505. // https://github.com/apple/swift-protobuf/issues/1182
  1506. try { if let v = self._a {
  1507. try visitor.visitSingularInt32Field(value: v, fieldNumber: 67)
  1508. } }()
  1509. try { if let v = self._b {
  1510. try visitor.visitSingularInt32Field(value: v, fieldNumber: 167)
  1511. } }()
  1512. try unknownFields.traverse(visitor: &visitor)
  1513. }
  1514. static func ==(lhs: SwiftProtoTesting_Message2.OneofGroup, rhs: SwiftProtoTesting_Message2.OneofGroup) -> Bool {
  1515. if lhs._a != rhs._a {return false}
  1516. if lhs._b != rhs._b {return false}
  1517. if lhs.unknownFields != rhs.unknownFields {return false}
  1518. return true
  1519. }
  1520. }
  1521. extension SwiftProtoTesting_Msg2NoStorage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1522. static let protoMessageName: String = _protobuf_package + ".Msg2NoStorage"
  1523. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  1524. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1525. // Load everything into unknown fields
  1526. while try decoder.nextFieldNumber() != nil {}
  1527. }
  1528. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1529. try unknownFields.traverse(visitor: &visitor)
  1530. }
  1531. static func ==(lhs: SwiftProtoTesting_Msg2NoStorage, rhs: SwiftProtoTesting_Msg2NoStorage) -> Bool {
  1532. if lhs.unknownFields != rhs.unknownFields {return false}
  1533. return true
  1534. }
  1535. }
  1536. extension SwiftProtoTesting_Msg2UsesStorage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1537. static let protoMessageName: String = _protobuf_package + ".Msg2UsesStorage"
  1538. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1539. 999: .same(proto: "y"),
  1540. ]
  1541. fileprivate class _StorageClass {
  1542. var _y: SwiftProtoTesting_Msg2UsesStorage? = nil
  1543. // This property is used as the initial default value for new instances of the type.
  1544. // The type itself is protecting the reference to its storage via CoW semantics.
  1545. // This will force a copy to be made of this reference when the first mutation occurs;
  1546. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  1547. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  1548. private init() {}
  1549. init(copying source: _StorageClass) {
  1550. _y = source._y
  1551. }
  1552. }
  1553. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  1554. if !isKnownUniquelyReferenced(&_storage) {
  1555. _storage = _StorageClass(copying: _storage)
  1556. }
  1557. return _storage
  1558. }
  1559. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1560. _ = _uniqueStorage()
  1561. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1562. while let fieldNumber = try decoder.nextFieldNumber() {
  1563. // The use of inline closures is to circumvent an issue where the compiler
  1564. // allocates stack space for every case branch when no optimizations are
  1565. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1566. switch fieldNumber {
  1567. case 999: try { try decoder.decodeSingularMessageField(value: &_storage._y) }()
  1568. default: break
  1569. }
  1570. }
  1571. }
  1572. }
  1573. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1574. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1575. // The use of inline closures is to circumvent an issue where the compiler
  1576. // allocates stack space for every if/case branch local when no optimizations
  1577. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1578. // https://github.com/apple/swift-protobuf/issues/1182
  1579. try { if let v = _storage._y {
  1580. try visitor.visitSingularMessageField(value: v, fieldNumber: 999)
  1581. } }()
  1582. }
  1583. try unknownFields.traverse(visitor: &visitor)
  1584. }
  1585. static func ==(lhs: SwiftProtoTesting_Msg2UsesStorage, rhs: SwiftProtoTesting_Msg2UsesStorage) -> Bool {
  1586. if lhs._storage !== rhs._storage {
  1587. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  1588. let _storage = _args.0
  1589. let rhs_storage = _args.1
  1590. if _storage._y != rhs_storage._y {return false}
  1591. return true
  1592. }
  1593. if !storagesAreEqual {return false}
  1594. }
  1595. if lhs.unknownFields != rhs.unknownFields {return false}
  1596. return true
  1597. }
  1598. }
  1599. extension SwiftProtoTesting_Msg2NamesNoStorage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1600. static let protoMessageName: String = _protobuf_package + ".Msg2NamesNoStorage"
  1601. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1602. 1: .standard(proto: "is_initialized"),
  1603. 2: .standard(proto: "debug_description"),
  1604. 3: .same(proto: "value"),
  1605. ]
  1606. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1607. while let fieldNumber = try decoder.nextFieldNumber() {
  1608. // The use of inline closures is to circumvent an issue where the compiler
  1609. // allocates stack space for every case branch when no optimizations are
  1610. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1611. switch fieldNumber {
  1612. case 1: try { try decoder.decodeSingularInt32Field(value: &self._isInitialized_p) }()
  1613. case 2: try { try decoder.decodeSingularInt32Field(value: &self._debugDescription_p) }()
  1614. case 3: try { try decoder.decodeSingularInt32Field(value: &self._value) }()
  1615. default: break
  1616. }
  1617. }
  1618. }
  1619. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1620. // The use of inline closures is to circumvent an issue where the compiler
  1621. // allocates stack space for every if/case branch local when no optimizations
  1622. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1623. // https://github.com/apple/swift-protobuf/issues/1182
  1624. try { if let v = self._isInitialized_p {
  1625. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  1626. } }()
  1627. try { if let v = self._debugDescription_p {
  1628. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  1629. } }()
  1630. try { if let v = self._value {
  1631. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  1632. } }()
  1633. try unknownFields.traverse(visitor: &visitor)
  1634. }
  1635. static func ==(lhs: SwiftProtoTesting_Msg2NamesNoStorage, rhs: SwiftProtoTesting_Msg2NamesNoStorage) -> Bool {
  1636. if lhs._isInitialized_p != rhs._isInitialized_p {return false}
  1637. if lhs._debugDescription_p != rhs._debugDescription_p {return false}
  1638. if lhs._value != rhs._value {return false}
  1639. if lhs.unknownFields != rhs.unknownFields {return false}
  1640. return true
  1641. }
  1642. }
  1643. extension SwiftProtoTesting_Msg2NamesUsesStorage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1644. static let protoMessageName: String = _protobuf_package + ".Msg2NamesUsesStorage"
  1645. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1646. 1: .standard(proto: "is_initialized"),
  1647. 2: .standard(proto: "debug_description"),
  1648. 3: .same(proto: "value"),
  1649. ]
  1650. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1651. while let fieldNumber = try decoder.nextFieldNumber() {
  1652. // The use of inline closures is to circumvent an issue where the compiler
  1653. // allocates stack space for every case branch when no optimizations are
  1654. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1655. switch fieldNumber {
  1656. case 1: try { try decoder.decodeSingularInt32Field(value: &self._isInitialized_p) }()
  1657. case 2: try { try decoder.decodeSingularInt32Field(value: &self._debugDescription_p) }()
  1658. case 3: try { try decoder.decodeSingularMessageField(value: &self._value) }()
  1659. default: break
  1660. }
  1661. }
  1662. }
  1663. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1664. // The use of inline closures is to circumvent an issue where the compiler
  1665. // allocates stack space for every if/case branch local when no optimizations
  1666. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1667. // https://github.com/apple/swift-protobuf/issues/1182
  1668. try { if let v = self._isInitialized_p {
  1669. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  1670. } }()
  1671. try { if let v = self._debugDescription_p {
  1672. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  1673. } }()
  1674. try { if let v = self._value {
  1675. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  1676. } }()
  1677. try unknownFields.traverse(visitor: &visitor)
  1678. }
  1679. static func ==(lhs: SwiftProtoTesting_Msg2NamesUsesStorage, rhs: SwiftProtoTesting_Msg2NamesUsesStorage) -> Bool {
  1680. if lhs._isInitialized_p != rhs._isInitialized_p {return false}
  1681. if lhs._debugDescription_p != rhs._debugDescription_p {return false}
  1682. if lhs._value != rhs._value {return false}
  1683. if lhs.unknownFields != rhs.unknownFields {return false}
  1684. return true
  1685. }
  1686. }