test_messages_edition2023.pb.swift 104 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197
  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: conformance/test_protos/test_messages_edition2023.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 2024 Google Inc. All rights reserved.
  12. //
  13. // Use of this source code is governed by a BSD-style
  14. // license that can be found in the LICENSE file or at
  15. // https://developers.google.com/open-source/licenses/bsd
  16. import Foundation
  17. import SwiftProtobuf
  18. // If the compiler emits an error on this type, it is because this file
  19. // was generated by a version of the `protoc` Swift plug-in that is
  20. // incompatible with the version of SwiftProtobuf to which you are linking.
  21. // Please ensure that you are building against the same version of the API
  22. // that was used to generate this file.
  23. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  24. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  25. typealias Version = _2
  26. }
  27. enum ProtobufTestMessages_Editions_ForeignEnumEdition2023: SwiftProtobuf.Enum, Swift.CaseIterable {
  28. typealias RawValue = Int
  29. case foreignFoo // = 0
  30. case foreignBar // = 1
  31. case foreignBaz // = 2
  32. case UNRECOGNIZED(Int)
  33. init() {
  34. self = .foreignFoo
  35. }
  36. init?(rawValue: Int) {
  37. switch rawValue {
  38. case 0: self = .foreignFoo
  39. case 1: self = .foreignBar
  40. case 2: self = .foreignBaz
  41. default: self = .UNRECOGNIZED(rawValue)
  42. }
  43. }
  44. var rawValue: Int {
  45. switch self {
  46. case .foreignFoo: return 0
  47. case .foreignBar: return 1
  48. case .foreignBaz: return 2
  49. case .UNRECOGNIZED(let i): return i
  50. }
  51. }
  52. // The compiler won't synthesize support with the UNRECOGNIZED case.
  53. static let allCases: [ProtobufTestMessages_Editions_ForeignEnumEdition2023] = [
  54. .foreignFoo,
  55. .foreignBar,
  56. .foreignBaz,
  57. ]
  58. }
  59. struct ProtobufTestMessages_Editions_ComplexMessage: Sendable {
  60. // SwiftProtobuf.Message conformance is added in an extension below. See the
  61. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  62. // methods supported on all messages.
  63. var d: Int32 {
  64. get {return _d ?? 0}
  65. set {_d = newValue}
  66. }
  67. /// Returns true if `d` has been explicitly set.
  68. var hasD: Bool {return self._d != nil}
  69. /// Clears the value of `d`. Subsequent reads from it will return its default value.
  70. mutating func clearD() {self._d = nil}
  71. var unknownFields = SwiftProtobuf.UnknownStorage()
  72. init() {}
  73. fileprivate var _d: Int32? = nil
  74. }
  75. struct ProtobufTestMessages_Editions_TestAllTypesEdition2023: SwiftProtobuf.ExtensibleMessage, @unchecked Sendable {
  76. // SwiftProtobuf.Message conformance is added in an extension below. See the
  77. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  78. // methods supported on all messages.
  79. /// Singular
  80. var optionalInt32: Int32 {
  81. get {return _storage._optionalInt32 ?? 0}
  82. set {_uniqueStorage()._optionalInt32 = newValue}
  83. }
  84. /// Returns true if `optionalInt32` has been explicitly set.
  85. var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil}
  86. /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  87. mutating func clearOptionalInt32() {_uniqueStorage()._optionalInt32 = nil}
  88. var optionalInt64: Int64 {
  89. get {return _storage._optionalInt64 ?? 0}
  90. set {_uniqueStorage()._optionalInt64 = newValue}
  91. }
  92. /// Returns true if `optionalInt64` has been explicitly set.
  93. var hasOptionalInt64: Bool {return _storage._optionalInt64 != nil}
  94. /// Clears the value of `optionalInt64`. Subsequent reads from it will return its default value.
  95. mutating func clearOptionalInt64() {_uniqueStorage()._optionalInt64 = nil}
  96. var optionalUint32: UInt32 {
  97. get {return _storage._optionalUint32 ?? 0}
  98. set {_uniqueStorage()._optionalUint32 = newValue}
  99. }
  100. /// Returns true if `optionalUint32` has been explicitly set.
  101. var hasOptionalUint32: Bool {return _storage._optionalUint32 != nil}
  102. /// Clears the value of `optionalUint32`. Subsequent reads from it will return its default value.
  103. mutating func clearOptionalUint32() {_uniqueStorage()._optionalUint32 = nil}
  104. var optionalUint64: UInt64 {
  105. get {return _storage._optionalUint64 ?? 0}
  106. set {_uniqueStorage()._optionalUint64 = newValue}
  107. }
  108. /// Returns true if `optionalUint64` has been explicitly set.
  109. var hasOptionalUint64: Bool {return _storage._optionalUint64 != nil}
  110. /// Clears the value of `optionalUint64`. Subsequent reads from it will return its default value.
  111. mutating func clearOptionalUint64() {_uniqueStorage()._optionalUint64 = nil}
  112. var optionalSint32: Int32 {
  113. get {return _storage._optionalSint32 ?? 0}
  114. set {_uniqueStorage()._optionalSint32 = newValue}
  115. }
  116. /// Returns true if `optionalSint32` has been explicitly set.
  117. var hasOptionalSint32: Bool {return _storage._optionalSint32 != nil}
  118. /// Clears the value of `optionalSint32`. Subsequent reads from it will return its default value.
  119. mutating func clearOptionalSint32() {_uniqueStorage()._optionalSint32 = nil}
  120. var optionalSint64: Int64 {
  121. get {return _storage._optionalSint64 ?? 0}
  122. set {_uniqueStorage()._optionalSint64 = newValue}
  123. }
  124. /// Returns true if `optionalSint64` has been explicitly set.
  125. var hasOptionalSint64: Bool {return _storage._optionalSint64 != nil}
  126. /// Clears the value of `optionalSint64`. Subsequent reads from it will return its default value.
  127. mutating func clearOptionalSint64() {_uniqueStorage()._optionalSint64 = nil}
  128. var optionalFixed32: UInt32 {
  129. get {return _storage._optionalFixed32 ?? 0}
  130. set {_uniqueStorage()._optionalFixed32 = newValue}
  131. }
  132. /// Returns true if `optionalFixed32` has been explicitly set.
  133. var hasOptionalFixed32: Bool {return _storage._optionalFixed32 != nil}
  134. /// Clears the value of `optionalFixed32`. Subsequent reads from it will return its default value.
  135. mutating func clearOptionalFixed32() {_uniqueStorage()._optionalFixed32 = nil}
  136. var optionalFixed64: UInt64 {
  137. get {return _storage._optionalFixed64 ?? 0}
  138. set {_uniqueStorage()._optionalFixed64 = newValue}
  139. }
  140. /// Returns true if `optionalFixed64` has been explicitly set.
  141. var hasOptionalFixed64: Bool {return _storage._optionalFixed64 != nil}
  142. /// Clears the value of `optionalFixed64`. Subsequent reads from it will return its default value.
  143. mutating func clearOptionalFixed64() {_uniqueStorage()._optionalFixed64 = nil}
  144. var optionalSfixed32: Int32 {
  145. get {return _storage._optionalSfixed32 ?? 0}
  146. set {_uniqueStorage()._optionalSfixed32 = newValue}
  147. }
  148. /// Returns true if `optionalSfixed32` has been explicitly set.
  149. var hasOptionalSfixed32: Bool {return _storage._optionalSfixed32 != nil}
  150. /// Clears the value of `optionalSfixed32`. Subsequent reads from it will return its default value.
  151. mutating func clearOptionalSfixed32() {_uniqueStorage()._optionalSfixed32 = nil}
  152. var optionalSfixed64: Int64 {
  153. get {return _storage._optionalSfixed64 ?? 0}
  154. set {_uniqueStorage()._optionalSfixed64 = newValue}
  155. }
  156. /// Returns true if `optionalSfixed64` has been explicitly set.
  157. var hasOptionalSfixed64: Bool {return _storage._optionalSfixed64 != nil}
  158. /// Clears the value of `optionalSfixed64`. Subsequent reads from it will return its default value.
  159. mutating func clearOptionalSfixed64() {_uniqueStorage()._optionalSfixed64 = nil}
  160. var optionalFloat: Float {
  161. get {return _storage._optionalFloat ?? 0}
  162. set {_uniqueStorage()._optionalFloat = newValue}
  163. }
  164. /// Returns true if `optionalFloat` has been explicitly set.
  165. var hasOptionalFloat: Bool {return _storage._optionalFloat != nil}
  166. /// Clears the value of `optionalFloat`. Subsequent reads from it will return its default value.
  167. mutating func clearOptionalFloat() {_uniqueStorage()._optionalFloat = nil}
  168. var optionalDouble: Double {
  169. get {return _storage._optionalDouble ?? 0}
  170. set {_uniqueStorage()._optionalDouble = newValue}
  171. }
  172. /// Returns true if `optionalDouble` has been explicitly set.
  173. var hasOptionalDouble: Bool {return _storage._optionalDouble != nil}
  174. /// Clears the value of `optionalDouble`. Subsequent reads from it will return its default value.
  175. mutating func clearOptionalDouble() {_uniqueStorage()._optionalDouble = nil}
  176. var optionalBool: Bool {
  177. get {return _storage._optionalBool ?? false}
  178. set {_uniqueStorage()._optionalBool = newValue}
  179. }
  180. /// Returns true if `optionalBool` has been explicitly set.
  181. var hasOptionalBool: Bool {return _storage._optionalBool != nil}
  182. /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
  183. mutating func clearOptionalBool() {_uniqueStorage()._optionalBool = nil}
  184. var optionalString: String {
  185. get {return _storage._optionalString ?? String()}
  186. set {_uniqueStorage()._optionalString = newValue}
  187. }
  188. /// Returns true if `optionalString` has been explicitly set.
  189. var hasOptionalString: Bool {return _storage._optionalString != nil}
  190. /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  191. mutating func clearOptionalString() {_uniqueStorage()._optionalString = nil}
  192. var optionalBytes: Data {
  193. get {return _storage._optionalBytes ?? Data()}
  194. set {_uniqueStorage()._optionalBytes = newValue}
  195. }
  196. /// Returns true if `optionalBytes` has been explicitly set.
  197. var hasOptionalBytes: Bool {return _storage._optionalBytes != nil}
  198. /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value.
  199. mutating func clearOptionalBytes() {_uniqueStorage()._optionalBytes = nil}
  200. var optionalNestedMessage: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage {
  201. get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage()}
  202. set {_uniqueStorage()._optionalNestedMessage = newValue}
  203. }
  204. /// Returns true if `optionalNestedMessage` has been explicitly set.
  205. var hasOptionalNestedMessage: Bool {return _storage._optionalNestedMessage != nil}
  206. /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value.
  207. mutating func clearOptionalNestedMessage() {_uniqueStorage()._optionalNestedMessage = nil}
  208. var optionalForeignMessage: ProtobufTestMessages_Editions_ForeignMessageEdition2023 {
  209. get {return _storage._optionalForeignMessage ?? ProtobufTestMessages_Editions_ForeignMessageEdition2023()}
  210. set {_uniqueStorage()._optionalForeignMessage = newValue}
  211. }
  212. /// Returns true if `optionalForeignMessage` has been explicitly set.
  213. var hasOptionalForeignMessage: Bool {return _storage._optionalForeignMessage != nil}
  214. /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value.
  215. mutating func clearOptionalForeignMessage() {_uniqueStorage()._optionalForeignMessage = nil}
  216. var optionalNestedEnum: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum {
  217. get {return _storage._optionalNestedEnum ?? .foo}
  218. set {_uniqueStorage()._optionalNestedEnum = newValue}
  219. }
  220. /// Returns true if `optionalNestedEnum` has been explicitly set.
  221. var hasOptionalNestedEnum: Bool {return _storage._optionalNestedEnum != nil}
  222. /// Clears the value of `optionalNestedEnum`. Subsequent reads from it will return its default value.
  223. mutating func clearOptionalNestedEnum() {_uniqueStorage()._optionalNestedEnum = nil}
  224. var optionalForeignEnum: ProtobufTestMessages_Editions_ForeignEnumEdition2023 {
  225. get {return _storage._optionalForeignEnum ?? .foreignFoo}
  226. set {_uniqueStorage()._optionalForeignEnum = newValue}
  227. }
  228. /// Returns true if `optionalForeignEnum` has been explicitly set.
  229. var hasOptionalForeignEnum: Bool {return _storage._optionalForeignEnum != nil}
  230. /// Clears the value of `optionalForeignEnum`. Subsequent reads from it will return its default value.
  231. mutating func clearOptionalForeignEnum() {_uniqueStorage()._optionalForeignEnum = nil}
  232. var optionalStringPiece: String {
  233. get {return _storage._optionalStringPiece ?? String()}
  234. set {_uniqueStorage()._optionalStringPiece = newValue}
  235. }
  236. /// Returns true if `optionalStringPiece` has been explicitly set.
  237. var hasOptionalStringPiece: Bool {return _storage._optionalStringPiece != nil}
  238. /// Clears the value of `optionalStringPiece`. Subsequent reads from it will return its default value.
  239. mutating func clearOptionalStringPiece() {_uniqueStorage()._optionalStringPiece = nil}
  240. var optionalCord: String {
  241. get {return _storage._optionalCord ?? String()}
  242. set {_uniqueStorage()._optionalCord = newValue}
  243. }
  244. /// Returns true if `optionalCord` has been explicitly set.
  245. var hasOptionalCord: Bool {return _storage._optionalCord != nil}
  246. /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value.
  247. mutating func clearOptionalCord() {_uniqueStorage()._optionalCord = nil}
  248. var recursiveMessage: ProtobufTestMessages_Editions_TestAllTypesEdition2023 {
  249. get {return _storage._recursiveMessage ?? ProtobufTestMessages_Editions_TestAllTypesEdition2023()}
  250. set {_uniqueStorage()._recursiveMessage = newValue}
  251. }
  252. /// Returns true if `recursiveMessage` has been explicitly set.
  253. var hasRecursiveMessage: Bool {return _storage._recursiveMessage != nil}
  254. /// Clears the value of `recursiveMessage`. Subsequent reads from it will return its default value.
  255. mutating func clearRecursiveMessage() {_uniqueStorage()._recursiveMessage = nil}
  256. /// Repeated
  257. var repeatedInt32: [Int32] {
  258. get {return _storage._repeatedInt32}
  259. set {_uniqueStorage()._repeatedInt32 = newValue}
  260. }
  261. var repeatedInt64: [Int64] {
  262. get {return _storage._repeatedInt64}
  263. set {_uniqueStorage()._repeatedInt64 = newValue}
  264. }
  265. var repeatedUint32: [UInt32] {
  266. get {return _storage._repeatedUint32}
  267. set {_uniqueStorage()._repeatedUint32 = newValue}
  268. }
  269. var repeatedUint64: [UInt64] {
  270. get {return _storage._repeatedUint64}
  271. set {_uniqueStorage()._repeatedUint64 = newValue}
  272. }
  273. var repeatedSint32: [Int32] {
  274. get {return _storage._repeatedSint32}
  275. set {_uniqueStorage()._repeatedSint32 = newValue}
  276. }
  277. var repeatedSint64: [Int64] {
  278. get {return _storage._repeatedSint64}
  279. set {_uniqueStorage()._repeatedSint64 = newValue}
  280. }
  281. var repeatedFixed32: [UInt32] {
  282. get {return _storage._repeatedFixed32}
  283. set {_uniqueStorage()._repeatedFixed32 = newValue}
  284. }
  285. var repeatedFixed64: [UInt64] {
  286. get {return _storage._repeatedFixed64}
  287. set {_uniqueStorage()._repeatedFixed64 = newValue}
  288. }
  289. var repeatedSfixed32: [Int32] {
  290. get {return _storage._repeatedSfixed32}
  291. set {_uniqueStorage()._repeatedSfixed32 = newValue}
  292. }
  293. var repeatedSfixed64: [Int64] {
  294. get {return _storage._repeatedSfixed64}
  295. set {_uniqueStorage()._repeatedSfixed64 = newValue}
  296. }
  297. var repeatedFloat: [Float] {
  298. get {return _storage._repeatedFloat}
  299. set {_uniqueStorage()._repeatedFloat = newValue}
  300. }
  301. var repeatedDouble: [Double] {
  302. get {return _storage._repeatedDouble}
  303. set {_uniqueStorage()._repeatedDouble = newValue}
  304. }
  305. var repeatedBool: [Bool] {
  306. get {return _storage._repeatedBool}
  307. set {_uniqueStorage()._repeatedBool = newValue}
  308. }
  309. var repeatedString: [String] {
  310. get {return _storage._repeatedString}
  311. set {_uniqueStorage()._repeatedString = newValue}
  312. }
  313. var repeatedBytes: [Data] {
  314. get {return _storage._repeatedBytes}
  315. set {_uniqueStorage()._repeatedBytes = newValue}
  316. }
  317. var repeatedNestedMessage: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage] {
  318. get {return _storage._repeatedNestedMessage}
  319. set {_uniqueStorage()._repeatedNestedMessage = newValue}
  320. }
  321. var repeatedForeignMessage: [ProtobufTestMessages_Editions_ForeignMessageEdition2023] {
  322. get {return _storage._repeatedForeignMessage}
  323. set {_uniqueStorage()._repeatedForeignMessage = newValue}
  324. }
  325. var repeatedNestedEnum: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum] {
  326. get {return _storage._repeatedNestedEnum}
  327. set {_uniqueStorage()._repeatedNestedEnum = newValue}
  328. }
  329. var repeatedForeignEnum: [ProtobufTestMessages_Editions_ForeignEnumEdition2023] {
  330. get {return _storage._repeatedForeignEnum}
  331. set {_uniqueStorage()._repeatedForeignEnum = newValue}
  332. }
  333. var repeatedStringPiece: [String] {
  334. get {return _storage._repeatedStringPiece}
  335. set {_uniqueStorage()._repeatedStringPiece = newValue}
  336. }
  337. var repeatedCord: [String] {
  338. get {return _storage._repeatedCord}
  339. set {_uniqueStorage()._repeatedCord = newValue}
  340. }
  341. /// Packed
  342. var packedInt32: [Int32] {
  343. get {return _storage._packedInt32}
  344. set {_uniqueStorage()._packedInt32 = newValue}
  345. }
  346. var packedInt64: [Int64] {
  347. get {return _storage._packedInt64}
  348. set {_uniqueStorage()._packedInt64 = newValue}
  349. }
  350. var packedUint32: [UInt32] {
  351. get {return _storage._packedUint32}
  352. set {_uniqueStorage()._packedUint32 = newValue}
  353. }
  354. var packedUint64: [UInt64] {
  355. get {return _storage._packedUint64}
  356. set {_uniqueStorage()._packedUint64 = newValue}
  357. }
  358. var packedSint32: [Int32] {
  359. get {return _storage._packedSint32}
  360. set {_uniqueStorage()._packedSint32 = newValue}
  361. }
  362. var packedSint64: [Int64] {
  363. get {return _storage._packedSint64}
  364. set {_uniqueStorage()._packedSint64 = newValue}
  365. }
  366. var packedFixed32: [UInt32] {
  367. get {return _storage._packedFixed32}
  368. set {_uniqueStorage()._packedFixed32 = newValue}
  369. }
  370. var packedFixed64: [UInt64] {
  371. get {return _storage._packedFixed64}
  372. set {_uniqueStorage()._packedFixed64 = newValue}
  373. }
  374. var packedSfixed32: [Int32] {
  375. get {return _storage._packedSfixed32}
  376. set {_uniqueStorage()._packedSfixed32 = newValue}
  377. }
  378. var packedSfixed64: [Int64] {
  379. get {return _storage._packedSfixed64}
  380. set {_uniqueStorage()._packedSfixed64 = newValue}
  381. }
  382. var packedFloat: [Float] {
  383. get {return _storage._packedFloat}
  384. set {_uniqueStorage()._packedFloat = newValue}
  385. }
  386. var packedDouble: [Double] {
  387. get {return _storage._packedDouble}
  388. set {_uniqueStorage()._packedDouble = newValue}
  389. }
  390. var packedBool: [Bool] {
  391. get {return _storage._packedBool}
  392. set {_uniqueStorage()._packedBool = newValue}
  393. }
  394. var packedNestedEnum: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum] {
  395. get {return _storage._packedNestedEnum}
  396. set {_uniqueStorage()._packedNestedEnum = newValue}
  397. }
  398. /// Unpacked
  399. var unpackedInt32: [Int32] {
  400. get {return _storage._unpackedInt32}
  401. set {_uniqueStorage()._unpackedInt32 = newValue}
  402. }
  403. var unpackedInt64: [Int64] {
  404. get {return _storage._unpackedInt64}
  405. set {_uniqueStorage()._unpackedInt64 = newValue}
  406. }
  407. var unpackedUint32: [UInt32] {
  408. get {return _storage._unpackedUint32}
  409. set {_uniqueStorage()._unpackedUint32 = newValue}
  410. }
  411. var unpackedUint64: [UInt64] {
  412. get {return _storage._unpackedUint64}
  413. set {_uniqueStorage()._unpackedUint64 = newValue}
  414. }
  415. var unpackedSint32: [Int32] {
  416. get {return _storage._unpackedSint32}
  417. set {_uniqueStorage()._unpackedSint32 = newValue}
  418. }
  419. var unpackedSint64: [Int64] {
  420. get {return _storage._unpackedSint64}
  421. set {_uniqueStorage()._unpackedSint64 = newValue}
  422. }
  423. var unpackedFixed32: [UInt32] {
  424. get {return _storage._unpackedFixed32}
  425. set {_uniqueStorage()._unpackedFixed32 = newValue}
  426. }
  427. var unpackedFixed64: [UInt64] {
  428. get {return _storage._unpackedFixed64}
  429. set {_uniqueStorage()._unpackedFixed64 = newValue}
  430. }
  431. var unpackedSfixed32: [Int32] {
  432. get {return _storage._unpackedSfixed32}
  433. set {_uniqueStorage()._unpackedSfixed32 = newValue}
  434. }
  435. var unpackedSfixed64: [Int64] {
  436. get {return _storage._unpackedSfixed64}
  437. set {_uniqueStorage()._unpackedSfixed64 = newValue}
  438. }
  439. var unpackedFloat: [Float] {
  440. get {return _storage._unpackedFloat}
  441. set {_uniqueStorage()._unpackedFloat = newValue}
  442. }
  443. var unpackedDouble: [Double] {
  444. get {return _storage._unpackedDouble}
  445. set {_uniqueStorage()._unpackedDouble = newValue}
  446. }
  447. var unpackedBool: [Bool] {
  448. get {return _storage._unpackedBool}
  449. set {_uniqueStorage()._unpackedBool = newValue}
  450. }
  451. var unpackedNestedEnum: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum] {
  452. get {return _storage._unpackedNestedEnum}
  453. set {_uniqueStorage()._unpackedNestedEnum = newValue}
  454. }
  455. /// Map
  456. var mapInt32Int32: Dictionary<Int32,Int32> {
  457. get {return _storage._mapInt32Int32}
  458. set {_uniqueStorage()._mapInt32Int32 = newValue}
  459. }
  460. var mapInt64Int64: Dictionary<Int64,Int64> {
  461. get {return _storage._mapInt64Int64}
  462. set {_uniqueStorage()._mapInt64Int64 = newValue}
  463. }
  464. var mapUint32Uint32: Dictionary<UInt32,UInt32> {
  465. get {return _storage._mapUint32Uint32}
  466. set {_uniqueStorage()._mapUint32Uint32 = newValue}
  467. }
  468. var mapUint64Uint64: Dictionary<UInt64,UInt64> {
  469. get {return _storage._mapUint64Uint64}
  470. set {_uniqueStorage()._mapUint64Uint64 = newValue}
  471. }
  472. var mapSint32Sint32: Dictionary<Int32,Int32> {
  473. get {return _storage._mapSint32Sint32}
  474. set {_uniqueStorage()._mapSint32Sint32 = newValue}
  475. }
  476. var mapSint64Sint64: Dictionary<Int64,Int64> {
  477. get {return _storage._mapSint64Sint64}
  478. set {_uniqueStorage()._mapSint64Sint64 = newValue}
  479. }
  480. var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
  481. get {return _storage._mapFixed32Fixed32}
  482. set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
  483. }
  484. var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
  485. get {return _storage._mapFixed64Fixed64}
  486. set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
  487. }
  488. var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
  489. get {return _storage._mapSfixed32Sfixed32}
  490. set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
  491. }
  492. var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
  493. get {return _storage._mapSfixed64Sfixed64}
  494. set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
  495. }
  496. var mapInt32Float: Dictionary<Int32,Float> {
  497. get {return _storage._mapInt32Float}
  498. set {_uniqueStorage()._mapInt32Float = newValue}
  499. }
  500. var mapInt32Double: Dictionary<Int32,Double> {
  501. get {return _storage._mapInt32Double}
  502. set {_uniqueStorage()._mapInt32Double = newValue}
  503. }
  504. var mapBoolBool: Dictionary<Bool,Bool> {
  505. get {return _storage._mapBoolBool}
  506. set {_uniqueStorage()._mapBoolBool = newValue}
  507. }
  508. var mapStringString: Dictionary<String,String> {
  509. get {return _storage._mapStringString}
  510. set {_uniqueStorage()._mapStringString = newValue}
  511. }
  512. var mapStringBytes: Dictionary<String,Data> {
  513. get {return _storage._mapStringBytes}
  514. set {_uniqueStorage()._mapStringBytes = newValue}
  515. }
  516. var mapStringNestedMessage: Dictionary<String,ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage> {
  517. get {return _storage._mapStringNestedMessage}
  518. set {_uniqueStorage()._mapStringNestedMessage = newValue}
  519. }
  520. var mapStringForeignMessage: Dictionary<String,ProtobufTestMessages_Editions_ForeignMessageEdition2023> {
  521. get {return _storage._mapStringForeignMessage}
  522. set {_uniqueStorage()._mapStringForeignMessage = newValue}
  523. }
  524. var mapStringNestedEnum: Dictionary<String,ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum> {
  525. get {return _storage._mapStringNestedEnum}
  526. set {_uniqueStorage()._mapStringNestedEnum = newValue}
  527. }
  528. var mapStringForeignEnum: Dictionary<String,ProtobufTestMessages_Editions_ForeignEnumEdition2023> {
  529. get {return _storage._mapStringForeignEnum}
  530. set {_uniqueStorage()._mapStringForeignEnum = newValue}
  531. }
  532. var oneofField: OneOf_OneofField? {
  533. get {return _storage._oneofField}
  534. set {_uniqueStorage()._oneofField = newValue}
  535. }
  536. var oneofUint32: UInt32 {
  537. get {
  538. if case .oneofUint32(let v)? = _storage._oneofField {return v}
  539. return 0
  540. }
  541. set {_uniqueStorage()._oneofField = .oneofUint32(newValue)}
  542. }
  543. var oneofNestedMessage: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage {
  544. get {
  545. if case .oneofNestedMessage(let v)? = _storage._oneofField {return v}
  546. return ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage()
  547. }
  548. set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)}
  549. }
  550. var oneofString: String {
  551. get {
  552. if case .oneofString(let v)? = _storage._oneofField {return v}
  553. return String()
  554. }
  555. set {_uniqueStorage()._oneofField = .oneofString(newValue)}
  556. }
  557. var oneofBytes: Data {
  558. get {
  559. if case .oneofBytes(let v)? = _storage._oneofField {return v}
  560. return Data()
  561. }
  562. set {_uniqueStorage()._oneofField = .oneofBytes(newValue)}
  563. }
  564. var oneofBool: Bool {
  565. get {
  566. if case .oneofBool(let v)? = _storage._oneofField {return v}
  567. return false
  568. }
  569. set {_uniqueStorage()._oneofField = .oneofBool(newValue)}
  570. }
  571. var oneofUint64: UInt64 {
  572. get {
  573. if case .oneofUint64(let v)? = _storage._oneofField {return v}
  574. return 0
  575. }
  576. set {_uniqueStorage()._oneofField = .oneofUint64(newValue)}
  577. }
  578. var oneofFloat: Float {
  579. get {
  580. if case .oneofFloat(let v)? = _storage._oneofField {return v}
  581. return 0
  582. }
  583. set {_uniqueStorage()._oneofField = .oneofFloat(newValue)}
  584. }
  585. var oneofDouble: Double {
  586. get {
  587. if case .oneofDouble(let v)? = _storage._oneofField {return v}
  588. return 0
  589. }
  590. set {_uniqueStorage()._oneofField = .oneofDouble(newValue)}
  591. }
  592. var oneofEnum: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum {
  593. get {
  594. if case .oneofEnum(let v)? = _storage._oneofField {return v}
  595. return .foo
  596. }
  597. set {_uniqueStorage()._oneofField = .oneofEnum(newValue)}
  598. }
  599. var groupLikeType: ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType {
  600. get {return _storage._groupLikeType ?? ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType()}
  601. set {_uniqueStorage()._groupLikeType = newValue}
  602. }
  603. /// Returns true if `groupLikeType` has been explicitly set.
  604. var hasGroupLikeType: Bool {return _storage._groupLikeType != nil}
  605. /// Clears the value of `groupLikeType`. Subsequent reads from it will return its default value.
  606. mutating func clearGroupLikeType() {_uniqueStorage()._groupLikeType = nil}
  607. var delimitedField: ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType {
  608. get {return _storage._delimitedField ?? ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType()}
  609. set {_uniqueStorage()._delimitedField = newValue}
  610. }
  611. /// Returns true if `delimitedField` has been explicitly set.
  612. var hasDelimitedField: Bool {return _storage._delimitedField != nil}
  613. /// Clears the value of `delimitedField`. Subsequent reads from it will return its default value.
  614. mutating func clearDelimitedField() {_uniqueStorage()._delimitedField = nil}
  615. var unknownFields = SwiftProtobuf.UnknownStorage()
  616. enum OneOf_OneofField: Equatable, @unchecked Sendable {
  617. case oneofUint32(UInt32)
  618. case oneofNestedMessage(ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage)
  619. case oneofString(String)
  620. case oneofBytes(Data)
  621. case oneofBool(Bool)
  622. case oneofUint64(UInt64)
  623. case oneofFloat(Float)
  624. case oneofDouble(Double)
  625. case oneofEnum(ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum)
  626. fileprivate var isInitialized: Bool {
  627. guard case .oneofNestedMessage(let v) = self else {return true}
  628. return v.isInitialized
  629. }
  630. }
  631. enum NestedEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
  632. typealias RawValue = Int
  633. case foo // = 0
  634. case bar // = 1
  635. case baz // = 2
  636. /// Intentionally negative.
  637. case neg // = -1
  638. case UNRECOGNIZED(Int)
  639. init() {
  640. self = .foo
  641. }
  642. init?(rawValue: Int) {
  643. switch rawValue {
  644. case -1: self = .neg
  645. case 0: self = .foo
  646. case 1: self = .bar
  647. case 2: self = .baz
  648. default: self = .UNRECOGNIZED(rawValue)
  649. }
  650. }
  651. var rawValue: Int {
  652. switch self {
  653. case .neg: return -1
  654. case .foo: return 0
  655. case .bar: return 1
  656. case .baz: return 2
  657. case .UNRECOGNIZED(let i): return i
  658. }
  659. }
  660. // The compiler won't synthesize support with the UNRECOGNIZED case.
  661. static let allCases: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum] = [
  662. .foo,
  663. .bar,
  664. .baz,
  665. .neg,
  666. ]
  667. }
  668. struct NestedMessage: @unchecked Sendable {
  669. // SwiftProtobuf.Message conformance is added in an extension below. See the
  670. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  671. // methods supported on all messages.
  672. var a: Int32 {
  673. get {return _storage._a ?? 0}
  674. set {_uniqueStorage()._a = newValue}
  675. }
  676. /// Returns true if `a` has been explicitly set.
  677. var hasA: Bool {return _storage._a != nil}
  678. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  679. mutating func clearA() {_uniqueStorage()._a = nil}
  680. var corecursive: ProtobufTestMessages_Editions_TestAllTypesEdition2023 {
  681. get {return _storage._corecursive ?? ProtobufTestMessages_Editions_TestAllTypesEdition2023()}
  682. set {_uniqueStorage()._corecursive = newValue}
  683. }
  684. /// Returns true if `corecursive` has been explicitly set.
  685. var hasCorecursive: Bool {return _storage._corecursive != nil}
  686. /// Clears the value of `corecursive`. Subsequent reads from it will return its default value.
  687. mutating func clearCorecursive() {_uniqueStorage()._corecursive = nil}
  688. var unknownFields = SwiftProtobuf.UnknownStorage()
  689. init() {}
  690. fileprivate var _storage = _StorageClass.defaultInstance
  691. }
  692. /// groups
  693. struct GroupLikeType: Sendable {
  694. // SwiftProtobuf.Message conformance is added in an extension below. See the
  695. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  696. // methods supported on all messages.
  697. var groupInt32: Int32 {
  698. get {return _groupInt32 ?? 0}
  699. set {_groupInt32 = newValue}
  700. }
  701. /// Returns true if `groupInt32` has been explicitly set.
  702. var hasGroupInt32: Bool {return self._groupInt32 != nil}
  703. /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value.
  704. mutating func clearGroupInt32() {self._groupInt32 = nil}
  705. var groupUint32: UInt32 {
  706. get {return _groupUint32 ?? 0}
  707. set {_groupUint32 = newValue}
  708. }
  709. /// Returns true if `groupUint32` has been explicitly set.
  710. var hasGroupUint32: Bool {return self._groupUint32 != nil}
  711. /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value.
  712. mutating func clearGroupUint32() {self._groupUint32 = nil}
  713. var unknownFields = SwiftProtobuf.UnknownStorage()
  714. init() {}
  715. fileprivate var _groupInt32: Int32? = nil
  716. fileprivate var _groupUint32: UInt32? = nil
  717. }
  718. init() {}
  719. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  720. fileprivate var _storage = _StorageClass.defaultInstance
  721. }
  722. struct ProtobufTestMessages_Editions_ForeignMessageEdition2023: Sendable {
  723. // SwiftProtobuf.Message conformance is added in an extension below. See the
  724. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  725. // methods supported on all messages.
  726. var c: Int32 {
  727. get {return _c ?? 0}
  728. set {_c = newValue}
  729. }
  730. /// Returns true if `c` has been explicitly set.
  731. var hasC: Bool {return self._c != nil}
  732. /// Clears the value of `c`. Subsequent reads from it will return its default value.
  733. mutating func clearC() {self._c = nil}
  734. var unknownFields = SwiftProtobuf.UnknownStorage()
  735. init() {}
  736. fileprivate var _c: Int32? = nil
  737. }
  738. struct ProtobufTestMessages_Editions_GroupLikeType: Sendable {
  739. // SwiftProtobuf.Message conformance is added in an extension below. See the
  740. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  741. // methods supported on all messages.
  742. var c: Int32 {
  743. get {return _c ?? 0}
  744. set {_c = newValue}
  745. }
  746. /// Returns true if `c` has been explicitly set.
  747. var hasC: Bool {return self._c != nil}
  748. /// Clears the value of `c`. Subsequent reads from it will return its default value.
  749. mutating func clearC() {self._c = nil}
  750. var unknownFields = SwiftProtobuf.UnknownStorage()
  751. init() {}
  752. fileprivate var _c: Int32? = nil
  753. }
  754. // MARK: - Extension support defined in test_messages_edition2023.proto.
  755. // MARK: - Extension Properties
  756. // Swift Extensions on the extended Messages to add easy access to the declared
  757. // extension fields. The names are based on the extension field name from the proto
  758. // declaration. To avoid naming collisions, the names are prefixed with the name of
  759. // the scope where the extend directive occurs.
  760. extension ProtobufTestMessages_Editions_TestAllTypesEdition2023 {
  761. var ProtobufTestMessages_Editions_extensionInt32: Int32 {
  762. get {return getExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_extension_int32) ?? 0}
  763. set {setExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_extension_int32, value: newValue)}
  764. }
  765. /// Returns true if extension `ProtobufTestMessages_Editions_Extensions_extension_int32`
  766. /// has been explicitly set.
  767. var hasProtobufTestMessages_Editions_extensionInt32: Bool {
  768. return hasExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_extension_int32)
  769. }
  770. /// Clears the value of extension `ProtobufTestMessages_Editions_Extensions_extension_int32`.
  771. /// Subsequent reads from it will return its default value.
  772. mutating func clearProtobufTestMessages_Editions_extensionInt32() {
  773. clearExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_extension_int32)
  774. }
  775. var ProtobufTestMessages_Editions_groupLikeType: ProtobufTestMessages_Editions_GroupLikeType {
  776. get {return getExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_GroupLikeType) ?? ProtobufTestMessages_Editions_GroupLikeType()}
  777. set {setExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_GroupLikeType, value: newValue)}
  778. }
  779. /// Returns true if extension `ProtobufTestMessages_Editions_Extensions_GroupLikeType`
  780. /// has been explicitly set.
  781. var hasProtobufTestMessages_Editions_groupLikeType: Bool {
  782. return hasExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_GroupLikeType)
  783. }
  784. /// Clears the value of extension `ProtobufTestMessages_Editions_Extensions_GroupLikeType`.
  785. /// Subsequent reads from it will return its default value.
  786. mutating func clearProtobufTestMessages_Editions_groupLikeType() {
  787. clearExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_GroupLikeType)
  788. }
  789. var ProtobufTestMessages_Editions_delimitedExt: ProtobufTestMessages_Editions_GroupLikeType {
  790. get {return getExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_delimited_ext) ?? ProtobufTestMessages_Editions_GroupLikeType()}
  791. set {setExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_delimited_ext, value: newValue)}
  792. }
  793. /// Returns true if extension `ProtobufTestMessages_Editions_Extensions_delimited_ext`
  794. /// has been explicitly set.
  795. var hasProtobufTestMessages_Editions_delimitedExt: Bool {
  796. return hasExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_delimited_ext)
  797. }
  798. /// Clears the value of extension `ProtobufTestMessages_Editions_Extensions_delimited_ext`.
  799. /// Subsequent reads from it will return its default value.
  800. mutating func clearProtobufTestMessages_Editions_delimitedExt() {
  801. clearExtensionValue(ext: ProtobufTestMessages_Editions_Extensions_delimited_ext)
  802. }
  803. }
  804. // MARK: - File's ExtensionMap: ProtobufTestMessages_Editions_TestMessagesEdition2023_Extensions
  805. /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
  806. /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
  807. /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
  808. /// a larger `SwiftProtobuf.SimpleExtensionMap`.
  809. let ProtobufTestMessages_Editions_TestMessagesEdition2023_Extensions: SwiftProtobuf.SimpleExtensionMap = [
  810. ProtobufTestMessages_Editions_Extensions_extension_int32,
  811. ProtobufTestMessages_Editions_Extensions_GroupLikeType,
  812. ProtobufTestMessages_Editions_Extensions_delimited_ext
  813. ]
  814. // Extension Objects - The only reason these might be needed is when manually
  815. // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
  816. // accessors for the extension fields on the messages directly.
  817. let ProtobufTestMessages_Editions_Extensions_extension_int32 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, ProtobufTestMessages_Editions_TestAllTypesEdition2023>(
  818. _protobuf_fieldNumber: 120,
  819. fieldName: "protobuf_test_messages.editions.extension_int32"
  820. )
  821. let ProtobufTestMessages_Editions_Extensions_GroupLikeType = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalGroupExtensionField<ProtobufTestMessages_Editions_GroupLikeType>, ProtobufTestMessages_Editions_TestAllTypesEdition2023>(
  822. _protobuf_fieldNumber: 121,
  823. fieldName: "protobuf_test_messages.editions.groupliketype"
  824. )
  825. let ProtobufTestMessages_Editions_Extensions_delimited_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalGroupExtensionField<ProtobufTestMessages_Editions_GroupLikeType>, ProtobufTestMessages_Editions_TestAllTypesEdition2023>(
  826. _protobuf_fieldNumber: 122,
  827. fieldName: "protobuf_test_messages.editions.delimited_ext"
  828. )
  829. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  830. fileprivate let _protobuf_package = "protobuf_test_messages.editions"
  831. extension ProtobufTestMessages_Editions_ForeignEnumEdition2023: SwiftProtobuf._ProtoNameProviding {
  832. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  833. 0: .same(proto: "FOREIGN_FOO"),
  834. 1: .same(proto: "FOREIGN_BAR"),
  835. 2: .same(proto: "FOREIGN_BAZ"),
  836. ]
  837. }
  838. extension ProtobufTestMessages_Editions_ComplexMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  839. static let protoMessageName: String = _protobuf_package + ".ComplexMessage"
  840. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  841. 1: .same(proto: "d"),
  842. ]
  843. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  844. while let fieldNumber = try decoder.nextFieldNumber() {
  845. // The use of inline closures is to circumvent an issue where the compiler
  846. // allocates stack space for every case branch when no optimizations are
  847. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  848. switch fieldNumber {
  849. case 1: try { try decoder.decodeSingularInt32Field(value: &self._d) }()
  850. default: break
  851. }
  852. }
  853. }
  854. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  855. // The use of inline closures is to circumvent an issue where the compiler
  856. // allocates stack space for every if/case branch local when no optimizations
  857. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  858. // https://github.com/apple/swift-protobuf/issues/1182
  859. try { if let v = self._d {
  860. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  861. } }()
  862. try unknownFields.traverse(visitor: &visitor)
  863. }
  864. static func ==(lhs: ProtobufTestMessages_Editions_ComplexMessage, rhs: ProtobufTestMessages_Editions_ComplexMessage) -> Bool {
  865. if lhs._d != rhs._d {return false}
  866. if lhs.unknownFields != rhs.unknownFields {return false}
  867. return true
  868. }
  869. }
  870. extension ProtobufTestMessages_Editions_TestAllTypesEdition2023: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  871. static let protoMessageName: String = _protobuf_package + ".TestAllTypesEdition2023"
  872. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  873. 1: .standard(proto: "optional_int32"),
  874. 2: .standard(proto: "optional_int64"),
  875. 3: .standard(proto: "optional_uint32"),
  876. 4: .standard(proto: "optional_uint64"),
  877. 5: .standard(proto: "optional_sint32"),
  878. 6: .standard(proto: "optional_sint64"),
  879. 7: .standard(proto: "optional_fixed32"),
  880. 8: .standard(proto: "optional_fixed64"),
  881. 9: .standard(proto: "optional_sfixed32"),
  882. 10: .standard(proto: "optional_sfixed64"),
  883. 11: .standard(proto: "optional_float"),
  884. 12: .standard(proto: "optional_double"),
  885. 13: .standard(proto: "optional_bool"),
  886. 14: .standard(proto: "optional_string"),
  887. 15: .standard(proto: "optional_bytes"),
  888. 18: .standard(proto: "optional_nested_message"),
  889. 19: .standard(proto: "optional_foreign_message"),
  890. 21: .standard(proto: "optional_nested_enum"),
  891. 22: .standard(proto: "optional_foreign_enum"),
  892. 24: .standard(proto: "optional_string_piece"),
  893. 25: .standard(proto: "optional_cord"),
  894. 27: .standard(proto: "recursive_message"),
  895. 31: .standard(proto: "repeated_int32"),
  896. 32: .standard(proto: "repeated_int64"),
  897. 33: .standard(proto: "repeated_uint32"),
  898. 34: .standard(proto: "repeated_uint64"),
  899. 35: .standard(proto: "repeated_sint32"),
  900. 36: .standard(proto: "repeated_sint64"),
  901. 37: .standard(proto: "repeated_fixed32"),
  902. 38: .standard(proto: "repeated_fixed64"),
  903. 39: .standard(proto: "repeated_sfixed32"),
  904. 40: .standard(proto: "repeated_sfixed64"),
  905. 41: .standard(proto: "repeated_float"),
  906. 42: .standard(proto: "repeated_double"),
  907. 43: .standard(proto: "repeated_bool"),
  908. 44: .standard(proto: "repeated_string"),
  909. 45: .standard(proto: "repeated_bytes"),
  910. 48: .standard(proto: "repeated_nested_message"),
  911. 49: .standard(proto: "repeated_foreign_message"),
  912. 51: .standard(proto: "repeated_nested_enum"),
  913. 52: .standard(proto: "repeated_foreign_enum"),
  914. 54: .standard(proto: "repeated_string_piece"),
  915. 55: .standard(proto: "repeated_cord"),
  916. 75: .standard(proto: "packed_int32"),
  917. 76: .standard(proto: "packed_int64"),
  918. 77: .standard(proto: "packed_uint32"),
  919. 78: .standard(proto: "packed_uint64"),
  920. 79: .standard(proto: "packed_sint32"),
  921. 80: .standard(proto: "packed_sint64"),
  922. 81: .standard(proto: "packed_fixed32"),
  923. 82: .standard(proto: "packed_fixed64"),
  924. 83: .standard(proto: "packed_sfixed32"),
  925. 84: .standard(proto: "packed_sfixed64"),
  926. 85: .standard(proto: "packed_float"),
  927. 86: .standard(proto: "packed_double"),
  928. 87: .standard(proto: "packed_bool"),
  929. 88: .standard(proto: "packed_nested_enum"),
  930. 89: .standard(proto: "unpacked_int32"),
  931. 90: .standard(proto: "unpacked_int64"),
  932. 91: .standard(proto: "unpacked_uint32"),
  933. 92: .standard(proto: "unpacked_uint64"),
  934. 93: .standard(proto: "unpacked_sint32"),
  935. 94: .standard(proto: "unpacked_sint64"),
  936. 95: .standard(proto: "unpacked_fixed32"),
  937. 96: .standard(proto: "unpacked_fixed64"),
  938. 97: .standard(proto: "unpacked_sfixed32"),
  939. 98: .standard(proto: "unpacked_sfixed64"),
  940. 99: .standard(proto: "unpacked_float"),
  941. 100: .standard(proto: "unpacked_double"),
  942. 101: .standard(proto: "unpacked_bool"),
  943. 102: .standard(proto: "unpacked_nested_enum"),
  944. 56: .standard(proto: "map_int32_int32"),
  945. 57: .standard(proto: "map_int64_int64"),
  946. 58: .standard(proto: "map_uint32_uint32"),
  947. 59: .standard(proto: "map_uint64_uint64"),
  948. 60: .standard(proto: "map_sint32_sint32"),
  949. 61: .standard(proto: "map_sint64_sint64"),
  950. 62: .standard(proto: "map_fixed32_fixed32"),
  951. 63: .standard(proto: "map_fixed64_fixed64"),
  952. 64: .standard(proto: "map_sfixed32_sfixed32"),
  953. 65: .standard(proto: "map_sfixed64_sfixed64"),
  954. 66: .standard(proto: "map_int32_float"),
  955. 67: .standard(proto: "map_int32_double"),
  956. 68: .standard(proto: "map_bool_bool"),
  957. 69: .standard(proto: "map_string_string"),
  958. 70: .standard(proto: "map_string_bytes"),
  959. 71: .standard(proto: "map_string_nested_message"),
  960. 72: .standard(proto: "map_string_foreign_message"),
  961. 73: .standard(proto: "map_string_nested_enum"),
  962. 74: .standard(proto: "map_string_foreign_enum"),
  963. 111: .standard(proto: "oneof_uint32"),
  964. 112: .standard(proto: "oneof_nested_message"),
  965. 113: .standard(proto: "oneof_string"),
  966. 114: .standard(proto: "oneof_bytes"),
  967. 115: .standard(proto: "oneof_bool"),
  968. 116: .standard(proto: "oneof_uint64"),
  969. 117: .standard(proto: "oneof_float"),
  970. 118: .standard(proto: "oneof_double"),
  971. 119: .standard(proto: "oneof_enum"),
  972. 201: .same(proto: "groupliketype"),
  973. 201: .unique(proto: "GroupLikeType", json: "groupliketype"),
  974. 202: .standard(proto: "delimited_field"),
  975. ]
  976. fileprivate class _StorageClass {
  977. var _optionalInt32: Int32? = nil
  978. var _optionalInt64: Int64? = nil
  979. var _optionalUint32: UInt32? = nil
  980. var _optionalUint64: UInt64? = nil
  981. var _optionalSint32: Int32? = nil
  982. var _optionalSint64: Int64? = nil
  983. var _optionalFixed32: UInt32? = nil
  984. var _optionalFixed64: UInt64? = nil
  985. var _optionalSfixed32: Int32? = nil
  986. var _optionalSfixed64: Int64? = nil
  987. var _optionalFloat: Float? = nil
  988. var _optionalDouble: Double? = nil
  989. var _optionalBool: Bool? = nil
  990. var _optionalString: String? = nil
  991. var _optionalBytes: Data? = nil
  992. var _optionalNestedMessage: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage? = nil
  993. var _optionalForeignMessage: ProtobufTestMessages_Editions_ForeignMessageEdition2023? = nil
  994. var _optionalNestedEnum: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum? = nil
  995. var _optionalForeignEnum: ProtobufTestMessages_Editions_ForeignEnumEdition2023? = nil
  996. var _optionalStringPiece: String? = nil
  997. var _optionalCord: String? = nil
  998. var _recursiveMessage: ProtobufTestMessages_Editions_TestAllTypesEdition2023? = nil
  999. var _repeatedInt32: [Int32] = []
  1000. var _repeatedInt64: [Int64] = []
  1001. var _repeatedUint32: [UInt32] = []
  1002. var _repeatedUint64: [UInt64] = []
  1003. var _repeatedSint32: [Int32] = []
  1004. var _repeatedSint64: [Int64] = []
  1005. var _repeatedFixed32: [UInt32] = []
  1006. var _repeatedFixed64: [UInt64] = []
  1007. var _repeatedSfixed32: [Int32] = []
  1008. var _repeatedSfixed64: [Int64] = []
  1009. var _repeatedFloat: [Float] = []
  1010. var _repeatedDouble: [Double] = []
  1011. var _repeatedBool: [Bool] = []
  1012. var _repeatedString: [String] = []
  1013. var _repeatedBytes: [Data] = []
  1014. var _repeatedNestedMessage: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage] = []
  1015. var _repeatedForeignMessage: [ProtobufTestMessages_Editions_ForeignMessageEdition2023] = []
  1016. var _repeatedNestedEnum: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum] = []
  1017. var _repeatedForeignEnum: [ProtobufTestMessages_Editions_ForeignEnumEdition2023] = []
  1018. var _repeatedStringPiece: [String] = []
  1019. var _repeatedCord: [String] = []
  1020. var _packedInt32: [Int32] = []
  1021. var _packedInt64: [Int64] = []
  1022. var _packedUint32: [UInt32] = []
  1023. var _packedUint64: [UInt64] = []
  1024. var _packedSint32: [Int32] = []
  1025. var _packedSint64: [Int64] = []
  1026. var _packedFixed32: [UInt32] = []
  1027. var _packedFixed64: [UInt64] = []
  1028. var _packedSfixed32: [Int32] = []
  1029. var _packedSfixed64: [Int64] = []
  1030. var _packedFloat: [Float] = []
  1031. var _packedDouble: [Double] = []
  1032. var _packedBool: [Bool] = []
  1033. var _packedNestedEnum: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum] = []
  1034. var _unpackedInt32: [Int32] = []
  1035. var _unpackedInt64: [Int64] = []
  1036. var _unpackedUint32: [UInt32] = []
  1037. var _unpackedUint64: [UInt64] = []
  1038. var _unpackedSint32: [Int32] = []
  1039. var _unpackedSint64: [Int64] = []
  1040. var _unpackedFixed32: [UInt32] = []
  1041. var _unpackedFixed64: [UInt64] = []
  1042. var _unpackedSfixed32: [Int32] = []
  1043. var _unpackedSfixed64: [Int64] = []
  1044. var _unpackedFloat: [Float] = []
  1045. var _unpackedDouble: [Double] = []
  1046. var _unpackedBool: [Bool] = []
  1047. var _unpackedNestedEnum: [ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum] = []
  1048. var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
  1049. var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
  1050. var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
  1051. var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
  1052. var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
  1053. var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
  1054. var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
  1055. var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
  1056. var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
  1057. var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
  1058. var _mapInt32Float: Dictionary<Int32,Float> = [:]
  1059. var _mapInt32Double: Dictionary<Int32,Double> = [:]
  1060. var _mapBoolBool: Dictionary<Bool,Bool> = [:]
  1061. var _mapStringString: Dictionary<String,String> = [:]
  1062. var _mapStringBytes: Dictionary<String,Data> = [:]
  1063. var _mapStringNestedMessage: Dictionary<String,ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage> = [:]
  1064. var _mapStringForeignMessage: Dictionary<String,ProtobufTestMessages_Editions_ForeignMessageEdition2023> = [:]
  1065. var _mapStringNestedEnum: Dictionary<String,ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum> = [:]
  1066. var _mapStringForeignEnum: Dictionary<String,ProtobufTestMessages_Editions_ForeignEnumEdition2023> = [:]
  1067. var _oneofField: ProtobufTestMessages_Editions_TestAllTypesEdition2023.OneOf_OneofField?
  1068. var _groupLikeType: ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType? = nil
  1069. var _delimitedField: ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType? = nil
  1070. // This property is used as the initial default value for new instances of the type.
  1071. // The type itself is protecting the reference to its storage via CoW semantics.
  1072. // This will force a copy to be made of this reference when the first mutation occurs;
  1073. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  1074. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  1075. private init() {}
  1076. init(copying source: _StorageClass) {
  1077. _optionalInt32 = source._optionalInt32
  1078. _optionalInt64 = source._optionalInt64
  1079. _optionalUint32 = source._optionalUint32
  1080. _optionalUint64 = source._optionalUint64
  1081. _optionalSint32 = source._optionalSint32
  1082. _optionalSint64 = source._optionalSint64
  1083. _optionalFixed32 = source._optionalFixed32
  1084. _optionalFixed64 = source._optionalFixed64
  1085. _optionalSfixed32 = source._optionalSfixed32
  1086. _optionalSfixed64 = source._optionalSfixed64
  1087. _optionalFloat = source._optionalFloat
  1088. _optionalDouble = source._optionalDouble
  1089. _optionalBool = source._optionalBool
  1090. _optionalString = source._optionalString
  1091. _optionalBytes = source._optionalBytes
  1092. _optionalNestedMessage = source._optionalNestedMessage
  1093. _optionalForeignMessage = source._optionalForeignMessage
  1094. _optionalNestedEnum = source._optionalNestedEnum
  1095. _optionalForeignEnum = source._optionalForeignEnum
  1096. _optionalStringPiece = source._optionalStringPiece
  1097. _optionalCord = source._optionalCord
  1098. _recursiveMessage = source._recursiveMessage
  1099. _repeatedInt32 = source._repeatedInt32
  1100. _repeatedInt64 = source._repeatedInt64
  1101. _repeatedUint32 = source._repeatedUint32
  1102. _repeatedUint64 = source._repeatedUint64
  1103. _repeatedSint32 = source._repeatedSint32
  1104. _repeatedSint64 = source._repeatedSint64
  1105. _repeatedFixed32 = source._repeatedFixed32
  1106. _repeatedFixed64 = source._repeatedFixed64
  1107. _repeatedSfixed32 = source._repeatedSfixed32
  1108. _repeatedSfixed64 = source._repeatedSfixed64
  1109. _repeatedFloat = source._repeatedFloat
  1110. _repeatedDouble = source._repeatedDouble
  1111. _repeatedBool = source._repeatedBool
  1112. _repeatedString = source._repeatedString
  1113. _repeatedBytes = source._repeatedBytes
  1114. _repeatedNestedMessage = source._repeatedNestedMessage
  1115. _repeatedForeignMessage = source._repeatedForeignMessage
  1116. _repeatedNestedEnum = source._repeatedNestedEnum
  1117. _repeatedForeignEnum = source._repeatedForeignEnum
  1118. _repeatedStringPiece = source._repeatedStringPiece
  1119. _repeatedCord = source._repeatedCord
  1120. _packedInt32 = source._packedInt32
  1121. _packedInt64 = source._packedInt64
  1122. _packedUint32 = source._packedUint32
  1123. _packedUint64 = source._packedUint64
  1124. _packedSint32 = source._packedSint32
  1125. _packedSint64 = source._packedSint64
  1126. _packedFixed32 = source._packedFixed32
  1127. _packedFixed64 = source._packedFixed64
  1128. _packedSfixed32 = source._packedSfixed32
  1129. _packedSfixed64 = source._packedSfixed64
  1130. _packedFloat = source._packedFloat
  1131. _packedDouble = source._packedDouble
  1132. _packedBool = source._packedBool
  1133. _packedNestedEnum = source._packedNestedEnum
  1134. _unpackedInt32 = source._unpackedInt32
  1135. _unpackedInt64 = source._unpackedInt64
  1136. _unpackedUint32 = source._unpackedUint32
  1137. _unpackedUint64 = source._unpackedUint64
  1138. _unpackedSint32 = source._unpackedSint32
  1139. _unpackedSint64 = source._unpackedSint64
  1140. _unpackedFixed32 = source._unpackedFixed32
  1141. _unpackedFixed64 = source._unpackedFixed64
  1142. _unpackedSfixed32 = source._unpackedSfixed32
  1143. _unpackedSfixed64 = source._unpackedSfixed64
  1144. _unpackedFloat = source._unpackedFloat
  1145. _unpackedDouble = source._unpackedDouble
  1146. _unpackedBool = source._unpackedBool
  1147. _unpackedNestedEnum = source._unpackedNestedEnum
  1148. _mapInt32Int32 = source._mapInt32Int32
  1149. _mapInt64Int64 = source._mapInt64Int64
  1150. _mapUint32Uint32 = source._mapUint32Uint32
  1151. _mapUint64Uint64 = source._mapUint64Uint64
  1152. _mapSint32Sint32 = source._mapSint32Sint32
  1153. _mapSint64Sint64 = source._mapSint64Sint64
  1154. _mapFixed32Fixed32 = source._mapFixed32Fixed32
  1155. _mapFixed64Fixed64 = source._mapFixed64Fixed64
  1156. _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
  1157. _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
  1158. _mapInt32Float = source._mapInt32Float
  1159. _mapInt32Double = source._mapInt32Double
  1160. _mapBoolBool = source._mapBoolBool
  1161. _mapStringString = source._mapStringString
  1162. _mapStringBytes = source._mapStringBytes
  1163. _mapStringNestedMessage = source._mapStringNestedMessage
  1164. _mapStringForeignMessage = source._mapStringForeignMessage
  1165. _mapStringNestedEnum = source._mapStringNestedEnum
  1166. _mapStringForeignEnum = source._mapStringForeignEnum
  1167. _oneofField = source._oneofField
  1168. _groupLikeType = source._groupLikeType
  1169. _delimitedField = source._delimitedField
  1170. }
  1171. }
  1172. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  1173. if !isKnownUniquelyReferenced(&_storage) {
  1174. _storage = _StorageClass(copying: _storage)
  1175. }
  1176. return _storage
  1177. }
  1178. public var isInitialized: Bool {
  1179. if !_protobuf_extensionFieldValues.isInitialized {return false}
  1180. return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1181. if let v = _storage._optionalNestedMessage, !v.isInitialized {return false}
  1182. if let v = _storage._recursiveMessage, !v.isInitialized {return false}
  1183. if !SwiftProtobuf.Internal.areAllInitialized(_storage._repeatedNestedMessage) {return false}
  1184. if !SwiftProtobuf.Internal.areAllInitialized(_storage._mapStringNestedMessage) {return false}
  1185. if let v = _storage._oneofField, !v.isInitialized {return false}
  1186. return true
  1187. }
  1188. }
  1189. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1190. _ = _uniqueStorage()
  1191. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1192. while let fieldNumber = try decoder.nextFieldNumber() {
  1193. // The use of inline closures is to circumvent an issue where the compiler
  1194. // allocates stack space for every case branch when no optimizations are
  1195. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1196. switch fieldNumber {
  1197. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) }()
  1198. case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) }()
  1199. case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) }()
  1200. case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) }()
  1201. case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) }()
  1202. case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) }()
  1203. case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) }()
  1204. case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) }()
  1205. case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) }()
  1206. case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) }()
  1207. case 11: try { try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) }()
  1208. case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) }()
  1209. case 13: try { try decoder.decodeSingularBoolField(value: &_storage._optionalBool) }()
  1210. case 14: try { try decoder.decodeSingularStringField(value: &_storage._optionalString) }()
  1211. case 15: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) }()
  1212. case 18: try { try decoder.decodeSingularMessageField(value: &_storage._optionalNestedMessage) }()
  1213. case 19: try { try decoder.decodeSingularMessageField(value: &_storage._optionalForeignMessage) }()
  1214. case 21: try { try decoder.decodeSingularEnumField(value: &_storage._optionalNestedEnum) }()
  1215. case 22: try { try decoder.decodeSingularEnumField(value: &_storage._optionalForeignEnum) }()
  1216. case 24: try { try decoder.decodeSingularStringField(value: &_storage._optionalStringPiece) }()
  1217. case 25: try { try decoder.decodeSingularStringField(value: &_storage._optionalCord) }()
  1218. case 27: try { try decoder.decodeSingularMessageField(value: &_storage._recursiveMessage) }()
  1219. case 31: try { try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) }()
  1220. case 32: try { try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) }()
  1221. case 33: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) }()
  1222. case 34: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) }()
  1223. case 35: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) }()
  1224. case 36: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) }()
  1225. case 37: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) }()
  1226. case 38: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) }()
  1227. case 39: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) }()
  1228. case 40: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) }()
  1229. case 41: try { try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) }()
  1230. case 42: try { try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) }()
  1231. case 43: try { try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) }()
  1232. case 44: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) }()
  1233. case 45: try { try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) }()
  1234. case 48: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNestedMessage) }()
  1235. case 49: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedForeignMessage) }()
  1236. case 51: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedNestedEnum) }()
  1237. case 52: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedForeignEnum) }()
  1238. case 54: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece) }()
  1239. case 55: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord) }()
  1240. case 56: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
  1241. case 57: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
  1242. case 58: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
  1243. case 59: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
  1244. case 60: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
  1245. case 61: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
  1246. case 62: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
  1247. case 63: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
  1248. case 64: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
  1249. case 65: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
  1250. case 66: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
  1251. case 67: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
  1252. case 68: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
  1253. case 69: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
  1254. case 70: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapStringBytes) }()
  1255. case 71: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage>.self, value: &_storage._mapStringNestedMessage) }()
  1256. case 72: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Editions_ForeignMessageEdition2023>.self, value: &_storage._mapStringForeignMessage) }()
  1257. case 73: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum>.self, value: &_storage._mapStringNestedEnum) }()
  1258. case 74: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Editions_ForeignEnumEdition2023>.self, value: &_storage._mapStringForeignEnum) }()
  1259. case 75: try { try decoder.decodeRepeatedInt32Field(value: &_storage._packedInt32) }()
  1260. case 76: try { try decoder.decodeRepeatedInt64Field(value: &_storage._packedInt64) }()
  1261. case 77: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._packedUint32) }()
  1262. case 78: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._packedUint64) }()
  1263. case 79: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._packedSint32) }()
  1264. case 80: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._packedSint64) }()
  1265. case 81: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._packedFixed32) }()
  1266. case 82: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._packedFixed64) }()
  1267. case 83: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._packedSfixed32) }()
  1268. case 84: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._packedSfixed64) }()
  1269. case 85: try { try decoder.decodeRepeatedFloatField(value: &_storage._packedFloat) }()
  1270. case 86: try { try decoder.decodeRepeatedDoubleField(value: &_storage._packedDouble) }()
  1271. case 87: try { try decoder.decodeRepeatedBoolField(value: &_storage._packedBool) }()
  1272. case 88: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedNestedEnum) }()
  1273. case 89: try { try decoder.decodeRepeatedInt32Field(value: &_storage._unpackedInt32) }()
  1274. case 90: try { try decoder.decodeRepeatedInt64Field(value: &_storage._unpackedInt64) }()
  1275. case 91: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._unpackedUint32) }()
  1276. case 92: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._unpackedUint64) }()
  1277. case 93: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._unpackedSint32) }()
  1278. case 94: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._unpackedSint64) }()
  1279. case 95: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._unpackedFixed32) }()
  1280. case 96: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._unpackedFixed64) }()
  1281. case 97: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._unpackedSfixed32) }()
  1282. case 98: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._unpackedSfixed64) }()
  1283. case 99: try { try decoder.decodeRepeatedFloatField(value: &_storage._unpackedFloat) }()
  1284. case 100: try { try decoder.decodeRepeatedDoubleField(value: &_storage._unpackedDouble) }()
  1285. case 101: try { try decoder.decodeRepeatedBoolField(value: &_storage._unpackedBool) }()
  1286. case 102: try { try decoder.decodeRepeatedEnumField(value: &_storage._unpackedNestedEnum) }()
  1287. case 111: try {
  1288. var v: UInt32?
  1289. try decoder.decodeSingularUInt32Field(value: &v)
  1290. if let v = v {
  1291. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  1292. _storage._oneofField = .oneofUint32(v)
  1293. }
  1294. }()
  1295. case 112: try {
  1296. var v: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage?
  1297. var hadOneofValue = false
  1298. if let current = _storage._oneofField {
  1299. hadOneofValue = true
  1300. if case .oneofNestedMessage(let m) = current {v = m}
  1301. }
  1302. try decoder.decodeSingularMessageField(value: &v)
  1303. if let v = v {
  1304. if hadOneofValue {try decoder.handleConflictingOneOf()}
  1305. _storage._oneofField = .oneofNestedMessage(v)
  1306. }
  1307. }()
  1308. case 113: try {
  1309. var v: String?
  1310. try decoder.decodeSingularStringField(value: &v)
  1311. if let v = v {
  1312. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  1313. _storage._oneofField = .oneofString(v)
  1314. }
  1315. }()
  1316. case 114: try {
  1317. var v: Data?
  1318. try decoder.decodeSingularBytesField(value: &v)
  1319. if let v = v {
  1320. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  1321. _storage._oneofField = .oneofBytes(v)
  1322. }
  1323. }()
  1324. case 115: try {
  1325. var v: Bool?
  1326. try decoder.decodeSingularBoolField(value: &v)
  1327. if let v = v {
  1328. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  1329. _storage._oneofField = .oneofBool(v)
  1330. }
  1331. }()
  1332. case 116: try {
  1333. var v: UInt64?
  1334. try decoder.decodeSingularUInt64Field(value: &v)
  1335. if let v = v {
  1336. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  1337. _storage._oneofField = .oneofUint64(v)
  1338. }
  1339. }()
  1340. case 117: try {
  1341. var v: Float?
  1342. try decoder.decodeSingularFloatField(value: &v)
  1343. if let v = v {
  1344. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  1345. _storage._oneofField = .oneofFloat(v)
  1346. }
  1347. }()
  1348. case 118: try {
  1349. var v: Double?
  1350. try decoder.decodeSingularDoubleField(value: &v)
  1351. if let v = v {
  1352. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  1353. _storage._oneofField = .oneofDouble(v)
  1354. }
  1355. }()
  1356. case 119: try {
  1357. var v: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum?
  1358. try decoder.decodeSingularEnumField(value: &v)
  1359. if let v = v {
  1360. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  1361. _storage._oneofField = .oneofEnum(v)
  1362. }
  1363. }()
  1364. case 201: try { try decoder.decodeSingularGroupField(value: &_storage._groupLikeType) }()
  1365. case 202: try { try decoder.decodeSingularGroupField(value: &_storage._delimitedField) }()
  1366. case 120..<201:
  1367. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Editions_TestAllTypesEdition2023.self, fieldNumber: fieldNumber) }()
  1368. default: break
  1369. }
  1370. }
  1371. }
  1372. }
  1373. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1374. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1375. // The use of inline closures is to circumvent an issue where the compiler
  1376. // allocates stack space for every if/case branch local when no optimizations
  1377. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1378. // https://github.com/apple/swift-protobuf/issues/1182
  1379. try { if let v = _storage._optionalInt32 {
  1380. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  1381. } }()
  1382. try { if let v = _storage._optionalInt64 {
  1383. try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
  1384. } }()
  1385. try { if let v = _storage._optionalUint32 {
  1386. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
  1387. } }()
  1388. try { if let v = _storage._optionalUint64 {
  1389. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
  1390. } }()
  1391. try { if let v = _storage._optionalSint32 {
  1392. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5)
  1393. } }()
  1394. try { if let v = _storage._optionalSint64 {
  1395. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6)
  1396. } }()
  1397. try { if let v = _storage._optionalFixed32 {
  1398. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7)
  1399. } }()
  1400. try { if let v = _storage._optionalFixed64 {
  1401. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8)
  1402. } }()
  1403. try { if let v = _storage._optionalSfixed32 {
  1404. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9)
  1405. } }()
  1406. try { if let v = _storage._optionalSfixed64 {
  1407. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10)
  1408. } }()
  1409. try { if let v = _storage._optionalFloat {
  1410. try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
  1411. } }()
  1412. try { if let v = _storage._optionalDouble {
  1413. try visitor.visitSingularDoubleField(value: v, fieldNumber: 12)
  1414. } }()
  1415. try { if let v = _storage._optionalBool {
  1416. try visitor.visitSingularBoolField(value: v, fieldNumber: 13)
  1417. } }()
  1418. try { if let v = _storage._optionalString {
  1419. try visitor.visitSingularStringField(value: v, fieldNumber: 14)
  1420. } }()
  1421. try { if let v = _storage._optionalBytes {
  1422. try visitor.visitSingularBytesField(value: v, fieldNumber: 15)
  1423. } }()
  1424. try { if let v = _storage._optionalNestedMessage {
  1425. try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
  1426. } }()
  1427. try { if let v = _storage._optionalForeignMessage {
  1428. try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
  1429. } }()
  1430. try { if let v = _storage._optionalNestedEnum {
  1431. try visitor.visitSingularEnumField(value: v, fieldNumber: 21)
  1432. } }()
  1433. try { if let v = _storage._optionalForeignEnum {
  1434. try visitor.visitSingularEnumField(value: v, fieldNumber: 22)
  1435. } }()
  1436. try { if let v = _storage._optionalStringPiece {
  1437. try visitor.visitSingularStringField(value: v, fieldNumber: 24)
  1438. } }()
  1439. try { if let v = _storage._optionalCord {
  1440. try visitor.visitSingularStringField(value: v, fieldNumber: 25)
  1441. } }()
  1442. try { if let v = _storage._recursiveMessage {
  1443. try visitor.visitSingularMessageField(value: v, fieldNumber: 27)
  1444. } }()
  1445. if !_storage._repeatedInt32.isEmpty {
  1446. try visitor.visitPackedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31)
  1447. }
  1448. if !_storage._repeatedInt64.isEmpty {
  1449. try visitor.visitPackedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32)
  1450. }
  1451. if !_storage._repeatedUint32.isEmpty {
  1452. try visitor.visitPackedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33)
  1453. }
  1454. if !_storage._repeatedUint64.isEmpty {
  1455. try visitor.visitPackedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34)
  1456. }
  1457. if !_storage._repeatedSint32.isEmpty {
  1458. try visitor.visitPackedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35)
  1459. }
  1460. if !_storage._repeatedSint64.isEmpty {
  1461. try visitor.visitPackedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36)
  1462. }
  1463. if !_storage._repeatedFixed32.isEmpty {
  1464. try visitor.visitPackedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37)
  1465. }
  1466. if !_storage._repeatedFixed64.isEmpty {
  1467. try visitor.visitPackedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38)
  1468. }
  1469. if !_storage._repeatedSfixed32.isEmpty {
  1470. try visitor.visitPackedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39)
  1471. }
  1472. if !_storage._repeatedSfixed64.isEmpty {
  1473. try visitor.visitPackedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40)
  1474. }
  1475. if !_storage._repeatedFloat.isEmpty {
  1476. try visitor.visitPackedFloatField(value: _storage._repeatedFloat, fieldNumber: 41)
  1477. }
  1478. if !_storage._repeatedDouble.isEmpty {
  1479. try visitor.visitPackedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42)
  1480. }
  1481. if !_storage._repeatedBool.isEmpty {
  1482. try visitor.visitPackedBoolField(value: _storage._repeatedBool, fieldNumber: 43)
  1483. }
  1484. if !_storage._repeatedString.isEmpty {
  1485. try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44)
  1486. }
  1487. if !_storage._repeatedBytes.isEmpty {
  1488. try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45)
  1489. }
  1490. if !_storage._repeatedNestedMessage.isEmpty {
  1491. try visitor.visitRepeatedMessageField(value: _storage._repeatedNestedMessage, fieldNumber: 48)
  1492. }
  1493. if !_storage._repeatedForeignMessage.isEmpty {
  1494. try visitor.visitRepeatedMessageField(value: _storage._repeatedForeignMessage, fieldNumber: 49)
  1495. }
  1496. if !_storage._repeatedNestedEnum.isEmpty {
  1497. try visitor.visitPackedEnumField(value: _storage._repeatedNestedEnum, fieldNumber: 51)
  1498. }
  1499. if !_storage._repeatedForeignEnum.isEmpty {
  1500. try visitor.visitPackedEnumField(value: _storage._repeatedForeignEnum, fieldNumber: 52)
  1501. }
  1502. if !_storage._repeatedStringPiece.isEmpty {
  1503. try visitor.visitRepeatedStringField(value: _storage._repeatedStringPiece, fieldNumber: 54)
  1504. }
  1505. if !_storage._repeatedCord.isEmpty {
  1506. try visitor.visitRepeatedStringField(value: _storage._repeatedCord, fieldNumber: 55)
  1507. }
  1508. if !_storage._mapInt32Int32.isEmpty {
  1509. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 56)
  1510. }
  1511. if !_storage._mapInt64Int64.isEmpty {
  1512. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 57)
  1513. }
  1514. if !_storage._mapUint32Uint32.isEmpty {
  1515. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 58)
  1516. }
  1517. if !_storage._mapUint64Uint64.isEmpty {
  1518. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 59)
  1519. }
  1520. if !_storage._mapSint32Sint32.isEmpty {
  1521. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 60)
  1522. }
  1523. if !_storage._mapSint64Sint64.isEmpty {
  1524. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 61)
  1525. }
  1526. if !_storage._mapFixed32Fixed32.isEmpty {
  1527. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 62)
  1528. }
  1529. if !_storage._mapFixed64Fixed64.isEmpty {
  1530. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 63)
  1531. }
  1532. if !_storage._mapSfixed32Sfixed32.isEmpty {
  1533. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 64)
  1534. }
  1535. if !_storage._mapSfixed64Sfixed64.isEmpty {
  1536. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 65)
  1537. }
  1538. if !_storage._mapInt32Float.isEmpty {
  1539. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 66)
  1540. }
  1541. if !_storage._mapInt32Double.isEmpty {
  1542. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 67)
  1543. }
  1544. if !_storage._mapBoolBool.isEmpty {
  1545. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 68)
  1546. }
  1547. if !_storage._mapStringString.isEmpty {
  1548. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 69)
  1549. }
  1550. if !_storage._mapStringBytes.isEmpty {
  1551. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapStringBytes, fieldNumber: 70)
  1552. }
  1553. if !_storage._mapStringNestedMessage.isEmpty {
  1554. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage>.self, value: _storage._mapStringNestedMessage, fieldNumber: 71)
  1555. }
  1556. if !_storage._mapStringForeignMessage.isEmpty {
  1557. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Editions_ForeignMessageEdition2023>.self, value: _storage._mapStringForeignMessage, fieldNumber: 72)
  1558. }
  1559. if !_storage._mapStringNestedEnum.isEmpty {
  1560. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum>.self, value: _storage._mapStringNestedEnum, fieldNumber: 73)
  1561. }
  1562. if !_storage._mapStringForeignEnum.isEmpty {
  1563. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Editions_ForeignEnumEdition2023>.self, value: _storage._mapStringForeignEnum, fieldNumber: 74)
  1564. }
  1565. if !_storage._packedInt32.isEmpty {
  1566. try visitor.visitPackedInt32Field(value: _storage._packedInt32, fieldNumber: 75)
  1567. }
  1568. if !_storage._packedInt64.isEmpty {
  1569. try visitor.visitPackedInt64Field(value: _storage._packedInt64, fieldNumber: 76)
  1570. }
  1571. if !_storage._packedUint32.isEmpty {
  1572. try visitor.visitPackedUInt32Field(value: _storage._packedUint32, fieldNumber: 77)
  1573. }
  1574. if !_storage._packedUint64.isEmpty {
  1575. try visitor.visitPackedUInt64Field(value: _storage._packedUint64, fieldNumber: 78)
  1576. }
  1577. if !_storage._packedSint32.isEmpty {
  1578. try visitor.visitPackedSInt32Field(value: _storage._packedSint32, fieldNumber: 79)
  1579. }
  1580. if !_storage._packedSint64.isEmpty {
  1581. try visitor.visitPackedSInt64Field(value: _storage._packedSint64, fieldNumber: 80)
  1582. }
  1583. if !_storage._packedFixed32.isEmpty {
  1584. try visitor.visitPackedFixed32Field(value: _storage._packedFixed32, fieldNumber: 81)
  1585. }
  1586. if !_storage._packedFixed64.isEmpty {
  1587. try visitor.visitPackedFixed64Field(value: _storage._packedFixed64, fieldNumber: 82)
  1588. }
  1589. if !_storage._packedSfixed32.isEmpty {
  1590. try visitor.visitPackedSFixed32Field(value: _storage._packedSfixed32, fieldNumber: 83)
  1591. }
  1592. if !_storage._packedSfixed64.isEmpty {
  1593. try visitor.visitPackedSFixed64Field(value: _storage._packedSfixed64, fieldNumber: 84)
  1594. }
  1595. if !_storage._packedFloat.isEmpty {
  1596. try visitor.visitPackedFloatField(value: _storage._packedFloat, fieldNumber: 85)
  1597. }
  1598. if !_storage._packedDouble.isEmpty {
  1599. try visitor.visitPackedDoubleField(value: _storage._packedDouble, fieldNumber: 86)
  1600. }
  1601. if !_storage._packedBool.isEmpty {
  1602. try visitor.visitPackedBoolField(value: _storage._packedBool, fieldNumber: 87)
  1603. }
  1604. if !_storage._packedNestedEnum.isEmpty {
  1605. try visitor.visitPackedEnumField(value: _storage._packedNestedEnum, fieldNumber: 88)
  1606. }
  1607. if !_storage._unpackedInt32.isEmpty {
  1608. try visitor.visitRepeatedInt32Field(value: _storage._unpackedInt32, fieldNumber: 89)
  1609. }
  1610. if !_storage._unpackedInt64.isEmpty {
  1611. try visitor.visitRepeatedInt64Field(value: _storage._unpackedInt64, fieldNumber: 90)
  1612. }
  1613. if !_storage._unpackedUint32.isEmpty {
  1614. try visitor.visitRepeatedUInt32Field(value: _storage._unpackedUint32, fieldNumber: 91)
  1615. }
  1616. if !_storage._unpackedUint64.isEmpty {
  1617. try visitor.visitRepeatedUInt64Field(value: _storage._unpackedUint64, fieldNumber: 92)
  1618. }
  1619. if !_storage._unpackedSint32.isEmpty {
  1620. try visitor.visitRepeatedSInt32Field(value: _storage._unpackedSint32, fieldNumber: 93)
  1621. }
  1622. if !_storage._unpackedSint64.isEmpty {
  1623. try visitor.visitRepeatedSInt64Field(value: _storage._unpackedSint64, fieldNumber: 94)
  1624. }
  1625. if !_storage._unpackedFixed32.isEmpty {
  1626. try visitor.visitRepeatedFixed32Field(value: _storage._unpackedFixed32, fieldNumber: 95)
  1627. }
  1628. if !_storage._unpackedFixed64.isEmpty {
  1629. try visitor.visitRepeatedFixed64Field(value: _storage._unpackedFixed64, fieldNumber: 96)
  1630. }
  1631. if !_storage._unpackedSfixed32.isEmpty {
  1632. try visitor.visitRepeatedSFixed32Field(value: _storage._unpackedSfixed32, fieldNumber: 97)
  1633. }
  1634. if !_storage._unpackedSfixed64.isEmpty {
  1635. try visitor.visitRepeatedSFixed64Field(value: _storage._unpackedSfixed64, fieldNumber: 98)
  1636. }
  1637. if !_storage._unpackedFloat.isEmpty {
  1638. try visitor.visitRepeatedFloatField(value: _storage._unpackedFloat, fieldNumber: 99)
  1639. }
  1640. if !_storage._unpackedDouble.isEmpty {
  1641. try visitor.visitRepeatedDoubleField(value: _storage._unpackedDouble, fieldNumber: 100)
  1642. }
  1643. if !_storage._unpackedBool.isEmpty {
  1644. try visitor.visitRepeatedBoolField(value: _storage._unpackedBool, fieldNumber: 101)
  1645. }
  1646. if !_storage._unpackedNestedEnum.isEmpty {
  1647. try visitor.visitRepeatedEnumField(value: _storage._unpackedNestedEnum, fieldNumber: 102)
  1648. }
  1649. switch _storage._oneofField {
  1650. case .oneofUint32?: try {
  1651. guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() }
  1652. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 111)
  1653. }()
  1654. case .oneofNestedMessage?: try {
  1655. guard case .oneofNestedMessage(let v)? = _storage._oneofField else { preconditionFailure() }
  1656. try visitor.visitSingularMessageField(value: v, fieldNumber: 112)
  1657. }()
  1658. case .oneofString?: try {
  1659. guard case .oneofString(let v)? = _storage._oneofField else { preconditionFailure() }
  1660. try visitor.visitSingularStringField(value: v, fieldNumber: 113)
  1661. }()
  1662. case .oneofBytes?: try {
  1663. guard case .oneofBytes(let v)? = _storage._oneofField else { preconditionFailure() }
  1664. try visitor.visitSingularBytesField(value: v, fieldNumber: 114)
  1665. }()
  1666. case .oneofBool?: try {
  1667. guard case .oneofBool(let v)? = _storage._oneofField else { preconditionFailure() }
  1668. try visitor.visitSingularBoolField(value: v, fieldNumber: 115)
  1669. }()
  1670. case .oneofUint64?: try {
  1671. guard case .oneofUint64(let v)? = _storage._oneofField else { preconditionFailure() }
  1672. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 116)
  1673. }()
  1674. case .oneofFloat?: try {
  1675. guard case .oneofFloat(let v)? = _storage._oneofField else { preconditionFailure() }
  1676. try visitor.visitSingularFloatField(value: v, fieldNumber: 117)
  1677. }()
  1678. case .oneofDouble?: try {
  1679. guard case .oneofDouble(let v)? = _storage._oneofField else { preconditionFailure() }
  1680. try visitor.visitSingularDoubleField(value: v, fieldNumber: 118)
  1681. }()
  1682. case .oneofEnum?: try {
  1683. guard case .oneofEnum(let v)? = _storage._oneofField else { preconditionFailure() }
  1684. try visitor.visitSingularEnumField(value: v, fieldNumber: 119)
  1685. }()
  1686. case nil: break
  1687. }
  1688. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 120, end: 201)
  1689. try { if let v = _storage._groupLikeType {
  1690. try visitor.visitSingularGroupField(value: v, fieldNumber: 201)
  1691. } }()
  1692. try { if let v = _storage._delimitedField {
  1693. try visitor.visitSingularGroupField(value: v, fieldNumber: 202)
  1694. } }()
  1695. }
  1696. try unknownFields.traverse(visitor: &visitor)
  1697. }
  1698. static func ==(lhs: ProtobufTestMessages_Editions_TestAllTypesEdition2023, rhs: ProtobufTestMessages_Editions_TestAllTypesEdition2023) -> Bool {
  1699. if lhs._storage !== rhs._storage {
  1700. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  1701. let _storage = _args.0
  1702. let rhs_storage = _args.1
  1703. if _storage._optionalInt32 != rhs_storage._optionalInt32 {return false}
  1704. if _storage._optionalInt64 != rhs_storage._optionalInt64 {return false}
  1705. if _storage._optionalUint32 != rhs_storage._optionalUint32 {return false}
  1706. if _storage._optionalUint64 != rhs_storage._optionalUint64 {return false}
  1707. if _storage._optionalSint32 != rhs_storage._optionalSint32 {return false}
  1708. if _storage._optionalSint64 != rhs_storage._optionalSint64 {return false}
  1709. if _storage._optionalFixed32 != rhs_storage._optionalFixed32 {return false}
  1710. if _storage._optionalFixed64 != rhs_storage._optionalFixed64 {return false}
  1711. if _storage._optionalSfixed32 != rhs_storage._optionalSfixed32 {return false}
  1712. if _storage._optionalSfixed64 != rhs_storage._optionalSfixed64 {return false}
  1713. if _storage._optionalFloat != rhs_storage._optionalFloat {return false}
  1714. if _storage._optionalDouble != rhs_storage._optionalDouble {return false}
  1715. if _storage._optionalBool != rhs_storage._optionalBool {return false}
  1716. if _storage._optionalString != rhs_storage._optionalString {return false}
  1717. if _storage._optionalBytes != rhs_storage._optionalBytes {return false}
  1718. if _storage._optionalNestedMessage != rhs_storage._optionalNestedMessage {return false}
  1719. if _storage._optionalForeignMessage != rhs_storage._optionalForeignMessage {return false}
  1720. if _storage._optionalNestedEnum != rhs_storage._optionalNestedEnum {return false}
  1721. if _storage._optionalForeignEnum != rhs_storage._optionalForeignEnum {return false}
  1722. if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false}
  1723. if _storage._optionalCord != rhs_storage._optionalCord {return false}
  1724. if _storage._recursiveMessage != rhs_storage._recursiveMessage {return false}
  1725. if _storage._repeatedInt32 != rhs_storage._repeatedInt32 {return false}
  1726. if _storage._repeatedInt64 != rhs_storage._repeatedInt64 {return false}
  1727. if _storage._repeatedUint32 != rhs_storage._repeatedUint32 {return false}
  1728. if _storage._repeatedUint64 != rhs_storage._repeatedUint64 {return false}
  1729. if _storage._repeatedSint32 != rhs_storage._repeatedSint32 {return false}
  1730. if _storage._repeatedSint64 != rhs_storage._repeatedSint64 {return false}
  1731. if _storage._repeatedFixed32 != rhs_storage._repeatedFixed32 {return false}
  1732. if _storage._repeatedFixed64 != rhs_storage._repeatedFixed64 {return false}
  1733. if _storage._repeatedSfixed32 != rhs_storage._repeatedSfixed32 {return false}
  1734. if _storage._repeatedSfixed64 != rhs_storage._repeatedSfixed64 {return false}
  1735. if _storage._repeatedFloat != rhs_storage._repeatedFloat {return false}
  1736. if _storage._repeatedDouble != rhs_storage._repeatedDouble {return false}
  1737. if _storage._repeatedBool != rhs_storage._repeatedBool {return false}
  1738. if _storage._repeatedString != rhs_storage._repeatedString {return false}
  1739. if _storage._repeatedBytes != rhs_storage._repeatedBytes {return false}
  1740. if _storage._repeatedNestedMessage != rhs_storage._repeatedNestedMessage {return false}
  1741. if _storage._repeatedForeignMessage != rhs_storage._repeatedForeignMessage {return false}
  1742. if _storage._repeatedNestedEnum != rhs_storage._repeatedNestedEnum {return false}
  1743. if _storage._repeatedForeignEnum != rhs_storage._repeatedForeignEnum {return false}
  1744. if _storage._repeatedStringPiece != rhs_storage._repeatedStringPiece {return false}
  1745. if _storage._repeatedCord != rhs_storage._repeatedCord {return false}
  1746. if _storage._packedInt32 != rhs_storage._packedInt32 {return false}
  1747. if _storage._packedInt64 != rhs_storage._packedInt64 {return false}
  1748. if _storage._packedUint32 != rhs_storage._packedUint32 {return false}
  1749. if _storage._packedUint64 != rhs_storage._packedUint64 {return false}
  1750. if _storage._packedSint32 != rhs_storage._packedSint32 {return false}
  1751. if _storage._packedSint64 != rhs_storage._packedSint64 {return false}
  1752. if _storage._packedFixed32 != rhs_storage._packedFixed32 {return false}
  1753. if _storage._packedFixed64 != rhs_storage._packedFixed64 {return false}
  1754. if _storage._packedSfixed32 != rhs_storage._packedSfixed32 {return false}
  1755. if _storage._packedSfixed64 != rhs_storage._packedSfixed64 {return false}
  1756. if _storage._packedFloat != rhs_storage._packedFloat {return false}
  1757. if _storage._packedDouble != rhs_storage._packedDouble {return false}
  1758. if _storage._packedBool != rhs_storage._packedBool {return false}
  1759. if _storage._packedNestedEnum != rhs_storage._packedNestedEnum {return false}
  1760. if _storage._unpackedInt32 != rhs_storage._unpackedInt32 {return false}
  1761. if _storage._unpackedInt64 != rhs_storage._unpackedInt64 {return false}
  1762. if _storage._unpackedUint32 != rhs_storage._unpackedUint32 {return false}
  1763. if _storage._unpackedUint64 != rhs_storage._unpackedUint64 {return false}
  1764. if _storage._unpackedSint32 != rhs_storage._unpackedSint32 {return false}
  1765. if _storage._unpackedSint64 != rhs_storage._unpackedSint64 {return false}
  1766. if _storage._unpackedFixed32 != rhs_storage._unpackedFixed32 {return false}
  1767. if _storage._unpackedFixed64 != rhs_storage._unpackedFixed64 {return false}
  1768. if _storage._unpackedSfixed32 != rhs_storage._unpackedSfixed32 {return false}
  1769. if _storage._unpackedSfixed64 != rhs_storage._unpackedSfixed64 {return false}
  1770. if _storage._unpackedFloat != rhs_storage._unpackedFloat {return false}
  1771. if _storage._unpackedDouble != rhs_storage._unpackedDouble {return false}
  1772. if _storage._unpackedBool != rhs_storage._unpackedBool {return false}
  1773. if _storage._unpackedNestedEnum != rhs_storage._unpackedNestedEnum {return false}
  1774. if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
  1775. if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
  1776. if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
  1777. if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
  1778. if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
  1779. if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
  1780. if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
  1781. if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
  1782. if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
  1783. if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
  1784. if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
  1785. if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
  1786. if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
  1787. if _storage._mapStringString != rhs_storage._mapStringString {return false}
  1788. if _storage._mapStringBytes != rhs_storage._mapStringBytes {return false}
  1789. if _storage._mapStringNestedMessage != rhs_storage._mapStringNestedMessage {return false}
  1790. if _storage._mapStringForeignMessage != rhs_storage._mapStringForeignMessage {return false}
  1791. if _storage._mapStringNestedEnum != rhs_storage._mapStringNestedEnum {return false}
  1792. if _storage._mapStringForeignEnum != rhs_storage._mapStringForeignEnum {return false}
  1793. if _storage._oneofField != rhs_storage._oneofField {return false}
  1794. if _storage._groupLikeType != rhs_storage._groupLikeType {return false}
  1795. if _storage._delimitedField != rhs_storage._delimitedField {return false}
  1796. return true
  1797. }
  1798. if !storagesAreEqual {return false}
  1799. }
  1800. if lhs.unknownFields != rhs.unknownFields {return false}
  1801. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  1802. return true
  1803. }
  1804. }
  1805. extension ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  1806. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1807. -1: .same(proto: "NEG"),
  1808. 0: .same(proto: "FOO"),
  1809. 1: .same(proto: "BAR"),
  1810. 2: .same(proto: "BAZ"),
  1811. ]
  1812. }
  1813. extension ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1814. static let protoMessageName: String = ProtobufTestMessages_Editions_TestAllTypesEdition2023.protoMessageName + ".NestedMessage"
  1815. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1816. 1: .same(proto: "a"),
  1817. 2: .same(proto: "corecursive"),
  1818. ]
  1819. fileprivate class _StorageClass {
  1820. var _a: Int32? = nil
  1821. var _corecursive: ProtobufTestMessages_Editions_TestAllTypesEdition2023? = nil
  1822. // This property is used as the initial default value for new instances of the type.
  1823. // The type itself is protecting the reference to its storage via CoW semantics.
  1824. // This will force a copy to be made of this reference when the first mutation occurs;
  1825. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  1826. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  1827. private init() {}
  1828. init(copying source: _StorageClass) {
  1829. _a = source._a
  1830. _corecursive = source._corecursive
  1831. }
  1832. }
  1833. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  1834. if !isKnownUniquelyReferenced(&_storage) {
  1835. _storage = _StorageClass(copying: _storage)
  1836. }
  1837. return _storage
  1838. }
  1839. public var isInitialized: Bool {
  1840. return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1841. if let v = _storage._corecursive, !v.isInitialized {return false}
  1842. return true
  1843. }
  1844. }
  1845. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1846. _ = _uniqueStorage()
  1847. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1848. while let fieldNumber = try decoder.nextFieldNumber() {
  1849. // The use of inline closures is to circumvent an issue where the compiler
  1850. // allocates stack space for every case branch when no optimizations are
  1851. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1852. switch fieldNumber {
  1853. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._a) }()
  1854. case 2: try { try decoder.decodeSingularMessageField(value: &_storage._corecursive) }()
  1855. default: break
  1856. }
  1857. }
  1858. }
  1859. }
  1860. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1861. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1862. // The use of inline closures is to circumvent an issue where the compiler
  1863. // allocates stack space for every if/case branch local when no optimizations
  1864. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1865. // https://github.com/apple/swift-protobuf/issues/1182
  1866. try { if let v = _storage._a {
  1867. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  1868. } }()
  1869. try { if let v = _storage._corecursive {
  1870. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1871. } }()
  1872. }
  1873. try unknownFields.traverse(visitor: &visitor)
  1874. }
  1875. static func ==(lhs: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage, rhs: ProtobufTestMessages_Editions_TestAllTypesEdition2023.NestedMessage) -> Bool {
  1876. if lhs._storage !== rhs._storage {
  1877. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  1878. let _storage = _args.0
  1879. let rhs_storage = _args.1
  1880. if _storage._a != rhs_storage._a {return false}
  1881. if _storage._corecursive != rhs_storage._corecursive {return false}
  1882. return true
  1883. }
  1884. if !storagesAreEqual {return false}
  1885. }
  1886. if lhs.unknownFields != rhs.unknownFields {return false}
  1887. return true
  1888. }
  1889. }
  1890. extension ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1891. static let protoMessageName: String = ProtobufTestMessages_Editions_TestAllTypesEdition2023.protoMessageName + ".GroupLikeType"
  1892. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1893. 202: .standard(proto: "group_int32"),
  1894. 203: .standard(proto: "group_uint32"),
  1895. ]
  1896. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1897. while let fieldNumber = try decoder.nextFieldNumber() {
  1898. // The use of inline closures is to circumvent an issue where the compiler
  1899. // allocates stack space for every case branch when no optimizations are
  1900. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1901. switch fieldNumber {
  1902. case 202: try { try decoder.decodeSingularInt32Field(value: &self._groupInt32) }()
  1903. case 203: try { try decoder.decodeSingularUInt32Field(value: &self._groupUint32) }()
  1904. default: break
  1905. }
  1906. }
  1907. }
  1908. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1909. // The use of inline closures is to circumvent an issue where the compiler
  1910. // allocates stack space for every if/case branch local when no optimizations
  1911. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1912. // https://github.com/apple/swift-protobuf/issues/1182
  1913. try { if let v = self._groupInt32 {
  1914. try visitor.visitSingularInt32Field(value: v, fieldNumber: 202)
  1915. } }()
  1916. try { if let v = self._groupUint32 {
  1917. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 203)
  1918. } }()
  1919. try unknownFields.traverse(visitor: &visitor)
  1920. }
  1921. static func ==(lhs: ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType, rhs: ProtobufTestMessages_Editions_TestAllTypesEdition2023.GroupLikeType) -> Bool {
  1922. if lhs._groupInt32 != rhs._groupInt32 {return false}
  1923. if lhs._groupUint32 != rhs._groupUint32 {return false}
  1924. if lhs.unknownFields != rhs.unknownFields {return false}
  1925. return true
  1926. }
  1927. }
  1928. extension ProtobufTestMessages_Editions_ForeignMessageEdition2023: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1929. static let protoMessageName: String = _protobuf_package + ".ForeignMessageEdition2023"
  1930. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1931. 1: .same(proto: "c"),
  1932. ]
  1933. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1934. while let fieldNumber = try decoder.nextFieldNumber() {
  1935. // The use of inline closures is to circumvent an issue where the compiler
  1936. // allocates stack space for every case branch when no optimizations are
  1937. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1938. switch fieldNumber {
  1939. case 1: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
  1940. default: break
  1941. }
  1942. }
  1943. }
  1944. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1945. // The use of inline closures is to circumvent an issue where the compiler
  1946. // allocates stack space for every if/case branch local when no optimizations
  1947. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1948. // https://github.com/apple/swift-protobuf/issues/1182
  1949. try { if let v = self._c {
  1950. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  1951. } }()
  1952. try unknownFields.traverse(visitor: &visitor)
  1953. }
  1954. static func ==(lhs: ProtobufTestMessages_Editions_ForeignMessageEdition2023, rhs: ProtobufTestMessages_Editions_ForeignMessageEdition2023) -> Bool {
  1955. if lhs._c != rhs._c {return false}
  1956. if lhs.unknownFields != rhs.unknownFields {return false}
  1957. return true
  1958. }
  1959. }
  1960. extension ProtobufTestMessages_Editions_GroupLikeType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1961. static let protoMessageName: String = _protobuf_package + ".GroupLikeType"
  1962. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1963. 1: .same(proto: "c"),
  1964. ]
  1965. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1966. while let fieldNumber = try decoder.nextFieldNumber() {
  1967. // The use of inline closures is to circumvent an issue where the compiler
  1968. // allocates stack space for every case branch when no optimizations are
  1969. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1970. switch fieldNumber {
  1971. case 1: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
  1972. default: break
  1973. }
  1974. }
  1975. }
  1976. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1977. // The use of inline closures is to circumvent an issue where the compiler
  1978. // allocates stack space for every if/case branch local when no optimizations
  1979. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1980. // https://github.com/apple/swift-protobuf/issues/1182
  1981. try { if let v = self._c {
  1982. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  1983. } }()
  1984. try unknownFields.traverse(visitor: &visitor)
  1985. }
  1986. static func ==(lhs: ProtobufTestMessages_Editions_GroupLikeType, rhs: ProtobufTestMessages_Editions_GroupLikeType) -> Bool {
  1987. if lhs._c != rhs._c {return false}
  1988. if lhs.unknownFields != rhs.unknownFields {return false}
  1989. return true
  1990. }
  1991. }