sample_messages_edition.pb.swift 215 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. // swiftlint:disable all
  4. //
  5. // Generated by the Swift generator plugin for the protocol buffer compiler.
  6. // Source: google/protobuf/sample_messages_edition.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. // Protocol Buffers - Google's data interchange format
  11. // Copyright 2008 Google Inc. All rights reserved.
  12. //
  13. // Use of this source code is governed by a BSD-style
  14. // license that can be found in the LICENSE file or at
  15. // https://developers.google.com/open-source/licenses/bsd
  16. //
  17. // Sample messages to generate example code.
  18. import Foundation
  19. import SwiftProtobuf
  20. // If the compiler emits an error on this type, it is because this file
  21. // was generated by a version of the `protoc` Swift plug-in that is
  22. // incompatible with the version of SwiftProtobuf to which you are linking.
  23. // Please ensure that you are building against the same version of the API
  24. // that was used to generate this file.
  25. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  26. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  27. typealias Version = _2
  28. }
  29. enum ProtobufTestMessages_Edition_ForeignEnumEdition: SwiftProtobuf.Enum, Swift.CaseIterable {
  30. typealias RawValue = Int
  31. case foreignFoo // = 0
  32. case foreignBar // = 1
  33. case foreignBaz // = 2
  34. case UNRECOGNIZED(Int)
  35. init() {
  36. self = .foreignFoo
  37. }
  38. init?(rawValue: Int) {
  39. switch rawValue {
  40. case 0: self = .foreignFoo
  41. case 1: self = .foreignBar
  42. case 2: self = .foreignBaz
  43. default: self = .UNRECOGNIZED(rawValue)
  44. }
  45. }
  46. var rawValue: Int {
  47. switch self {
  48. case .foreignFoo: return 0
  49. case .foreignBar: return 1
  50. case .foreignBaz: return 2
  51. case .UNRECOGNIZED(let i): return i
  52. }
  53. }
  54. // The compiler won't synthesize support with the UNRECOGNIZED case.
  55. static let allCases: [ProtobufTestMessages_Edition_ForeignEnumEdition] = [
  56. .foreignFoo,
  57. .foreignBar,
  58. .foreignBaz,
  59. ]
  60. }
  61. /// This proto includes every type of field in both singular and repeated
  62. /// forms.
  63. ///
  64. /// Also, crucially, all messages and enums in this file are eventually
  65. /// submessages of this message. So for example, a fuzz test of TestAllTypes
  66. /// could trigger bugs that occur in any message type in this file. We verify
  67. /// this stays true in a unit test.
  68. struct ProtobufTestMessages_Edition_TestAllTypesEdition: SwiftProtobuf.ExtensibleMessage, @unchecked Sendable {
  69. // SwiftProtobuf.Message conformance is added in an extension below. See the
  70. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  71. // methods supported on all messages.
  72. /// Singular
  73. var optionalInt32: Int32 {
  74. get {return _storage._optionalInt32 ?? 0}
  75. set {_uniqueStorage()._optionalInt32 = newValue}
  76. }
  77. /// Returns true if `optionalInt32` has been explicitly set.
  78. var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil}
  79. /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  80. mutating func clearOptionalInt32() {_uniqueStorage()._optionalInt32 = nil}
  81. var optionalInt64: Int64 {
  82. get {return _storage._optionalInt64 ?? 0}
  83. set {_uniqueStorage()._optionalInt64 = newValue}
  84. }
  85. /// Returns true if `optionalInt64` has been explicitly set.
  86. var hasOptionalInt64: Bool {return _storage._optionalInt64 != nil}
  87. /// Clears the value of `optionalInt64`. Subsequent reads from it will return its default value.
  88. mutating func clearOptionalInt64() {_uniqueStorage()._optionalInt64 = nil}
  89. var optionalUint32: UInt32 {
  90. get {return _storage._optionalUint32 ?? 0}
  91. set {_uniqueStorage()._optionalUint32 = newValue}
  92. }
  93. /// Returns true if `optionalUint32` has been explicitly set.
  94. var hasOptionalUint32: Bool {return _storage._optionalUint32 != nil}
  95. /// Clears the value of `optionalUint32`. Subsequent reads from it will return its default value.
  96. mutating func clearOptionalUint32() {_uniqueStorage()._optionalUint32 = nil}
  97. var optionalUint64: UInt64 {
  98. get {return _storage._optionalUint64 ?? 0}
  99. set {_uniqueStorage()._optionalUint64 = newValue}
  100. }
  101. /// Returns true if `optionalUint64` has been explicitly set.
  102. var hasOptionalUint64: Bool {return _storage._optionalUint64 != nil}
  103. /// Clears the value of `optionalUint64`. Subsequent reads from it will return its default value.
  104. mutating func clearOptionalUint64() {_uniqueStorage()._optionalUint64 = nil}
  105. var optionalSint32: Int32 {
  106. get {return _storage._optionalSint32 ?? 0}
  107. set {_uniqueStorage()._optionalSint32 = newValue}
  108. }
  109. /// Returns true if `optionalSint32` has been explicitly set.
  110. var hasOptionalSint32: Bool {return _storage._optionalSint32 != nil}
  111. /// Clears the value of `optionalSint32`. Subsequent reads from it will return its default value.
  112. mutating func clearOptionalSint32() {_uniqueStorage()._optionalSint32 = nil}
  113. var optionalSint64: Int64 {
  114. get {return _storage._optionalSint64 ?? 0}
  115. set {_uniqueStorage()._optionalSint64 = newValue}
  116. }
  117. /// Returns true if `optionalSint64` has been explicitly set.
  118. var hasOptionalSint64: Bool {return _storage._optionalSint64 != nil}
  119. /// Clears the value of `optionalSint64`. Subsequent reads from it will return its default value.
  120. mutating func clearOptionalSint64() {_uniqueStorage()._optionalSint64 = nil}
  121. var optionalFixed32: UInt32 {
  122. get {return _storage._optionalFixed32 ?? 0}
  123. set {_uniqueStorage()._optionalFixed32 = newValue}
  124. }
  125. /// Returns true if `optionalFixed32` has been explicitly set.
  126. var hasOptionalFixed32: Bool {return _storage._optionalFixed32 != nil}
  127. /// Clears the value of `optionalFixed32`. Subsequent reads from it will return its default value.
  128. mutating func clearOptionalFixed32() {_uniqueStorage()._optionalFixed32 = nil}
  129. var optionalFixed64: UInt64 {
  130. get {return _storage._optionalFixed64 ?? 0}
  131. set {_uniqueStorage()._optionalFixed64 = newValue}
  132. }
  133. /// Returns true if `optionalFixed64` has been explicitly set.
  134. var hasOptionalFixed64: Bool {return _storage._optionalFixed64 != nil}
  135. /// Clears the value of `optionalFixed64`. Subsequent reads from it will return its default value.
  136. mutating func clearOptionalFixed64() {_uniqueStorage()._optionalFixed64 = nil}
  137. var optionalSfixed32: Int32 {
  138. get {return _storage._optionalSfixed32 ?? 0}
  139. set {_uniqueStorage()._optionalSfixed32 = newValue}
  140. }
  141. /// Returns true if `optionalSfixed32` has been explicitly set.
  142. var hasOptionalSfixed32: Bool {return _storage._optionalSfixed32 != nil}
  143. /// Clears the value of `optionalSfixed32`. Subsequent reads from it will return its default value.
  144. mutating func clearOptionalSfixed32() {_uniqueStorage()._optionalSfixed32 = nil}
  145. var optionalSfixed64: Int64 {
  146. get {return _storage._optionalSfixed64 ?? 0}
  147. set {_uniqueStorage()._optionalSfixed64 = newValue}
  148. }
  149. /// Returns true if `optionalSfixed64` has been explicitly set.
  150. var hasOptionalSfixed64: Bool {return _storage._optionalSfixed64 != nil}
  151. /// Clears the value of `optionalSfixed64`. Subsequent reads from it will return its default value.
  152. mutating func clearOptionalSfixed64() {_uniqueStorage()._optionalSfixed64 = nil}
  153. var optionalFloat: Float {
  154. get {return _storage._optionalFloat ?? 0}
  155. set {_uniqueStorage()._optionalFloat = newValue}
  156. }
  157. /// Returns true if `optionalFloat` has been explicitly set.
  158. var hasOptionalFloat: Bool {return _storage._optionalFloat != nil}
  159. /// Clears the value of `optionalFloat`. Subsequent reads from it will return its default value.
  160. mutating func clearOptionalFloat() {_uniqueStorage()._optionalFloat = nil}
  161. var optionalDouble: Double {
  162. get {return _storage._optionalDouble ?? 0}
  163. set {_uniqueStorage()._optionalDouble = newValue}
  164. }
  165. /// Returns true if `optionalDouble` has been explicitly set.
  166. var hasOptionalDouble: Bool {return _storage._optionalDouble != nil}
  167. /// Clears the value of `optionalDouble`. Subsequent reads from it will return its default value.
  168. mutating func clearOptionalDouble() {_uniqueStorage()._optionalDouble = nil}
  169. var optionalBool: Bool {
  170. get {return _storage._optionalBool ?? false}
  171. set {_uniqueStorage()._optionalBool = newValue}
  172. }
  173. /// Returns true if `optionalBool` has been explicitly set.
  174. var hasOptionalBool: Bool {return _storage._optionalBool != nil}
  175. /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
  176. mutating func clearOptionalBool() {_uniqueStorage()._optionalBool = nil}
  177. var optionalString: String {
  178. get {return _storage._optionalString ?? String()}
  179. set {_uniqueStorage()._optionalString = newValue}
  180. }
  181. /// Returns true if `optionalString` has been explicitly set.
  182. var hasOptionalString: Bool {return _storage._optionalString != nil}
  183. /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  184. mutating func clearOptionalString() {_uniqueStorage()._optionalString = nil}
  185. var optionalBytes: Data {
  186. get {return _storage._optionalBytes ?? Data()}
  187. set {_uniqueStorage()._optionalBytes = newValue}
  188. }
  189. /// Returns true if `optionalBytes` has been explicitly set.
  190. var hasOptionalBytes: Bool {return _storage._optionalBytes != nil}
  191. /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value.
  192. mutating func clearOptionalBytes() {_uniqueStorage()._optionalBytes = nil}
  193. var optionalNestedMessage: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage {
  194. get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage()}
  195. set {_uniqueStorage()._optionalNestedMessage = newValue}
  196. }
  197. /// Returns true if `optionalNestedMessage` has been explicitly set.
  198. var hasOptionalNestedMessage: Bool {return _storage._optionalNestedMessage != nil}
  199. /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value.
  200. mutating func clearOptionalNestedMessage() {_uniqueStorage()._optionalNestedMessage = nil}
  201. var optionalForeignMessage: ProtobufTestMessages_Edition_ForeignMessageEdition {
  202. get {return _storage._optionalForeignMessage ?? ProtobufTestMessages_Edition_ForeignMessageEdition()}
  203. set {_uniqueStorage()._optionalForeignMessage = newValue}
  204. }
  205. /// Returns true if `optionalForeignMessage` has been explicitly set.
  206. var hasOptionalForeignMessage: Bool {return _storage._optionalForeignMessage != nil}
  207. /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value.
  208. mutating func clearOptionalForeignMessage() {_uniqueStorage()._optionalForeignMessage = nil}
  209. var optionalNestedEnum: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum {
  210. get {return _storage._optionalNestedEnum ?? .foo}
  211. set {_uniqueStorage()._optionalNestedEnum = newValue}
  212. }
  213. /// Returns true if `optionalNestedEnum` has been explicitly set.
  214. var hasOptionalNestedEnum: Bool {return _storage._optionalNestedEnum != nil}
  215. /// Clears the value of `optionalNestedEnum`. Subsequent reads from it will return its default value.
  216. mutating func clearOptionalNestedEnum() {_uniqueStorage()._optionalNestedEnum = nil}
  217. var optionalForeignEnum: ProtobufTestMessages_Edition_ForeignEnumEdition {
  218. get {return _storage._optionalForeignEnum ?? .foreignFoo}
  219. set {_uniqueStorage()._optionalForeignEnum = newValue}
  220. }
  221. /// Returns true if `optionalForeignEnum` has been explicitly set.
  222. var hasOptionalForeignEnum: Bool {return _storage._optionalForeignEnum != nil}
  223. /// Clears the value of `optionalForeignEnum`. Subsequent reads from it will return its default value.
  224. mutating func clearOptionalForeignEnum() {_uniqueStorage()._optionalForeignEnum = nil}
  225. var optionalStringPiece: String {
  226. get {return _storage._optionalStringPiece ?? String()}
  227. set {_uniqueStorage()._optionalStringPiece = newValue}
  228. }
  229. /// Returns true if `optionalStringPiece` has been explicitly set.
  230. var hasOptionalStringPiece: Bool {return _storage._optionalStringPiece != nil}
  231. /// Clears the value of `optionalStringPiece`. Subsequent reads from it will return its default value.
  232. mutating func clearOptionalStringPiece() {_uniqueStorage()._optionalStringPiece = nil}
  233. var optionalCord: String {
  234. get {return _storage._optionalCord ?? String()}
  235. set {_uniqueStorage()._optionalCord = newValue}
  236. }
  237. /// Returns true if `optionalCord` has been explicitly set.
  238. var hasOptionalCord: Bool {return _storage._optionalCord != nil}
  239. /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value.
  240. mutating func clearOptionalCord() {_uniqueStorage()._optionalCord = nil}
  241. var recursiveMessage: ProtobufTestMessages_Edition_TestAllTypesEdition {
  242. get {return _storage._recursiveMessage ?? ProtobufTestMessages_Edition_TestAllTypesEdition()}
  243. set {_uniqueStorage()._recursiveMessage = newValue}
  244. }
  245. /// Returns true if `recursiveMessage` has been explicitly set.
  246. var hasRecursiveMessage: Bool {return _storage._recursiveMessage != nil}
  247. /// Clears the value of `recursiveMessage`. Subsequent reads from it will return its default value.
  248. mutating func clearRecursiveMessage() {_uniqueStorage()._recursiveMessage = nil}
  249. /// Repeated
  250. var repeatedInt32: [Int32] {
  251. get {return _storage._repeatedInt32}
  252. set {_uniqueStorage()._repeatedInt32 = newValue}
  253. }
  254. var repeatedInt64: [Int64] {
  255. get {return _storage._repeatedInt64}
  256. set {_uniqueStorage()._repeatedInt64 = newValue}
  257. }
  258. var repeatedUint32: [UInt32] {
  259. get {return _storage._repeatedUint32}
  260. set {_uniqueStorage()._repeatedUint32 = newValue}
  261. }
  262. var repeatedUint64: [UInt64] {
  263. get {return _storage._repeatedUint64}
  264. set {_uniqueStorage()._repeatedUint64 = newValue}
  265. }
  266. var repeatedSint32: [Int32] {
  267. get {return _storage._repeatedSint32}
  268. set {_uniqueStorage()._repeatedSint32 = newValue}
  269. }
  270. var repeatedSint64: [Int64] {
  271. get {return _storage._repeatedSint64}
  272. set {_uniqueStorage()._repeatedSint64 = newValue}
  273. }
  274. var repeatedFixed32: [UInt32] {
  275. get {return _storage._repeatedFixed32}
  276. set {_uniqueStorage()._repeatedFixed32 = newValue}
  277. }
  278. var repeatedFixed64: [UInt64] {
  279. get {return _storage._repeatedFixed64}
  280. set {_uniqueStorage()._repeatedFixed64 = newValue}
  281. }
  282. var repeatedSfixed32: [Int32] {
  283. get {return _storage._repeatedSfixed32}
  284. set {_uniqueStorage()._repeatedSfixed32 = newValue}
  285. }
  286. var repeatedSfixed64: [Int64] {
  287. get {return _storage._repeatedSfixed64}
  288. set {_uniqueStorage()._repeatedSfixed64 = newValue}
  289. }
  290. var repeatedFloat: [Float] {
  291. get {return _storage._repeatedFloat}
  292. set {_uniqueStorage()._repeatedFloat = newValue}
  293. }
  294. var repeatedDouble: [Double] {
  295. get {return _storage._repeatedDouble}
  296. set {_uniqueStorage()._repeatedDouble = newValue}
  297. }
  298. var repeatedBool: [Bool] {
  299. get {return _storage._repeatedBool}
  300. set {_uniqueStorage()._repeatedBool = newValue}
  301. }
  302. var repeatedString: [String] {
  303. get {return _storage._repeatedString}
  304. set {_uniqueStorage()._repeatedString = newValue}
  305. }
  306. var repeatedBytes: [Data] {
  307. get {return _storage._repeatedBytes}
  308. set {_uniqueStorage()._repeatedBytes = newValue}
  309. }
  310. var repeatedNestedMessage: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage] {
  311. get {return _storage._repeatedNestedMessage}
  312. set {_uniqueStorage()._repeatedNestedMessage = newValue}
  313. }
  314. var repeatedForeignMessage: [ProtobufTestMessages_Edition_ForeignMessageEdition] {
  315. get {return _storage._repeatedForeignMessage}
  316. set {_uniqueStorage()._repeatedForeignMessage = newValue}
  317. }
  318. var repeatedNestedEnum: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum] {
  319. get {return _storage._repeatedNestedEnum}
  320. set {_uniqueStorage()._repeatedNestedEnum = newValue}
  321. }
  322. var repeatedForeignEnum: [ProtobufTestMessages_Edition_ForeignEnumEdition] {
  323. get {return _storage._repeatedForeignEnum}
  324. set {_uniqueStorage()._repeatedForeignEnum = newValue}
  325. }
  326. var repeatedStringPiece: [String] {
  327. get {return _storage._repeatedStringPiece}
  328. set {_uniqueStorage()._repeatedStringPiece = newValue}
  329. }
  330. var repeatedCord: [String] {
  331. get {return _storage._repeatedCord}
  332. set {_uniqueStorage()._repeatedCord = newValue}
  333. }
  334. /// Packed
  335. var packedInt32: [Int32] {
  336. get {return _storage._packedInt32}
  337. set {_uniqueStorage()._packedInt32 = newValue}
  338. }
  339. var packedInt64: [Int64] {
  340. get {return _storage._packedInt64}
  341. set {_uniqueStorage()._packedInt64 = newValue}
  342. }
  343. var packedUint32: [UInt32] {
  344. get {return _storage._packedUint32}
  345. set {_uniqueStorage()._packedUint32 = newValue}
  346. }
  347. var packedUint64: [UInt64] {
  348. get {return _storage._packedUint64}
  349. set {_uniqueStorage()._packedUint64 = newValue}
  350. }
  351. var packedSint32: [Int32] {
  352. get {return _storage._packedSint32}
  353. set {_uniqueStorage()._packedSint32 = newValue}
  354. }
  355. var packedSint64: [Int64] {
  356. get {return _storage._packedSint64}
  357. set {_uniqueStorage()._packedSint64 = newValue}
  358. }
  359. var packedFixed32: [UInt32] {
  360. get {return _storage._packedFixed32}
  361. set {_uniqueStorage()._packedFixed32 = newValue}
  362. }
  363. var packedFixed64: [UInt64] {
  364. get {return _storage._packedFixed64}
  365. set {_uniqueStorage()._packedFixed64 = newValue}
  366. }
  367. var packedSfixed32: [Int32] {
  368. get {return _storage._packedSfixed32}
  369. set {_uniqueStorage()._packedSfixed32 = newValue}
  370. }
  371. var packedSfixed64: [Int64] {
  372. get {return _storage._packedSfixed64}
  373. set {_uniqueStorage()._packedSfixed64 = newValue}
  374. }
  375. var packedFloat: [Float] {
  376. get {return _storage._packedFloat}
  377. set {_uniqueStorage()._packedFloat = newValue}
  378. }
  379. var packedDouble: [Double] {
  380. get {return _storage._packedDouble}
  381. set {_uniqueStorage()._packedDouble = newValue}
  382. }
  383. var packedBool: [Bool] {
  384. get {return _storage._packedBool}
  385. set {_uniqueStorage()._packedBool = newValue}
  386. }
  387. var packedNestedEnum: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum] {
  388. get {return _storage._packedNestedEnum}
  389. set {_uniqueStorage()._packedNestedEnum = newValue}
  390. }
  391. /// Unpacked
  392. var unpackedInt32: [Int32] {
  393. get {return _storage._unpackedInt32}
  394. set {_uniqueStorage()._unpackedInt32 = newValue}
  395. }
  396. var unpackedInt64: [Int64] {
  397. get {return _storage._unpackedInt64}
  398. set {_uniqueStorage()._unpackedInt64 = newValue}
  399. }
  400. var unpackedUint32: [UInt32] {
  401. get {return _storage._unpackedUint32}
  402. set {_uniqueStorage()._unpackedUint32 = newValue}
  403. }
  404. var unpackedUint64: [UInt64] {
  405. get {return _storage._unpackedUint64}
  406. set {_uniqueStorage()._unpackedUint64 = newValue}
  407. }
  408. var unpackedSint32: [Int32] {
  409. get {return _storage._unpackedSint32}
  410. set {_uniqueStorage()._unpackedSint32 = newValue}
  411. }
  412. var unpackedSint64: [Int64] {
  413. get {return _storage._unpackedSint64}
  414. set {_uniqueStorage()._unpackedSint64 = newValue}
  415. }
  416. var unpackedFixed32: [UInt32] {
  417. get {return _storage._unpackedFixed32}
  418. set {_uniqueStorage()._unpackedFixed32 = newValue}
  419. }
  420. var unpackedFixed64: [UInt64] {
  421. get {return _storage._unpackedFixed64}
  422. set {_uniqueStorage()._unpackedFixed64 = newValue}
  423. }
  424. var unpackedSfixed32: [Int32] {
  425. get {return _storage._unpackedSfixed32}
  426. set {_uniqueStorage()._unpackedSfixed32 = newValue}
  427. }
  428. var unpackedSfixed64: [Int64] {
  429. get {return _storage._unpackedSfixed64}
  430. set {_uniqueStorage()._unpackedSfixed64 = newValue}
  431. }
  432. var unpackedFloat: [Float] {
  433. get {return _storage._unpackedFloat}
  434. set {_uniqueStorage()._unpackedFloat = newValue}
  435. }
  436. var unpackedDouble: [Double] {
  437. get {return _storage._unpackedDouble}
  438. set {_uniqueStorage()._unpackedDouble = newValue}
  439. }
  440. var unpackedBool: [Bool] {
  441. get {return _storage._unpackedBool}
  442. set {_uniqueStorage()._unpackedBool = newValue}
  443. }
  444. var unpackedNestedEnum: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum] {
  445. get {return _storage._unpackedNestedEnum}
  446. set {_uniqueStorage()._unpackedNestedEnum = newValue}
  447. }
  448. /// Map
  449. var mapInt32Int32: Dictionary<Int32,Int32> {
  450. get {return _storage._mapInt32Int32}
  451. set {_uniqueStorage()._mapInt32Int32 = newValue}
  452. }
  453. var mapInt64Int64: Dictionary<Int64,Int64> {
  454. get {return _storage._mapInt64Int64}
  455. set {_uniqueStorage()._mapInt64Int64 = newValue}
  456. }
  457. var mapUint32Uint32: Dictionary<UInt32,UInt32> {
  458. get {return _storage._mapUint32Uint32}
  459. set {_uniqueStorage()._mapUint32Uint32 = newValue}
  460. }
  461. var mapUint64Uint64: Dictionary<UInt64,UInt64> {
  462. get {return _storage._mapUint64Uint64}
  463. set {_uniqueStorage()._mapUint64Uint64 = newValue}
  464. }
  465. var mapSint32Sint32: Dictionary<Int32,Int32> {
  466. get {return _storage._mapSint32Sint32}
  467. set {_uniqueStorage()._mapSint32Sint32 = newValue}
  468. }
  469. var mapSint64Sint64: Dictionary<Int64,Int64> {
  470. get {return _storage._mapSint64Sint64}
  471. set {_uniqueStorage()._mapSint64Sint64 = newValue}
  472. }
  473. var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
  474. get {return _storage._mapFixed32Fixed32}
  475. set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
  476. }
  477. var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
  478. get {return _storage._mapFixed64Fixed64}
  479. set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
  480. }
  481. var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
  482. get {return _storage._mapSfixed32Sfixed32}
  483. set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
  484. }
  485. var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
  486. get {return _storage._mapSfixed64Sfixed64}
  487. set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
  488. }
  489. var mapInt32Float: Dictionary<Int32,Float> {
  490. get {return _storage._mapInt32Float}
  491. set {_uniqueStorage()._mapInt32Float = newValue}
  492. }
  493. var mapInt32Double: Dictionary<Int32,Double> {
  494. get {return _storage._mapInt32Double}
  495. set {_uniqueStorage()._mapInt32Double = newValue}
  496. }
  497. var mapBoolBool: Dictionary<Bool,Bool> {
  498. get {return _storage._mapBoolBool}
  499. set {_uniqueStorage()._mapBoolBool = newValue}
  500. }
  501. var mapStringString: Dictionary<String,String> {
  502. get {return _storage._mapStringString}
  503. set {_uniqueStorage()._mapStringString = newValue}
  504. }
  505. var mapStringBytes: Dictionary<String,Data> {
  506. get {return _storage._mapStringBytes}
  507. set {_uniqueStorage()._mapStringBytes = newValue}
  508. }
  509. var mapStringNestedMessage: Dictionary<String,ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage> {
  510. get {return _storage._mapStringNestedMessage}
  511. set {_uniqueStorage()._mapStringNestedMessage = newValue}
  512. }
  513. var mapStringForeignMessage: Dictionary<String,ProtobufTestMessages_Edition_ForeignMessageEdition> {
  514. get {return _storage._mapStringForeignMessage}
  515. set {_uniqueStorage()._mapStringForeignMessage = newValue}
  516. }
  517. var mapStringNestedEnum: Dictionary<String,ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum> {
  518. get {return _storage._mapStringNestedEnum}
  519. set {_uniqueStorage()._mapStringNestedEnum = newValue}
  520. }
  521. var mapStringForeignEnum: Dictionary<String,ProtobufTestMessages_Edition_ForeignEnumEdition> {
  522. get {return _storage._mapStringForeignEnum}
  523. set {_uniqueStorage()._mapStringForeignEnum = newValue}
  524. }
  525. var oneofField: OneOf_OneofField? {
  526. get {return _storage._oneofField}
  527. set {_uniqueStorage()._oneofField = newValue}
  528. }
  529. var oneofUint32: UInt32 {
  530. get {
  531. if case .oneofUint32(let v)? = _storage._oneofField {return v}
  532. return 0
  533. }
  534. set {_uniqueStorage()._oneofField = .oneofUint32(newValue)}
  535. }
  536. var oneofNestedMessage: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage {
  537. get {
  538. if case .oneofNestedMessage(let v)? = _storage._oneofField {return v}
  539. return ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage()
  540. }
  541. set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)}
  542. }
  543. var oneofString: String {
  544. get {
  545. if case .oneofString(let v)? = _storage._oneofField {return v}
  546. return String()
  547. }
  548. set {_uniqueStorage()._oneofField = .oneofString(newValue)}
  549. }
  550. var oneofBytes: Data {
  551. get {
  552. if case .oneofBytes(let v)? = _storage._oneofField {return v}
  553. return Data()
  554. }
  555. set {_uniqueStorage()._oneofField = .oneofBytes(newValue)}
  556. }
  557. var oneofBool: Bool {
  558. get {
  559. if case .oneofBool(let v)? = _storage._oneofField {return v}
  560. return false
  561. }
  562. set {_uniqueStorage()._oneofField = .oneofBool(newValue)}
  563. }
  564. var oneofUint64: UInt64 {
  565. get {
  566. if case .oneofUint64(let v)? = _storage._oneofField {return v}
  567. return 0
  568. }
  569. set {_uniqueStorage()._oneofField = .oneofUint64(newValue)}
  570. }
  571. var oneofFloat: Float {
  572. get {
  573. if case .oneofFloat(let v)? = _storage._oneofField {return v}
  574. return 0
  575. }
  576. set {_uniqueStorage()._oneofField = .oneofFloat(newValue)}
  577. }
  578. var oneofDouble: Double {
  579. get {
  580. if case .oneofDouble(let v)? = _storage._oneofField {return v}
  581. return 0
  582. }
  583. set {_uniqueStorage()._oneofField = .oneofDouble(newValue)}
  584. }
  585. var oneofEnum: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum {
  586. get {
  587. if case .oneofEnum(let v)? = _storage._oneofField {return v}
  588. return .foo
  589. }
  590. set {_uniqueStorage()._oneofField = .oneofEnum(newValue)}
  591. }
  592. var data: ProtobufTestMessages_Edition_TestAllTypesEdition.DataMessage {
  593. get {return _storage._data ?? ProtobufTestMessages_Edition_TestAllTypesEdition.DataMessage()}
  594. set {_uniqueStorage()._data = newValue}
  595. }
  596. /// Returns true if `data` has been explicitly set.
  597. var hasData: Bool {return _storage._data != nil}
  598. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  599. mutating func clearData() {_uniqueStorage()._data = nil}
  600. /// default values
  601. var defaultInt32: Int32 {
  602. get {return _storage._defaultInt32 ?? -123456789}
  603. set {_uniqueStorage()._defaultInt32 = newValue}
  604. }
  605. /// Returns true if `defaultInt32` has been explicitly set.
  606. var hasDefaultInt32: Bool {return _storage._defaultInt32 != nil}
  607. /// Clears the value of `defaultInt32`. Subsequent reads from it will return its default value.
  608. mutating func clearDefaultInt32() {_uniqueStorage()._defaultInt32 = nil}
  609. var defaultInt64: Int64 {
  610. get {return _storage._defaultInt64 ?? -9123456789123456789}
  611. set {_uniqueStorage()._defaultInt64 = newValue}
  612. }
  613. /// Returns true if `defaultInt64` has been explicitly set.
  614. var hasDefaultInt64: Bool {return _storage._defaultInt64 != nil}
  615. /// Clears the value of `defaultInt64`. Subsequent reads from it will return its default value.
  616. mutating func clearDefaultInt64() {_uniqueStorage()._defaultInt64 = nil}
  617. var defaultUint32: UInt32 {
  618. get {return _storage._defaultUint32 ?? 2123456789}
  619. set {_uniqueStorage()._defaultUint32 = newValue}
  620. }
  621. /// Returns true if `defaultUint32` has been explicitly set.
  622. var hasDefaultUint32: Bool {return _storage._defaultUint32 != nil}
  623. /// Clears the value of `defaultUint32`. Subsequent reads from it will return its default value.
  624. mutating func clearDefaultUint32() {_uniqueStorage()._defaultUint32 = nil}
  625. var defaultUint64: UInt64 {
  626. get {return _storage._defaultUint64 ?? 10123456789123456789}
  627. set {_uniqueStorage()._defaultUint64 = newValue}
  628. }
  629. /// Returns true if `defaultUint64` has been explicitly set.
  630. var hasDefaultUint64: Bool {return _storage._defaultUint64 != nil}
  631. /// Clears the value of `defaultUint64`. Subsequent reads from it will return its default value.
  632. mutating func clearDefaultUint64() {_uniqueStorage()._defaultUint64 = nil}
  633. var defaultSint32: Int32 {
  634. get {return _storage._defaultSint32 ?? -123456789}
  635. set {_uniqueStorage()._defaultSint32 = newValue}
  636. }
  637. /// Returns true if `defaultSint32` has been explicitly set.
  638. var hasDefaultSint32: Bool {return _storage._defaultSint32 != nil}
  639. /// Clears the value of `defaultSint32`. Subsequent reads from it will return its default value.
  640. mutating func clearDefaultSint32() {_uniqueStorage()._defaultSint32 = nil}
  641. var defaultSint64: Int64 {
  642. get {return _storage._defaultSint64 ?? -9123456789123456789}
  643. set {_uniqueStorage()._defaultSint64 = newValue}
  644. }
  645. /// Returns true if `defaultSint64` has been explicitly set.
  646. var hasDefaultSint64: Bool {return _storage._defaultSint64 != nil}
  647. /// Clears the value of `defaultSint64`. Subsequent reads from it will return its default value.
  648. mutating func clearDefaultSint64() {_uniqueStorage()._defaultSint64 = nil}
  649. var defaultFixed32: UInt32 {
  650. get {return _storage._defaultFixed32 ?? 2123456789}
  651. set {_uniqueStorage()._defaultFixed32 = newValue}
  652. }
  653. /// Returns true if `defaultFixed32` has been explicitly set.
  654. var hasDefaultFixed32: Bool {return _storage._defaultFixed32 != nil}
  655. /// Clears the value of `defaultFixed32`. Subsequent reads from it will return its default value.
  656. mutating func clearDefaultFixed32() {_uniqueStorage()._defaultFixed32 = nil}
  657. var defaultFixed64: UInt64 {
  658. get {return _storage._defaultFixed64 ?? 10123456789123456789}
  659. set {_uniqueStorage()._defaultFixed64 = newValue}
  660. }
  661. /// Returns true if `defaultFixed64` has been explicitly set.
  662. var hasDefaultFixed64: Bool {return _storage._defaultFixed64 != nil}
  663. /// Clears the value of `defaultFixed64`. Subsequent reads from it will return its default value.
  664. mutating func clearDefaultFixed64() {_uniqueStorage()._defaultFixed64 = nil}
  665. var defaultSfixed32: Int32 {
  666. get {return _storage._defaultSfixed32 ?? -123456789}
  667. set {_uniqueStorage()._defaultSfixed32 = newValue}
  668. }
  669. /// Returns true if `defaultSfixed32` has been explicitly set.
  670. var hasDefaultSfixed32: Bool {return _storage._defaultSfixed32 != nil}
  671. /// Clears the value of `defaultSfixed32`. Subsequent reads from it will return its default value.
  672. mutating func clearDefaultSfixed32() {_uniqueStorage()._defaultSfixed32 = nil}
  673. var defaultSfixed64: Int64 {
  674. get {return _storage._defaultSfixed64 ?? -9123456789123456789}
  675. set {_uniqueStorage()._defaultSfixed64 = newValue}
  676. }
  677. /// Returns true if `defaultSfixed64` has been explicitly set.
  678. var hasDefaultSfixed64: Bool {return _storage._defaultSfixed64 != nil}
  679. /// Clears the value of `defaultSfixed64`. Subsequent reads from it will return its default value.
  680. mutating func clearDefaultSfixed64() {_uniqueStorage()._defaultSfixed64 = nil}
  681. var defaultFloat: Float {
  682. get {return _storage._defaultFloat ?? 9e+09}
  683. set {_uniqueStorage()._defaultFloat = newValue}
  684. }
  685. /// Returns true if `defaultFloat` has been explicitly set.
  686. var hasDefaultFloat: Bool {return _storage._defaultFloat != nil}
  687. /// Clears the value of `defaultFloat`. Subsequent reads from it will return its default value.
  688. mutating func clearDefaultFloat() {_uniqueStorage()._defaultFloat = nil}
  689. var defaultDouble: Double {
  690. get {return _storage._defaultDouble ?? 7e+22}
  691. set {_uniqueStorage()._defaultDouble = newValue}
  692. }
  693. /// Returns true if `defaultDouble` has been explicitly set.
  694. var hasDefaultDouble: Bool {return _storage._defaultDouble != nil}
  695. /// Clears the value of `defaultDouble`. Subsequent reads from it will return its default value.
  696. mutating func clearDefaultDouble() {_uniqueStorage()._defaultDouble = nil}
  697. var defaultBool: Bool {
  698. get {return _storage._defaultBool ?? true}
  699. set {_uniqueStorage()._defaultBool = newValue}
  700. }
  701. /// Returns true if `defaultBool` has been explicitly set.
  702. var hasDefaultBool: Bool {return _storage._defaultBool != nil}
  703. /// Clears the value of `defaultBool`. Subsequent reads from it will return its default value.
  704. mutating func clearDefaultBool() {_uniqueStorage()._defaultBool = nil}
  705. var defaultString: String {
  706. get {return _storage._defaultString ?? "Rosebud"}
  707. set {_uniqueStorage()._defaultString = newValue}
  708. }
  709. /// Returns true if `defaultString` has been explicitly set.
  710. var hasDefaultString: Bool {return _storage._defaultString != nil}
  711. /// Clears the value of `defaultString`. Subsequent reads from it will return its default value.
  712. mutating func clearDefaultString() {_uniqueStorage()._defaultString = nil}
  713. var defaultBytes: Data {
  714. get {return _storage._defaultBytes ?? Data([106, 111, 115, 104, 117, 97])}
  715. set {_uniqueStorage()._defaultBytes = newValue}
  716. }
  717. /// Returns true if `defaultBytes` has been explicitly set.
  718. var hasDefaultBytes: Bool {return _storage._defaultBytes != nil}
  719. /// Clears the value of `defaultBytes`. Subsequent reads from it will return its default value.
  720. mutating func clearDefaultBytes() {_uniqueStorage()._defaultBytes = nil}
  721. /// Test field-name-to-JSON-name convention.
  722. /// (protobuf says names can be any valid C/C++ identifier.)
  723. var fieldname1: Int32 {
  724. get {return _storage._fieldname1 ?? 0}
  725. set {_uniqueStorage()._fieldname1 = newValue}
  726. }
  727. /// Returns true if `fieldname1` has been explicitly set.
  728. var hasFieldname1: Bool {return _storage._fieldname1 != nil}
  729. /// Clears the value of `fieldname1`. Subsequent reads from it will return its default value.
  730. mutating func clearFieldname1() {_uniqueStorage()._fieldname1 = nil}
  731. var fieldName2: Int32 {
  732. get {return _storage._fieldName2 ?? 0}
  733. set {_uniqueStorage()._fieldName2 = newValue}
  734. }
  735. /// Returns true if `fieldName2` has been explicitly set.
  736. var hasFieldName2: Bool {return _storage._fieldName2 != nil}
  737. /// Clears the value of `fieldName2`. Subsequent reads from it will return its default value.
  738. mutating func clearFieldName2() {_uniqueStorage()._fieldName2 = nil}
  739. var fieldName3: Int32 {
  740. get {return _storage._fieldName3 ?? 0}
  741. set {_uniqueStorage()._fieldName3 = newValue}
  742. }
  743. /// Returns true if `fieldName3` has been explicitly set.
  744. var hasFieldName3: Bool {return _storage._fieldName3 != nil}
  745. /// Clears the value of `fieldName3`. Subsequent reads from it will return its default value.
  746. mutating func clearFieldName3() {_uniqueStorage()._fieldName3 = nil}
  747. var field_Name4_: Int32 {
  748. get {return _storage._field_Name4_ ?? 0}
  749. set {_uniqueStorage()._field_Name4_ = newValue}
  750. }
  751. /// Returns true if `field_Name4_` has been explicitly set.
  752. var hasField_Name4_: Bool {return _storage._field_Name4_ != nil}
  753. /// Clears the value of `field_Name4_`. Subsequent reads from it will return its default value.
  754. mutating func clearField_Name4_() {_uniqueStorage()._field_Name4_ = nil}
  755. var field0Name5: Int32 {
  756. get {return _storage._field0Name5 ?? 0}
  757. set {_uniqueStorage()._field0Name5 = newValue}
  758. }
  759. /// Returns true if `field0Name5` has been explicitly set.
  760. var hasField0Name5: Bool {return _storage._field0Name5 != nil}
  761. /// Clears the value of `field0Name5`. Subsequent reads from it will return its default value.
  762. mutating func clearField0Name5() {_uniqueStorage()._field0Name5 = nil}
  763. var field0Name6: Int32 {
  764. get {return _storage._field0Name6 ?? 0}
  765. set {_uniqueStorage()._field0Name6 = newValue}
  766. }
  767. /// Returns true if `field0Name6` has been explicitly set.
  768. var hasField0Name6: Bool {return _storage._field0Name6 != nil}
  769. /// Clears the value of `field0Name6`. Subsequent reads from it will return its default value.
  770. mutating func clearField0Name6() {_uniqueStorage()._field0Name6 = nil}
  771. var fieldName7: Int32 {
  772. get {return _storage._fieldName7 ?? 0}
  773. set {_uniqueStorage()._fieldName7 = newValue}
  774. }
  775. /// Returns true if `fieldName7` has been explicitly set.
  776. var hasFieldName7: Bool {return _storage._fieldName7 != nil}
  777. /// Clears the value of `fieldName7`. Subsequent reads from it will return its default value.
  778. mutating func clearFieldName7() {_uniqueStorage()._fieldName7 = nil}
  779. var fieldName8: Int32 {
  780. get {return _storage._fieldName8 ?? 0}
  781. set {_uniqueStorage()._fieldName8 = newValue}
  782. }
  783. /// Returns true if `fieldName8` has been explicitly set.
  784. var hasFieldName8: Bool {return _storage._fieldName8 != nil}
  785. /// Clears the value of `fieldName8`. Subsequent reads from it will return its default value.
  786. mutating func clearFieldName8() {_uniqueStorage()._fieldName8 = nil}
  787. var fieldName9: Int32 {
  788. get {return _storage._fieldName9 ?? 0}
  789. set {_uniqueStorage()._fieldName9 = newValue}
  790. }
  791. /// Returns true if `fieldName9` has been explicitly set.
  792. var hasFieldName9: Bool {return _storage._fieldName9 != nil}
  793. /// Clears the value of `fieldName9`. Subsequent reads from it will return its default value.
  794. mutating func clearFieldName9() {_uniqueStorage()._fieldName9 = nil}
  795. var fieldName10: Int32 {
  796. get {return _storage._fieldName10 ?? 0}
  797. set {_uniqueStorage()._fieldName10 = newValue}
  798. }
  799. /// Returns true if `fieldName10` has been explicitly set.
  800. var hasFieldName10: Bool {return _storage._fieldName10 != nil}
  801. /// Clears the value of `fieldName10`. Subsequent reads from it will return its default value.
  802. mutating func clearFieldName10() {_uniqueStorage()._fieldName10 = nil}
  803. var fieldName11: Int32 {
  804. get {return _storage._fieldName11 ?? 0}
  805. set {_uniqueStorage()._fieldName11 = newValue}
  806. }
  807. /// Returns true if `fieldName11` has been explicitly set.
  808. var hasFieldName11: Bool {return _storage._fieldName11 != nil}
  809. /// Clears the value of `fieldName11`. Subsequent reads from it will return its default value.
  810. mutating func clearFieldName11() {_uniqueStorage()._fieldName11 = nil}
  811. var fieldName12: Int32 {
  812. get {return _storage._fieldName12 ?? 0}
  813. set {_uniqueStorage()._fieldName12 = newValue}
  814. }
  815. /// Returns true if `fieldName12` has been explicitly set.
  816. var hasFieldName12: Bool {return _storage._fieldName12 != nil}
  817. /// Clears the value of `fieldName12`. Subsequent reads from it will return its default value.
  818. mutating func clearFieldName12() {_uniqueStorage()._fieldName12 = nil}
  819. var _FieldName13: Int32 {
  820. get {return _storage.__FieldName13 ?? 0}
  821. set {_uniqueStorage().__FieldName13 = newValue}
  822. }
  823. /// Returns true if `_FieldName13` has been explicitly set.
  824. var has_FieldName13: Bool {return _storage.__FieldName13 != nil}
  825. /// Clears the value of `_FieldName13`. Subsequent reads from it will return its default value.
  826. mutating func clear_FieldName13() {_uniqueStorage().__FieldName13 = nil}
  827. var _FieldName14: Int32 {
  828. get {return _storage.__FieldName14 ?? 0}
  829. set {_uniqueStorage().__FieldName14 = newValue}
  830. }
  831. /// Returns true if `_FieldName14` has been explicitly set.
  832. var has_FieldName14: Bool {return _storage.__FieldName14 != nil}
  833. /// Clears the value of `_FieldName14`. Subsequent reads from it will return its default value.
  834. mutating func clear_FieldName14() {_uniqueStorage().__FieldName14 = nil}
  835. var field_Name15: Int32 {
  836. get {return _storage._field_Name15 ?? 0}
  837. set {_uniqueStorage()._field_Name15 = newValue}
  838. }
  839. /// Returns true if `field_Name15` has been explicitly set.
  840. var hasField_Name15: Bool {return _storage._field_Name15 != nil}
  841. /// Clears the value of `field_Name15`. Subsequent reads from it will return its default value.
  842. mutating func clearField_Name15() {_uniqueStorage()._field_Name15 = nil}
  843. var field_Name16: Int32 {
  844. get {return _storage._field_Name16 ?? 0}
  845. set {_uniqueStorage()._field_Name16 = newValue}
  846. }
  847. /// Returns true if `field_Name16` has been explicitly set.
  848. var hasField_Name16: Bool {return _storage._field_Name16 != nil}
  849. /// Clears the value of `field_Name16`. Subsequent reads from it will return its default value.
  850. mutating func clearField_Name16() {_uniqueStorage()._field_Name16 = nil}
  851. var fieldName17__: Int32 {
  852. get {return _storage._fieldName17__ ?? 0}
  853. set {_uniqueStorage()._fieldName17__ = newValue}
  854. }
  855. /// Returns true if `fieldName17__` has been explicitly set.
  856. var hasFieldName17__: Bool {return _storage._fieldName17__ != nil}
  857. /// Clears the value of `fieldName17__`. Subsequent reads from it will return its default value.
  858. mutating func clearFieldName17__() {_uniqueStorage()._fieldName17__ = nil}
  859. var fieldName18__: Int32 {
  860. get {return _storage._fieldName18__ ?? 0}
  861. set {_uniqueStorage()._fieldName18__ = newValue}
  862. }
  863. /// Returns true if `fieldName18__` has been explicitly set.
  864. var hasFieldName18__: Bool {return _storage._fieldName18__ != nil}
  865. /// Clears the value of `fieldName18__`. Subsequent reads from it will return its default value.
  866. mutating func clearFieldName18__() {_uniqueStorage()._fieldName18__ = nil}
  867. var unknownFields = SwiftProtobuf.UnknownStorage()
  868. enum OneOf_OneofField: Equatable, @unchecked Sendable {
  869. case oneofUint32(UInt32)
  870. case oneofNestedMessage(ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage)
  871. case oneofString(String)
  872. case oneofBytes(Data)
  873. case oneofBool(Bool)
  874. case oneofUint64(UInt64)
  875. case oneofFloat(Float)
  876. case oneofDouble(Double)
  877. case oneofEnum(ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum)
  878. fileprivate var isInitialized: Bool {
  879. guard case .oneofNestedMessage(let v) = self else {return true}
  880. return v.isInitialized
  881. }
  882. }
  883. enum NestedEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
  884. typealias RawValue = Int
  885. case foo // = 0
  886. case bar // = 1
  887. case baz // = 2
  888. /// Intentionally negative.
  889. case neg // = -1
  890. case UNRECOGNIZED(Int)
  891. init() {
  892. self = .foo
  893. }
  894. init?(rawValue: Int) {
  895. switch rawValue {
  896. case -1: self = .neg
  897. case 0: self = .foo
  898. case 1: self = .bar
  899. case 2: self = .baz
  900. default: self = .UNRECOGNIZED(rawValue)
  901. }
  902. }
  903. var rawValue: Int {
  904. switch self {
  905. case .neg: return -1
  906. case .foo: return 0
  907. case .bar: return 1
  908. case .baz: return 2
  909. case .UNRECOGNIZED(let i): return i
  910. }
  911. }
  912. // The compiler won't synthesize support with the UNRECOGNIZED case.
  913. static let allCases: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum] = [
  914. .foo,
  915. .bar,
  916. .baz,
  917. .neg,
  918. ]
  919. }
  920. struct NestedMessage: @unchecked Sendable {
  921. // SwiftProtobuf.Message conformance is added in an extension below. See the
  922. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  923. // methods supported on all messages.
  924. var a: Int32 {
  925. get {return _storage._a ?? 0}
  926. set {_uniqueStorage()._a = newValue}
  927. }
  928. /// Returns true if `a` has been explicitly set.
  929. var hasA: Bool {return _storage._a != nil}
  930. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  931. mutating func clearA() {_uniqueStorage()._a = nil}
  932. var corecursive: ProtobufTestMessages_Edition_TestAllTypesEdition {
  933. get {return _storage._corecursive ?? ProtobufTestMessages_Edition_TestAllTypesEdition()}
  934. set {_uniqueStorage()._corecursive = newValue}
  935. }
  936. /// Returns true if `corecursive` has been explicitly set.
  937. var hasCorecursive: Bool {return _storage._corecursive != nil}
  938. /// Clears the value of `corecursive`. Subsequent reads from it will return its default value.
  939. mutating func clearCorecursive() {_uniqueStorage()._corecursive = nil}
  940. var unknownFields = SwiftProtobuf.UnknownStorage()
  941. init() {}
  942. fileprivate var _storage = _StorageClass.defaultInstance
  943. }
  944. /// groups
  945. struct DataMessage: Sendable {
  946. // SwiftProtobuf.Message conformance is added in an extension below. See the
  947. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  948. // methods supported on all messages.
  949. var groupInt32: Int32 {
  950. get {return _groupInt32 ?? 0}
  951. set {_groupInt32 = newValue}
  952. }
  953. /// Returns true if `groupInt32` has been explicitly set.
  954. var hasGroupInt32: Bool {return self._groupInt32 != nil}
  955. /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value.
  956. mutating func clearGroupInt32() {self._groupInt32 = nil}
  957. var groupUint32: UInt32 {
  958. get {return _groupUint32 ?? 0}
  959. set {_groupUint32 = newValue}
  960. }
  961. /// Returns true if `groupUint32` has been explicitly set.
  962. var hasGroupUint32: Bool {return self._groupUint32 != nil}
  963. /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value.
  964. mutating func clearGroupUint32() {self._groupUint32 = nil}
  965. var unknownFields = SwiftProtobuf.UnknownStorage()
  966. init() {}
  967. fileprivate var _groupInt32: Int32? = nil
  968. fileprivate var _groupUint32: UInt32? = nil
  969. }
  970. /// message_set test case.
  971. struct MessageSetCorrect: SwiftProtobuf.ExtensibleMessage, Sendable {
  972. // SwiftProtobuf.Message conformance is added in an extension below. See the
  973. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  974. // methods supported on all messages.
  975. var unknownFields = SwiftProtobuf.UnknownStorage()
  976. init() {}
  977. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  978. }
  979. struct MessageSetCorrectExtension1: Sendable {
  980. // SwiftProtobuf.Message conformance is added in an extension below. See the
  981. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  982. // methods supported on all messages.
  983. var str: String {
  984. get {return _str ?? String()}
  985. set {_str = newValue}
  986. }
  987. /// Returns true if `str` has been explicitly set.
  988. var hasStr: Bool {return self._str != nil}
  989. /// Clears the value of `str`. Subsequent reads from it will return its default value.
  990. mutating func clearStr() {self._str = nil}
  991. var unknownFields = SwiftProtobuf.UnknownStorage()
  992. init() {}
  993. fileprivate var _str: String? = nil
  994. }
  995. struct MessageSetCorrectExtension2: Sendable {
  996. // SwiftProtobuf.Message conformance is added in an extension below. See the
  997. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  998. // methods supported on all messages.
  999. var i: Int32 {
  1000. get {return _i ?? 0}
  1001. set {_i = newValue}
  1002. }
  1003. /// Returns true if `i` has been explicitly set.
  1004. var hasI: Bool {return self._i != nil}
  1005. /// Clears the value of `i`. Subsequent reads from it will return its default value.
  1006. mutating func clearI() {self._i = nil}
  1007. var unknownFields = SwiftProtobuf.UnknownStorage()
  1008. init() {}
  1009. fileprivate var _i: Int32? = nil
  1010. }
  1011. init() {}
  1012. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  1013. fileprivate var _storage = _StorageClass.defaultInstance
  1014. }
  1015. struct ProtobufTestMessages_Edition_ForeignMessageEdition: Sendable {
  1016. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1017. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1018. // methods supported on all messages.
  1019. var c: Int32 {
  1020. get {return _c ?? 0}
  1021. set {_c = newValue}
  1022. }
  1023. /// Returns true if `c` has been explicitly set.
  1024. var hasC: Bool {return self._c != nil}
  1025. /// Clears the value of `c`. Subsequent reads from it will return its default value.
  1026. mutating func clearC() {self._c = nil}
  1027. var unknownFields = SwiftProtobuf.UnknownStorage()
  1028. init() {}
  1029. fileprivate var _c: Int32? = nil
  1030. }
  1031. struct ProtobufTestMessages_Edition_UnknownToTestAllTypes: Sendable {
  1032. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1033. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1034. // methods supported on all messages.
  1035. var optionalInt32: Int32 {
  1036. get {return _optionalInt32 ?? 0}
  1037. set {_optionalInt32 = newValue}
  1038. }
  1039. /// Returns true if `optionalInt32` has been explicitly set.
  1040. var hasOptionalInt32: Bool {return self._optionalInt32 != nil}
  1041. /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  1042. mutating func clearOptionalInt32() {self._optionalInt32 = nil}
  1043. var optionalString: String {
  1044. get {return _optionalString ?? String()}
  1045. set {_optionalString = newValue}
  1046. }
  1047. /// Returns true if `optionalString` has been explicitly set.
  1048. var hasOptionalString: Bool {return self._optionalString != nil}
  1049. /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  1050. mutating func clearOptionalString() {self._optionalString = nil}
  1051. var nestedMessage: ProtobufTestMessages_Edition_ForeignMessageEdition {
  1052. get {return _nestedMessage ?? ProtobufTestMessages_Edition_ForeignMessageEdition()}
  1053. set {_nestedMessage = newValue}
  1054. }
  1055. /// Returns true if `nestedMessage` has been explicitly set.
  1056. var hasNestedMessage: Bool {return self._nestedMessage != nil}
  1057. /// Clears the value of `nestedMessage`. Subsequent reads from it will return its default value.
  1058. mutating func clearNestedMessage() {self._nestedMessage = nil}
  1059. var optionalGroup: ProtobufTestMessages_Edition_UnknownToTestAllTypes.OptionalGroup {
  1060. get {return _optionalGroup ?? ProtobufTestMessages_Edition_UnknownToTestAllTypes.OptionalGroup()}
  1061. set {_optionalGroup = newValue}
  1062. }
  1063. /// Returns true if `optionalGroup` has been explicitly set.
  1064. var hasOptionalGroup: Bool {return self._optionalGroup != nil}
  1065. /// Clears the value of `optionalGroup`. Subsequent reads from it will return its default value.
  1066. mutating func clearOptionalGroup() {self._optionalGroup = nil}
  1067. var optionalBool: Bool {
  1068. get {return _optionalBool ?? false}
  1069. set {_optionalBool = newValue}
  1070. }
  1071. /// Returns true if `optionalBool` has been explicitly set.
  1072. var hasOptionalBool: Bool {return self._optionalBool != nil}
  1073. /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
  1074. mutating func clearOptionalBool() {self._optionalBool = nil}
  1075. var repeatedInt32: [Int32] = []
  1076. var unknownFields = SwiftProtobuf.UnknownStorage()
  1077. struct OptionalGroup: Sendable {
  1078. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1079. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1080. // methods supported on all messages.
  1081. var a: Int32 {
  1082. get {return _a ?? 0}
  1083. set {_a = newValue}
  1084. }
  1085. /// Returns true if `a` has been explicitly set.
  1086. var hasA: Bool {return self._a != nil}
  1087. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1088. mutating func clearA() {self._a = nil}
  1089. var unknownFields = SwiftProtobuf.UnknownStorage()
  1090. init() {}
  1091. fileprivate var _a: Int32? = nil
  1092. }
  1093. init() {}
  1094. fileprivate var _optionalInt32: Int32? = nil
  1095. fileprivate var _optionalString: String? = nil
  1096. fileprivate var _nestedMessage: ProtobufTestMessages_Edition_ForeignMessageEdition? = nil
  1097. fileprivate var _optionalGroup: ProtobufTestMessages_Edition_UnknownToTestAllTypes.OptionalGroup? = nil
  1098. fileprivate var _optionalBool: Bool? = nil
  1099. }
  1100. struct ProtobufTestMessages_Edition_NullHypothesisEdition: Sendable {
  1101. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1102. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1103. // methods supported on all messages.
  1104. var unknownFields = SwiftProtobuf.UnknownStorage()
  1105. init() {}
  1106. }
  1107. struct ProtobufTestMessages_Edition_EnumOnlyEdition: Sendable {
  1108. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1109. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1110. // methods supported on all messages.
  1111. var unknownFields = SwiftProtobuf.UnknownStorage()
  1112. enum BoolEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
  1113. typealias RawValue = Int
  1114. case kFalse // = 0
  1115. case kTrue // = 1
  1116. case UNRECOGNIZED(Int)
  1117. init() {
  1118. self = .kFalse
  1119. }
  1120. init?(rawValue: Int) {
  1121. switch rawValue {
  1122. case 0: self = .kFalse
  1123. case 1: self = .kTrue
  1124. default: self = .UNRECOGNIZED(rawValue)
  1125. }
  1126. }
  1127. var rawValue: Int {
  1128. switch self {
  1129. case .kFalse: return 0
  1130. case .kTrue: return 1
  1131. case .UNRECOGNIZED(let i): return i
  1132. }
  1133. }
  1134. // The compiler won't synthesize support with the UNRECOGNIZED case.
  1135. static let allCases: [ProtobufTestMessages_Edition_EnumOnlyEdition.BoolEnum] = [
  1136. .kFalse,
  1137. .kTrue,
  1138. ]
  1139. }
  1140. init() {}
  1141. }
  1142. struct ProtobufTestMessages_Edition_OneStringEdition: Sendable {
  1143. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1144. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1145. // methods supported on all messages.
  1146. var data: String {
  1147. get {return _data ?? String()}
  1148. set {_data = newValue}
  1149. }
  1150. /// Returns true if `data` has been explicitly set.
  1151. var hasData: Bool {return self._data != nil}
  1152. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  1153. mutating func clearData() {self._data = nil}
  1154. var unknownFields = SwiftProtobuf.UnknownStorage()
  1155. init() {}
  1156. fileprivate var _data: String? = nil
  1157. }
  1158. struct ProtobufTestMessages_Edition_ProtoWithKeywords: Sendable {
  1159. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1160. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1161. // methods supported on all messages.
  1162. var inline: Int32 {
  1163. get {return _inline ?? 0}
  1164. set {_inline = newValue}
  1165. }
  1166. /// Returns true if `inline` has been explicitly set.
  1167. var hasInline: Bool {return self._inline != nil}
  1168. /// Clears the value of `inline`. Subsequent reads from it will return its default value.
  1169. mutating func clearInline() {self._inline = nil}
  1170. var concept: String {
  1171. get {return _concept ?? String()}
  1172. set {_concept = newValue}
  1173. }
  1174. /// Returns true if `concept` has been explicitly set.
  1175. var hasConcept: Bool {return self._concept != nil}
  1176. /// Clears the value of `concept`. Subsequent reads from it will return its default value.
  1177. mutating func clearConcept() {self._concept = nil}
  1178. var requires: [String] = []
  1179. var unknownFields = SwiftProtobuf.UnknownStorage()
  1180. init() {}
  1181. fileprivate var _inline: Int32? = nil
  1182. fileprivate var _concept: String? = nil
  1183. }
  1184. struct ProtobufTestMessages_Edition_TestAllRequiredTypesEdition: SwiftProtobuf.ExtensibleMessage, @unchecked Sendable {
  1185. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1186. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1187. // methods supported on all messages.
  1188. /// Singular
  1189. var requiredInt32: Int32 {
  1190. get {return _storage._requiredInt32 ?? 0}
  1191. set {_uniqueStorage()._requiredInt32 = newValue}
  1192. }
  1193. /// Returns true if `requiredInt32` has been explicitly set.
  1194. var hasRequiredInt32: Bool {return _storage._requiredInt32 != nil}
  1195. /// Clears the value of `requiredInt32`. Subsequent reads from it will return its default value.
  1196. mutating func clearRequiredInt32() {_uniqueStorage()._requiredInt32 = nil}
  1197. var requiredInt64: Int64 {
  1198. get {return _storage._requiredInt64 ?? 0}
  1199. set {_uniqueStorage()._requiredInt64 = newValue}
  1200. }
  1201. /// Returns true if `requiredInt64` has been explicitly set.
  1202. var hasRequiredInt64: Bool {return _storage._requiredInt64 != nil}
  1203. /// Clears the value of `requiredInt64`. Subsequent reads from it will return its default value.
  1204. mutating func clearRequiredInt64() {_uniqueStorage()._requiredInt64 = nil}
  1205. var requiredUint32: UInt32 {
  1206. get {return _storage._requiredUint32 ?? 0}
  1207. set {_uniqueStorage()._requiredUint32 = newValue}
  1208. }
  1209. /// Returns true if `requiredUint32` has been explicitly set.
  1210. var hasRequiredUint32: Bool {return _storage._requiredUint32 != nil}
  1211. /// Clears the value of `requiredUint32`. Subsequent reads from it will return its default value.
  1212. mutating func clearRequiredUint32() {_uniqueStorage()._requiredUint32 = nil}
  1213. var requiredUint64: UInt64 {
  1214. get {return _storage._requiredUint64 ?? 0}
  1215. set {_uniqueStorage()._requiredUint64 = newValue}
  1216. }
  1217. /// Returns true if `requiredUint64` has been explicitly set.
  1218. var hasRequiredUint64: Bool {return _storage._requiredUint64 != nil}
  1219. /// Clears the value of `requiredUint64`. Subsequent reads from it will return its default value.
  1220. mutating func clearRequiredUint64() {_uniqueStorage()._requiredUint64 = nil}
  1221. var requiredSint32: Int32 {
  1222. get {return _storage._requiredSint32 ?? 0}
  1223. set {_uniqueStorage()._requiredSint32 = newValue}
  1224. }
  1225. /// Returns true if `requiredSint32` has been explicitly set.
  1226. var hasRequiredSint32: Bool {return _storage._requiredSint32 != nil}
  1227. /// Clears the value of `requiredSint32`. Subsequent reads from it will return its default value.
  1228. mutating func clearRequiredSint32() {_uniqueStorage()._requiredSint32 = nil}
  1229. var requiredSint64: Int64 {
  1230. get {return _storage._requiredSint64 ?? 0}
  1231. set {_uniqueStorage()._requiredSint64 = newValue}
  1232. }
  1233. /// Returns true if `requiredSint64` has been explicitly set.
  1234. var hasRequiredSint64: Bool {return _storage._requiredSint64 != nil}
  1235. /// Clears the value of `requiredSint64`. Subsequent reads from it will return its default value.
  1236. mutating func clearRequiredSint64() {_uniqueStorage()._requiredSint64 = nil}
  1237. var requiredFixed32: UInt32 {
  1238. get {return _storage._requiredFixed32 ?? 0}
  1239. set {_uniqueStorage()._requiredFixed32 = newValue}
  1240. }
  1241. /// Returns true if `requiredFixed32` has been explicitly set.
  1242. var hasRequiredFixed32: Bool {return _storage._requiredFixed32 != nil}
  1243. /// Clears the value of `requiredFixed32`. Subsequent reads from it will return its default value.
  1244. mutating func clearRequiredFixed32() {_uniqueStorage()._requiredFixed32 = nil}
  1245. var requiredFixed64: UInt64 {
  1246. get {return _storage._requiredFixed64 ?? 0}
  1247. set {_uniqueStorage()._requiredFixed64 = newValue}
  1248. }
  1249. /// Returns true if `requiredFixed64` has been explicitly set.
  1250. var hasRequiredFixed64: Bool {return _storage._requiredFixed64 != nil}
  1251. /// Clears the value of `requiredFixed64`. Subsequent reads from it will return its default value.
  1252. mutating func clearRequiredFixed64() {_uniqueStorage()._requiredFixed64 = nil}
  1253. var requiredSfixed32: Int32 {
  1254. get {return _storage._requiredSfixed32 ?? 0}
  1255. set {_uniqueStorage()._requiredSfixed32 = newValue}
  1256. }
  1257. /// Returns true if `requiredSfixed32` has been explicitly set.
  1258. var hasRequiredSfixed32: Bool {return _storage._requiredSfixed32 != nil}
  1259. /// Clears the value of `requiredSfixed32`. Subsequent reads from it will return its default value.
  1260. mutating func clearRequiredSfixed32() {_uniqueStorage()._requiredSfixed32 = nil}
  1261. var requiredSfixed64: Int64 {
  1262. get {return _storage._requiredSfixed64 ?? 0}
  1263. set {_uniqueStorage()._requiredSfixed64 = newValue}
  1264. }
  1265. /// Returns true if `requiredSfixed64` has been explicitly set.
  1266. var hasRequiredSfixed64: Bool {return _storage._requiredSfixed64 != nil}
  1267. /// Clears the value of `requiredSfixed64`. Subsequent reads from it will return its default value.
  1268. mutating func clearRequiredSfixed64() {_uniqueStorage()._requiredSfixed64 = nil}
  1269. var requiredFloat: Float {
  1270. get {return _storage._requiredFloat ?? 0}
  1271. set {_uniqueStorage()._requiredFloat = newValue}
  1272. }
  1273. /// Returns true if `requiredFloat` has been explicitly set.
  1274. var hasRequiredFloat: Bool {return _storage._requiredFloat != nil}
  1275. /// Clears the value of `requiredFloat`. Subsequent reads from it will return its default value.
  1276. mutating func clearRequiredFloat() {_uniqueStorage()._requiredFloat = nil}
  1277. var requiredDouble: Double {
  1278. get {return _storage._requiredDouble ?? 0}
  1279. set {_uniqueStorage()._requiredDouble = newValue}
  1280. }
  1281. /// Returns true if `requiredDouble` has been explicitly set.
  1282. var hasRequiredDouble: Bool {return _storage._requiredDouble != nil}
  1283. /// Clears the value of `requiredDouble`. Subsequent reads from it will return its default value.
  1284. mutating func clearRequiredDouble() {_uniqueStorage()._requiredDouble = nil}
  1285. var requiredBool: Bool {
  1286. get {return _storage._requiredBool ?? false}
  1287. set {_uniqueStorage()._requiredBool = newValue}
  1288. }
  1289. /// Returns true if `requiredBool` has been explicitly set.
  1290. var hasRequiredBool: Bool {return _storage._requiredBool != nil}
  1291. /// Clears the value of `requiredBool`. Subsequent reads from it will return its default value.
  1292. mutating func clearRequiredBool() {_uniqueStorage()._requiredBool = nil}
  1293. var requiredString: String {
  1294. get {return _storage._requiredString ?? String()}
  1295. set {_uniqueStorage()._requiredString = newValue}
  1296. }
  1297. /// Returns true if `requiredString` has been explicitly set.
  1298. var hasRequiredString: Bool {return _storage._requiredString != nil}
  1299. /// Clears the value of `requiredString`. Subsequent reads from it will return its default value.
  1300. mutating func clearRequiredString() {_uniqueStorage()._requiredString = nil}
  1301. var requiredBytes: Data {
  1302. get {return _storage._requiredBytes ?? Data()}
  1303. set {_uniqueStorage()._requiredBytes = newValue}
  1304. }
  1305. /// Returns true if `requiredBytes` has been explicitly set.
  1306. var hasRequiredBytes: Bool {return _storage._requiredBytes != nil}
  1307. /// Clears the value of `requiredBytes`. Subsequent reads from it will return its default value.
  1308. mutating func clearRequiredBytes() {_uniqueStorage()._requiredBytes = nil}
  1309. var requiredNestedMessage: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedMessage {
  1310. get {return _storage._requiredNestedMessage ?? ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedMessage()}
  1311. set {_uniqueStorage()._requiredNestedMessage = newValue}
  1312. }
  1313. /// Returns true if `requiredNestedMessage` has been explicitly set.
  1314. var hasRequiredNestedMessage: Bool {return _storage._requiredNestedMessage != nil}
  1315. /// Clears the value of `requiredNestedMessage`. Subsequent reads from it will return its default value.
  1316. mutating func clearRequiredNestedMessage() {_uniqueStorage()._requiredNestedMessage = nil}
  1317. var requiredForeignMessage: ProtobufTestMessages_Edition_ForeignMessageEdition {
  1318. get {return _storage._requiredForeignMessage ?? ProtobufTestMessages_Edition_ForeignMessageEdition()}
  1319. set {_uniqueStorage()._requiredForeignMessage = newValue}
  1320. }
  1321. /// Returns true if `requiredForeignMessage` has been explicitly set.
  1322. var hasRequiredForeignMessage: Bool {return _storage._requiredForeignMessage != nil}
  1323. /// Clears the value of `requiredForeignMessage`. Subsequent reads from it will return its default value.
  1324. mutating func clearRequiredForeignMessage() {_uniqueStorage()._requiredForeignMessage = nil}
  1325. var requiredNestedEnum: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedEnum {
  1326. get {return _storage._requiredNestedEnum ?? .foo}
  1327. set {_uniqueStorage()._requiredNestedEnum = newValue}
  1328. }
  1329. /// Returns true if `requiredNestedEnum` has been explicitly set.
  1330. var hasRequiredNestedEnum: Bool {return _storage._requiredNestedEnum != nil}
  1331. /// Clears the value of `requiredNestedEnum`. Subsequent reads from it will return its default value.
  1332. mutating func clearRequiredNestedEnum() {_uniqueStorage()._requiredNestedEnum = nil}
  1333. var requiredForeignEnum: ProtobufTestMessages_Edition_ForeignEnumEdition {
  1334. get {return _storage._requiredForeignEnum ?? .foreignFoo}
  1335. set {_uniqueStorage()._requiredForeignEnum = newValue}
  1336. }
  1337. /// Returns true if `requiredForeignEnum` has been explicitly set.
  1338. var hasRequiredForeignEnum: Bool {return _storage._requiredForeignEnum != nil}
  1339. /// Clears the value of `requiredForeignEnum`. Subsequent reads from it will return its default value.
  1340. mutating func clearRequiredForeignEnum() {_uniqueStorage()._requiredForeignEnum = nil}
  1341. var requiredStringPiece: String {
  1342. get {return _storage._requiredStringPiece ?? String()}
  1343. set {_uniqueStorage()._requiredStringPiece = newValue}
  1344. }
  1345. /// Returns true if `requiredStringPiece` has been explicitly set.
  1346. var hasRequiredStringPiece: Bool {return _storage._requiredStringPiece != nil}
  1347. /// Clears the value of `requiredStringPiece`. Subsequent reads from it will return its default value.
  1348. mutating func clearRequiredStringPiece() {_uniqueStorage()._requiredStringPiece = nil}
  1349. var requiredCord: String {
  1350. get {return _storage._requiredCord ?? String()}
  1351. set {_uniqueStorage()._requiredCord = newValue}
  1352. }
  1353. /// Returns true if `requiredCord` has been explicitly set.
  1354. var hasRequiredCord: Bool {return _storage._requiredCord != nil}
  1355. /// Clears the value of `requiredCord`. Subsequent reads from it will return its default value.
  1356. mutating func clearRequiredCord() {_uniqueStorage()._requiredCord = nil}
  1357. var recursiveMessage: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition {
  1358. get {return _storage._recursiveMessage ?? ProtobufTestMessages_Edition_TestAllRequiredTypesEdition()}
  1359. set {_uniqueStorage()._recursiveMessage = newValue}
  1360. }
  1361. /// Returns true if `recursiveMessage` has been explicitly set.
  1362. var hasRecursiveMessage: Bool {return _storage._recursiveMessage != nil}
  1363. /// Clears the value of `recursiveMessage`. Subsequent reads from it will return its default value.
  1364. mutating func clearRecursiveMessage() {_uniqueStorage()._recursiveMessage = nil}
  1365. var optionalRecursiveMessage: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition {
  1366. get {return _storage._optionalRecursiveMessage ?? ProtobufTestMessages_Edition_TestAllRequiredTypesEdition()}
  1367. set {_uniqueStorage()._optionalRecursiveMessage = newValue}
  1368. }
  1369. /// Returns true if `optionalRecursiveMessage` has been explicitly set.
  1370. var hasOptionalRecursiveMessage: Bool {return _storage._optionalRecursiveMessage != nil}
  1371. /// Clears the value of `optionalRecursiveMessage`. Subsequent reads from it will return its default value.
  1372. mutating func clearOptionalRecursiveMessage() {_uniqueStorage()._optionalRecursiveMessage = nil}
  1373. var data: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.DataMessage {
  1374. get {return _storage._data ?? ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.DataMessage()}
  1375. set {_uniqueStorage()._data = newValue}
  1376. }
  1377. /// Returns true if `data` has been explicitly set.
  1378. var hasData: Bool {return _storage._data != nil}
  1379. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  1380. mutating func clearData() {_uniqueStorage()._data = nil}
  1381. /// default values
  1382. var defaultInt32: Int32 {
  1383. get {return _storage._defaultInt32 ?? -123456789}
  1384. set {_uniqueStorage()._defaultInt32 = newValue}
  1385. }
  1386. /// Returns true if `defaultInt32` has been explicitly set.
  1387. var hasDefaultInt32: Bool {return _storage._defaultInt32 != nil}
  1388. /// Clears the value of `defaultInt32`. Subsequent reads from it will return its default value.
  1389. mutating func clearDefaultInt32() {_uniqueStorage()._defaultInt32 = nil}
  1390. var defaultInt64: Int64 {
  1391. get {return _storage._defaultInt64 ?? -9123456789123456789}
  1392. set {_uniqueStorage()._defaultInt64 = newValue}
  1393. }
  1394. /// Returns true if `defaultInt64` has been explicitly set.
  1395. var hasDefaultInt64: Bool {return _storage._defaultInt64 != nil}
  1396. /// Clears the value of `defaultInt64`. Subsequent reads from it will return its default value.
  1397. mutating func clearDefaultInt64() {_uniqueStorage()._defaultInt64 = nil}
  1398. var defaultUint32: UInt32 {
  1399. get {return _storage._defaultUint32 ?? 2123456789}
  1400. set {_uniqueStorage()._defaultUint32 = newValue}
  1401. }
  1402. /// Returns true if `defaultUint32` has been explicitly set.
  1403. var hasDefaultUint32: Bool {return _storage._defaultUint32 != nil}
  1404. /// Clears the value of `defaultUint32`. Subsequent reads from it will return its default value.
  1405. mutating func clearDefaultUint32() {_uniqueStorage()._defaultUint32 = nil}
  1406. var defaultUint64: UInt64 {
  1407. get {return _storage._defaultUint64 ?? 10123456789123456789}
  1408. set {_uniqueStorage()._defaultUint64 = newValue}
  1409. }
  1410. /// Returns true if `defaultUint64` has been explicitly set.
  1411. var hasDefaultUint64: Bool {return _storage._defaultUint64 != nil}
  1412. /// Clears the value of `defaultUint64`. Subsequent reads from it will return its default value.
  1413. mutating func clearDefaultUint64() {_uniqueStorage()._defaultUint64 = nil}
  1414. var defaultSint32: Int32 {
  1415. get {return _storage._defaultSint32 ?? -123456789}
  1416. set {_uniqueStorage()._defaultSint32 = newValue}
  1417. }
  1418. /// Returns true if `defaultSint32` has been explicitly set.
  1419. var hasDefaultSint32: Bool {return _storage._defaultSint32 != nil}
  1420. /// Clears the value of `defaultSint32`. Subsequent reads from it will return its default value.
  1421. mutating func clearDefaultSint32() {_uniqueStorage()._defaultSint32 = nil}
  1422. var defaultSint64: Int64 {
  1423. get {return _storage._defaultSint64 ?? -9123456789123456789}
  1424. set {_uniqueStorage()._defaultSint64 = newValue}
  1425. }
  1426. /// Returns true if `defaultSint64` has been explicitly set.
  1427. var hasDefaultSint64: Bool {return _storage._defaultSint64 != nil}
  1428. /// Clears the value of `defaultSint64`. Subsequent reads from it will return its default value.
  1429. mutating func clearDefaultSint64() {_uniqueStorage()._defaultSint64 = nil}
  1430. var defaultFixed32: UInt32 {
  1431. get {return _storage._defaultFixed32 ?? 2123456789}
  1432. set {_uniqueStorage()._defaultFixed32 = newValue}
  1433. }
  1434. /// Returns true if `defaultFixed32` has been explicitly set.
  1435. var hasDefaultFixed32: Bool {return _storage._defaultFixed32 != nil}
  1436. /// Clears the value of `defaultFixed32`. Subsequent reads from it will return its default value.
  1437. mutating func clearDefaultFixed32() {_uniqueStorage()._defaultFixed32 = nil}
  1438. var defaultFixed64: UInt64 {
  1439. get {return _storage._defaultFixed64 ?? 10123456789123456789}
  1440. set {_uniqueStorage()._defaultFixed64 = newValue}
  1441. }
  1442. /// Returns true if `defaultFixed64` has been explicitly set.
  1443. var hasDefaultFixed64: Bool {return _storage._defaultFixed64 != nil}
  1444. /// Clears the value of `defaultFixed64`. Subsequent reads from it will return its default value.
  1445. mutating func clearDefaultFixed64() {_uniqueStorage()._defaultFixed64 = nil}
  1446. var defaultSfixed32: Int32 {
  1447. get {return _storage._defaultSfixed32 ?? -123456789}
  1448. set {_uniqueStorage()._defaultSfixed32 = newValue}
  1449. }
  1450. /// Returns true if `defaultSfixed32` has been explicitly set.
  1451. var hasDefaultSfixed32: Bool {return _storage._defaultSfixed32 != nil}
  1452. /// Clears the value of `defaultSfixed32`. Subsequent reads from it will return its default value.
  1453. mutating func clearDefaultSfixed32() {_uniqueStorage()._defaultSfixed32 = nil}
  1454. var defaultSfixed64: Int64 {
  1455. get {return _storage._defaultSfixed64 ?? -9123456789123456789}
  1456. set {_uniqueStorage()._defaultSfixed64 = newValue}
  1457. }
  1458. /// Returns true if `defaultSfixed64` has been explicitly set.
  1459. var hasDefaultSfixed64: Bool {return _storage._defaultSfixed64 != nil}
  1460. /// Clears the value of `defaultSfixed64`. Subsequent reads from it will return its default value.
  1461. mutating func clearDefaultSfixed64() {_uniqueStorage()._defaultSfixed64 = nil}
  1462. var defaultFloat: Float {
  1463. get {return _storage._defaultFloat ?? 9e+09}
  1464. set {_uniqueStorage()._defaultFloat = newValue}
  1465. }
  1466. /// Returns true if `defaultFloat` has been explicitly set.
  1467. var hasDefaultFloat: Bool {return _storage._defaultFloat != nil}
  1468. /// Clears the value of `defaultFloat`. Subsequent reads from it will return its default value.
  1469. mutating func clearDefaultFloat() {_uniqueStorage()._defaultFloat = nil}
  1470. var defaultDouble: Double {
  1471. get {return _storage._defaultDouble ?? 7e+22}
  1472. set {_uniqueStorage()._defaultDouble = newValue}
  1473. }
  1474. /// Returns true if `defaultDouble` has been explicitly set.
  1475. var hasDefaultDouble: Bool {return _storage._defaultDouble != nil}
  1476. /// Clears the value of `defaultDouble`. Subsequent reads from it will return its default value.
  1477. mutating func clearDefaultDouble() {_uniqueStorage()._defaultDouble = nil}
  1478. var defaultBool: Bool {
  1479. get {return _storage._defaultBool ?? true}
  1480. set {_uniqueStorage()._defaultBool = newValue}
  1481. }
  1482. /// Returns true if `defaultBool` has been explicitly set.
  1483. var hasDefaultBool: Bool {return _storage._defaultBool != nil}
  1484. /// Clears the value of `defaultBool`. Subsequent reads from it will return its default value.
  1485. mutating func clearDefaultBool() {_uniqueStorage()._defaultBool = nil}
  1486. var defaultString: String {
  1487. get {return _storage._defaultString ?? "Rosebud"}
  1488. set {_uniqueStorage()._defaultString = newValue}
  1489. }
  1490. /// Returns true if `defaultString` has been explicitly set.
  1491. var hasDefaultString: Bool {return _storage._defaultString != nil}
  1492. /// Clears the value of `defaultString`. Subsequent reads from it will return its default value.
  1493. mutating func clearDefaultString() {_uniqueStorage()._defaultString = nil}
  1494. var defaultBytes: Data {
  1495. get {return _storage._defaultBytes ?? Data([106, 111, 115, 104, 117, 97])}
  1496. set {_uniqueStorage()._defaultBytes = newValue}
  1497. }
  1498. /// Returns true if `defaultBytes` has been explicitly set.
  1499. var hasDefaultBytes: Bool {return _storage._defaultBytes != nil}
  1500. /// Clears the value of `defaultBytes`. Subsequent reads from it will return its default value.
  1501. mutating func clearDefaultBytes() {_uniqueStorage()._defaultBytes = nil}
  1502. var unknownFields = SwiftProtobuf.UnknownStorage()
  1503. enum NestedEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
  1504. typealias RawValue = Int
  1505. case foo // = 0
  1506. case bar // = 1
  1507. case baz // = 2
  1508. /// Intentionally negative.
  1509. case neg // = -1
  1510. case UNRECOGNIZED(Int)
  1511. init() {
  1512. self = .foo
  1513. }
  1514. init?(rawValue: Int) {
  1515. switch rawValue {
  1516. case -1: self = .neg
  1517. case 0: self = .foo
  1518. case 1: self = .bar
  1519. case 2: self = .baz
  1520. default: self = .UNRECOGNIZED(rawValue)
  1521. }
  1522. }
  1523. var rawValue: Int {
  1524. switch self {
  1525. case .neg: return -1
  1526. case .foo: return 0
  1527. case .bar: return 1
  1528. case .baz: return 2
  1529. case .UNRECOGNIZED(let i): return i
  1530. }
  1531. }
  1532. // The compiler won't synthesize support with the UNRECOGNIZED case.
  1533. static let allCases: [ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedEnum] = [
  1534. .foo,
  1535. .bar,
  1536. .baz,
  1537. .neg,
  1538. ]
  1539. }
  1540. struct NestedMessage: @unchecked Sendable {
  1541. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1542. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1543. // methods supported on all messages.
  1544. var a: Int32 {
  1545. get {return _storage._a ?? 0}
  1546. set {_uniqueStorage()._a = newValue}
  1547. }
  1548. /// Returns true if `a` has been explicitly set.
  1549. var hasA: Bool {return _storage._a != nil}
  1550. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1551. mutating func clearA() {_uniqueStorage()._a = nil}
  1552. var corecursive: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition {
  1553. get {return _storage._corecursive ?? ProtobufTestMessages_Edition_TestAllRequiredTypesEdition()}
  1554. set {_uniqueStorage()._corecursive = newValue}
  1555. }
  1556. /// Returns true if `corecursive` has been explicitly set.
  1557. var hasCorecursive: Bool {return _storage._corecursive != nil}
  1558. /// Clears the value of `corecursive`. Subsequent reads from it will return its default value.
  1559. mutating func clearCorecursive() {_uniqueStorage()._corecursive = nil}
  1560. var optionalCorecursive: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition {
  1561. get {return _storage._optionalCorecursive ?? ProtobufTestMessages_Edition_TestAllRequiredTypesEdition()}
  1562. set {_uniqueStorage()._optionalCorecursive = newValue}
  1563. }
  1564. /// Returns true if `optionalCorecursive` has been explicitly set.
  1565. var hasOptionalCorecursive: Bool {return _storage._optionalCorecursive != nil}
  1566. /// Clears the value of `optionalCorecursive`. Subsequent reads from it will return its default value.
  1567. mutating func clearOptionalCorecursive() {_uniqueStorage()._optionalCorecursive = nil}
  1568. var unknownFields = SwiftProtobuf.UnknownStorage()
  1569. init() {}
  1570. fileprivate var _storage = _StorageClass.defaultInstance
  1571. }
  1572. /// groups
  1573. struct DataMessage: Sendable {
  1574. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1575. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1576. // methods supported on all messages.
  1577. var groupInt32: Int32 {
  1578. get {return _groupInt32 ?? 0}
  1579. set {_groupInt32 = newValue}
  1580. }
  1581. /// Returns true if `groupInt32` has been explicitly set.
  1582. var hasGroupInt32: Bool {return self._groupInt32 != nil}
  1583. /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value.
  1584. mutating func clearGroupInt32() {self._groupInt32 = nil}
  1585. var groupUint32: UInt32 {
  1586. get {return _groupUint32 ?? 0}
  1587. set {_groupUint32 = newValue}
  1588. }
  1589. /// Returns true if `groupUint32` has been explicitly set.
  1590. var hasGroupUint32: Bool {return self._groupUint32 != nil}
  1591. /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value.
  1592. mutating func clearGroupUint32() {self._groupUint32 = nil}
  1593. var unknownFields = SwiftProtobuf.UnknownStorage()
  1594. init() {}
  1595. fileprivate var _groupInt32: Int32? = nil
  1596. fileprivate var _groupUint32: UInt32? = nil
  1597. }
  1598. /// message_set test case.
  1599. struct MessageSetCorrect: SwiftProtobuf.ExtensibleMessage, Sendable {
  1600. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1601. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1602. // methods supported on all messages.
  1603. var unknownFields = SwiftProtobuf.UnknownStorage()
  1604. init() {}
  1605. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  1606. }
  1607. struct MessageSetCorrectExtension1: Sendable {
  1608. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1609. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1610. // methods supported on all messages.
  1611. var str: String {
  1612. get {return _str ?? String()}
  1613. set {_str = newValue}
  1614. }
  1615. /// Returns true if `str` has been explicitly set.
  1616. var hasStr: Bool {return self._str != nil}
  1617. /// Clears the value of `str`. Subsequent reads from it will return its default value.
  1618. mutating func clearStr() {self._str = nil}
  1619. var unknownFields = SwiftProtobuf.UnknownStorage()
  1620. init() {}
  1621. fileprivate var _str: String? = nil
  1622. }
  1623. struct MessageSetCorrectExtension2: Sendable {
  1624. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1625. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1626. // methods supported on all messages.
  1627. var i: Int32 {
  1628. get {return _i ?? 0}
  1629. set {_i = newValue}
  1630. }
  1631. /// Returns true if `i` has been explicitly set.
  1632. var hasI: Bool {return self._i != nil}
  1633. /// Clears the value of `i`. Subsequent reads from it will return its default value.
  1634. mutating func clearI() {self._i = nil}
  1635. var unknownFields = SwiftProtobuf.UnknownStorage()
  1636. init() {}
  1637. fileprivate var _i: Int32? = nil
  1638. }
  1639. init() {}
  1640. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  1641. fileprivate var _storage = _StorageClass.defaultInstance
  1642. }
  1643. // MARK: - Extension support defined in sample_messages_edition.proto.
  1644. // MARK: - Extension Properties
  1645. // Swift Extensions on the extended Messages to add easy access to the declared
  1646. // extension fields. The names are based on the extension field name from the proto
  1647. // declaration. To avoid naming collisions, the names are prefixed with the name of
  1648. // the scope where the extend directive occurs.
  1649. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrect {
  1650. var ProtobufTestMessages_Edition_TestAllRequiredTypesEdition_MessageSetCorrectExtension1_messageSetExtension: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1 {
  1651. get {return getExtensionValue(ext: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension) ?? ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1()}
  1652. set {setExtensionValue(ext: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension, value: newValue)}
  1653. }
  1654. /// Returns true if extension `ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension`
  1655. /// has been explicitly set.
  1656. var hasProtobufTestMessages_Edition_TestAllRequiredTypesEdition_MessageSetCorrectExtension1_messageSetExtension: Bool {
  1657. return hasExtensionValue(ext: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension)
  1658. }
  1659. /// Clears the value of extension `ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension`.
  1660. /// Subsequent reads from it will return its default value.
  1661. mutating func clearProtobufTestMessages_Edition_TestAllRequiredTypesEdition_MessageSetCorrectExtension1_messageSetExtension() {
  1662. clearExtensionValue(ext: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension)
  1663. }
  1664. var ProtobufTestMessages_Edition_TestAllRequiredTypesEdition_MessageSetCorrectExtension2_messageSetExtension: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2 {
  1665. get {return getExtensionValue(ext: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension) ?? ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2()}
  1666. set {setExtensionValue(ext: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension, value: newValue)}
  1667. }
  1668. /// Returns true if extension `ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension`
  1669. /// has been explicitly set.
  1670. var hasProtobufTestMessages_Edition_TestAllRequiredTypesEdition_MessageSetCorrectExtension2_messageSetExtension: Bool {
  1671. return hasExtensionValue(ext: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension)
  1672. }
  1673. /// Clears the value of extension `ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension`.
  1674. /// Subsequent reads from it will return its default value.
  1675. mutating func clearProtobufTestMessages_Edition_TestAllRequiredTypesEdition_MessageSetCorrectExtension2_messageSetExtension() {
  1676. clearExtensionValue(ext: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension)
  1677. }
  1678. }
  1679. extension ProtobufTestMessages_Edition_TestAllTypesEdition {
  1680. var ProtobufTestMessages_Edition_extensionInt32: Int32 {
  1681. get {return getExtensionValue(ext: ProtobufTestMessages_Edition_Extensions_extension_int32) ?? 0}
  1682. set {setExtensionValue(ext: ProtobufTestMessages_Edition_Extensions_extension_int32, value: newValue)}
  1683. }
  1684. /// Returns true if extension `ProtobufTestMessages_Edition_Extensions_extension_int32`
  1685. /// has been explicitly set.
  1686. var hasProtobufTestMessages_Edition_extensionInt32: Bool {
  1687. return hasExtensionValue(ext: ProtobufTestMessages_Edition_Extensions_extension_int32)
  1688. }
  1689. /// Clears the value of extension `ProtobufTestMessages_Edition_Extensions_extension_int32`.
  1690. /// Subsequent reads from it will return its default value.
  1691. mutating func clearProtobufTestMessages_Edition_extensionInt32() {
  1692. clearExtensionValue(ext: ProtobufTestMessages_Edition_Extensions_extension_int32)
  1693. }
  1694. }
  1695. extension ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrect {
  1696. var ProtobufTestMessages_Edition_TestAllTypesEdition_MessageSetCorrectExtension1_messageSetExtension: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1 {
  1697. get {return getExtensionValue(ext: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension) ?? ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1()}
  1698. set {setExtensionValue(ext: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension, value: newValue)}
  1699. }
  1700. /// Returns true if extension `ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension`
  1701. /// has been explicitly set.
  1702. var hasProtobufTestMessages_Edition_TestAllTypesEdition_MessageSetCorrectExtension1_messageSetExtension: Bool {
  1703. return hasExtensionValue(ext: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension)
  1704. }
  1705. /// Clears the value of extension `ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension`.
  1706. /// Subsequent reads from it will return its default value.
  1707. mutating func clearProtobufTestMessages_Edition_TestAllTypesEdition_MessageSetCorrectExtension1_messageSetExtension() {
  1708. clearExtensionValue(ext: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension)
  1709. }
  1710. var ProtobufTestMessages_Edition_TestAllTypesEdition_MessageSetCorrectExtension2_messageSetExtension: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2 {
  1711. get {return getExtensionValue(ext: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension) ?? ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2()}
  1712. set {setExtensionValue(ext: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension, value: newValue)}
  1713. }
  1714. /// Returns true if extension `ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension`
  1715. /// has been explicitly set.
  1716. var hasProtobufTestMessages_Edition_TestAllTypesEdition_MessageSetCorrectExtension2_messageSetExtension: Bool {
  1717. return hasExtensionValue(ext: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension)
  1718. }
  1719. /// Clears the value of extension `ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension`.
  1720. /// Subsequent reads from it will return its default value.
  1721. mutating func clearProtobufTestMessages_Edition_TestAllTypesEdition_MessageSetCorrectExtension2_messageSetExtension() {
  1722. clearExtensionValue(ext: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension)
  1723. }
  1724. }
  1725. // MARK: - File's ExtensionMap: ProtobufTestMessages_Edition_SampleMessagesEdition_Extensions
  1726. /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
  1727. /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
  1728. /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
  1729. /// a larger `SwiftProtobuf.SimpleExtensionMap`.
  1730. let ProtobufTestMessages_Edition_SampleMessagesEdition_Extensions: SwiftProtobuf.SimpleExtensionMap = [
  1731. ProtobufTestMessages_Edition_Extensions_extension_int32,
  1732. ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension,
  1733. ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension,
  1734. ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1.Extensions.message_set_extension,
  1735. ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2.Extensions.message_set_extension
  1736. ]
  1737. // Extension Objects - The only reason these might be needed is when manually
  1738. // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
  1739. // accessors for the extension fields on the messages directly.
  1740. let ProtobufTestMessages_Edition_Extensions_extension_int32 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, ProtobufTestMessages_Edition_TestAllTypesEdition>(
  1741. _protobuf_fieldNumber: 120,
  1742. fieldName: "protobuf_test_messages.edition.extension_int32"
  1743. )
  1744. extension ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1 {
  1745. enum Extensions {
  1746. static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1>, ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrect>(
  1747. _protobuf_fieldNumber: 1547769,
  1748. fieldName: "protobuf_test_messages.edition.TestAllTypesEdition.MessageSetCorrectExtension1"
  1749. )
  1750. }
  1751. }
  1752. extension ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2 {
  1753. enum Extensions {
  1754. static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2>, ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrect>(
  1755. _protobuf_fieldNumber: 4135312,
  1756. fieldName: "protobuf_test_messages.edition.TestAllTypesEdition.MessageSetCorrectExtension2"
  1757. )
  1758. }
  1759. }
  1760. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1 {
  1761. enum Extensions {
  1762. static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1>, ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrect>(
  1763. _protobuf_fieldNumber: 1547769,
  1764. fieldName: "protobuf_test_messages.edition.TestAllRequiredTypesEdition.MessageSetCorrectExtension1"
  1765. )
  1766. }
  1767. }
  1768. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2 {
  1769. enum Extensions {
  1770. static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2>, ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrect>(
  1771. _protobuf_fieldNumber: 4135312,
  1772. fieldName: "protobuf_test_messages.edition.TestAllRequiredTypesEdition.MessageSetCorrectExtension2"
  1773. )
  1774. }
  1775. }
  1776. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  1777. fileprivate let _protobuf_package = "protobuf_test_messages.edition"
  1778. extension ProtobufTestMessages_Edition_ForeignEnumEdition: SwiftProtobuf._ProtoNameProviding {
  1779. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1780. 0: .same(proto: "FOREIGN_FOO"),
  1781. 1: .same(proto: "FOREIGN_BAR"),
  1782. 2: .same(proto: "FOREIGN_BAZ"),
  1783. ]
  1784. }
  1785. extension ProtobufTestMessages_Edition_TestAllTypesEdition: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1786. static let protoMessageName: String = _protobuf_package + ".TestAllTypesEdition"
  1787. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1788. 1: .standard(proto: "optional_int32"),
  1789. 2: .standard(proto: "optional_int64"),
  1790. 3: .standard(proto: "optional_uint32"),
  1791. 4: .standard(proto: "optional_uint64"),
  1792. 5: .standard(proto: "optional_sint32"),
  1793. 6: .standard(proto: "optional_sint64"),
  1794. 7: .standard(proto: "optional_fixed32"),
  1795. 8: .standard(proto: "optional_fixed64"),
  1796. 9: .standard(proto: "optional_sfixed32"),
  1797. 10: .standard(proto: "optional_sfixed64"),
  1798. 11: .standard(proto: "optional_float"),
  1799. 12: .standard(proto: "optional_double"),
  1800. 13: .standard(proto: "optional_bool"),
  1801. 14: .standard(proto: "optional_string"),
  1802. 15: .standard(proto: "optional_bytes"),
  1803. 18: .standard(proto: "optional_nested_message"),
  1804. 19: .standard(proto: "optional_foreign_message"),
  1805. 21: .standard(proto: "optional_nested_enum"),
  1806. 22: .standard(proto: "optional_foreign_enum"),
  1807. 24: .standard(proto: "optional_string_piece"),
  1808. 25: .standard(proto: "optional_cord"),
  1809. 27: .standard(proto: "recursive_message"),
  1810. 31: .standard(proto: "repeated_int32"),
  1811. 32: .standard(proto: "repeated_int64"),
  1812. 33: .standard(proto: "repeated_uint32"),
  1813. 34: .standard(proto: "repeated_uint64"),
  1814. 35: .standard(proto: "repeated_sint32"),
  1815. 36: .standard(proto: "repeated_sint64"),
  1816. 37: .standard(proto: "repeated_fixed32"),
  1817. 38: .standard(proto: "repeated_fixed64"),
  1818. 39: .standard(proto: "repeated_sfixed32"),
  1819. 40: .standard(proto: "repeated_sfixed64"),
  1820. 41: .standard(proto: "repeated_float"),
  1821. 42: .standard(proto: "repeated_double"),
  1822. 43: .standard(proto: "repeated_bool"),
  1823. 44: .standard(proto: "repeated_string"),
  1824. 45: .standard(proto: "repeated_bytes"),
  1825. 48: .standard(proto: "repeated_nested_message"),
  1826. 49: .standard(proto: "repeated_foreign_message"),
  1827. 51: .standard(proto: "repeated_nested_enum"),
  1828. 52: .standard(proto: "repeated_foreign_enum"),
  1829. 54: .standard(proto: "repeated_string_piece"),
  1830. 55: .standard(proto: "repeated_cord"),
  1831. 75: .standard(proto: "packed_int32"),
  1832. 76: .standard(proto: "packed_int64"),
  1833. 77: .standard(proto: "packed_uint32"),
  1834. 78: .standard(proto: "packed_uint64"),
  1835. 79: .standard(proto: "packed_sint32"),
  1836. 80: .standard(proto: "packed_sint64"),
  1837. 81: .standard(proto: "packed_fixed32"),
  1838. 82: .standard(proto: "packed_fixed64"),
  1839. 83: .standard(proto: "packed_sfixed32"),
  1840. 84: .standard(proto: "packed_sfixed64"),
  1841. 85: .standard(proto: "packed_float"),
  1842. 86: .standard(proto: "packed_double"),
  1843. 87: .standard(proto: "packed_bool"),
  1844. 88: .standard(proto: "packed_nested_enum"),
  1845. 89: .standard(proto: "unpacked_int32"),
  1846. 90: .standard(proto: "unpacked_int64"),
  1847. 91: .standard(proto: "unpacked_uint32"),
  1848. 92: .standard(proto: "unpacked_uint64"),
  1849. 93: .standard(proto: "unpacked_sint32"),
  1850. 94: .standard(proto: "unpacked_sint64"),
  1851. 95: .standard(proto: "unpacked_fixed32"),
  1852. 96: .standard(proto: "unpacked_fixed64"),
  1853. 97: .standard(proto: "unpacked_sfixed32"),
  1854. 98: .standard(proto: "unpacked_sfixed64"),
  1855. 99: .standard(proto: "unpacked_float"),
  1856. 100: .standard(proto: "unpacked_double"),
  1857. 101: .standard(proto: "unpacked_bool"),
  1858. 102: .standard(proto: "unpacked_nested_enum"),
  1859. 56: .standard(proto: "map_int32_int32"),
  1860. 57: .standard(proto: "map_int64_int64"),
  1861. 58: .standard(proto: "map_uint32_uint32"),
  1862. 59: .standard(proto: "map_uint64_uint64"),
  1863. 60: .standard(proto: "map_sint32_sint32"),
  1864. 61: .standard(proto: "map_sint64_sint64"),
  1865. 62: .standard(proto: "map_fixed32_fixed32"),
  1866. 63: .standard(proto: "map_fixed64_fixed64"),
  1867. 64: .standard(proto: "map_sfixed32_sfixed32"),
  1868. 65: .standard(proto: "map_sfixed64_sfixed64"),
  1869. 66: .standard(proto: "map_int32_float"),
  1870. 67: .standard(proto: "map_int32_double"),
  1871. 68: .standard(proto: "map_bool_bool"),
  1872. 69: .standard(proto: "map_string_string"),
  1873. 70: .standard(proto: "map_string_bytes"),
  1874. 71: .standard(proto: "map_string_nested_message"),
  1875. 72: .standard(proto: "map_string_foreign_message"),
  1876. 73: .standard(proto: "map_string_nested_enum"),
  1877. 74: .standard(proto: "map_string_foreign_enum"),
  1878. 111: .standard(proto: "oneof_uint32"),
  1879. 112: .standard(proto: "oneof_nested_message"),
  1880. 113: .standard(proto: "oneof_string"),
  1881. 114: .standard(proto: "oneof_bytes"),
  1882. 115: .standard(proto: "oneof_bool"),
  1883. 116: .standard(proto: "oneof_uint64"),
  1884. 117: .standard(proto: "oneof_float"),
  1885. 118: .standard(proto: "oneof_double"),
  1886. 119: .standard(proto: "oneof_enum"),
  1887. 201: .same(proto: "data"),
  1888. 201: .unique(proto: "Data", json: "data"),
  1889. 241: .standard(proto: "default_int32"),
  1890. 242: .standard(proto: "default_int64"),
  1891. 243: .standard(proto: "default_uint32"),
  1892. 244: .standard(proto: "default_uint64"),
  1893. 245: .standard(proto: "default_sint32"),
  1894. 246: .standard(proto: "default_sint64"),
  1895. 247: .standard(proto: "default_fixed32"),
  1896. 248: .standard(proto: "default_fixed64"),
  1897. 249: .standard(proto: "default_sfixed32"),
  1898. 250: .standard(proto: "default_sfixed64"),
  1899. 251: .standard(proto: "default_float"),
  1900. 252: .standard(proto: "default_double"),
  1901. 253: .standard(proto: "default_bool"),
  1902. 254: .standard(proto: "default_string"),
  1903. 255: .standard(proto: "default_bytes"),
  1904. 401: .same(proto: "fieldname1"),
  1905. 402: .standard(proto: "field_name2"),
  1906. 403: .standard(proto: "_field_name3"),
  1907. 404: .standard(proto: "field__name4_"),
  1908. 405: .same(proto: "field0name5"),
  1909. 406: .standard(proto: "field_0_name6"),
  1910. 407: .same(proto: "fieldName7"),
  1911. 408: .same(proto: "FieldName8"),
  1912. 409: .standard(proto: "field_Name9"),
  1913. 410: .standard(proto: "Field_Name10"),
  1914. 411: .standard(proto: "FIELD_NAME11"),
  1915. 412: .standard(proto: "FIELD_name12"),
  1916. 413: .standard(proto: "__field_name13"),
  1917. 414: .standard(proto: "__Field_name14"),
  1918. 415: .standard(proto: "field__name15"),
  1919. 416: .standard(proto: "field__Name16"),
  1920. 417: .standard(proto: "field_name17__"),
  1921. 418: .standard(proto: "Field_name18__"),
  1922. ]
  1923. fileprivate class _StorageClass {
  1924. var _optionalInt32: Int32? = nil
  1925. var _optionalInt64: Int64? = nil
  1926. var _optionalUint32: UInt32? = nil
  1927. var _optionalUint64: UInt64? = nil
  1928. var _optionalSint32: Int32? = nil
  1929. var _optionalSint64: Int64? = nil
  1930. var _optionalFixed32: UInt32? = nil
  1931. var _optionalFixed64: UInt64? = nil
  1932. var _optionalSfixed32: Int32? = nil
  1933. var _optionalSfixed64: Int64? = nil
  1934. var _optionalFloat: Float? = nil
  1935. var _optionalDouble: Double? = nil
  1936. var _optionalBool: Bool? = nil
  1937. var _optionalString: String? = nil
  1938. var _optionalBytes: Data? = nil
  1939. var _optionalNestedMessage: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage? = nil
  1940. var _optionalForeignMessage: ProtobufTestMessages_Edition_ForeignMessageEdition? = nil
  1941. var _optionalNestedEnum: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum? = nil
  1942. var _optionalForeignEnum: ProtobufTestMessages_Edition_ForeignEnumEdition? = nil
  1943. var _optionalStringPiece: String? = nil
  1944. var _optionalCord: String? = nil
  1945. var _recursiveMessage: ProtobufTestMessages_Edition_TestAllTypesEdition? = nil
  1946. var _repeatedInt32: [Int32] = []
  1947. var _repeatedInt64: [Int64] = []
  1948. var _repeatedUint32: [UInt32] = []
  1949. var _repeatedUint64: [UInt64] = []
  1950. var _repeatedSint32: [Int32] = []
  1951. var _repeatedSint64: [Int64] = []
  1952. var _repeatedFixed32: [UInt32] = []
  1953. var _repeatedFixed64: [UInt64] = []
  1954. var _repeatedSfixed32: [Int32] = []
  1955. var _repeatedSfixed64: [Int64] = []
  1956. var _repeatedFloat: [Float] = []
  1957. var _repeatedDouble: [Double] = []
  1958. var _repeatedBool: [Bool] = []
  1959. var _repeatedString: [String] = []
  1960. var _repeatedBytes: [Data] = []
  1961. var _repeatedNestedMessage: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage] = []
  1962. var _repeatedForeignMessage: [ProtobufTestMessages_Edition_ForeignMessageEdition] = []
  1963. var _repeatedNestedEnum: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum] = []
  1964. var _repeatedForeignEnum: [ProtobufTestMessages_Edition_ForeignEnumEdition] = []
  1965. var _repeatedStringPiece: [String] = []
  1966. var _repeatedCord: [String] = []
  1967. var _packedInt32: [Int32] = []
  1968. var _packedInt64: [Int64] = []
  1969. var _packedUint32: [UInt32] = []
  1970. var _packedUint64: [UInt64] = []
  1971. var _packedSint32: [Int32] = []
  1972. var _packedSint64: [Int64] = []
  1973. var _packedFixed32: [UInt32] = []
  1974. var _packedFixed64: [UInt64] = []
  1975. var _packedSfixed32: [Int32] = []
  1976. var _packedSfixed64: [Int64] = []
  1977. var _packedFloat: [Float] = []
  1978. var _packedDouble: [Double] = []
  1979. var _packedBool: [Bool] = []
  1980. var _packedNestedEnum: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum] = []
  1981. var _unpackedInt32: [Int32] = []
  1982. var _unpackedInt64: [Int64] = []
  1983. var _unpackedUint32: [UInt32] = []
  1984. var _unpackedUint64: [UInt64] = []
  1985. var _unpackedSint32: [Int32] = []
  1986. var _unpackedSint64: [Int64] = []
  1987. var _unpackedFixed32: [UInt32] = []
  1988. var _unpackedFixed64: [UInt64] = []
  1989. var _unpackedSfixed32: [Int32] = []
  1990. var _unpackedSfixed64: [Int64] = []
  1991. var _unpackedFloat: [Float] = []
  1992. var _unpackedDouble: [Double] = []
  1993. var _unpackedBool: [Bool] = []
  1994. var _unpackedNestedEnum: [ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum] = []
  1995. var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
  1996. var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
  1997. var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
  1998. var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
  1999. var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
  2000. var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
  2001. var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
  2002. var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
  2003. var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
  2004. var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
  2005. var _mapInt32Float: Dictionary<Int32,Float> = [:]
  2006. var _mapInt32Double: Dictionary<Int32,Double> = [:]
  2007. var _mapBoolBool: Dictionary<Bool,Bool> = [:]
  2008. var _mapStringString: Dictionary<String,String> = [:]
  2009. var _mapStringBytes: Dictionary<String,Data> = [:]
  2010. var _mapStringNestedMessage: Dictionary<String,ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage> = [:]
  2011. var _mapStringForeignMessage: Dictionary<String,ProtobufTestMessages_Edition_ForeignMessageEdition> = [:]
  2012. var _mapStringNestedEnum: Dictionary<String,ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum> = [:]
  2013. var _mapStringForeignEnum: Dictionary<String,ProtobufTestMessages_Edition_ForeignEnumEdition> = [:]
  2014. var _oneofField: ProtobufTestMessages_Edition_TestAllTypesEdition.OneOf_OneofField?
  2015. var _data: ProtobufTestMessages_Edition_TestAllTypesEdition.DataMessage? = nil
  2016. var _defaultInt32: Int32? = nil
  2017. var _defaultInt64: Int64? = nil
  2018. var _defaultUint32: UInt32? = nil
  2019. var _defaultUint64: UInt64? = nil
  2020. var _defaultSint32: Int32? = nil
  2021. var _defaultSint64: Int64? = nil
  2022. var _defaultFixed32: UInt32? = nil
  2023. var _defaultFixed64: UInt64? = nil
  2024. var _defaultSfixed32: Int32? = nil
  2025. var _defaultSfixed64: Int64? = nil
  2026. var _defaultFloat: Float? = nil
  2027. var _defaultDouble: Double? = nil
  2028. var _defaultBool: Bool? = nil
  2029. var _defaultString: String? = nil
  2030. var _defaultBytes: Data? = nil
  2031. var _fieldname1: Int32? = nil
  2032. var _fieldName2: Int32? = nil
  2033. var _fieldName3: Int32? = nil
  2034. var _field_Name4_: Int32? = nil
  2035. var _field0Name5: Int32? = nil
  2036. var _field0Name6: Int32? = nil
  2037. var _fieldName7: Int32? = nil
  2038. var _fieldName8: Int32? = nil
  2039. var _fieldName9: Int32? = nil
  2040. var _fieldName10: Int32? = nil
  2041. var _fieldName11: Int32? = nil
  2042. var _fieldName12: Int32? = nil
  2043. var __FieldName13: Int32? = nil
  2044. var __FieldName14: Int32? = nil
  2045. var _field_Name15: Int32? = nil
  2046. var _field_Name16: Int32? = nil
  2047. var _fieldName17__: Int32? = nil
  2048. var _fieldName18__: Int32? = nil
  2049. // This property is used as the initial default value for new instances of the type.
  2050. // The type itself is protecting the reference to its storage via CoW semantics.
  2051. // This will force a copy to be made of this reference when the first mutation occurs;
  2052. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  2053. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  2054. private init() {}
  2055. init(copying source: _StorageClass) {
  2056. _optionalInt32 = source._optionalInt32
  2057. _optionalInt64 = source._optionalInt64
  2058. _optionalUint32 = source._optionalUint32
  2059. _optionalUint64 = source._optionalUint64
  2060. _optionalSint32 = source._optionalSint32
  2061. _optionalSint64 = source._optionalSint64
  2062. _optionalFixed32 = source._optionalFixed32
  2063. _optionalFixed64 = source._optionalFixed64
  2064. _optionalSfixed32 = source._optionalSfixed32
  2065. _optionalSfixed64 = source._optionalSfixed64
  2066. _optionalFloat = source._optionalFloat
  2067. _optionalDouble = source._optionalDouble
  2068. _optionalBool = source._optionalBool
  2069. _optionalString = source._optionalString
  2070. _optionalBytes = source._optionalBytes
  2071. _optionalNestedMessage = source._optionalNestedMessage
  2072. _optionalForeignMessage = source._optionalForeignMessage
  2073. _optionalNestedEnum = source._optionalNestedEnum
  2074. _optionalForeignEnum = source._optionalForeignEnum
  2075. _optionalStringPiece = source._optionalStringPiece
  2076. _optionalCord = source._optionalCord
  2077. _recursiveMessage = source._recursiveMessage
  2078. _repeatedInt32 = source._repeatedInt32
  2079. _repeatedInt64 = source._repeatedInt64
  2080. _repeatedUint32 = source._repeatedUint32
  2081. _repeatedUint64 = source._repeatedUint64
  2082. _repeatedSint32 = source._repeatedSint32
  2083. _repeatedSint64 = source._repeatedSint64
  2084. _repeatedFixed32 = source._repeatedFixed32
  2085. _repeatedFixed64 = source._repeatedFixed64
  2086. _repeatedSfixed32 = source._repeatedSfixed32
  2087. _repeatedSfixed64 = source._repeatedSfixed64
  2088. _repeatedFloat = source._repeatedFloat
  2089. _repeatedDouble = source._repeatedDouble
  2090. _repeatedBool = source._repeatedBool
  2091. _repeatedString = source._repeatedString
  2092. _repeatedBytes = source._repeatedBytes
  2093. _repeatedNestedMessage = source._repeatedNestedMessage
  2094. _repeatedForeignMessage = source._repeatedForeignMessage
  2095. _repeatedNestedEnum = source._repeatedNestedEnum
  2096. _repeatedForeignEnum = source._repeatedForeignEnum
  2097. _repeatedStringPiece = source._repeatedStringPiece
  2098. _repeatedCord = source._repeatedCord
  2099. _packedInt32 = source._packedInt32
  2100. _packedInt64 = source._packedInt64
  2101. _packedUint32 = source._packedUint32
  2102. _packedUint64 = source._packedUint64
  2103. _packedSint32 = source._packedSint32
  2104. _packedSint64 = source._packedSint64
  2105. _packedFixed32 = source._packedFixed32
  2106. _packedFixed64 = source._packedFixed64
  2107. _packedSfixed32 = source._packedSfixed32
  2108. _packedSfixed64 = source._packedSfixed64
  2109. _packedFloat = source._packedFloat
  2110. _packedDouble = source._packedDouble
  2111. _packedBool = source._packedBool
  2112. _packedNestedEnum = source._packedNestedEnum
  2113. _unpackedInt32 = source._unpackedInt32
  2114. _unpackedInt64 = source._unpackedInt64
  2115. _unpackedUint32 = source._unpackedUint32
  2116. _unpackedUint64 = source._unpackedUint64
  2117. _unpackedSint32 = source._unpackedSint32
  2118. _unpackedSint64 = source._unpackedSint64
  2119. _unpackedFixed32 = source._unpackedFixed32
  2120. _unpackedFixed64 = source._unpackedFixed64
  2121. _unpackedSfixed32 = source._unpackedSfixed32
  2122. _unpackedSfixed64 = source._unpackedSfixed64
  2123. _unpackedFloat = source._unpackedFloat
  2124. _unpackedDouble = source._unpackedDouble
  2125. _unpackedBool = source._unpackedBool
  2126. _unpackedNestedEnum = source._unpackedNestedEnum
  2127. _mapInt32Int32 = source._mapInt32Int32
  2128. _mapInt64Int64 = source._mapInt64Int64
  2129. _mapUint32Uint32 = source._mapUint32Uint32
  2130. _mapUint64Uint64 = source._mapUint64Uint64
  2131. _mapSint32Sint32 = source._mapSint32Sint32
  2132. _mapSint64Sint64 = source._mapSint64Sint64
  2133. _mapFixed32Fixed32 = source._mapFixed32Fixed32
  2134. _mapFixed64Fixed64 = source._mapFixed64Fixed64
  2135. _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
  2136. _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
  2137. _mapInt32Float = source._mapInt32Float
  2138. _mapInt32Double = source._mapInt32Double
  2139. _mapBoolBool = source._mapBoolBool
  2140. _mapStringString = source._mapStringString
  2141. _mapStringBytes = source._mapStringBytes
  2142. _mapStringNestedMessage = source._mapStringNestedMessage
  2143. _mapStringForeignMessage = source._mapStringForeignMessage
  2144. _mapStringNestedEnum = source._mapStringNestedEnum
  2145. _mapStringForeignEnum = source._mapStringForeignEnum
  2146. _oneofField = source._oneofField
  2147. _data = source._data
  2148. _defaultInt32 = source._defaultInt32
  2149. _defaultInt64 = source._defaultInt64
  2150. _defaultUint32 = source._defaultUint32
  2151. _defaultUint64 = source._defaultUint64
  2152. _defaultSint32 = source._defaultSint32
  2153. _defaultSint64 = source._defaultSint64
  2154. _defaultFixed32 = source._defaultFixed32
  2155. _defaultFixed64 = source._defaultFixed64
  2156. _defaultSfixed32 = source._defaultSfixed32
  2157. _defaultSfixed64 = source._defaultSfixed64
  2158. _defaultFloat = source._defaultFloat
  2159. _defaultDouble = source._defaultDouble
  2160. _defaultBool = source._defaultBool
  2161. _defaultString = source._defaultString
  2162. _defaultBytes = source._defaultBytes
  2163. _fieldname1 = source._fieldname1
  2164. _fieldName2 = source._fieldName2
  2165. _fieldName3 = source._fieldName3
  2166. _field_Name4_ = source._field_Name4_
  2167. _field0Name5 = source._field0Name5
  2168. _field0Name6 = source._field0Name6
  2169. _fieldName7 = source._fieldName7
  2170. _fieldName8 = source._fieldName8
  2171. _fieldName9 = source._fieldName9
  2172. _fieldName10 = source._fieldName10
  2173. _fieldName11 = source._fieldName11
  2174. _fieldName12 = source._fieldName12
  2175. __FieldName13 = source.__FieldName13
  2176. __FieldName14 = source.__FieldName14
  2177. _field_Name15 = source._field_Name15
  2178. _field_Name16 = source._field_Name16
  2179. _fieldName17__ = source._fieldName17__
  2180. _fieldName18__ = source._fieldName18__
  2181. }
  2182. }
  2183. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  2184. if !isKnownUniquelyReferenced(&_storage) {
  2185. _storage = _StorageClass(copying: _storage)
  2186. }
  2187. return _storage
  2188. }
  2189. public var isInitialized: Bool {
  2190. if !_protobuf_extensionFieldValues.isInitialized {return false}
  2191. return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  2192. if let v = _storage._optionalNestedMessage, !v.isInitialized {return false}
  2193. if let v = _storage._recursiveMessage, !v.isInitialized {return false}
  2194. if !SwiftProtobuf.Internal.areAllInitialized(_storage._repeatedNestedMessage) {return false}
  2195. if !SwiftProtobuf.Internal.areAllInitialized(_storage._mapStringNestedMessage) {return false}
  2196. if let v = _storage._oneofField, !v.isInitialized {return false}
  2197. return true
  2198. }
  2199. }
  2200. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  2201. _ = _uniqueStorage()
  2202. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  2203. while let fieldNumber = try decoder.nextFieldNumber() {
  2204. // The use of inline closures is to circumvent an issue where the compiler
  2205. // allocates stack space for every case branch when no optimizations are
  2206. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  2207. switch fieldNumber {
  2208. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) }()
  2209. case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) }()
  2210. case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) }()
  2211. case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) }()
  2212. case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) }()
  2213. case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) }()
  2214. case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) }()
  2215. case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) }()
  2216. case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) }()
  2217. case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) }()
  2218. case 11: try { try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) }()
  2219. case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) }()
  2220. case 13: try { try decoder.decodeSingularBoolField(value: &_storage._optionalBool) }()
  2221. case 14: try { try decoder.decodeSingularStringField(value: &_storage._optionalString) }()
  2222. case 15: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) }()
  2223. case 18: try { try decoder.decodeSingularMessageField(value: &_storage._optionalNestedMessage) }()
  2224. case 19: try { try decoder.decodeSingularMessageField(value: &_storage._optionalForeignMessage) }()
  2225. case 21: try { try decoder.decodeSingularEnumField(value: &_storage._optionalNestedEnum) }()
  2226. case 22: try { try decoder.decodeSingularEnumField(value: &_storage._optionalForeignEnum) }()
  2227. case 24: try { try decoder.decodeSingularStringField(value: &_storage._optionalStringPiece) }()
  2228. case 25: try { try decoder.decodeSingularStringField(value: &_storage._optionalCord) }()
  2229. case 27: try { try decoder.decodeSingularMessageField(value: &_storage._recursiveMessage) }()
  2230. case 31: try { try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) }()
  2231. case 32: try { try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) }()
  2232. case 33: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) }()
  2233. case 34: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) }()
  2234. case 35: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) }()
  2235. case 36: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) }()
  2236. case 37: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) }()
  2237. case 38: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) }()
  2238. case 39: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) }()
  2239. case 40: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) }()
  2240. case 41: try { try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) }()
  2241. case 42: try { try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) }()
  2242. case 43: try { try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) }()
  2243. case 44: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) }()
  2244. case 45: try { try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) }()
  2245. case 48: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNestedMessage) }()
  2246. case 49: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedForeignMessage) }()
  2247. case 51: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedNestedEnum) }()
  2248. case 52: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedForeignEnum) }()
  2249. case 54: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece) }()
  2250. case 55: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord) }()
  2251. case 56: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
  2252. case 57: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
  2253. case 58: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
  2254. case 59: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
  2255. case 60: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
  2256. case 61: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
  2257. case 62: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
  2258. case 63: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
  2259. case 64: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
  2260. case 65: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
  2261. case 66: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
  2262. case 67: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
  2263. case 68: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
  2264. case 69: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
  2265. case 70: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapStringBytes) }()
  2266. case 71: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage>.self, value: &_storage._mapStringNestedMessage) }()
  2267. case 72: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Edition_ForeignMessageEdition>.self, value: &_storage._mapStringForeignMessage) }()
  2268. case 73: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum>.self, value: &_storage._mapStringNestedEnum) }()
  2269. case 74: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Edition_ForeignEnumEdition>.self, value: &_storage._mapStringForeignEnum) }()
  2270. case 75: try { try decoder.decodeRepeatedInt32Field(value: &_storage._packedInt32) }()
  2271. case 76: try { try decoder.decodeRepeatedInt64Field(value: &_storage._packedInt64) }()
  2272. case 77: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._packedUint32) }()
  2273. case 78: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._packedUint64) }()
  2274. case 79: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._packedSint32) }()
  2275. case 80: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._packedSint64) }()
  2276. case 81: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._packedFixed32) }()
  2277. case 82: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._packedFixed64) }()
  2278. case 83: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._packedSfixed32) }()
  2279. case 84: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._packedSfixed64) }()
  2280. case 85: try { try decoder.decodeRepeatedFloatField(value: &_storage._packedFloat) }()
  2281. case 86: try { try decoder.decodeRepeatedDoubleField(value: &_storage._packedDouble) }()
  2282. case 87: try { try decoder.decodeRepeatedBoolField(value: &_storage._packedBool) }()
  2283. case 88: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedNestedEnum) }()
  2284. case 89: try { try decoder.decodeRepeatedInt32Field(value: &_storage._unpackedInt32) }()
  2285. case 90: try { try decoder.decodeRepeatedInt64Field(value: &_storage._unpackedInt64) }()
  2286. case 91: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._unpackedUint32) }()
  2287. case 92: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._unpackedUint64) }()
  2288. case 93: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._unpackedSint32) }()
  2289. case 94: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._unpackedSint64) }()
  2290. case 95: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._unpackedFixed32) }()
  2291. case 96: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._unpackedFixed64) }()
  2292. case 97: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._unpackedSfixed32) }()
  2293. case 98: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._unpackedSfixed64) }()
  2294. case 99: try { try decoder.decodeRepeatedFloatField(value: &_storage._unpackedFloat) }()
  2295. case 100: try { try decoder.decodeRepeatedDoubleField(value: &_storage._unpackedDouble) }()
  2296. case 101: try { try decoder.decodeRepeatedBoolField(value: &_storage._unpackedBool) }()
  2297. case 102: try { try decoder.decodeRepeatedEnumField(value: &_storage._unpackedNestedEnum) }()
  2298. case 111: try {
  2299. var v: UInt32?
  2300. try decoder.decodeSingularUInt32Field(value: &v)
  2301. if let v = v {
  2302. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  2303. _storage._oneofField = .oneofUint32(v)
  2304. }
  2305. }()
  2306. case 112: try {
  2307. var v: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage?
  2308. var hadOneofValue = false
  2309. if let current = _storage._oneofField {
  2310. hadOneofValue = true
  2311. if case .oneofNestedMessage(let m) = current {v = m}
  2312. }
  2313. try decoder.decodeSingularMessageField(value: &v)
  2314. if let v = v {
  2315. if hadOneofValue {try decoder.handleConflictingOneOf()}
  2316. _storage._oneofField = .oneofNestedMessage(v)
  2317. }
  2318. }()
  2319. case 113: try {
  2320. var v: String?
  2321. try decoder.decodeSingularStringField(value: &v)
  2322. if let v = v {
  2323. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  2324. _storage._oneofField = .oneofString(v)
  2325. }
  2326. }()
  2327. case 114: try {
  2328. var v: Data?
  2329. try decoder.decodeSingularBytesField(value: &v)
  2330. if let v = v {
  2331. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  2332. _storage._oneofField = .oneofBytes(v)
  2333. }
  2334. }()
  2335. case 115: try {
  2336. var v: Bool?
  2337. try decoder.decodeSingularBoolField(value: &v)
  2338. if let v = v {
  2339. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  2340. _storage._oneofField = .oneofBool(v)
  2341. }
  2342. }()
  2343. case 116: try {
  2344. var v: UInt64?
  2345. try decoder.decodeSingularUInt64Field(value: &v)
  2346. if let v = v {
  2347. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  2348. _storage._oneofField = .oneofUint64(v)
  2349. }
  2350. }()
  2351. case 117: try {
  2352. var v: Float?
  2353. try decoder.decodeSingularFloatField(value: &v)
  2354. if let v = v {
  2355. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  2356. _storage._oneofField = .oneofFloat(v)
  2357. }
  2358. }()
  2359. case 118: try {
  2360. var v: Double?
  2361. try decoder.decodeSingularDoubleField(value: &v)
  2362. if let v = v {
  2363. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  2364. _storage._oneofField = .oneofDouble(v)
  2365. }
  2366. }()
  2367. case 119: try {
  2368. var v: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum?
  2369. try decoder.decodeSingularEnumField(value: &v)
  2370. if let v = v {
  2371. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  2372. _storage._oneofField = .oneofEnum(v)
  2373. }
  2374. }()
  2375. case 201: try { try decoder.decodeSingularGroupField(value: &_storage._data) }()
  2376. case 241: try { try decoder.decodeSingularInt32Field(value: &_storage._defaultInt32) }()
  2377. case 242: try { try decoder.decodeSingularInt64Field(value: &_storage._defaultInt64) }()
  2378. case 243: try { try decoder.decodeSingularUInt32Field(value: &_storage._defaultUint32) }()
  2379. case 244: try { try decoder.decodeSingularUInt64Field(value: &_storage._defaultUint64) }()
  2380. case 245: try { try decoder.decodeSingularSInt32Field(value: &_storage._defaultSint32) }()
  2381. case 246: try { try decoder.decodeSingularSInt64Field(value: &_storage._defaultSint64) }()
  2382. case 247: try { try decoder.decodeSingularFixed32Field(value: &_storage._defaultFixed32) }()
  2383. case 248: try { try decoder.decodeSingularFixed64Field(value: &_storage._defaultFixed64) }()
  2384. case 249: try { try decoder.decodeSingularSFixed32Field(value: &_storage._defaultSfixed32) }()
  2385. case 250: try { try decoder.decodeSingularSFixed64Field(value: &_storage._defaultSfixed64) }()
  2386. case 251: try { try decoder.decodeSingularFloatField(value: &_storage._defaultFloat) }()
  2387. case 252: try { try decoder.decodeSingularDoubleField(value: &_storage._defaultDouble) }()
  2388. case 253: try { try decoder.decodeSingularBoolField(value: &_storage._defaultBool) }()
  2389. case 254: try { try decoder.decodeSingularStringField(value: &_storage._defaultString) }()
  2390. case 255: try { try decoder.decodeSingularBytesField(value: &_storage._defaultBytes) }()
  2391. case 401: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldname1) }()
  2392. case 402: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName2) }()
  2393. case 403: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName3) }()
  2394. case 404: try { try decoder.decodeSingularInt32Field(value: &_storage._field_Name4_) }()
  2395. case 405: try { try decoder.decodeSingularInt32Field(value: &_storage._field0Name5) }()
  2396. case 406: try { try decoder.decodeSingularInt32Field(value: &_storage._field0Name6) }()
  2397. case 407: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName7) }()
  2398. case 408: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName8) }()
  2399. case 409: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName9) }()
  2400. case 410: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName10) }()
  2401. case 411: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName11) }()
  2402. case 412: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName12) }()
  2403. case 413: try { try decoder.decodeSingularInt32Field(value: &_storage.__FieldName13) }()
  2404. case 414: try { try decoder.decodeSingularInt32Field(value: &_storage.__FieldName14) }()
  2405. case 415: try { try decoder.decodeSingularInt32Field(value: &_storage._field_Name15) }()
  2406. case 416: try { try decoder.decodeSingularInt32Field(value: &_storage._field_Name16) }()
  2407. case 417: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName17__) }()
  2408. case 418: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName18__) }()
  2409. case 120..<201:
  2410. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Edition_TestAllTypesEdition.self, fieldNumber: fieldNumber) }()
  2411. default: break
  2412. }
  2413. }
  2414. }
  2415. }
  2416. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  2417. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  2418. // The use of inline closures is to circumvent an issue where the compiler
  2419. // allocates stack space for every if/case branch local when no optimizations
  2420. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  2421. // https://github.com/apple/swift-protobuf/issues/1182
  2422. try { if let v = _storage._optionalInt32 {
  2423. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  2424. } }()
  2425. try { if let v = _storage._optionalInt64 {
  2426. try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
  2427. } }()
  2428. try { if let v = _storage._optionalUint32 {
  2429. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
  2430. } }()
  2431. try { if let v = _storage._optionalUint64 {
  2432. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
  2433. } }()
  2434. try { if let v = _storage._optionalSint32 {
  2435. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5)
  2436. } }()
  2437. try { if let v = _storage._optionalSint64 {
  2438. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6)
  2439. } }()
  2440. try { if let v = _storage._optionalFixed32 {
  2441. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7)
  2442. } }()
  2443. try { if let v = _storage._optionalFixed64 {
  2444. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8)
  2445. } }()
  2446. try { if let v = _storage._optionalSfixed32 {
  2447. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9)
  2448. } }()
  2449. try { if let v = _storage._optionalSfixed64 {
  2450. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10)
  2451. } }()
  2452. try { if let v = _storage._optionalFloat {
  2453. try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
  2454. } }()
  2455. try { if let v = _storage._optionalDouble {
  2456. try visitor.visitSingularDoubleField(value: v, fieldNumber: 12)
  2457. } }()
  2458. try { if let v = _storage._optionalBool {
  2459. try visitor.visitSingularBoolField(value: v, fieldNumber: 13)
  2460. } }()
  2461. try { if let v = _storage._optionalString {
  2462. try visitor.visitSingularStringField(value: v, fieldNumber: 14)
  2463. } }()
  2464. try { if let v = _storage._optionalBytes {
  2465. try visitor.visitSingularBytesField(value: v, fieldNumber: 15)
  2466. } }()
  2467. try { if let v = _storage._optionalNestedMessage {
  2468. try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
  2469. } }()
  2470. try { if let v = _storage._optionalForeignMessage {
  2471. try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
  2472. } }()
  2473. try { if let v = _storage._optionalNestedEnum {
  2474. try visitor.visitSingularEnumField(value: v, fieldNumber: 21)
  2475. } }()
  2476. try { if let v = _storage._optionalForeignEnum {
  2477. try visitor.visitSingularEnumField(value: v, fieldNumber: 22)
  2478. } }()
  2479. try { if let v = _storage._optionalStringPiece {
  2480. try visitor.visitSingularStringField(value: v, fieldNumber: 24)
  2481. } }()
  2482. try { if let v = _storage._optionalCord {
  2483. try visitor.visitSingularStringField(value: v, fieldNumber: 25)
  2484. } }()
  2485. try { if let v = _storage._recursiveMessage {
  2486. try visitor.visitSingularMessageField(value: v, fieldNumber: 27)
  2487. } }()
  2488. if !_storage._repeatedInt32.isEmpty {
  2489. try visitor.visitPackedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31)
  2490. }
  2491. if !_storage._repeatedInt64.isEmpty {
  2492. try visitor.visitPackedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32)
  2493. }
  2494. if !_storage._repeatedUint32.isEmpty {
  2495. try visitor.visitPackedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33)
  2496. }
  2497. if !_storage._repeatedUint64.isEmpty {
  2498. try visitor.visitPackedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34)
  2499. }
  2500. if !_storage._repeatedSint32.isEmpty {
  2501. try visitor.visitPackedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35)
  2502. }
  2503. if !_storage._repeatedSint64.isEmpty {
  2504. try visitor.visitPackedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36)
  2505. }
  2506. if !_storage._repeatedFixed32.isEmpty {
  2507. try visitor.visitPackedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37)
  2508. }
  2509. if !_storage._repeatedFixed64.isEmpty {
  2510. try visitor.visitPackedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38)
  2511. }
  2512. if !_storage._repeatedSfixed32.isEmpty {
  2513. try visitor.visitPackedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39)
  2514. }
  2515. if !_storage._repeatedSfixed64.isEmpty {
  2516. try visitor.visitPackedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40)
  2517. }
  2518. if !_storage._repeatedFloat.isEmpty {
  2519. try visitor.visitPackedFloatField(value: _storage._repeatedFloat, fieldNumber: 41)
  2520. }
  2521. if !_storage._repeatedDouble.isEmpty {
  2522. try visitor.visitPackedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42)
  2523. }
  2524. if !_storage._repeatedBool.isEmpty {
  2525. try visitor.visitPackedBoolField(value: _storage._repeatedBool, fieldNumber: 43)
  2526. }
  2527. if !_storage._repeatedString.isEmpty {
  2528. try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44)
  2529. }
  2530. if !_storage._repeatedBytes.isEmpty {
  2531. try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45)
  2532. }
  2533. if !_storage._repeatedNestedMessage.isEmpty {
  2534. try visitor.visitRepeatedMessageField(value: _storage._repeatedNestedMessage, fieldNumber: 48)
  2535. }
  2536. if !_storage._repeatedForeignMessage.isEmpty {
  2537. try visitor.visitRepeatedMessageField(value: _storage._repeatedForeignMessage, fieldNumber: 49)
  2538. }
  2539. if !_storage._repeatedNestedEnum.isEmpty {
  2540. try visitor.visitPackedEnumField(value: _storage._repeatedNestedEnum, fieldNumber: 51)
  2541. }
  2542. if !_storage._repeatedForeignEnum.isEmpty {
  2543. try visitor.visitPackedEnumField(value: _storage._repeatedForeignEnum, fieldNumber: 52)
  2544. }
  2545. if !_storage._repeatedStringPiece.isEmpty {
  2546. try visitor.visitRepeatedStringField(value: _storage._repeatedStringPiece, fieldNumber: 54)
  2547. }
  2548. if !_storage._repeatedCord.isEmpty {
  2549. try visitor.visitRepeatedStringField(value: _storage._repeatedCord, fieldNumber: 55)
  2550. }
  2551. if !_storage._mapInt32Int32.isEmpty {
  2552. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 56)
  2553. }
  2554. if !_storage._mapInt64Int64.isEmpty {
  2555. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 57)
  2556. }
  2557. if !_storage._mapUint32Uint32.isEmpty {
  2558. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 58)
  2559. }
  2560. if !_storage._mapUint64Uint64.isEmpty {
  2561. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 59)
  2562. }
  2563. if !_storage._mapSint32Sint32.isEmpty {
  2564. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 60)
  2565. }
  2566. if !_storage._mapSint64Sint64.isEmpty {
  2567. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 61)
  2568. }
  2569. if !_storage._mapFixed32Fixed32.isEmpty {
  2570. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 62)
  2571. }
  2572. if !_storage._mapFixed64Fixed64.isEmpty {
  2573. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 63)
  2574. }
  2575. if !_storage._mapSfixed32Sfixed32.isEmpty {
  2576. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 64)
  2577. }
  2578. if !_storage._mapSfixed64Sfixed64.isEmpty {
  2579. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 65)
  2580. }
  2581. if !_storage._mapInt32Float.isEmpty {
  2582. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 66)
  2583. }
  2584. if !_storage._mapInt32Double.isEmpty {
  2585. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 67)
  2586. }
  2587. if !_storage._mapBoolBool.isEmpty {
  2588. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 68)
  2589. }
  2590. if !_storage._mapStringString.isEmpty {
  2591. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 69)
  2592. }
  2593. if !_storage._mapStringBytes.isEmpty {
  2594. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapStringBytes, fieldNumber: 70)
  2595. }
  2596. if !_storage._mapStringNestedMessage.isEmpty {
  2597. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage>.self, value: _storage._mapStringNestedMessage, fieldNumber: 71)
  2598. }
  2599. if !_storage._mapStringForeignMessage.isEmpty {
  2600. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Edition_ForeignMessageEdition>.self, value: _storage._mapStringForeignMessage, fieldNumber: 72)
  2601. }
  2602. if !_storage._mapStringNestedEnum.isEmpty {
  2603. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum>.self, value: _storage._mapStringNestedEnum, fieldNumber: 73)
  2604. }
  2605. if !_storage._mapStringForeignEnum.isEmpty {
  2606. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Edition_ForeignEnumEdition>.self, value: _storage._mapStringForeignEnum, fieldNumber: 74)
  2607. }
  2608. if !_storage._packedInt32.isEmpty {
  2609. try visitor.visitPackedInt32Field(value: _storage._packedInt32, fieldNumber: 75)
  2610. }
  2611. if !_storage._packedInt64.isEmpty {
  2612. try visitor.visitPackedInt64Field(value: _storage._packedInt64, fieldNumber: 76)
  2613. }
  2614. if !_storage._packedUint32.isEmpty {
  2615. try visitor.visitPackedUInt32Field(value: _storage._packedUint32, fieldNumber: 77)
  2616. }
  2617. if !_storage._packedUint64.isEmpty {
  2618. try visitor.visitPackedUInt64Field(value: _storage._packedUint64, fieldNumber: 78)
  2619. }
  2620. if !_storage._packedSint32.isEmpty {
  2621. try visitor.visitPackedSInt32Field(value: _storage._packedSint32, fieldNumber: 79)
  2622. }
  2623. if !_storage._packedSint64.isEmpty {
  2624. try visitor.visitPackedSInt64Field(value: _storage._packedSint64, fieldNumber: 80)
  2625. }
  2626. if !_storage._packedFixed32.isEmpty {
  2627. try visitor.visitPackedFixed32Field(value: _storage._packedFixed32, fieldNumber: 81)
  2628. }
  2629. if !_storage._packedFixed64.isEmpty {
  2630. try visitor.visitPackedFixed64Field(value: _storage._packedFixed64, fieldNumber: 82)
  2631. }
  2632. if !_storage._packedSfixed32.isEmpty {
  2633. try visitor.visitPackedSFixed32Field(value: _storage._packedSfixed32, fieldNumber: 83)
  2634. }
  2635. if !_storage._packedSfixed64.isEmpty {
  2636. try visitor.visitPackedSFixed64Field(value: _storage._packedSfixed64, fieldNumber: 84)
  2637. }
  2638. if !_storage._packedFloat.isEmpty {
  2639. try visitor.visitPackedFloatField(value: _storage._packedFloat, fieldNumber: 85)
  2640. }
  2641. if !_storage._packedDouble.isEmpty {
  2642. try visitor.visitPackedDoubleField(value: _storage._packedDouble, fieldNumber: 86)
  2643. }
  2644. if !_storage._packedBool.isEmpty {
  2645. try visitor.visitPackedBoolField(value: _storage._packedBool, fieldNumber: 87)
  2646. }
  2647. if !_storage._packedNestedEnum.isEmpty {
  2648. try visitor.visitPackedEnumField(value: _storage._packedNestedEnum, fieldNumber: 88)
  2649. }
  2650. if !_storage._unpackedInt32.isEmpty {
  2651. try visitor.visitRepeatedInt32Field(value: _storage._unpackedInt32, fieldNumber: 89)
  2652. }
  2653. if !_storage._unpackedInt64.isEmpty {
  2654. try visitor.visitRepeatedInt64Field(value: _storage._unpackedInt64, fieldNumber: 90)
  2655. }
  2656. if !_storage._unpackedUint32.isEmpty {
  2657. try visitor.visitRepeatedUInt32Field(value: _storage._unpackedUint32, fieldNumber: 91)
  2658. }
  2659. if !_storage._unpackedUint64.isEmpty {
  2660. try visitor.visitRepeatedUInt64Field(value: _storage._unpackedUint64, fieldNumber: 92)
  2661. }
  2662. if !_storage._unpackedSint32.isEmpty {
  2663. try visitor.visitRepeatedSInt32Field(value: _storage._unpackedSint32, fieldNumber: 93)
  2664. }
  2665. if !_storage._unpackedSint64.isEmpty {
  2666. try visitor.visitRepeatedSInt64Field(value: _storage._unpackedSint64, fieldNumber: 94)
  2667. }
  2668. if !_storage._unpackedFixed32.isEmpty {
  2669. try visitor.visitRepeatedFixed32Field(value: _storage._unpackedFixed32, fieldNumber: 95)
  2670. }
  2671. if !_storage._unpackedFixed64.isEmpty {
  2672. try visitor.visitRepeatedFixed64Field(value: _storage._unpackedFixed64, fieldNumber: 96)
  2673. }
  2674. if !_storage._unpackedSfixed32.isEmpty {
  2675. try visitor.visitRepeatedSFixed32Field(value: _storage._unpackedSfixed32, fieldNumber: 97)
  2676. }
  2677. if !_storage._unpackedSfixed64.isEmpty {
  2678. try visitor.visitRepeatedSFixed64Field(value: _storage._unpackedSfixed64, fieldNumber: 98)
  2679. }
  2680. if !_storage._unpackedFloat.isEmpty {
  2681. try visitor.visitRepeatedFloatField(value: _storage._unpackedFloat, fieldNumber: 99)
  2682. }
  2683. if !_storage._unpackedDouble.isEmpty {
  2684. try visitor.visitRepeatedDoubleField(value: _storage._unpackedDouble, fieldNumber: 100)
  2685. }
  2686. if !_storage._unpackedBool.isEmpty {
  2687. try visitor.visitRepeatedBoolField(value: _storage._unpackedBool, fieldNumber: 101)
  2688. }
  2689. if !_storage._unpackedNestedEnum.isEmpty {
  2690. try visitor.visitRepeatedEnumField(value: _storage._unpackedNestedEnum, fieldNumber: 102)
  2691. }
  2692. switch _storage._oneofField {
  2693. case .oneofUint32?: try {
  2694. guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() }
  2695. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 111)
  2696. }()
  2697. case .oneofNestedMessage?: try {
  2698. guard case .oneofNestedMessage(let v)? = _storage._oneofField else { preconditionFailure() }
  2699. try visitor.visitSingularMessageField(value: v, fieldNumber: 112)
  2700. }()
  2701. case .oneofString?: try {
  2702. guard case .oneofString(let v)? = _storage._oneofField else { preconditionFailure() }
  2703. try visitor.visitSingularStringField(value: v, fieldNumber: 113)
  2704. }()
  2705. case .oneofBytes?: try {
  2706. guard case .oneofBytes(let v)? = _storage._oneofField else { preconditionFailure() }
  2707. try visitor.visitSingularBytesField(value: v, fieldNumber: 114)
  2708. }()
  2709. case .oneofBool?: try {
  2710. guard case .oneofBool(let v)? = _storage._oneofField else { preconditionFailure() }
  2711. try visitor.visitSingularBoolField(value: v, fieldNumber: 115)
  2712. }()
  2713. case .oneofUint64?: try {
  2714. guard case .oneofUint64(let v)? = _storage._oneofField else { preconditionFailure() }
  2715. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 116)
  2716. }()
  2717. case .oneofFloat?: try {
  2718. guard case .oneofFloat(let v)? = _storage._oneofField else { preconditionFailure() }
  2719. try visitor.visitSingularFloatField(value: v, fieldNumber: 117)
  2720. }()
  2721. case .oneofDouble?: try {
  2722. guard case .oneofDouble(let v)? = _storage._oneofField else { preconditionFailure() }
  2723. try visitor.visitSingularDoubleField(value: v, fieldNumber: 118)
  2724. }()
  2725. case .oneofEnum?: try {
  2726. guard case .oneofEnum(let v)? = _storage._oneofField else { preconditionFailure() }
  2727. try visitor.visitSingularEnumField(value: v, fieldNumber: 119)
  2728. }()
  2729. case nil: break
  2730. }
  2731. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 120, end: 201)
  2732. try { if let v = _storage._data {
  2733. try visitor.visitSingularGroupField(value: v, fieldNumber: 201)
  2734. } }()
  2735. try { if let v = _storage._defaultInt32 {
  2736. try visitor.visitSingularInt32Field(value: v, fieldNumber: 241)
  2737. } }()
  2738. try { if let v = _storage._defaultInt64 {
  2739. try visitor.visitSingularInt64Field(value: v, fieldNumber: 242)
  2740. } }()
  2741. try { if let v = _storage._defaultUint32 {
  2742. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 243)
  2743. } }()
  2744. try { if let v = _storage._defaultUint64 {
  2745. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 244)
  2746. } }()
  2747. try { if let v = _storage._defaultSint32 {
  2748. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 245)
  2749. } }()
  2750. try { if let v = _storage._defaultSint64 {
  2751. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 246)
  2752. } }()
  2753. try { if let v = _storage._defaultFixed32 {
  2754. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 247)
  2755. } }()
  2756. try { if let v = _storage._defaultFixed64 {
  2757. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 248)
  2758. } }()
  2759. try { if let v = _storage._defaultSfixed32 {
  2760. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 249)
  2761. } }()
  2762. try { if let v = _storage._defaultSfixed64 {
  2763. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 250)
  2764. } }()
  2765. try { if let v = _storage._defaultFloat {
  2766. try visitor.visitSingularFloatField(value: v, fieldNumber: 251)
  2767. } }()
  2768. try { if let v = _storage._defaultDouble {
  2769. try visitor.visitSingularDoubleField(value: v, fieldNumber: 252)
  2770. } }()
  2771. try { if let v = _storage._defaultBool {
  2772. try visitor.visitSingularBoolField(value: v, fieldNumber: 253)
  2773. } }()
  2774. try { if let v = _storage._defaultString {
  2775. try visitor.visitSingularStringField(value: v, fieldNumber: 254)
  2776. } }()
  2777. try { if let v = _storage._defaultBytes {
  2778. try visitor.visitSingularBytesField(value: v, fieldNumber: 255)
  2779. } }()
  2780. try { if let v = _storage._fieldname1 {
  2781. try visitor.visitSingularInt32Field(value: v, fieldNumber: 401)
  2782. } }()
  2783. try { if let v = _storage._fieldName2 {
  2784. try visitor.visitSingularInt32Field(value: v, fieldNumber: 402)
  2785. } }()
  2786. try { if let v = _storage._fieldName3 {
  2787. try visitor.visitSingularInt32Field(value: v, fieldNumber: 403)
  2788. } }()
  2789. try { if let v = _storage._field_Name4_ {
  2790. try visitor.visitSingularInt32Field(value: v, fieldNumber: 404)
  2791. } }()
  2792. try { if let v = _storage._field0Name5 {
  2793. try visitor.visitSingularInt32Field(value: v, fieldNumber: 405)
  2794. } }()
  2795. try { if let v = _storage._field0Name6 {
  2796. try visitor.visitSingularInt32Field(value: v, fieldNumber: 406)
  2797. } }()
  2798. try { if let v = _storage._fieldName7 {
  2799. try visitor.visitSingularInt32Field(value: v, fieldNumber: 407)
  2800. } }()
  2801. try { if let v = _storage._fieldName8 {
  2802. try visitor.visitSingularInt32Field(value: v, fieldNumber: 408)
  2803. } }()
  2804. try { if let v = _storage._fieldName9 {
  2805. try visitor.visitSingularInt32Field(value: v, fieldNumber: 409)
  2806. } }()
  2807. try { if let v = _storage._fieldName10 {
  2808. try visitor.visitSingularInt32Field(value: v, fieldNumber: 410)
  2809. } }()
  2810. try { if let v = _storage._fieldName11 {
  2811. try visitor.visitSingularInt32Field(value: v, fieldNumber: 411)
  2812. } }()
  2813. try { if let v = _storage._fieldName12 {
  2814. try visitor.visitSingularInt32Field(value: v, fieldNumber: 412)
  2815. } }()
  2816. try { if let v = _storage.__FieldName13 {
  2817. try visitor.visitSingularInt32Field(value: v, fieldNumber: 413)
  2818. } }()
  2819. try { if let v = _storage.__FieldName14 {
  2820. try visitor.visitSingularInt32Field(value: v, fieldNumber: 414)
  2821. } }()
  2822. try { if let v = _storage._field_Name15 {
  2823. try visitor.visitSingularInt32Field(value: v, fieldNumber: 415)
  2824. } }()
  2825. try { if let v = _storage._field_Name16 {
  2826. try visitor.visitSingularInt32Field(value: v, fieldNumber: 416)
  2827. } }()
  2828. try { if let v = _storage._fieldName17__ {
  2829. try visitor.visitSingularInt32Field(value: v, fieldNumber: 417)
  2830. } }()
  2831. try { if let v = _storage._fieldName18__ {
  2832. try visitor.visitSingularInt32Field(value: v, fieldNumber: 418)
  2833. } }()
  2834. }
  2835. try unknownFields.traverse(visitor: &visitor)
  2836. }
  2837. static func ==(lhs: ProtobufTestMessages_Edition_TestAllTypesEdition, rhs: ProtobufTestMessages_Edition_TestAllTypesEdition) -> Bool {
  2838. if lhs._storage !== rhs._storage {
  2839. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  2840. let _storage = _args.0
  2841. let rhs_storage = _args.1
  2842. if _storage._optionalInt32 != rhs_storage._optionalInt32 {return false}
  2843. if _storage._optionalInt64 != rhs_storage._optionalInt64 {return false}
  2844. if _storage._optionalUint32 != rhs_storage._optionalUint32 {return false}
  2845. if _storage._optionalUint64 != rhs_storage._optionalUint64 {return false}
  2846. if _storage._optionalSint32 != rhs_storage._optionalSint32 {return false}
  2847. if _storage._optionalSint64 != rhs_storage._optionalSint64 {return false}
  2848. if _storage._optionalFixed32 != rhs_storage._optionalFixed32 {return false}
  2849. if _storage._optionalFixed64 != rhs_storage._optionalFixed64 {return false}
  2850. if _storage._optionalSfixed32 != rhs_storage._optionalSfixed32 {return false}
  2851. if _storage._optionalSfixed64 != rhs_storage._optionalSfixed64 {return false}
  2852. if _storage._optionalFloat != rhs_storage._optionalFloat {return false}
  2853. if _storage._optionalDouble != rhs_storage._optionalDouble {return false}
  2854. if _storage._optionalBool != rhs_storage._optionalBool {return false}
  2855. if _storage._optionalString != rhs_storage._optionalString {return false}
  2856. if _storage._optionalBytes != rhs_storage._optionalBytes {return false}
  2857. if _storage._optionalNestedMessage != rhs_storage._optionalNestedMessage {return false}
  2858. if _storage._optionalForeignMessage != rhs_storage._optionalForeignMessage {return false}
  2859. if _storage._optionalNestedEnum != rhs_storage._optionalNestedEnum {return false}
  2860. if _storage._optionalForeignEnum != rhs_storage._optionalForeignEnum {return false}
  2861. if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false}
  2862. if _storage._optionalCord != rhs_storage._optionalCord {return false}
  2863. if _storage._recursiveMessage != rhs_storage._recursiveMessage {return false}
  2864. if _storage._repeatedInt32 != rhs_storage._repeatedInt32 {return false}
  2865. if _storage._repeatedInt64 != rhs_storage._repeatedInt64 {return false}
  2866. if _storage._repeatedUint32 != rhs_storage._repeatedUint32 {return false}
  2867. if _storage._repeatedUint64 != rhs_storage._repeatedUint64 {return false}
  2868. if _storage._repeatedSint32 != rhs_storage._repeatedSint32 {return false}
  2869. if _storage._repeatedSint64 != rhs_storage._repeatedSint64 {return false}
  2870. if _storage._repeatedFixed32 != rhs_storage._repeatedFixed32 {return false}
  2871. if _storage._repeatedFixed64 != rhs_storage._repeatedFixed64 {return false}
  2872. if _storage._repeatedSfixed32 != rhs_storage._repeatedSfixed32 {return false}
  2873. if _storage._repeatedSfixed64 != rhs_storage._repeatedSfixed64 {return false}
  2874. if _storage._repeatedFloat != rhs_storage._repeatedFloat {return false}
  2875. if _storage._repeatedDouble != rhs_storage._repeatedDouble {return false}
  2876. if _storage._repeatedBool != rhs_storage._repeatedBool {return false}
  2877. if _storage._repeatedString != rhs_storage._repeatedString {return false}
  2878. if _storage._repeatedBytes != rhs_storage._repeatedBytes {return false}
  2879. if _storage._repeatedNestedMessage != rhs_storage._repeatedNestedMessage {return false}
  2880. if _storage._repeatedForeignMessage != rhs_storage._repeatedForeignMessage {return false}
  2881. if _storage._repeatedNestedEnum != rhs_storage._repeatedNestedEnum {return false}
  2882. if _storage._repeatedForeignEnum != rhs_storage._repeatedForeignEnum {return false}
  2883. if _storage._repeatedStringPiece != rhs_storage._repeatedStringPiece {return false}
  2884. if _storage._repeatedCord != rhs_storage._repeatedCord {return false}
  2885. if _storage._packedInt32 != rhs_storage._packedInt32 {return false}
  2886. if _storage._packedInt64 != rhs_storage._packedInt64 {return false}
  2887. if _storage._packedUint32 != rhs_storage._packedUint32 {return false}
  2888. if _storage._packedUint64 != rhs_storage._packedUint64 {return false}
  2889. if _storage._packedSint32 != rhs_storage._packedSint32 {return false}
  2890. if _storage._packedSint64 != rhs_storage._packedSint64 {return false}
  2891. if _storage._packedFixed32 != rhs_storage._packedFixed32 {return false}
  2892. if _storage._packedFixed64 != rhs_storage._packedFixed64 {return false}
  2893. if _storage._packedSfixed32 != rhs_storage._packedSfixed32 {return false}
  2894. if _storage._packedSfixed64 != rhs_storage._packedSfixed64 {return false}
  2895. if _storage._packedFloat != rhs_storage._packedFloat {return false}
  2896. if _storage._packedDouble != rhs_storage._packedDouble {return false}
  2897. if _storage._packedBool != rhs_storage._packedBool {return false}
  2898. if _storage._packedNestedEnum != rhs_storage._packedNestedEnum {return false}
  2899. if _storage._unpackedInt32 != rhs_storage._unpackedInt32 {return false}
  2900. if _storage._unpackedInt64 != rhs_storage._unpackedInt64 {return false}
  2901. if _storage._unpackedUint32 != rhs_storage._unpackedUint32 {return false}
  2902. if _storage._unpackedUint64 != rhs_storage._unpackedUint64 {return false}
  2903. if _storage._unpackedSint32 != rhs_storage._unpackedSint32 {return false}
  2904. if _storage._unpackedSint64 != rhs_storage._unpackedSint64 {return false}
  2905. if _storage._unpackedFixed32 != rhs_storage._unpackedFixed32 {return false}
  2906. if _storage._unpackedFixed64 != rhs_storage._unpackedFixed64 {return false}
  2907. if _storage._unpackedSfixed32 != rhs_storage._unpackedSfixed32 {return false}
  2908. if _storage._unpackedSfixed64 != rhs_storage._unpackedSfixed64 {return false}
  2909. if _storage._unpackedFloat != rhs_storage._unpackedFloat {return false}
  2910. if _storage._unpackedDouble != rhs_storage._unpackedDouble {return false}
  2911. if _storage._unpackedBool != rhs_storage._unpackedBool {return false}
  2912. if _storage._unpackedNestedEnum != rhs_storage._unpackedNestedEnum {return false}
  2913. if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
  2914. if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
  2915. if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
  2916. if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
  2917. if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
  2918. if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
  2919. if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
  2920. if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
  2921. if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
  2922. if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
  2923. if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
  2924. if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
  2925. if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
  2926. if _storage._mapStringString != rhs_storage._mapStringString {return false}
  2927. if _storage._mapStringBytes != rhs_storage._mapStringBytes {return false}
  2928. if _storage._mapStringNestedMessage != rhs_storage._mapStringNestedMessage {return false}
  2929. if _storage._mapStringForeignMessage != rhs_storage._mapStringForeignMessage {return false}
  2930. if _storage._mapStringNestedEnum != rhs_storage._mapStringNestedEnum {return false}
  2931. if _storage._mapStringForeignEnum != rhs_storage._mapStringForeignEnum {return false}
  2932. if _storage._oneofField != rhs_storage._oneofField {return false}
  2933. if _storage._data != rhs_storage._data {return false}
  2934. if _storage._defaultInt32 != rhs_storage._defaultInt32 {return false}
  2935. if _storage._defaultInt64 != rhs_storage._defaultInt64 {return false}
  2936. if _storage._defaultUint32 != rhs_storage._defaultUint32 {return false}
  2937. if _storage._defaultUint64 != rhs_storage._defaultUint64 {return false}
  2938. if _storage._defaultSint32 != rhs_storage._defaultSint32 {return false}
  2939. if _storage._defaultSint64 != rhs_storage._defaultSint64 {return false}
  2940. if _storage._defaultFixed32 != rhs_storage._defaultFixed32 {return false}
  2941. if _storage._defaultFixed64 != rhs_storage._defaultFixed64 {return false}
  2942. if _storage._defaultSfixed32 != rhs_storage._defaultSfixed32 {return false}
  2943. if _storage._defaultSfixed64 != rhs_storage._defaultSfixed64 {return false}
  2944. if _storage._defaultFloat != rhs_storage._defaultFloat {return false}
  2945. if _storage._defaultDouble != rhs_storage._defaultDouble {return false}
  2946. if _storage._defaultBool != rhs_storage._defaultBool {return false}
  2947. if _storage._defaultString != rhs_storage._defaultString {return false}
  2948. if _storage._defaultBytes != rhs_storage._defaultBytes {return false}
  2949. if _storage._fieldname1 != rhs_storage._fieldname1 {return false}
  2950. if _storage._fieldName2 != rhs_storage._fieldName2 {return false}
  2951. if _storage._fieldName3 != rhs_storage._fieldName3 {return false}
  2952. if _storage._field_Name4_ != rhs_storage._field_Name4_ {return false}
  2953. if _storage._field0Name5 != rhs_storage._field0Name5 {return false}
  2954. if _storage._field0Name6 != rhs_storage._field0Name6 {return false}
  2955. if _storage._fieldName7 != rhs_storage._fieldName7 {return false}
  2956. if _storage._fieldName8 != rhs_storage._fieldName8 {return false}
  2957. if _storage._fieldName9 != rhs_storage._fieldName9 {return false}
  2958. if _storage._fieldName10 != rhs_storage._fieldName10 {return false}
  2959. if _storage._fieldName11 != rhs_storage._fieldName11 {return false}
  2960. if _storage._fieldName12 != rhs_storage._fieldName12 {return false}
  2961. if _storage.__FieldName13 != rhs_storage.__FieldName13 {return false}
  2962. if _storage.__FieldName14 != rhs_storage.__FieldName14 {return false}
  2963. if _storage._field_Name15 != rhs_storage._field_Name15 {return false}
  2964. if _storage._field_Name16 != rhs_storage._field_Name16 {return false}
  2965. if _storage._fieldName17__ != rhs_storage._fieldName17__ {return false}
  2966. if _storage._fieldName18__ != rhs_storage._fieldName18__ {return false}
  2967. return true
  2968. }
  2969. if !storagesAreEqual {return false}
  2970. }
  2971. if lhs.unknownFields != rhs.unknownFields {return false}
  2972. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  2973. return true
  2974. }
  2975. }
  2976. extension ProtobufTestMessages_Edition_TestAllTypesEdition.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  2977. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  2978. -1: .same(proto: "NEG"),
  2979. 0: .same(proto: "FOO"),
  2980. 1: .same(proto: "BAR"),
  2981. 2: .same(proto: "BAZ"),
  2982. ]
  2983. }
  2984. extension ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  2985. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllTypesEdition.protoMessageName + ".NestedMessage"
  2986. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  2987. 1: .same(proto: "a"),
  2988. 2: .same(proto: "corecursive"),
  2989. ]
  2990. fileprivate class _StorageClass {
  2991. var _a: Int32? = nil
  2992. var _corecursive: ProtobufTestMessages_Edition_TestAllTypesEdition? = nil
  2993. // This property is used as the initial default value for new instances of the type.
  2994. // The type itself is protecting the reference to its storage via CoW semantics.
  2995. // This will force a copy to be made of this reference when the first mutation occurs;
  2996. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  2997. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  2998. private init() {}
  2999. init(copying source: _StorageClass) {
  3000. _a = source._a
  3001. _corecursive = source._corecursive
  3002. }
  3003. }
  3004. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  3005. if !isKnownUniquelyReferenced(&_storage) {
  3006. _storage = _StorageClass(copying: _storage)
  3007. }
  3008. return _storage
  3009. }
  3010. public var isInitialized: Bool {
  3011. return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3012. if let v = _storage._corecursive, !v.isInitialized {return false}
  3013. return true
  3014. }
  3015. }
  3016. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3017. _ = _uniqueStorage()
  3018. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3019. while let fieldNumber = try decoder.nextFieldNumber() {
  3020. // The use of inline closures is to circumvent an issue where the compiler
  3021. // allocates stack space for every case branch when no optimizations are
  3022. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3023. switch fieldNumber {
  3024. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._a) }()
  3025. case 2: try { try decoder.decodeSingularMessageField(value: &_storage._corecursive) }()
  3026. default: break
  3027. }
  3028. }
  3029. }
  3030. }
  3031. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3032. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3033. // The use of inline closures is to circumvent an issue where the compiler
  3034. // allocates stack space for every if/case branch local when no optimizations
  3035. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3036. // https://github.com/apple/swift-protobuf/issues/1182
  3037. try { if let v = _storage._a {
  3038. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  3039. } }()
  3040. try { if let v = _storage._corecursive {
  3041. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  3042. } }()
  3043. }
  3044. try unknownFields.traverse(visitor: &visitor)
  3045. }
  3046. static func ==(lhs: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage, rhs: ProtobufTestMessages_Edition_TestAllTypesEdition.NestedMessage) -> Bool {
  3047. if lhs._storage !== rhs._storage {
  3048. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  3049. let _storage = _args.0
  3050. let rhs_storage = _args.1
  3051. if _storage._a != rhs_storage._a {return false}
  3052. if _storage._corecursive != rhs_storage._corecursive {return false}
  3053. return true
  3054. }
  3055. if !storagesAreEqual {return false}
  3056. }
  3057. if lhs.unknownFields != rhs.unknownFields {return false}
  3058. return true
  3059. }
  3060. }
  3061. extension ProtobufTestMessages_Edition_TestAllTypesEdition.DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3062. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllTypesEdition.protoMessageName + ".Data"
  3063. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3064. 202: .standard(proto: "group_int32"),
  3065. 203: .standard(proto: "group_uint32"),
  3066. ]
  3067. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3068. while let fieldNumber = try decoder.nextFieldNumber() {
  3069. // The use of inline closures is to circumvent an issue where the compiler
  3070. // allocates stack space for every case branch when no optimizations are
  3071. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3072. switch fieldNumber {
  3073. case 202: try { try decoder.decodeSingularInt32Field(value: &self._groupInt32) }()
  3074. case 203: try { try decoder.decodeSingularUInt32Field(value: &self._groupUint32) }()
  3075. default: break
  3076. }
  3077. }
  3078. }
  3079. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3080. // The use of inline closures is to circumvent an issue where the compiler
  3081. // allocates stack space for every if/case branch local when no optimizations
  3082. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3083. // https://github.com/apple/swift-protobuf/issues/1182
  3084. try { if let v = self._groupInt32 {
  3085. try visitor.visitSingularInt32Field(value: v, fieldNumber: 202)
  3086. } }()
  3087. try { if let v = self._groupUint32 {
  3088. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 203)
  3089. } }()
  3090. try unknownFields.traverse(visitor: &visitor)
  3091. }
  3092. static func ==(lhs: ProtobufTestMessages_Edition_TestAllTypesEdition.DataMessage, rhs: ProtobufTestMessages_Edition_TestAllTypesEdition.DataMessage) -> Bool {
  3093. if lhs._groupInt32 != rhs._groupInt32 {return false}
  3094. if lhs._groupUint32 != rhs._groupUint32 {return false}
  3095. if lhs.unknownFields != rhs.unknownFields {return false}
  3096. return true
  3097. }
  3098. }
  3099. extension ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3100. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllTypesEdition.protoMessageName + ".MessageSetCorrect"
  3101. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  3102. public var isInitialized: Bool {
  3103. if !_protobuf_extensionFieldValues.isInitialized {return false}
  3104. return true
  3105. }
  3106. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3107. try decoder.decodeExtensionFieldsAsMessageSet(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrect.self)
  3108. }
  3109. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3110. try visitor.visitExtensionFieldsAsMessageSet(fields: _protobuf_extensionFieldValues, start: 4, end: 2147483647)
  3111. try unknownFields.traverse(visitor: &visitor)
  3112. }
  3113. static func ==(lhs: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrect, rhs: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrect) -> Bool {
  3114. if lhs.unknownFields != rhs.unknownFields {return false}
  3115. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  3116. return true
  3117. }
  3118. }
  3119. extension ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3120. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllTypesEdition.protoMessageName + ".MessageSetCorrectExtension1"
  3121. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3122. 25: .same(proto: "str"),
  3123. ]
  3124. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3125. while let fieldNumber = try decoder.nextFieldNumber() {
  3126. // The use of inline closures is to circumvent an issue where the compiler
  3127. // allocates stack space for every case branch when no optimizations are
  3128. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3129. switch fieldNumber {
  3130. case 25: try { try decoder.decodeSingularStringField(value: &self._str) }()
  3131. default: break
  3132. }
  3133. }
  3134. }
  3135. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3136. // The use of inline closures is to circumvent an issue where the compiler
  3137. // allocates stack space for every if/case branch local when no optimizations
  3138. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3139. // https://github.com/apple/swift-protobuf/issues/1182
  3140. try { if let v = self._str {
  3141. try visitor.visitSingularStringField(value: v, fieldNumber: 25)
  3142. } }()
  3143. try unknownFields.traverse(visitor: &visitor)
  3144. }
  3145. static func ==(lhs: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1, rhs: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension1) -> Bool {
  3146. if lhs._str != rhs._str {return false}
  3147. if lhs.unknownFields != rhs.unknownFields {return false}
  3148. return true
  3149. }
  3150. }
  3151. extension ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3152. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllTypesEdition.protoMessageName + ".MessageSetCorrectExtension2"
  3153. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3154. 9: .same(proto: "i"),
  3155. ]
  3156. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3157. while let fieldNumber = try decoder.nextFieldNumber() {
  3158. // The use of inline closures is to circumvent an issue where the compiler
  3159. // allocates stack space for every case branch when no optimizations are
  3160. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3161. switch fieldNumber {
  3162. case 9: try { try decoder.decodeSingularInt32Field(value: &self._i) }()
  3163. default: break
  3164. }
  3165. }
  3166. }
  3167. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3168. // The use of inline closures is to circumvent an issue where the compiler
  3169. // allocates stack space for every if/case branch local when no optimizations
  3170. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3171. // https://github.com/apple/swift-protobuf/issues/1182
  3172. try { if let v = self._i {
  3173. try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
  3174. } }()
  3175. try unknownFields.traverse(visitor: &visitor)
  3176. }
  3177. static func ==(lhs: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2, rhs: ProtobufTestMessages_Edition_TestAllTypesEdition.MessageSetCorrectExtension2) -> Bool {
  3178. if lhs._i != rhs._i {return false}
  3179. if lhs.unknownFields != rhs.unknownFields {return false}
  3180. return true
  3181. }
  3182. }
  3183. extension ProtobufTestMessages_Edition_ForeignMessageEdition: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3184. static let protoMessageName: String = _protobuf_package + ".ForeignMessageEdition"
  3185. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3186. 1: .same(proto: "c"),
  3187. ]
  3188. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3189. while let fieldNumber = try decoder.nextFieldNumber() {
  3190. // The use of inline closures is to circumvent an issue where the compiler
  3191. // allocates stack space for every case branch when no optimizations are
  3192. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3193. switch fieldNumber {
  3194. case 1: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
  3195. default: break
  3196. }
  3197. }
  3198. }
  3199. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3200. // The use of inline closures is to circumvent an issue where the compiler
  3201. // allocates stack space for every if/case branch local when no optimizations
  3202. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3203. // https://github.com/apple/swift-protobuf/issues/1182
  3204. try { if let v = self._c {
  3205. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  3206. } }()
  3207. try unknownFields.traverse(visitor: &visitor)
  3208. }
  3209. static func ==(lhs: ProtobufTestMessages_Edition_ForeignMessageEdition, rhs: ProtobufTestMessages_Edition_ForeignMessageEdition) -> Bool {
  3210. if lhs._c != rhs._c {return false}
  3211. if lhs.unknownFields != rhs.unknownFields {return false}
  3212. return true
  3213. }
  3214. }
  3215. extension ProtobufTestMessages_Edition_UnknownToTestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3216. static let protoMessageName: String = _protobuf_package + ".UnknownToTestAllTypes"
  3217. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3218. 1001: .standard(proto: "optional_int32"),
  3219. 1002: .standard(proto: "optional_string"),
  3220. 1003: .standard(proto: "nested_message"),
  3221. 1004: .same(proto: "optionalgroup"),
  3222. 1004: .unique(proto: "OptionalGroup", json: "optionalgroup"),
  3223. 1006: .standard(proto: "optional_bool"),
  3224. 1011: .standard(proto: "repeated_int32"),
  3225. ]
  3226. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3227. while let fieldNumber = try decoder.nextFieldNumber() {
  3228. // The use of inline closures is to circumvent an issue where the compiler
  3229. // allocates stack space for every case branch when no optimizations are
  3230. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3231. switch fieldNumber {
  3232. case 1001: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt32) }()
  3233. case 1002: try { try decoder.decodeSingularStringField(value: &self._optionalString) }()
  3234. case 1003: try { try decoder.decodeSingularMessageField(value: &self._nestedMessage) }()
  3235. case 1004: try { try decoder.decodeSingularGroupField(value: &self._optionalGroup) }()
  3236. case 1006: try { try decoder.decodeSingularBoolField(value: &self._optionalBool) }()
  3237. case 1011: try { try decoder.decodeRepeatedInt32Field(value: &self.repeatedInt32) }()
  3238. default: break
  3239. }
  3240. }
  3241. }
  3242. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3243. // The use of inline closures is to circumvent an issue where the compiler
  3244. // allocates stack space for every if/case branch local when no optimizations
  3245. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3246. // https://github.com/apple/swift-protobuf/issues/1182
  3247. try { if let v = self._optionalInt32 {
  3248. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1001)
  3249. } }()
  3250. try { if let v = self._optionalString {
  3251. try visitor.visitSingularStringField(value: v, fieldNumber: 1002)
  3252. } }()
  3253. try { if let v = self._nestedMessage {
  3254. try visitor.visitSingularMessageField(value: v, fieldNumber: 1003)
  3255. } }()
  3256. try { if let v = self._optionalGroup {
  3257. try visitor.visitSingularGroupField(value: v, fieldNumber: 1004)
  3258. } }()
  3259. try { if let v = self._optionalBool {
  3260. try visitor.visitSingularBoolField(value: v, fieldNumber: 1006)
  3261. } }()
  3262. if !self.repeatedInt32.isEmpty {
  3263. try visitor.visitPackedInt32Field(value: self.repeatedInt32, fieldNumber: 1011)
  3264. }
  3265. try unknownFields.traverse(visitor: &visitor)
  3266. }
  3267. static func ==(lhs: ProtobufTestMessages_Edition_UnknownToTestAllTypes, rhs: ProtobufTestMessages_Edition_UnknownToTestAllTypes) -> Bool {
  3268. if lhs._optionalInt32 != rhs._optionalInt32 {return false}
  3269. if lhs._optionalString != rhs._optionalString {return false}
  3270. if lhs._nestedMessage != rhs._nestedMessage {return false}
  3271. if lhs._optionalGroup != rhs._optionalGroup {return false}
  3272. if lhs._optionalBool != rhs._optionalBool {return false}
  3273. if lhs.repeatedInt32 != rhs.repeatedInt32 {return false}
  3274. if lhs.unknownFields != rhs.unknownFields {return false}
  3275. return true
  3276. }
  3277. }
  3278. extension ProtobufTestMessages_Edition_UnknownToTestAllTypes.OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3279. static let protoMessageName: String = ProtobufTestMessages_Edition_UnknownToTestAllTypes.protoMessageName + ".OptionalGroup"
  3280. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3281. 1: .same(proto: "a"),
  3282. ]
  3283. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3284. while let fieldNumber = try decoder.nextFieldNumber() {
  3285. // The use of inline closures is to circumvent an issue where the compiler
  3286. // allocates stack space for every case branch when no optimizations are
  3287. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3288. switch fieldNumber {
  3289. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  3290. default: break
  3291. }
  3292. }
  3293. }
  3294. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3295. // The use of inline closures is to circumvent an issue where the compiler
  3296. // allocates stack space for every if/case branch local when no optimizations
  3297. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3298. // https://github.com/apple/swift-protobuf/issues/1182
  3299. try { if let v = self._a {
  3300. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  3301. } }()
  3302. try unknownFields.traverse(visitor: &visitor)
  3303. }
  3304. static func ==(lhs: ProtobufTestMessages_Edition_UnknownToTestAllTypes.OptionalGroup, rhs: ProtobufTestMessages_Edition_UnknownToTestAllTypes.OptionalGroup) -> Bool {
  3305. if lhs._a != rhs._a {return false}
  3306. if lhs.unknownFields != rhs.unknownFields {return false}
  3307. return true
  3308. }
  3309. }
  3310. extension ProtobufTestMessages_Edition_NullHypothesisEdition: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3311. static let protoMessageName: String = _protobuf_package + ".NullHypothesisEdition"
  3312. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  3313. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3314. // Load everything into unknown fields
  3315. while try decoder.nextFieldNumber() != nil {}
  3316. }
  3317. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3318. try unknownFields.traverse(visitor: &visitor)
  3319. }
  3320. static func ==(lhs: ProtobufTestMessages_Edition_NullHypothesisEdition, rhs: ProtobufTestMessages_Edition_NullHypothesisEdition) -> Bool {
  3321. if lhs.unknownFields != rhs.unknownFields {return false}
  3322. return true
  3323. }
  3324. }
  3325. extension ProtobufTestMessages_Edition_EnumOnlyEdition: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3326. static let protoMessageName: String = _protobuf_package + ".EnumOnlyEdition"
  3327. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  3328. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3329. // Load everything into unknown fields
  3330. while try decoder.nextFieldNumber() != nil {}
  3331. }
  3332. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3333. try unknownFields.traverse(visitor: &visitor)
  3334. }
  3335. static func ==(lhs: ProtobufTestMessages_Edition_EnumOnlyEdition, rhs: ProtobufTestMessages_Edition_EnumOnlyEdition) -> Bool {
  3336. if lhs.unknownFields != rhs.unknownFields {return false}
  3337. return true
  3338. }
  3339. }
  3340. extension ProtobufTestMessages_Edition_EnumOnlyEdition.BoolEnum: SwiftProtobuf._ProtoNameProviding {
  3341. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3342. 0: .same(proto: "kFalse"),
  3343. 1: .same(proto: "kTrue"),
  3344. ]
  3345. }
  3346. extension ProtobufTestMessages_Edition_OneStringEdition: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3347. static let protoMessageName: String = _protobuf_package + ".OneStringEdition"
  3348. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3349. 1: .same(proto: "data"),
  3350. ]
  3351. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3352. while let fieldNumber = try decoder.nextFieldNumber() {
  3353. // The use of inline closures is to circumvent an issue where the compiler
  3354. // allocates stack space for every case branch when no optimizations are
  3355. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3356. switch fieldNumber {
  3357. case 1: try { try decoder.decodeSingularStringField(value: &self._data) }()
  3358. default: break
  3359. }
  3360. }
  3361. }
  3362. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3363. // The use of inline closures is to circumvent an issue where the compiler
  3364. // allocates stack space for every if/case branch local when no optimizations
  3365. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3366. // https://github.com/apple/swift-protobuf/issues/1182
  3367. try { if let v = self._data {
  3368. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  3369. } }()
  3370. try unknownFields.traverse(visitor: &visitor)
  3371. }
  3372. static func ==(lhs: ProtobufTestMessages_Edition_OneStringEdition, rhs: ProtobufTestMessages_Edition_OneStringEdition) -> Bool {
  3373. if lhs._data != rhs._data {return false}
  3374. if lhs.unknownFields != rhs.unknownFields {return false}
  3375. return true
  3376. }
  3377. }
  3378. extension ProtobufTestMessages_Edition_ProtoWithKeywords: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3379. static let protoMessageName: String = _protobuf_package + ".ProtoWithKeywords"
  3380. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3381. 1: .same(proto: "inline"),
  3382. 2: .same(proto: "concept"),
  3383. 3: .same(proto: "requires"),
  3384. ]
  3385. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3386. while let fieldNumber = try decoder.nextFieldNumber() {
  3387. // The use of inline closures is to circumvent an issue where the compiler
  3388. // allocates stack space for every case branch when no optimizations are
  3389. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3390. switch fieldNumber {
  3391. case 1: try { try decoder.decodeSingularInt32Field(value: &self._inline) }()
  3392. case 2: try { try decoder.decodeSingularStringField(value: &self._concept) }()
  3393. case 3: try { try decoder.decodeRepeatedStringField(value: &self.requires) }()
  3394. default: break
  3395. }
  3396. }
  3397. }
  3398. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3399. // The use of inline closures is to circumvent an issue where the compiler
  3400. // allocates stack space for every if/case branch local when no optimizations
  3401. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3402. // https://github.com/apple/swift-protobuf/issues/1182
  3403. try { if let v = self._inline {
  3404. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  3405. } }()
  3406. try { if let v = self._concept {
  3407. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  3408. } }()
  3409. if !self.requires.isEmpty {
  3410. try visitor.visitRepeatedStringField(value: self.requires, fieldNumber: 3)
  3411. }
  3412. try unknownFields.traverse(visitor: &visitor)
  3413. }
  3414. static func ==(lhs: ProtobufTestMessages_Edition_ProtoWithKeywords, rhs: ProtobufTestMessages_Edition_ProtoWithKeywords) -> Bool {
  3415. if lhs._inline != rhs._inline {return false}
  3416. if lhs._concept != rhs._concept {return false}
  3417. if lhs.requires != rhs.requires {return false}
  3418. if lhs.unknownFields != rhs.unknownFields {return false}
  3419. return true
  3420. }
  3421. }
  3422. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3423. static let protoMessageName: String = _protobuf_package + ".TestAllRequiredTypesEdition"
  3424. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3425. 1: .standard(proto: "required_int32"),
  3426. 2: .standard(proto: "required_int64"),
  3427. 3: .standard(proto: "required_uint32"),
  3428. 4: .standard(proto: "required_uint64"),
  3429. 5: .standard(proto: "required_sint32"),
  3430. 6: .standard(proto: "required_sint64"),
  3431. 7: .standard(proto: "required_fixed32"),
  3432. 8: .standard(proto: "required_fixed64"),
  3433. 9: .standard(proto: "required_sfixed32"),
  3434. 10: .standard(proto: "required_sfixed64"),
  3435. 11: .standard(proto: "required_float"),
  3436. 12: .standard(proto: "required_double"),
  3437. 13: .standard(proto: "required_bool"),
  3438. 14: .standard(proto: "required_string"),
  3439. 15: .standard(proto: "required_bytes"),
  3440. 18: .standard(proto: "required_nested_message"),
  3441. 19: .standard(proto: "required_foreign_message"),
  3442. 21: .standard(proto: "required_nested_enum"),
  3443. 22: .standard(proto: "required_foreign_enum"),
  3444. 24: .standard(proto: "required_string_piece"),
  3445. 25: .standard(proto: "required_cord"),
  3446. 27: .standard(proto: "recursive_message"),
  3447. 28: .standard(proto: "optional_recursive_message"),
  3448. 201: .same(proto: "data"),
  3449. 201: .unique(proto: "Data", json: "data"),
  3450. 241: .standard(proto: "default_int32"),
  3451. 242: .standard(proto: "default_int64"),
  3452. 243: .standard(proto: "default_uint32"),
  3453. 244: .standard(proto: "default_uint64"),
  3454. 245: .standard(proto: "default_sint32"),
  3455. 246: .standard(proto: "default_sint64"),
  3456. 247: .standard(proto: "default_fixed32"),
  3457. 248: .standard(proto: "default_fixed64"),
  3458. 249: .standard(proto: "default_sfixed32"),
  3459. 250: .standard(proto: "default_sfixed64"),
  3460. 251: .standard(proto: "default_float"),
  3461. 252: .standard(proto: "default_double"),
  3462. 253: .standard(proto: "default_bool"),
  3463. 254: .standard(proto: "default_string"),
  3464. 255: .standard(proto: "default_bytes"),
  3465. ]
  3466. fileprivate class _StorageClass {
  3467. var _requiredInt32: Int32? = nil
  3468. var _requiredInt64: Int64? = nil
  3469. var _requiredUint32: UInt32? = nil
  3470. var _requiredUint64: UInt64? = nil
  3471. var _requiredSint32: Int32? = nil
  3472. var _requiredSint64: Int64? = nil
  3473. var _requiredFixed32: UInt32? = nil
  3474. var _requiredFixed64: UInt64? = nil
  3475. var _requiredSfixed32: Int32? = nil
  3476. var _requiredSfixed64: Int64? = nil
  3477. var _requiredFloat: Float? = nil
  3478. var _requiredDouble: Double? = nil
  3479. var _requiredBool: Bool? = nil
  3480. var _requiredString: String? = nil
  3481. var _requiredBytes: Data? = nil
  3482. var _requiredNestedMessage: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedMessage? = nil
  3483. var _requiredForeignMessage: ProtobufTestMessages_Edition_ForeignMessageEdition? = nil
  3484. var _requiredNestedEnum: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedEnum? = nil
  3485. var _requiredForeignEnum: ProtobufTestMessages_Edition_ForeignEnumEdition? = nil
  3486. var _requiredStringPiece: String? = nil
  3487. var _requiredCord: String? = nil
  3488. var _recursiveMessage: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition? = nil
  3489. var _optionalRecursiveMessage: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition? = nil
  3490. var _data: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.DataMessage? = nil
  3491. var _defaultInt32: Int32? = nil
  3492. var _defaultInt64: Int64? = nil
  3493. var _defaultUint32: UInt32? = nil
  3494. var _defaultUint64: UInt64? = nil
  3495. var _defaultSint32: Int32? = nil
  3496. var _defaultSint64: Int64? = nil
  3497. var _defaultFixed32: UInt32? = nil
  3498. var _defaultFixed64: UInt64? = nil
  3499. var _defaultSfixed32: Int32? = nil
  3500. var _defaultSfixed64: Int64? = nil
  3501. var _defaultFloat: Float? = nil
  3502. var _defaultDouble: Double? = nil
  3503. var _defaultBool: Bool? = nil
  3504. var _defaultString: String? = nil
  3505. var _defaultBytes: Data? = nil
  3506. // This property is used as the initial default value for new instances of the type.
  3507. // The type itself is protecting the reference to its storage via CoW semantics.
  3508. // This will force a copy to be made of this reference when the first mutation occurs;
  3509. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  3510. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  3511. private init() {}
  3512. init(copying source: _StorageClass) {
  3513. _requiredInt32 = source._requiredInt32
  3514. _requiredInt64 = source._requiredInt64
  3515. _requiredUint32 = source._requiredUint32
  3516. _requiredUint64 = source._requiredUint64
  3517. _requiredSint32 = source._requiredSint32
  3518. _requiredSint64 = source._requiredSint64
  3519. _requiredFixed32 = source._requiredFixed32
  3520. _requiredFixed64 = source._requiredFixed64
  3521. _requiredSfixed32 = source._requiredSfixed32
  3522. _requiredSfixed64 = source._requiredSfixed64
  3523. _requiredFloat = source._requiredFloat
  3524. _requiredDouble = source._requiredDouble
  3525. _requiredBool = source._requiredBool
  3526. _requiredString = source._requiredString
  3527. _requiredBytes = source._requiredBytes
  3528. _requiredNestedMessage = source._requiredNestedMessage
  3529. _requiredForeignMessage = source._requiredForeignMessage
  3530. _requiredNestedEnum = source._requiredNestedEnum
  3531. _requiredForeignEnum = source._requiredForeignEnum
  3532. _requiredStringPiece = source._requiredStringPiece
  3533. _requiredCord = source._requiredCord
  3534. _recursiveMessage = source._recursiveMessage
  3535. _optionalRecursiveMessage = source._optionalRecursiveMessage
  3536. _data = source._data
  3537. _defaultInt32 = source._defaultInt32
  3538. _defaultInt64 = source._defaultInt64
  3539. _defaultUint32 = source._defaultUint32
  3540. _defaultUint64 = source._defaultUint64
  3541. _defaultSint32 = source._defaultSint32
  3542. _defaultSint64 = source._defaultSint64
  3543. _defaultFixed32 = source._defaultFixed32
  3544. _defaultFixed64 = source._defaultFixed64
  3545. _defaultSfixed32 = source._defaultSfixed32
  3546. _defaultSfixed64 = source._defaultSfixed64
  3547. _defaultFloat = source._defaultFloat
  3548. _defaultDouble = source._defaultDouble
  3549. _defaultBool = source._defaultBool
  3550. _defaultString = source._defaultString
  3551. _defaultBytes = source._defaultBytes
  3552. }
  3553. }
  3554. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  3555. if !isKnownUniquelyReferenced(&_storage) {
  3556. _storage = _StorageClass(copying: _storage)
  3557. }
  3558. return _storage
  3559. }
  3560. public var isInitialized: Bool {
  3561. if !_protobuf_extensionFieldValues.isInitialized {return false}
  3562. return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3563. if _storage._requiredInt32 == nil {return false}
  3564. if _storage._requiredInt64 == nil {return false}
  3565. if _storage._requiredUint32 == nil {return false}
  3566. if _storage._requiredUint64 == nil {return false}
  3567. if _storage._requiredSint32 == nil {return false}
  3568. if _storage._requiredSint64 == nil {return false}
  3569. if _storage._requiredFixed32 == nil {return false}
  3570. if _storage._requiredFixed64 == nil {return false}
  3571. if _storage._requiredSfixed32 == nil {return false}
  3572. if _storage._requiredSfixed64 == nil {return false}
  3573. if _storage._requiredFloat == nil {return false}
  3574. if _storage._requiredDouble == nil {return false}
  3575. if _storage._requiredBool == nil {return false}
  3576. if _storage._requiredString == nil {return false}
  3577. if _storage._requiredBytes == nil {return false}
  3578. if _storage._requiredNestedMessage == nil {return false}
  3579. if _storage._requiredForeignMessage == nil {return false}
  3580. if _storage._requiredNestedEnum == nil {return false}
  3581. if _storage._requiredForeignEnum == nil {return false}
  3582. if _storage._requiredStringPiece == nil {return false}
  3583. if _storage._requiredCord == nil {return false}
  3584. if _storage._defaultInt32 == nil {return false}
  3585. if _storage._defaultInt64 == nil {return false}
  3586. if _storage._defaultUint32 == nil {return false}
  3587. if _storage._defaultUint64 == nil {return false}
  3588. if _storage._defaultSint32 == nil {return false}
  3589. if _storage._defaultSint64 == nil {return false}
  3590. if _storage._defaultFixed32 == nil {return false}
  3591. if _storage._defaultFixed64 == nil {return false}
  3592. if _storage._defaultSfixed32 == nil {return false}
  3593. if _storage._defaultSfixed64 == nil {return false}
  3594. if _storage._defaultFloat == nil {return false}
  3595. if _storage._defaultDouble == nil {return false}
  3596. if _storage._defaultBool == nil {return false}
  3597. if _storage._defaultString == nil {return false}
  3598. if _storage._defaultBytes == nil {return false}
  3599. if let v = _storage._requiredNestedMessage, !v.isInitialized {return false}
  3600. if let v = _storage._recursiveMessage, !v.isInitialized {return false}
  3601. if let v = _storage._optionalRecursiveMessage, !v.isInitialized {return false}
  3602. if let v = _storage._data, !v.isInitialized {return false}
  3603. return true
  3604. }
  3605. }
  3606. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3607. _ = _uniqueStorage()
  3608. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3609. while let fieldNumber = try decoder.nextFieldNumber() {
  3610. // The use of inline closures is to circumvent an issue where the compiler
  3611. // allocates stack space for every case branch when no optimizations are
  3612. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3613. switch fieldNumber {
  3614. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._requiredInt32) }()
  3615. case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._requiredInt64) }()
  3616. case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._requiredUint32) }()
  3617. case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._requiredUint64) }()
  3618. case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._requiredSint32) }()
  3619. case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._requiredSint64) }()
  3620. case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._requiredFixed32) }()
  3621. case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._requiredFixed64) }()
  3622. case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._requiredSfixed32) }()
  3623. case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._requiredSfixed64) }()
  3624. case 11: try { try decoder.decodeSingularFloatField(value: &_storage._requiredFloat) }()
  3625. case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._requiredDouble) }()
  3626. case 13: try { try decoder.decodeSingularBoolField(value: &_storage._requiredBool) }()
  3627. case 14: try { try decoder.decodeSingularStringField(value: &_storage._requiredString) }()
  3628. case 15: try { try decoder.decodeSingularBytesField(value: &_storage._requiredBytes) }()
  3629. case 18: try { try decoder.decodeSingularMessageField(value: &_storage._requiredNestedMessage) }()
  3630. case 19: try { try decoder.decodeSingularMessageField(value: &_storage._requiredForeignMessage) }()
  3631. case 21: try { try decoder.decodeSingularEnumField(value: &_storage._requiredNestedEnum) }()
  3632. case 22: try { try decoder.decodeSingularEnumField(value: &_storage._requiredForeignEnum) }()
  3633. case 24: try { try decoder.decodeSingularStringField(value: &_storage._requiredStringPiece) }()
  3634. case 25: try { try decoder.decodeSingularStringField(value: &_storage._requiredCord) }()
  3635. case 27: try { try decoder.decodeSingularMessageField(value: &_storage._recursiveMessage) }()
  3636. case 28: try { try decoder.decodeSingularMessageField(value: &_storage._optionalRecursiveMessage) }()
  3637. case 201: try { try decoder.decodeSingularGroupField(value: &_storage._data) }()
  3638. case 241: try { try decoder.decodeSingularInt32Field(value: &_storage._defaultInt32) }()
  3639. case 242: try { try decoder.decodeSingularInt64Field(value: &_storage._defaultInt64) }()
  3640. case 243: try { try decoder.decodeSingularUInt32Field(value: &_storage._defaultUint32) }()
  3641. case 244: try { try decoder.decodeSingularUInt64Field(value: &_storage._defaultUint64) }()
  3642. case 245: try { try decoder.decodeSingularSInt32Field(value: &_storage._defaultSint32) }()
  3643. case 246: try { try decoder.decodeSingularSInt64Field(value: &_storage._defaultSint64) }()
  3644. case 247: try { try decoder.decodeSingularFixed32Field(value: &_storage._defaultFixed32) }()
  3645. case 248: try { try decoder.decodeSingularFixed64Field(value: &_storage._defaultFixed64) }()
  3646. case 249: try { try decoder.decodeSingularSFixed32Field(value: &_storage._defaultSfixed32) }()
  3647. case 250: try { try decoder.decodeSingularSFixed64Field(value: &_storage._defaultSfixed64) }()
  3648. case 251: try { try decoder.decodeSingularFloatField(value: &_storage._defaultFloat) }()
  3649. case 252: try { try decoder.decodeSingularDoubleField(value: &_storage._defaultDouble) }()
  3650. case 253: try { try decoder.decodeSingularBoolField(value: &_storage._defaultBool) }()
  3651. case 254: try { try decoder.decodeSingularStringField(value: &_storage._defaultString) }()
  3652. case 255: try { try decoder.decodeSingularBytesField(value: &_storage._defaultBytes) }()
  3653. case 120..<201:
  3654. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.self, fieldNumber: fieldNumber) }()
  3655. default: break
  3656. }
  3657. }
  3658. }
  3659. }
  3660. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3661. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3662. // The use of inline closures is to circumvent an issue where the compiler
  3663. // allocates stack space for every if/case branch local when no optimizations
  3664. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3665. // https://github.com/apple/swift-protobuf/issues/1182
  3666. try { if let v = _storage._requiredInt32 {
  3667. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  3668. } }()
  3669. try { if let v = _storage._requiredInt64 {
  3670. try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
  3671. } }()
  3672. try { if let v = _storage._requiredUint32 {
  3673. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
  3674. } }()
  3675. try { if let v = _storage._requiredUint64 {
  3676. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
  3677. } }()
  3678. try { if let v = _storage._requiredSint32 {
  3679. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5)
  3680. } }()
  3681. try { if let v = _storage._requiredSint64 {
  3682. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6)
  3683. } }()
  3684. try { if let v = _storage._requiredFixed32 {
  3685. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7)
  3686. } }()
  3687. try { if let v = _storage._requiredFixed64 {
  3688. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8)
  3689. } }()
  3690. try { if let v = _storage._requiredSfixed32 {
  3691. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9)
  3692. } }()
  3693. try { if let v = _storage._requiredSfixed64 {
  3694. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10)
  3695. } }()
  3696. try { if let v = _storage._requiredFloat {
  3697. try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
  3698. } }()
  3699. try { if let v = _storage._requiredDouble {
  3700. try visitor.visitSingularDoubleField(value: v, fieldNumber: 12)
  3701. } }()
  3702. try { if let v = _storage._requiredBool {
  3703. try visitor.visitSingularBoolField(value: v, fieldNumber: 13)
  3704. } }()
  3705. try { if let v = _storage._requiredString {
  3706. try visitor.visitSingularStringField(value: v, fieldNumber: 14)
  3707. } }()
  3708. try { if let v = _storage._requiredBytes {
  3709. try visitor.visitSingularBytesField(value: v, fieldNumber: 15)
  3710. } }()
  3711. try { if let v = _storage._requiredNestedMessage {
  3712. try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
  3713. } }()
  3714. try { if let v = _storage._requiredForeignMessage {
  3715. try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
  3716. } }()
  3717. try { if let v = _storage._requiredNestedEnum {
  3718. try visitor.visitSingularEnumField(value: v, fieldNumber: 21)
  3719. } }()
  3720. try { if let v = _storage._requiredForeignEnum {
  3721. try visitor.visitSingularEnumField(value: v, fieldNumber: 22)
  3722. } }()
  3723. try { if let v = _storage._requiredStringPiece {
  3724. try visitor.visitSingularStringField(value: v, fieldNumber: 24)
  3725. } }()
  3726. try { if let v = _storage._requiredCord {
  3727. try visitor.visitSingularStringField(value: v, fieldNumber: 25)
  3728. } }()
  3729. try { if let v = _storage._recursiveMessage {
  3730. try visitor.visitSingularMessageField(value: v, fieldNumber: 27)
  3731. } }()
  3732. try { if let v = _storage._optionalRecursiveMessage {
  3733. try visitor.visitSingularMessageField(value: v, fieldNumber: 28)
  3734. } }()
  3735. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 120, end: 201)
  3736. try { if let v = _storage._data {
  3737. try visitor.visitSingularGroupField(value: v, fieldNumber: 201)
  3738. } }()
  3739. try { if let v = _storage._defaultInt32 {
  3740. try visitor.visitSingularInt32Field(value: v, fieldNumber: 241)
  3741. } }()
  3742. try { if let v = _storage._defaultInt64 {
  3743. try visitor.visitSingularInt64Field(value: v, fieldNumber: 242)
  3744. } }()
  3745. try { if let v = _storage._defaultUint32 {
  3746. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 243)
  3747. } }()
  3748. try { if let v = _storage._defaultUint64 {
  3749. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 244)
  3750. } }()
  3751. try { if let v = _storage._defaultSint32 {
  3752. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 245)
  3753. } }()
  3754. try { if let v = _storage._defaultSint64 {
  3755. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 246)
  3756. } }()
  3757. try { if let v = _storage._defaultFixed32 {
  3758. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 247)
  3759. } }()
  3760. try { if let v = _storage._defaultFixed64 {
  3761. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 248)
  3762. } }()
  3763. try { if let v = _storage._defaultSfixed32 {
  3764. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 249)
  3765. } }()
  3766. try { if let v = _storage._defaultSfixed64 {
  3767. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 250)
  3768. } }()
  3769. try { if let v = _storage._defaultFloat {
  3770. try visitor.visitSingularFloatField(value: v, fieldNumber: 251)
  3771. } }()
  3772. try { if let v = _storage._defaultDouble {
  3773. try visitor.visitSingularDoubleField(value: v, fieldNumber: 252)
  3774. } }()
  3775. try { if let v = _storage._defaultBool {
  3776. try visitor.visitSingularBoolField(value: v, fieldNumber: 253)
  3777. } }()
  3778. try { if let v = _storage._defaultString {
  3779. try visitor.visitSingularStringField(value: v, fieldNumber: 254)
  3780. } }()
  3781. try { if let v = _storage._defaultBytes {
  3782. try visitor.visitSingularBytesField(value: v, fieldNumber: 255)
  3783. } }()
  3784. }
  3785. try unknownFields.traverse(visitor: &visitor)
  3786. }
  3787. static func ==(lhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition, rhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition) -> Bool {
  3788. if lhs._storage !== rhs._storage {
  3789. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  3790. let _storage = _args.0
  3791. let rhs_storage = _args.1
  3792. if _storage._requiredInt32 != rhs_storage._requiredInt32 {return false}
  3793. if _storage._requiredInt64 != rhs_storage._requiredInt64 {return false}
  3794. if _storage._requiredUint32 != rhs_storage._requiredUint32 {return false}
  3795. if _storage._requiredUint64 != rhs_storage._requiredUint64 {return false}
  3796. if _storage._requiredSint32 != rhs_storage._requiredSint32 {return false}
  3797. if _storage._requiredSint64 != rhs_storage._requiredSint64 {return false}
  3798. if _storage._requiredFixed32 != rhs_storage._requiredFixed32 {return false}
  3799. if _storage._requiredFixed64 != rhs_storage._requiredFixed64 {return false}
  3800. if _storage._requiredSfixed32 != rhs_storage._requiredSfixed32 {return false}
  3801. if _storage._requiredSfixed64 != rhs_storage._requiredSfixed64 {return false}
  3802. if _storage._requiredFloat != rhs_storage._requiredFloat {return false}
  3803. if _storage._requiredDouble != rhs_storage._requiredDouble {return false}
  3804. if _storage._requiredBool != rhs_storage._requiredBool {return false}
  3805. if _storage._requiredString != rhs_storage._requiredString {return false}
  3806. if _storage._requiredBytes != rhs_storage._requiredBytes {return false}
  3807. if _storage._requiredNestedMessage != rhs_storage._requiredNestedMessage {return false}
  3808. if _storage._requiredForeignMessage != rhs_storage._requiredForeignMessage {return false}
  3809. if _storage._requiredNestedEnum != rhs_storage._requiredNestedEnum {return false}
  3810. if _storage._requiredForeignEnum != rhs_storage._requiredForeignEnum {return false}
  3811. if _storage._requiredStringPiece != rhs_storage._requiredStringPiece {return false}
  3812. if _storage._requiredCord != rhs_storage._requiredCord {return false}
  3813. if _storage._recursiveMessage != rhs_storage._recursiveMessage {return false}
  3814. if _storage._optionalRecursiveMessage != rhs_storage._optionalRecursiveMessage {return false}
  3815. if _storage._data != rhs_storage._data {return false}
  3816. if _storage._defaultInt32 != rhs_storage._defaultInt32 {return false}
  3817. if _storage._defaultInt64 != rhs_storage._defaultInt64 {return false}
  3818. if _storage._defaultUint32 != rhs_storage._defaultUint32 {return false}
  3819. if _storage._defaultUint64 != rhs_storage._defaultUint64 {return false}
  3820. if _storage._defaultSint32 != rhs_storage._defaultSint32 {return false}
  3821. if _storage._defaultSint64 != rhs_storage._defaultSint64 {return false}
  3822. if _storage._defaultFixed32 != rhs_storage._defaultFixed32 {return false}
  3823. if _storage._defaultFixed64 != rhs_storage._defaultFixed64 {return false}
  3824. if _storage._defaultSfixed32 != rhs_storage._defaultSfixed32 {return false}
  3825. if _storage._defaultSfixed64 != rhs_storage._defaultSfixed64 {return false}
  3826. if _storage._defaultFloat != rhs_storage._defaultFloat {return false}
  3827. if _storage._defaultDouble != rhs_storage._defaultDouble {return false}
  3828. if _storage._defaultBool != rhs_storage._defaultBool {return false}
  3829. if _storage._defaultString != rhs_storage._defaultString {return false}
  3830. if _storage._defaultBytes != rhs_storage._defaultBytes {return false}
  3831. return true
  3832. }
  3833. if !storagesAreEqual {return false}
  3834. }
  3835. if lhs.unknownFields != rhs.unknownFields {return false}
  3836. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  3837. return true
  3838. }
  3839. }
  3840. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  3841. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3842. -1: .same(proto: "NEG"),
  3843. 0: .same(proto: "FOO"),
  3844. 1: .same(proto: "BAR"),
  3845. 2: .same(proto: "BAZ"),
  3846. ]
  3847. }
  3848. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3849. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.protoMessageName + ".NestedMessage"
  3850. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3851. 1: .same(proto: "a"),
  3852. 2: .same(proto: "corecursive"),
  3853. 3: .standard(proto: "optional_corecursive"),
  3854. ]
  3855. fileprivate class _StorageClass {
  3856. var _a: Int32? = nil
  3857. var _corecursive: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition? = nil
  3858. var _optionalCorecursive: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition? = nil
  3859. // This property is used as the initial default value for new instances of the type.
  3860. // The type itself is protecting the reference to its storage via CoW semantics.
  3861. // This will force a copy to be made of this reference when the first mutation occurs;
  3862. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  3863. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  3864. private init() {}
  3865. init(copying source: _StorageClass) {
  3866. _a = source._a
  3867. _corecursive = source._corecursive
  3868. _optionalCorecursive = source._optionalCorecursive
  3869. }
  3870. }
  3871. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  3872. if !isKnownUniquelyReferenced(&_storage) {
  3873. _storage = _StorageClass(copying: _storage)
  3874. }
  3875. return _storage
  3876. }
  3877. public var isInitialized: Bool {
  3878. return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3879. if _storage._a == nil {return false}
  3880. if _storage._corecursive == nil {return false}
  3881. if let v = _storage._corecursive, !v.isInitialized {return false}
  3882. if let v = _storage._optionalCorecursive, !v.isInitialized {return false}
  3883. return true
  3884. }
  3885. }
  3886. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3887. _ = _uniqueStorage()
  3888. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3889. while let fieldNumber = try decoder.nextFieldNumber() {
  3890. // The use of inline closures is to circumvent an issue where the compiler
  3891. // allocates stack space for every case branch when no optimizations are
  3892. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3893. switch fieldNumber {
  3894. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._a) }()
  3895. case 2: try { try decoder.decodeSingularMessageField(value: &_storage._corecursive) }()
  3896. case 3: try { try decoder.decodeSingularMessageField(value: &_storage._optionalCorecursive) }()
  3897. default: break
  3898. }
  3899. }
  3900. }
  3901. }
  3902. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3903. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  3904. // The use of inline closures is to circumvent an issue where the compiler
  3905. // allocates stack space for every if/case branch local when no optimizations
  3906. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3907. // https://github.com/apple/swift-protobuf/issues/1182
  3908. try { if let v = _storage._a {
  3909. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  3910. } }()
  3911. try { if let v = _storage._corecursive {
  3912. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  3913. } }()
  3914. try { if let v = _storage._optionalCorecursive {
  3915. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  3916. } }()
  3917. }
  3918. try unknownFields.traverse(visitor: &visitor)
  3919. }
  3920. static func ==(lhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedMessage, rhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.NestedMessage) -> Bool {
  3921. if lhs._storage !== rhs._storage {
  3922. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  3923. let _storage = _args.0
  3924. let rhs_storage = _args.1
  3925. if _storage._a != rhs_storage._a {return false}
  3926. if _storage._corecursive != rhs_storage._corecursive {return false}
  3927. if _storage._optionalCorecursive != rhs_storage._optionalCorecursive {return false}
  3928. return true
  3929. }
  3930. if !storagesAreEqual {return false}
  3931. }
  3932. if lhs.unknownFields != rhs.unknownFields {return false}
  3933. return true
  3934. }
  3935. }
  3936. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3937. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.protoMessageName + ".Data"
  3938. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  3939. 202: .standard(proto: "group_int32"),
  3940. 203: .standard(proto: "group_uint32"),
  3941. ]
  3942. public var isInitialized: Bool {
  3943. if self._groupInt32 == nil {return false}
  3944. if self._groupUint32 == nil {return false}
  3945. return true
  3946. }
  3947. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3948. while let fieldNumber = try decoder.nextFieldNumber() {
  3949. // The use of inline closures is to circumvent an issue where the compiler
  3950. // allocates stack space for every case branch when no optimizations are
  3951. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3952. switch fieldNumber {
  3953. case 202: try { try decoder.decodeSingularInt32Field(value: &self._groupInt32) }()
  3954. case 203: try { try decoder.decodeSingularUInt32Field(value: &self._groupUint32) }()
  3955. default: break
  3956. }
  3957. }
  3958. }
  3959. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3960. // The use of inline closures is to circumvent an issue where the compiler
  3961. // allocates stack space for every if/case branch local when no optimizations
  3962. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  3963. // https://github.com/apple/swift-protobuf/issues/1182
  3964. try { if let v = self._groupInt32 {
  3965. try visitor.visitSingularInt32Field(value: v, fieldNumber: 202)
  3966. } }()
  3967. try { if let v = self._groupUint32 {
  3968. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 203)
  3969. } }()
  3970. try unknownFields.traverse(visitor: &visitor)
  3971. }
  3972. static func ==(lhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.DataMessage, rhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.DataMessage) -> Bool {
  3973. if lhs._groupInt32 != rhs._groupInt32 {return false}
  3974. if lhs._groupUint32 != rhs._groupUint32 {return false}
  3975. if lhs.unknownFields != rhs.unknownFields {return false}
  3976. return true
  3977. }
  3978. }
  3979. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  3980. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.protoMessageName + ".MessageSetCorrect"
  3981. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  3982. public var isInitialized: Bool {
  3983. if !_protobuf_extensionFieldValues.isInitialized {return false}
  3984. return true
  3985. }
  3986. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  3987. try decoder.decodeExtensionFieldsAsMessageSet(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrect.self)
  3988. }
  3989. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  3990. try visitor.visitExtensionFieldsAsMessageSet(fields: _protobuf_extensionFieldValues, start: 4, end: 2147483647)
  3991. try unknownFields.traverse(visitor: &visitor)
  3992. }
  3993. static func ==(lhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrect, rhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrect) -> Bool {
  3994. if lhs.unknownFields != rhs.unknownFields {return false}
  3995. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  3996. return true
  3997. }
  3998. }
  3999. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  4000. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.protoMessageName + ".MessageSetCorrectExtension1"
  4001. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  4002. 25: .same(proto: "str"),
  4003. ]
  4004. public var isInitialized: Bool {
  4005. if self._str == nil {return false}
  4006. return true
  4007. }
  4008. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  4009. while let fieldNumber = try decoder.nextFieldNumber() {
  4010. // The use of inline closures is to circumvent an issue where the compiler
  4011. // allocates stack space for every case branch when no optimizations are
  4012. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  4013. switch fieldNumber {
  4014. case 25: try { try decoder.decodeSingularStringField(value: &self._str) }()
  4015. default: break
  4016. }
  4017. }
  4018. }
  4019. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  4020. // The use of inline closures is to circumvent an issue where the compiler
  4021. // allocates stack space for every if/case branch local when no optimizations
  4022. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  4023. // https://github.com/apple/swift-protobuf/issues/1182
  4024. try { if let v = self._str {
  4025. try visitor.visitSingularStringField(value: v, fieldNumber: 25)
  4026. } }()
  4027. try unknownFields.traverse(visitor: &visitor)
  4028. }
  4029. static func ==(lhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1, rhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension1) -> Bool {
  4030. if lhs._str != rhs._str {return false}
  4031. if lhs.unknownFields != rhs.unknownFields {return false}
  4032. return true
  4033. }
  4034. }
  4035. extension ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  4036. static let protoMessageName: String = ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.protoMessageName + ".MessageSetCorrectExtension2"
  4037. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  4038. 9: .same(proto: "i"),
  4039. ]
  4040. public var isInitialized: Bool {
  4041. if self._i == nil {return false}
  4042. return true
  4043. }
  4044. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  4045. while let fieldNumber = try decoder.nextFieldNumber() {
  4046. // The use of inline closures is to circumvent an issue where the compiler
  4047. // allocates stack space for every case branch when no optimizations are
  4048. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  4049. switch fieldNumber {
  4050. case 9: try { try decoder.decodeSingularInt32Field(value: &self._i) }()
  4051. default: break
  4052. }
  4053. }
  4054. }
  4055. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  4056. // The use of inline closures is to circumvent an issue where the compiler
  4057. // allocates stack space for every if/case branch local when no optimizations
  4058. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  4059. // https://github.com/apple/swift-protobuf/issues/1182
  4060. try { if let v = self._i {
  4061. try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
  4062. } }()
  4063. try unknownFields.traverse(visitor: &visitor)
  4064. }
  4065. static func ==(lhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2, rhs: ProtobufTestMessages_Edition_TestAllRequiredTypesEdition.MessageSetCorrectExtension2) -> Bool {
  4066. if lhs._i != rhs._i {return false}
  4067. if lhs.unknownFields != rhs.unknownFields {return false}
  4068. return true
  4069. }
  4070. }