test_messages_proto2.pb.swift 242 KB

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