| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079 |
- // DO NOT EDIT.
- // swift-format-ignore-file
- // swiftlint:disable all
- //
- // Generated by the Swift generator plugin for the protocol buffer compiler.
- // Source: google/protobuf/test_messages_proto2.proto
- //
- // For information on using the generated types, please see the documentation:
- // https://github.com/apple/swift-protobuf/
- // Protocol Buffers - Google's data interchange format
- // Copyright 2008 Google Inc. All rights reserved.
- //
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file or at
- // https://developers.google.com/open-source/licenses/bsd
- //
- // Test schema for proto2 messages. This test schema is used by:
- //
- // - conformance tests
- // LINT: ALLOW_GROUPS
- import Foundation
- import SwiftProtobuf
- // If the compiler emits an error on this type, it is because this file
- // was generated by a version of the `protoc` Swift plug-in that is
- // incompatible with the version of SwiftProtobuf to which you are linking.
- // Please ensure that you are building against the same version of the API
- // that was used to generate this file.
- fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
- struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
- typealias Version = _2
- }
- enum ProtobufTestMessages_Proto2_ForeignEnumProto2: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
- case foreignFoo = 0
- case foreignBar = 1
- case foreignBaz = 2
- init() {
- self = .foreignFoo
- }
- }
- /// This proto includes every type of field in both singular and repeated
- /// forms.
- ///
- /// Also, crucially, all messages and enums in this file are eventually
- /// submessages of this message. So for example, a fuzz test of TestAllTypes
- /// could trigger bugs that occur in any message type in this file. We verify
- /// this stays true in a unit test.
- struct ProtobufTestMessages_Proto2_TestAllTypesProto2: SwiftProtobuf.ExtensibleMessage, @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Singular
- var optionalInt32: Int32 {
- get {return _storage._optionalInt32 ?? 0}
- set {_uniqueStorage()._optionalInt32 = newValue}
- }
- /// Returns true if `optionalInt32` has been explicitly set.
- var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil}
- /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
- mutating func clearOptionalInt32() {_uniqueStorage()._optionalInt32 = nil}
- var optionalInt64: Int64 {
- get {return _storage._optionalInt64 ?? 0}
- set {_uniqueStorage()._optionalInt64 = newValue}
- }
- /// Returns true if `optionalInt64` has been explicitly set.
- var hasOptionalInt64: Bool {return _storage._optionalInt64 != nil}
- /// Clears the value of `optionalInt64`. Subsequent reads from it will return its default value.
- mutating func clearOptionalInt64() {_uniqueStorage()._optionalInt64 = nil}
- var optionalUint32: UInt32 {
- get {return _storage._optionalUint32 ?? 0}
- set {_uniqueStorage()._optionalUint32 = newValue}
- }
- /// Returns true if `optionalUint32` has been explicitly set.
- var hasOptionalUint32: Bool {return _storage._optionalUint32 != nil}
- /// Clears the value of `optionalUint32`. Subsequent reads from it will return its default value.
- mutating func clearOptionalUint32() {_uniqueStorage()._optionalUint32 = nil}
- var optionalUint64: UInt64 {
- get {return _storage._optionalUint64 ?? 0}
- set {_uniqueStorage()._optionalUint64 = newValue}
- }
- /// Returns true if `optionalUint64` has been explicitly set.
- var hasOptionalUint64: Bool {return _storage._optionalUint64 != nil}
- /// Clears the value of `optionalUint64`. Subsequent reads from it will return its default value.
- mutating func clearOptionalUint64() {_uniqueStorage()._optionalUint64 = nil}
- var optionalSint32: Int32 {
- get {return _storage._optionalSint32 ?? 0}
- set {_uniqueStorage()._optionalSint32 = newValue}
- }
- /// Returns true if `optionalSint32` has been explicitly set.
- var hasOptionalSint32: Bool {return _storage._optionalSint32 != nil}
- /// Clears the value of `optionalSint32`. Subsequent reads from it will return its default value.
- mutating func clearOptionalSint32() {_uniqueStorage()._optionalSint32 = nil}
- var optionalSint64: Int64 {
- get {return _storage._optionalSint64 ?? 0}
- set {_uniqueStorage()._optionalSint64 = newValue}
- }
- /// Returns true if `optionalSint64` has been explicitly set.
- var hasOptionalSint64: Bool {return _storage._optionalSint64 != nil}
- /// Clears the value of `optionalSint64`. Subsequent reads from it will return its default value.
- mutating func clearOptionalSint64() {_uniqueStorage()._optionalSint64 = nil}
- var optionalFixed32: UInt32 {
- get {return _storage._optionalFixed32 ?? 0}
- set {_uniqueStorage()._optionalFixed32 = newValue}
- }
- /// Returns true if `optionalFixed32` has been explicitly set.
- var hasOptionalFixed32: Bool {return _storage._optionalFixed32 != nil}
- /// Clears the value of `optionalFixed32`. Subsequent reads from it will return its default value.
- mutating func clearOptionalFixed32() {_uniqueStorage()._optionalFixed32 = nil}
- var optionalFixed64: UInt64 {
- get {return _storage._optionalFixed64 ?? 0}
- set {_uniqueStorage()._optionalFixed64 = newValue}
- }
- /// Returns true if `optionalFixed64` has been explicitly set.
- var hasOptionalFixed64: Bool {return _storage._optionalFixed64 != nil}
- /// Clears the value of `optionalFixed64`. Subsequent reads from it will return its default value.
- mutating func clearOptionalFixed64() {_uniqueStorage()._optionalFixed64 = nil}
- var optionalSfixed32: Int32 {
- get {return _storage._optionalSfixed32 ?? 0}
- set {_uniqueStorage()._optionalSfixed32 = newValue}
- }
- /// Returns true if `optionalSfixed32` has been explicitly set.
- var hasOptionalSfixed32: Bool {return _storage._optionalSfixed32 != nil}
- /// Clears the value of `optionalSfixed32`. Subsequent reads from it will return its default value.
- mutating func clearOptionalSfixed32() {_uniqueStorage()._optionalSfixed32 = nil}
- var optionalSfixed64: Int64 {
- get {return _storage._optionalSfixed64 ?? 0}
- set {_uniqueStorage()._optionalSfixed64 = newValue}
- }
- /// Returns true if `optionalSfixed64` has been explicitly set.
- var hasOptionalSfixed64: Bool {return _storage._optionalSfixed64 != nil}
- /// Clears the value of `optionalSfixed64`. Subsequent reads from it will return its default value.
- mutating func clearOptionalSfixed64() {_uniqueStorage()._optionalSfixed64 = nil}
- var optionalFloat: Float {
- get {return _storage._optionalFloat ?? 0}
- set {_uniqueStorage()._optionalFloat = newValue}
- }
- /// Returns true if `optionalFloat` has been explicitly set.
- var hasOptionalFloat: Bool {return _storage._optionalFloat != nil}
- /// Clears the value of `optionalFloat`. Subsequent reads from it will return its default value.
- mutating func clearOptionalFloat() {_uniqueStorage()._optionalFloat = nil}
- var optionalDouble: Double {
- get {return _storage._optionalDouble ?? 0}
- set {_uniqueStorage()._optionalDouble = newValue}
- }
- /// Returns true if `optionalDouble` has been explicitly set.
- var hasOptionalDouble: Bool {return _storage._optionalDouble != nil}
- /// Clears the value of `optionalDouble`. Subsequent reads from it will return its default value.
- mutating func clearOptionalDouble() {_uniqueStorage()._optionalDouble = nil}
- var optionalBool: Bool {
- get {return _storage._optionalBool ?? false}
- set {_uniqueStorage()._optionalBool = newValue}
- }
- /// Returns true if `optionalBool` has been explicitly set.
- var hasOptionalBool: Bool {return _storage._optionalBool != nil}
- /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
- mutating func clearOptionalBool() {_uniqueStorage()._optionalBool = nil}
- var optionalString: String {
- get {return _storage._optionalString ?? String()}
- set {_uniqueStorage()._optionalString = newValue}
- }
- /// Returns true if `optionalString` has been explicitly set.
- var hasOptionalString: Bool {return _storage._optionalString != nil}
- /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
- mutating func clearOptionalString() {_uniqueStorage()._optionalString = nil}
- var optionalBytes: Data {
- get {return _storage._optionalBytes ?? Data()}
- set {_uniqueStorage()._optionalBytes = newValue}
- }
- /// Returns true if `optionalBytes` has been explicitly set.
- var hasOptionalBytes: Bool {return _storage._optionalBytes != nil}
- /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value.
- mutating func clearOptionalBytes() {_uniqueStorage()._optionalBytes = nil}
- var optionalNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage {
- get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage()}
- set {_uniqueStorage()._optionalNestedMessage = newValue}
- }
- /// Returns true if `optionalNestedMessage` has been explicitly set.
- var hasOptionalNestedMessage: Bool {return _storage._optionalNestedMessage != nil}
- /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalNestedMessage() {_uniqueStorage()._optionalNestedMessage = nil}
- var optionalForeignMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2 {
- get {return _storage._optionalForeignMessage ?? ProtobufTestMessages_Proto2_ForeignMessageProto2()}
- set {_uniqueStorage()._optionalForeignMessage = newValue}
- }
- /// Returns true if `optionalForeignMessage` has been explicitly set.
- var hasOptionalForeignMessage: Bool {return _storage._optionalForeignMessage != nil}
- /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalForeignMessage() {_uniqueStorage()._optionalForeignMessage = nil}
- var optionalNestedEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum {
- get {return _storage._optionalNestedEnum ?? .foo}
- set {_uniqueStorage()._optionalNestedEnum = newValue}
- }
- /// Returns true if `optionalNestedEnum` has been explicitly set.
- var hasOptionalNestedEnum: Bool {return _storage._optionalNestedEnum != nil}
- /// Clears the value of `optionalNestedEnum`. Subsequent reads from it will return its default value.
- mutating func clearOptionalNestedEnum() {_uniqueStorage()._optionalNestedEnum = nil}
- var optionalForeignEnum: ProtobufTestMessages_Proto2_ForeignEnumProto2 {
- get {return _storage._optionalForeignEnum ?? .foreignFoo}
- set {_uniqueStorage()._optionalForeignEnum = newValue}
- }
- /// Returns true if `optionalForeignEnum` has been explicitly set.
- var hasOptionalForeignEnum: Bool {return _storage._optionalForeignEnum != nil}
- /// Clears the value of `optionalForeignEnum`. Subsequent reads from it will return its default value.
- mutating func clearOptionalForeignEnum() {_uniqueStorage()._optionalForeignEnum = nil}
- var optionalStringPiece: String {
- get {return _storage._optionalStringPiece ?? String()}
- set {_uniqueStorage()._optionalStringPiece = newValue}
- }
- /// Returns true if `optionalStringPiece` has been explicitly set.
- var hasOptionalStringPiece: Bool {return _storage._optionalStringPiece != nil}
- /// Clears the value of `optionalStringPiece`. Subsequent reads from it will return its default value.
- mutating func clearOptionalStringPiece() {_uniqueStorage()._optionalStringPiece = nil}
- var optionalCord: String {
- get {return _storage._optionalCord ?? String()}
- set {_uniqueStorage()._optionalCord = newValue}
- }
- /// Returns true if `optionalCord` has been explicitly set.
- var hasOptionalCord: Bool {return _storage._optionalCord != nil}
- /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value.
- mutating func clearOptionalCord() {_uniqueStorage()._optionalCord = nil}
- var recursiveMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2 {
- get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto2_TestAllTypesProto2()}
- set {_uniqueStorage()._recursiveMessage = newValue}
- }
- /// Returns true if `recursiveMessage` has been explicitly set.
- var hasRecursiveMessage: Bool {return _storage._recursiveMessage != nil}
- /// Clears the value of `recursiveMessage`. Subsequent reads from it will return its default value.
- mutating func clearRecursiveMessage() {_uniqueStorage()._recursiveMessage = nil}
- /// Repeated
- var repeatedInt32: [Int32] {
- get {return _storage._repeatedInt32}
- set {_uniqueStorage()._repeatedInt32 = newValue}
- }
- var repeatedInt64: [Int64] {
- get {return _storage._repeatedInt64}
- set {_uniqueStorage()._repeatedInt64 = newValue}
- }
- var repeatedUint32: [UInt32] {
- get {return _storage._repeatedUint32}
- set {_uniqueStorage()._repeatedUint32 = newValue}
- }
- var repeatedUint64: [UInt64] {
- get {return _storage._repeatedUint64}
- set {_uniqueStorage()._repeatedUint64 = newValue}
- }
- var repeatedSint32: [Int32] {
- get {return _storage._repeatedSint32}
- set {_uniqueStorage()._repeatedSint32 = newValue}
- }
- var repeatedSint64: [Int64] {
- get {return _storage._repeatedSint64}
- set {_uniqueStorage()._repeatedSint64 = newValue}
- }
- var repeatedFixed32: [UInt32] {
- get {return _storage._repeatedFixed32}
- set {_uniqueStorage()._repeatedFixed32 = newValue}
- }
- var repeatedFixed64: [UInt64] {
- get {return _storage._repeatedFixed64}
- set {_uniqueStorage()._repeatedFixed64 = newValue}
- }
- var repeatedSfixed32: [Int32] {
- get {return _storage._repeatedSfixed32}
- set {_uniqueStorage()._repeatedSfixed32 = newValue}
- }
- var repeatedSfixed64: [Int64] {
- get {return _storage._repeatedSfixed64}
- set {_uniqueStorage()._repeatedSfixed64 = newValue}
- }
- var repeatedFloat: [Float] {
- get {return _storage._repeatedFloat}
- set {_uniqueStorage()._repeatedFloat = newValue}
- }
- var repeatedDouble: [Double] {
- get {return _storage._repeatedDouble}
- set {_uniqueStorage()._repeatedDouble = newValue}
- }
- var repeatedBool: [Bool] {
- get {return _storage._repeatedBool}
- set {_uniqueStorage()._repeatedBool = newValue}
- }
- var repeatedString: [String] {
- get {return _storage._repeatedString}
- set {_uniqueStorage()._repeatedString = newValue}
- }
- var repeatedBytes: [Data] {
- get {return _storage._repeatedBytes}
- set {_uniqueStorage()._repeatedBytes = newValue}
- }
- var repeatedNestedMessage: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage] {
- get {return _storage._repeatedNestedMessage}
- set {_uniqueStorage()._repeatedNestedMessage = newValue}
- }
- var repeatedForeignMessage: [ProtobufTestMessages_Proto2_ForeignMessageProto2] {
- get {return _storage._repeatedForeignMessage}
- set {_uniqueStorage()._repeatedForeignMessage = newValue}
- }
- var repeatedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] {
- get {return _storage._repeatedNestedEnum}
- set {_uniqueStorage()._repeatedNestedEnum = newValue}
- }
- var repeatedForeignEnum: [ProtobufTestMessages_Proto2_ForeignEnumProto2] {
- get {return _storage._repeatedForeignEnum}
- set {_uniqueStorage()._repeatedForeignEnum = newValue}
- }
- var repeatedStringPiece: [String] {
- get {return _storage._repeatedStringPiece}
- set {_uniqueStorage()._repeatedStringPiece = newValue}
- }
- var repeatedCord: [String] {
- get {return _storage._repeatedCord}
- set {_uniqueStorage()._repeatedCord = newValue}
- }
- /// Packed
- var packedInt32: [Int32] {
- get {return _storage._packedInt32}
- set {_uniqueStorage()._packedInt32 = newValue}
- }
- var packedInt64: [Int64] {
- get {return _storage._packedInt64}
- set {_uniqueStorage()._packedInt64 = newValue}
- }
- var packedUint32: [UInt32] {
- get {return _storage._packedUint32}
- set {_uniqueStorage()._packedUint32 = newValue}
- }
- var packedUint64: [UInt64] {
- get {return _storage._packedUint64}
- set {_uniqueStorage()._packedUint64 = newValue}
- }
- var packedSint32: [Int32] {
- get {return _storage._packedSint32}
- set {_uniqueStorage()._packedSint32 = newValue}
- }
- var packedSint64: [Int64] {
- get {return _storage._packedSint64}
- set {_uniqueStorage()._packedSint64 = newValue}
- }
- var packedFixed32: [UInt32] {
- get {return _storage._packedFixed32}
- set {_uniqueStorage()._packedFixed32 = newValue}
- }
- var packedFixed64: [UInt64] {
- get {return _storage._packedFixed64}
- set {_uniqueStorage()._packedFixed64 = newValue}
- }
- var packedSfixed32: [Int32] {
- get {return _storage._packedSfixed32}
- set {_uniqueStorage()._packedSfixed32 = newValue}
- }
- var packedSfixed64: [Int64] {
- get {return _storage._packedSfixed64}
- set {_uniqueStorage()._packedSfixed64 = newValue}
- }
- var packedFloat: [Float] {
- get {return _storage._packedFloat}
- set {_uniqueStorage()._packedFloat = newValue}
- }
- var packedDouble: [Double] {
- get {return _storage._packedDouble}
- set {_uniqueStorage()._packedDouble = newValue}
- }
- var packedBool: [Bool] {
- get {return _storage._packedBool}
- set {_uniqueStorage()._packedBool = newValue}
- }
- var packedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] {
- get {return _storage._packedNestedEnum}
- set {_uniqueStorage()._packedNestedEnum = newValue}
- }
- /// Unpacked
- var unpackedInt32: [Int32] {
- get {return _storage._unpackedInt32}
- set {_uniqueStorage()._unpackedInt32 = newValue}
- }
- var unpackedInt64: [Int64] {
- get {return _storage._unpackedInt64}
- set {_uniqueStorage()._unpackedInt64 = newValue}
- }
- var unpackedUint32: [UInt32] {
- get {return _storage._unpackedUint32}
- set {_uniqueStorage()._unpackedUint32 = newValue}
- }
- var unpackedUint64: [UInt64] {
- get {return _storage._unpackedUint64}
- set {_uniqueStorage()._unpackedUint64 = newValue}
- }
- var unpackedSint32: [Int32] {
- get {return _storage._unpackedSint32}
- set {_uniqueStorage()._unpackedSint32 = newValue}
- }
- var unpackedSint64: [Int64] {
- get {return _storage._unpackedSint64}
- set {_uniqueStorage()._unpackedSint64 = newValue}
- }
- var unpackedFixed32: [UInt32] {
- get {return _storage._unpackedFixed32}
- set {_uniqueStorage()._unpackedFixed32 = newValue}
- }
- var unpackedFixed64: [UInt64] {
- get {return _storage._unpackedFixed64}
- set {_uniqueStorage()._unpackedFixed64 = newValue}
- }
- var unpackedSfixed32: [Int32] {
- get {return _storage._unpackedSfixed32}
- set {_uniqueStorage()._unpackedSfixed32 = newValue}
- }
- var unpackedSfixed64: [Int64] {
- get {return _storage._unpackedSfixed64}
- set {_uniqueStorage()._unpackedSfixed64 = newValue}
- }
- var unpackedFloat: [Float] {
- get {return _storage._unpackedFloat}
- set {_uniqueStorage()._unpackedFloat = newValue}
- }
- var unpackedDouble: [Double] {
- get {return _storage._unpackedDouble}
- set {_uniqueStorage()._unpackedDouble = newValue}
- }
- var unpackedBool: [Bool] {
- get {return _storage._unpackedBool}
- set {_uniqueStorage()._unpackedBool = newValue}
- }
- var unpackedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] {
- get {return _storage._unpackedNestedEnum}
- set {_uniqueStorage()._unpackedNestedEnum = newValue}
- }
- /// Map
- var mapInt32Int32: Dictionary<Int32,Int32> {
- get {return _storage._mapInt32Int32}
- set {_uniqueStorage()._mapInt32Int32 = newValue}
- }
- var mapInt64Int64: Dictionary<Int64,Int64> {
- get {return _storage._mapInt64Int64}
- set {_uniqueStorage()._mapInt64Int64 = newValue}
- }
- var mapUint32Uint32: Dictionary<UInt32,UInt32> {
- get {return _storage._mapUint32Uint32}
- set {_uniqueStorage()._mapUint32Uint32 = newValue}
- }
- var mapUint64Uint64: Dictionary<UInt64,UInt64> {
- get {return _storage._mapUint64Uint64}
- set {_uniqueStorage()._mapUint64Uint64 = newValue}
- }
- var mapSint32Sint32: Dictionary<Int32,Int32> {
- get {return _storage._mapSint32Sint32}
- set {_uniqueStorage()._mapSint32Sint32 = newValue}
- }
- var mapSint64Sint64: Dictionary<Int64,Int64> {
- get {return _storage._mapSint64Sint64}
- set {_uniqueStorage()._mapSint64Sint64 = newValue}
- }
- var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
- get {return _storage._mapFixed32Fixed32}
- set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
- }
- var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
- get {return _storage._mapFixed64Fixed64}
- set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
- }
- var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
- get {return _storage._mapSfixed32Sfixed32}
- set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
- }
- var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
- get {return _storage._mapSfixed64Sfixed64}
- set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
- }
- var mapInt32Bool: Dictionary<Int32,Bool> {
- get {return _storage._mapInt32Bool}
- set {_uniqueStorage()._mapInt32Bool = newValue}
- }
- var mapInt32Float: Dictionary<Int32,Float> {
- get {return _storage._mapInt32Float}
- set {_uniqueStorage()._mapInt32Float = newValue}
- }
- var mapInt32Double: Dictionary<Int32,Double> {
- get {return _storage._mapInt32Double}
- set {_uniqueStorage()._mapInt32Double = newValue}
- }
- var mapInt32NestedMessage: Dictionary<Int32,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage> {
- get {return _storage._mapInt32NestedMessage}
- set {_uniqueStorage()._mapInt32NestedMessage = newValue}
- }
- var mapBoolBool: Dictionary<Bool,Bool> {
- get {return _storage._mapBoolBool}
- set {_uniqueStorage()._mapBoolBool = newValue}
- }
- var mapStringString: Dictionary<String,String> {
- get {return _storage._mapStringString}
- set {_uniqueStorage()._mapStringString = newValue}
- }
- var mapStringBytes: Dictionary<String,Data> {
- get {return _storage._mapStringBytes}
- set {_uniqueStorage()._mapStringBytes = newValue}
- }
- var mapStringNestedMessage: Dictionary<String,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage> {
- get {return _storage._mapStringNestedMessage}
- set {_uniqueStorage()._mapStringNestedMessage = newValue}
- }
- var mapStringForeignMessage: Dictionary<String,ProtobufTestMessages_Proto2_ForeignMessageProto2> {
- get {return _storage._mapStringForeignMessage}
- set {_uniqueStorage()._mapStringForeignMessage = newValue}
- }
- var mapStringNestedEnum: Dictionary<String,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum> {
- get {return _storage._mapStringNestedEnum}
- set {_uniqueStorage()._mapStringNestedEnum = newValue}
- }
- var mapStringForeignEnum: Dictionary<String,ProtobufTestMessages_Proto2_ForeignEnumProto2> {
- get {return _storage._mapStringForeignEnum}
- set {_uniqueStorage()._mapStringForeignEnum = newValue}
- }
- var oneofField: OneOf_OneofField? {
- get {return _storage._oneofField}
- set {_uniqueStorage()._oneofField = newValue}
- }
- var oneofUint32: UInt32 {
- get {
- if case .oneofUint32(let v)? = _storage._oneofField {return v}
- return 0
- }
- set {_uniqueStorage()._oneofField = .oneofUint32(newValue)}
- }
- var oneofNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage {
- get {
- if case .oneofNestedMessage(let v)? = _storage._oneofField {return v}
- return ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage()
- }
- set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)}
- }
- var oneofString: String {
- get {
- if case .oneofString(let v)? = _storage._oneofField {return v}
- return String()
- }
- set {_uniqueStorage()._oneofField = .oneofString(newValue)}
- }
- var oneofBytes: Data {
- get {
- if case .oneofBytes(let v)? = _storage._oneofField {return v}
- return Data()
- }
- set {_uniqueStorage()._oneofField = .oneofBytes(newValue)}
- }
- var oneofBool: Bool {
- get {
- if case .oneofBool(let v)? = _storage._oneofField {return v}
- return false
- }
- set {_uniqueStorage()._oneofField = .oneofBool(newValue)}
- }
- var oneofUint64: UInt64 {
- get {
- if case .oneofUint64(let v)? = _storage._oneofField {return v}
- return 0
- }
- set {_uniqueStorage()._oneofField = .oneofUint64(newValue)}
- }
- var oneofFloat: Float {
- get {
- if case .oneofFloat(let v)? = _storage._oneofField {return v}
- return 0
- }
- set {_uniqueStorage()._oneofField = .oneofFloat(newValue)}
- }
- var oneofDouble: Double {
- get {
- if case .oneofDouble(let v)? = _storage._oneofField {return v}
- return 0
- }
- set {_uniqueStorage()._oneofField = .oneofDouble(newValue)}
- }
- var oneofEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum {
- get {
- if case .oneofEnum(let v)? = _storage._oneofField {return v}
- return .foo
- }
- set {_uniqueStorage()._oneofField = .oneofEnum(newValue)}
- }
- var data: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage {
- get {return _storage._data ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage()}
- set {_uniqueStorage()._data = newValue}
- }
- /// Returns true if `data` has been explicitly set.
- var hasData: Bool {return _storage._data != nil}
- /// Clears the value of `data`. Subsequent reads from it will return its default value.
- mutating func clearData() {_uniqueStorage()._data = nil}
- var multiWordGroupField: ProtobufTestMessages_Proto2_TestAllTypesProto2.MultiWordGroupField {
- get {return _storage._multiWordGroupField ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MultiWordGroupField()}
- set {_uniqueStorage()._multiWordGroupField = newValue}
- }
- /// Returns true if `multiWordGroupField` has been explicitly set.
- var hasMultiWordGroupField: Bool {return _storage._multiWordGroupField != nil}
- /// Clears the value of `multiWordGroupField`. Subsequent reads from it will return its default value.
- mutating func clearMultiWordGroupField() {_uniqueStorage()._multiWordGroupField = nil}
- /// default values
- var defaultInt32: Int32 {
- get {return _storage._defaultInt32 ?? -123456789}
- set {_uniqueStorage()._defaultInt32 = newValue}
- }
- /// Returns true if `defaultInt32` has been explicitly set.
- var hasDefaultInt32: Bool {return _storage._defaultInt32 != nil}
- /// Clears the value of `defaultInt32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultInt32() {_uniqueStorage()._defaultInt32 = nil}
- var defaultInt64: Int64 {
- get {return _storage._defaultInt64 ?? -9123456789123456789}
- set {_uniqueStorage()._defaultInt64 = newValue}
- }
- /// Returns true if `defaultInt64` has been explicitly set.
- var hasDefaultInt64: Bool {return _storage._defaultInt64 != nil}
- /// Clears the value of `defaultInt64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultInt64() {_uniqueStorage()._defaultInt64 = nil}
- var defaultUint32: UInt32 {
- get {return _storage._defaultUint32 ?? 2123456789}
- set {_uniqueStorage()._defaultUint32 = newValue}
- }
- /// Returns true if `defaultUint32` has been explicitly set.
- var hasDefaultUint32: Bool {return _storage._defaultUint32 != nil}
- /// Clears the value of `defaultUint32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultUint32() {_uniqueStorage()._defaultUint32 = nil}
- var defaultUint64: UInt64 {
- get {return _storage._defaultUint64 ?? 10123456789123456789}
- set {_uniqueStorage()._defaultUint64 = newValue}
- }
- /// Returns true if `defaultUint64` has been explicitly set.
- var hasDefaultUint64: Bool {return _storage._defaultUint64 != nil}
- /// Clears the value of `defaultUint64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultUint64() {_uniqueStorage()._defaultUint64 = nil}
- var defaultSint32: Int32 {
- get {return _storage._defaultSint32 ?? -123456789}
- set {_uniqueStorage()._defaultSint32 = newValue}
- }
- /// Returns true if `defaultSint32` has been explicitly set.
- var hasDefaultSint32: Bool {return _storage._defaultSint32 != nil}
- /// Clears the value of `defaultSint32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSint32() {_uniqueStorage()._defaultSint32 = nil}
- var defaultSint64: Int64 {
- get {return _storage._defaultSint64 ?? -9123456789123456789}
- set {_uniqueStorage()._defaultSint64 = newValue}
- }
- /// Returns true if `defaultSint64` has been explicitly set.
- var hasDefaultSint64: Bool {return _storage._defaultSint64 != nil}
- /// Clears the value of `defaultSint64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSint64() {_uniqueStorage()._defaultSint64 = nil}
- var defaultFixed32: UInt32 {
- get {return _storage._defaultFixed32 ?? 2123456789}
- set {_uniqueStorage()._defaultFixed32 = newValue}
- }
- /// Returns true if `defaultFixed32` has been explicitly set.
- var hasDefaultFixed32: Bool {return _storage._defaultFixed32 != nil}
- /// Clears the value of `defaultFixed32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultFixed32() {_uniqueStorage()._defaultFixed32 = nil}
- var defaultFixed64: UInt64 {
- get {return _storage._defaultFixed64 ?? 10123456789123456789}
- set {_uniqueStorage()._defaultFixed64 = newValue}
- }
- /// Returns true if `defaultFixed64` has been explicitly set.
- var hasDefaultFixed64: Bool {return _storage._defaultFixed64 != nil}
- /// Clears the value of `defaultFixed64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultFixed64() {_uniqueStorage()._defaultFixed64 = nil}
- var defaultSfixed32: Int32 {
- get {return _storage._defaultSfixed32 ?? -123456789}
- set {_uniqueStorage()._defaultSfixed32 = newValue}
- }
- /// Returns true if `defaultSfixed32` has been explicitly set.
- var hasDefaultSfixed32: Bool {return _storage._defaultSfixed32 != nil}
- /// Clears the value of `defaultSfixed32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSfixed32() {_uniqueStorage()._defaultSfixed32 = nil}
- var defaultSfixed64: Int64 {
- get {return _storage._defaultSfixed64 ?? -9123456789123456789}
- set {_uniqueStorage()._defaultSfixed64 = newValue}
- }
- /// Returns true if `defaultSfixed64` has been explicitly set.
- var hasDefaultSfixed64: Bool {return _storage._defaultSfixed64 != nil}
- /// Clears the value of `defaultSfixed64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSfixed64() {_uniqueStorage()._defaultSfixed64 = nil}
- var defaultFloat: Float {
- get {return _storage._defaultFloat ?? 9e+09}
- set {_uniqueStorage()._defaultFloat = newValue}
- }
- /// Returns true if `defaultFloat` has been explicitly set.
- var hasDefaultFloat: Bool {return _storage._defaultFloat != nil}
- /// Clears the value of `defaultFloat`. Subsequent reads from it will return its default value.
- mutating func clearDefaultFloat() {_uniqueStorage()._defaultFloat = nil}
- var defaultDouble: Double {
- get {return _storage._defaultDouble ?? 7e+22}
- set {_uniqueStorage()._defaultDouble = newValue}
- }
- /// Returns true if `defaultDouble` has been explicitly set.
- var hasDefaultDouble: Bool {return _storage._defaultDouble != nil}
- /// Clears the value of `defaultDouble`. Subsequent reads from it will return its default value.
- mutating func clearDefaultDouble() {_uniqueStorage()._defaultDouble = nil}
- var defaultBool: Bool {
- get {return _storage._defaultBool ?? true}
- set {_uniqueStorage()._defaultBool = newValue}
- }
- /// Returns true if `defaultBool` has been explicitly set.
- var hasDefaultBool: Bool {return _storage._defaultBool != nil}
- /// Clears the value of `defaultBool`. Subsequent reads from it will return its default value.
- mutating func clearDefaultBool() {_uniqueStorage()._defaultBool = nil}
- var defaultString: String {
- get {return _storage._defaultString ?? "Rosebud"}
- set {_uniqueStorage()._defaultString = newValue}
- }
- /// Returns true if `defaultString` has been explicitly set.
- var hasDefaultString: Bool {return _storage._defaultString != nil}
- /// Clears the value of `defaultString`. Subsequent reads from it will return its default value.
- mutating func clearDefaultString() {_uniqueStorage()._defaultString = nil}
- var defaultBytes: Data {
- get {return _storage._defaultBytes ?? Data([106, 111, 115, 104, 117, 97])}
- set {_uniqueStorage()._defaultBytes = newValue}
- }
- /// Returns true if `defaultBytes` has been explicitly set.
- var hasDefaultBytes: Bool {return _storage._defaultBytes != nil}
- /// Clears the value of `defaultBytes`. Subsequent reads from it will return its default value.
- mutating func clearDefaultBytes() {_uniqueStorage()._defaultBytes = nil}
- /// Test field-name-to-JSON-name convention.
- /// (protobuf says names can be any valid C/C++ identifier.)
- var fieldname1: Int32 {
- get {return _storage._fieldname1 ?? 0}
- set {_uniqueStorage()._fieldname1 = newValue}
- }
- /// Returns true if `fieldname1` has been explicitly set.
- var hasFieldname1: Bool {return _storage._fieldname1 != nil}
- /// Clears the value of `fieldname1`. Subsequent reads from it will return its default value.
- mutating func clearFieldname1() {_uniqueStorage()._fieldname1 = nil}
- var fieldName2: Int32 {
- get {return _storage._fieldName2 ?? 0}
- set {_uniqueStorage()._fieldName2 = newValue}
- }
- /// Returns true if `fieldName2` has been explicitly set.
- var hasFieldName2: Bool {return _storage._fieldName2 != nil}
- /// Clears the value of `fieldName2`. Subsequent reads from it will return its default value.
- mutating func clearFieldName2() {_uniqueStorage()._fieldName2 = nil}
- var fieldName3: Int32 {
- get {return _storage._fieldName3 ?? 0}
- set {_uniqueStorage()._fieldName3 = newValue}
- }
- /// Returns true if `fieldName3` has been explicitly set.
- var hasFieldName3: Bool {return _storage._fieldName3 != nil}
- /// Clears the value of `fieldName3`. Subsequent reads from it will return its default value.
- mutating func clearFieldName3() {_uniqueStorage()._fieldName3 = nil}
- var field_Name4_: Int32 {
- get {return _storage._field_Name4_ ?? 0}
- set {_uniqueStorage()._field_Name4_ = newValue}
- }
- /// Returns true if `field_Name4_` has been explicitly set.
- var hasField_Name4_: Bool {return _storage._field_Name4_ != nil}
- /// Clears the value of `field_Name4_`. Subsequent reads from it will return its default value.
- mutating func clearField_Name4_() {_uniqueStorage()._field_Name4_ = nil}
- var field0Name5: Int32 {
- get {return _storage._field0Name5 ?? 0}
- set {_uniqueStorage()._field0Name5 = newValue}
- }
- /// Returns true if `field0Name5` has been explicitly set.
- var hasField0Name5: Bool {return _storage._field0Name5 != nil}
- /// Clears the value of `field0Name5`. Subsequent reads from it will return its default value.
- mutating func clearField0Name5() {_uniqueStorage()._field0Name5 = nil}
- var field0Name6: Int32 {
- get {return _storage._field0Name6 ?? 0}
- set {_uniqueStorage()._field0Name6 = newValue}
- }
- /// Returns true if `field0Name6` has been explicitly set.
- var hasField0Name6: Bool {return _storage._field0Name6 != nil}
- /// Clears the value of `field0Name6`. Subsequent reads from it will return its default value.
- mutating func clearField0Name6() {_uniqueStorage()._field0Name6 = nil}
- var fieldName7: Int32 {
- get {return _storage._fieldName7 ?? 0}
- set {_uniqueStorage()._fieldName7 = newValue}
- }
- /// Returns true if `fieldName7` has been explicitly set.
- var hasFieldName7: Bool {return _storage._fieldName7 != nil}
- /// Clears the value of `fieldName7`. Subsequent reads from it will return its default value.
- mutating func clearFieldName7() {_uniqueStorage()._fieldName7 = nil}
- var fieldName8: Int32 {
- get {return _storage._fieldName8 ?? 0}
- set {_uniqueStorage()._fieldName8 = newValue}
- }
- /// Returns true if `fieldName8` has been explicitly set.
- var hasFieldName8: Bool {return _storage._fieldName8 != nil}
- /// Clears the value of `fieldName8`. Subsequent reads from it will return its default value.
- mutating func clearFieldName8() {_uniqueStorage()._fieldName8 = nil}
- var fieldName9: Int32 {
- get {return _storage._fieldName9 ?? 0}
- set {_uniqueStorage()._fieldName9 = newValue}
- }
- /// Returns true if `fieldName9` has been explicitly set.
- var hasFieldName9: Bool {return _storage._fieldName9 != nil}
- /// Clears the value of `fieldName9`. Subsequent reads from it will return its default value.
- mutating func clearFieldName9() {_uniqueStorage()._fieldName9 = nil}
- var fieldName10: Int32 {
- get {return _storage._fieldName10 ?? 0}
- set {_uniqueStorage()._fieldName10 = newValue}
- }
- /// Returns true if `fieldName10` has been explicitly set.
- var hasFieldName10: Bool {return _storage._fieldName10 != nil}
- /// Clears the value of `fieldName10`. Subsequent reads from it will return its default value.
- mutating func clearFieldName10() {_uniqueStorage()._fieldName10 = nil}
- var fieldName11: Int32 {
- get {return _storage._fieldName11 ?? 0}
- set {_uniqueStorage()._fieldName11 = newValue}
- }
- /// Returns true if `fieldName11` has been explicitly set.
- var hasFieldName11: Bool {return _storage._fieldName11 != nil}
- /// Clears the value of `fieldName11`. Subsequent reads from it will return its default value.
- mutating func clearFieldName11() {_uniqueStorage()._fieldName11 = nil}
- var fieldName12: Int32 {
- get {return _storage._fieldName12 ?? 0}
- set {_uniqueStorage()._fieldName12 = newValue}
- }
- /// Returns true if `fieldName12` has been explicitly set.
- var hasFieldName12: Bool {return _storage._fieldName12 != nil}
- /// Clears the value of `fieldName12`. Subsequent reads from it will return its default value.
- mutating func clearFieldName12() {_uniqueStorage()._fieldName12 = nil}
- var _FieldName13: Int32 {
- get {return _storage.__FieldName13 ?? 0}
- set {_uniqueStorage().__FieldName13 = newValue}
- }
- /// Returns true if `_FieldName13` has been explicitly set.
- var has_FieldName13: Bool {return _storage.__FieldName13 != nil}
- /// Clears the value of `_FieldName13`. Subsequent reads from it will return its default value.
- mutating func clear_FieldName13() {_uniqueStorage().__FieldName13 = nil}
- var _FieldName14: Int32 {
- get {return _storage.__FieldName14 ?? 0}
- set {_uniqueStorage().__FieldName14 = newValue}
- }
- /// Returns true if `_FieldName14` has been explicitly set.
- var has_FieldName14: Bool {return _storage.__FieldName14 != nil}
- /// Clears the value of `_FieldName14`. Subsequent reads from it will return its default value.
- mutating func clear_FieldName14() {_uniqueStorage().__FieldName14 = nil}
- var field_Name15: Int32 {
- get {return _storage._field_Name15 ?? 0}
- set {_uniqueStorage()._field_Name15 = newValue}
- }
- /// Returns true if `field_Name15` has been explicitly set.
- var hasField_Name15: Bool {return _storage._field_Name15 != nil}
- /// Clears the value of `field_Name15`. Subsequent reads from it will return its default value.
- mutating func clearField_Name15() {_uniqueStorage()._field_Name15 = nil}
- var field_Name16: Int32 {
- get {return _storage._field_Name16 ?? 0}
- set {_uniqueStorage()._field_Name16 = newValue}
- }
- /// Returns true if `field_Name16` has been explicitly set.
- var hasField_Name16: Bool {return _storage._field_Name16 != nil}
- /// Clears the value of `field_Name16`. Subsequent reads from it will return its default value.
- mutating func clearField_Name16() {_uniqueStorage()._field_Name16 = nil}
- var fieldName17__: Int32 {
- get {return _storage._fieldName17__ ?? 0}
- set {_uniqueStorage()._fieldName17__ = newValue}
- }
- /// Returns true if `fieldName17__` has been explicitly set.
- var hasFieldName17__: Bool {return _storage._fieldName17__ != nil}
- /// Clears the value of `fieldName17__`. Subsequent reads from it will return its default value.
- mutating func clearFieldName17__() {_uniqueStorage()._fieldName17__ = nil}
- var fieldName18__: Int32 {
- get {return _storage._fieldName18__ ?? 0}
- set {_uniqueStorage()._fieldName18__ = newValue}
- }
- /// Returns true if `fieldName18__` has been explicitly set.
- var hasFieldName18__: Bool {return _storage._fieldName18__ != nil}
- /// Clears the value of `fieldName18__`. Subsequent reads from it will return its default value.
- mutating func clearFieldName18__() {_uniqueStorage()._fieldName18__ = nil}
- var messageSetCorrect: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect {
- get {return _storage._messageSetCorrect ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect()}
- set {_uniqueStorage()._messageSetCorrect = newValue}
- }
- /// Returns true if `messageSetCorrect` has been explicitly set.
- var hasMessageSetCorrect: Bool {return _storage._messageSetCorrect != nil}
- /// Clears the value of `messageSetCorrect`. Subsequent reads from it will return its default value.
- mutating func clearMessageSetCorrect() {_uniqueStorage()._messageSetCorrect = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- enum OneOf_OneofField: Equatable, @unchecked Sendable {
- case oneofUint32(UInt32)
- case oneofNestedMessage(ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage)
- case oneofString(String)
- case oneofBytes(Data)
- case oneofBool(Bool)
- case oneofUint64(UInt64)
- case oneofFloat(Float)
- case oneofDouble(Double)
- case oneofEnum(ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum)
- fileprivate var isInitialized: Bool {
- guard case .oneofNestedMessage(let v) = self else {return true}
- return v.isInitialized
- }
- }
- enum NestedEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
- case foo = 0
- case bar = 1
- case baz = 2
- /// Intentionally negative.
- case neg = -1
- init() {
- self = .foo
- }
- }
- struct NestedMessage: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var a: Int32 {
- get {return _storage._a ?? 0}
- set {_uniqueStorage()._a = newValue}
- }
- /// Returns true if `a` has been explicitly set.
- var hasA: Bool {return _storage._a != nil}
- /// Clears the value of `a`. Subsequent reads from it will return its default value.
- mutating func clearA() {_uniqueStorage()._a = nil}
- var corecursive: ProtobufTestMessages_Proto2_TestAllTypesProto2 {
- get {return _storage._corecursive ?? ProtobufTestMessages_Proto2_TestAllTypesProto2()}
- set {_uniqueStorage()._corecursive = newValue}
- }
- /// Returns true if `corecursive` has been explicitly set.
- var hasCorecursive: Bool {return _storage._corecursive != nil}
- /// Clears the value of `corecursive`. Subsequent reads from it will return its default value.
- mutating func clearCorecursive() {_uniqueStorage()._corecursive = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- /// groups
- struct DataMessage: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var groupInt32: Int32 {
- get {return _groupInt32 ?? 0}
- set {_groupInt32 = newValue}
- }
- /// Returns true if `groupInt32` has been explicitly set.
- var hasGroupInt32: Bool {return self._groupInt32 != nil}
- /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value.
- mutating func clearGroupInt32() {self._groupInt32 = nil}
- var groupUint32: UInt32 {
- get {return _groupUint32 ?? 0}
- set {_groupUint32 = newValue}
- }
- /// Returns true if `groupUint32` has been explicitly set.
- var hasGroupUint32: Bool {return self._groupUint32 != nil}
- /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value.
- mutating func clearGroupUint32() {self._groupUint32 = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _groupInt32: Int32? = nil
- fileprivate var _groupUint32: UInt32? = nil
- }
- struct MultiWordGroupField: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var groupInt32: Int32 {
- get {return _groupInt32 ?? 0}
- set {_groupInt32 = newValue}
- }
- /// Returns true if `groupInt32` has been explicitly set.
- var hasGroupInt32: Bool {return self._groupInt32 != nil}
- /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value.
- mutating func clearGroupInt32() {self._groupInt32 = nil}
- var groupUint32: UInt32 {
- get {return _groupUint32 ?? 0}
- set {_groupUint32 = newValue}
- }
- /// Returns true if `groupUint32` has been explicitly set.
- var hasGroupUint32: Bool {return self._groupUint32 != nil}
- /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value.
- mutating func clearGroupUint32() {self._groupUint32 = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _groupInt32: Int32? = nil
- fileprivate var _groupUint32: UInt32? = nil
- }
- /// message_set test case.
- struct MessageSetCorrect: SwiftProtobuf.ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
- }
- struct MessageSetCorrectExtension1: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var str: String {
- get {return _str ?? String()}
- set {_str = newValue}
- }
- /// Returns true if `str` has been explicitly set.
- var hasStr: Bool {return self._str != nil}
- /// Clears the value of `str`. Subsequent reads from it will return its default value.
- mutating func clearStr() {self._str = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _str: String? = nil
- }
- struct MessageSetCorrectExtension2: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var i: Int32 {
- get {return _i ?? 0}
- set {_i = newValue}
- }
- /// Returns true if `i` has been explicitly set.
- var hasI: Bool {return self._i != nil}
- /// Clears the value of `i`. Subsequent reads from it will return its default value.
- mutating func clearI() {self._i = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _i: Int32? = nil
- }
- struct ExtensionWithOneof: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var oneofField: ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof.OneOf_OneofField? = nil
- var a: Int32 {
- get {
- if case .a(let v)? = oneofField {return v}
- return 0
- }
- set {oneofField = .a(newValue)}
- }
- var b: Int32 {
- get {
- if case .b(let v)? = oneofField {return v}
- return 0
- }
- set {oneofField = .b(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- enum OneOf_OneofField: Equatable, Sendable {
- case a(Int32)
- case b(Int32)
- }
- init() {}
- }
- init() {}
- var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- struct ProtobufTestMessages_Proto2_ForeignMessageProto2: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var c: Int32 {
- get {return _c ?? 0}
- set {_c = newValue}
- }
- /// Returns true if `c` has been explicitly set.
- var hasC: Bool {return self._c != nil}
- /// Clears the value of `c`. Subsequent reads from it will return its default value.
- mutating func clearC() {self._c = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _c: Int32? = nil
- }
- struct ProtobufTestMessages_Proto2_GroupField: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var groupInt32: Int32 {
- get {return _groupInt32 ?? 0}
- set {_groupInt32 = newValue}
- }
- /// Returns true if `groupInt32` has been explicitly set.
- var hasGroupInt32: Bool {return self._groupInt32 != nil}
- /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value.
- mutating func clearGroupInt32() {self._groupInt32 = nil}
- var groupUint32: UInt32 {
- get {return _groupUint32 ?? 0}
- set {_groupUint32 = newValue}
- }
- /// Returns true if `groupUint32` has been explicitly set.
- var hasGroupUint32: Bool {return self._groupUint32 != nil}
- /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value.
- mutating func clearGroupUint32() {self._groupUint32 = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _groupInt32: Int32? = nil
- fileprivate var _groupUint32: UInt32? = nil
- }
- struct ProtobufTestMessages_Proto2_UnknownToTestAllTypes: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var optionalInt32: Int32 {
- get {return _optionalInt32 ?? 0}
- set {_optionalInt32 = newValue}
- }
- /// Returns true if `optionalInt32` has been explicitly set.
- var hasOptionalInt32: Bool {return self._optionalInt32 != nil}
- /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
- mutating func clearOptionalInt32() {self._optionalInt32 = nil}
- var optionalString: String {
- get {return _optionalString ?? String()}
- set {_optionalString = newValue}
- }
- /// Returns true if `optionalString` has been explicitly set.
- var hasOptionalString: Bool {return self._optionalString != nil}
- /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
- mutating func clearOptionalString() {self._optionalString = nil}
- var nestedMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2 {
- get {return _nestedMessage ?? ProtobufTestMessages_Proto2_ForeignMessageProto2()}
- set {_nestedMessage = newValue}
- }
- /// Returns true if `nestedMessage` has been explicitly set.
- var hasNestedMessage: Bool {return self._nestedMessage != nil}
- /// Clears the value of `nestedMessage`. Subsequent reads from it will return its default value.
- mutating func clearNestedMessage() {self._nestedMessage = nil}
- var optionalGroup: ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup {
- get {return _optionalGroup ?? ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup()}
- set {_optionalGroup = newValue}
- }
- /// Returns true if `optionalGroup` has been explicitly set.
- var hasOptionalGroup: Bool {return self._optionalGroup != nil}
- /// Clears the value of `optionalGroup`. Subsequent reads from it will return its default value.
- mutating func clearOptionalGroup() {self._optionalGroup = nil}
- var optionalBool: Bool {
- get {return _optionalBool ?? false}
- set {_optionalBool = newValue}
- }
- /// Returns true if `optionalBool` has been explicitly set.
- var hasOptionalBool: Bool {return self._optionalBool != nil}
- /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
- mutating func clearOptionalBool() {self._optionalBool = nil}
- var repeatedInt32: [Int32] = []
- var unknownFields = SwiftProtobuf.UnknownStorage()
- struct OptionalGroup: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var a: Int32 {
- get {return _a ?? 0}
- set {_a = newValue}
- }
- /// Returns true if `a` has been explicitly set.
- var hasA: Bool {return self._a != nil}
- /// Clears the value of `a`. Subsequent reads from it will return its default value.
- mutating func clearA() {self._a = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _a: Int32? = nil
- }
- init() {}
- fileprivate var _optionalInt32: Int32? = nil
- fileprivate var _optionalString: String? = nil
- fileprivate var _nestedMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2? = nil
- fileprivate var _optionalGroup: ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup? = nil
- fileprivate var _optionalBool: Bool? = nil
- }
- struct ProtobufTestMessages_Proto2_NullHypothesisProto2: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct ProtobufTestMessages_Proto2_EnumOnlyProto2: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- enum BoolEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
- case kFalse = 0
- case kTrue = 1
- init() {
- self = .kFalse
- }
- }
- init() {}
- }
- struct ProtobufTestMessages_Proto2_OneStringProto2: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var data: String {
- get {return _data ?? String()}
- set {_data = newValue}
- }
- /// Returns true if `data` has been explicitly set.
- var hasData: Bool {return self._data != nil}
- /// Clears the value of `data`. Subsequent reads from it will return its default value.
- mutating func clearData() {self._data = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _data: String? = nil
- }
- struct ProtobufTestMessages_Proto2_ProtoWithKeywords: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var inline: Int32 {
- get {return _inline ?? 0}
- set {_inline = newValue}
- }
- /// Returns true if `inline` has been explicitly set.
- var hasInline: Bool {return self._inline != nil}
- /// Clears the value of `inline`. Subsequent reads from it will return its default value.
- mutating func clearInline() {self._inline = nil}
- var concept: String {
- get {return _concept ?? String()}
- set {_concept = newValue}
- }
- /// Returns true if `concept` has been explicitly set.
- var hasConcept: Bool {return self._concept != nil}
- /// Clears the value of `concept`. Subsequent reads from it will return its default value.
- mutating func clearConcept() {self._concept = nil}
- var requires: [String] = []
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _inline: Int32? = nil
- fileprivate var _concept: String? = nil
- }
- struct ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2: SwiftProtobuf.ExtensibleMessage, @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Singular
- var requiredInt32: Int32 {
- get {return _storage._requiredInt32 ?? 0}
- set {_uniqueStorage()._requiredInt32 = newValue}
- }
- /// Returns true if `requiredInt32` has been explicitly set.
- var hasRequiredInt32: Bool {return _storage._requiredInt32 != nil}
- /// Clears the value of `requiredInt32`. Subsequent reads from it will return its default value.
- mutating func clearRequiredInt32() {_uniqueStorage()._requiredInt32 = nil}
- var requiredInt64: Int64 {
- get {return _storage._requiredInt64 ?? 0}
- set {_uniqueStorage()._requiredInt64 = newValue}
- }
- /// Returns true if `requiredInt64` has been explicitly set.
- var hasRequiredInt64: Bool {return _storage._requiredInt64 != nil}
- /// Clears the value of `requiredInt64`. Subsequent reads from it will return its default value.
- mutating func clearRequiredInt64() {_uniqueStorage()._requiredInt64 = nil}
- var requiredUint32: UInt32 {
- get {return _storage._requiredUint32 ?? 0}
- set {_uniqueStorage()._requiredUint32 = newValue}
- }
- /// Returns true if `requiredUint32` has been explicitly set.
- var hasRequiredUint32: Bool {return _storage._requiredUint32 != nil}
- /// Clears the value of `requiredUint32`. Subsequent reads from it will return its default value.
- mutating func clearRequiredUint32() {_uniqueStorage()._requiredUint32 = nil}
- var requiredUint64: UInt64 {
- get {return _storage._requiredUint64 ?? 0}
- set {_uniqueStorage()._requiredUint64 = newValue}
- }
- /// Returns true if `requiredUint64` has been explicitly set.
- var hasRequiredUint64: Bool {return _storage._requiredUint64 != nil}
- /// Clears the value of `requiredUint64`. Subsequent reads from it will return its default value.
- mutating func clearRequiredUint64() {_uniqueStorage()._requiredUint64 = nil}
- var requiredSint32: Int32 {
- get {return _storage._requiredSint32 ?? 0}
- set {_uniqueStorage()._requiredSint32 = newValue}
- }
- /// Returns true if `requiredSint32` has been explicitly set.
- var hasRequiredSint32: Bool {return _storage._requiredSint32 != nil}
- /// Clears the value of `requiredSint32`. Subsequent reads from it will return its default value.
- mutating func clearRequiredSint32() {_uniqueStorage()._requiredSint32 = nil}
- var requiredSint64: Int64 {
- get {return _storage._requiredSint64 ?? 0}
- set {_uniqueStorage()._requiredSint64 = newValue}
- }
- /// Returns true if `requiredSint64` has been explicitly set.
- var hasRequiredSint64: Bool {return _storage._requiredSint64 != nil}
- /// Clears the value of `requiredSint64`. Subsequent reads from it will return its default value.
- mutating func clearRequiredSint64() {_uniqueStorage()._requiredSint64 = nil}
- var requiredFixed32: UInt32 {
- get {return _storage._requiredFixed32 ?? 0}
- set {_uniqueStorage()._requiredFixed32 = newValue}
- }
- /// Returns true if `requiredFixed32` has been explicitly set.
- var hasRequiredFixed32: Bool {return _storage._requiredFixed32 != nil}
- /// Clears the value of `requiredFixed32`. Subsequent reads from it will return its default value.
- mutating func clearRequiredFixed32() {_uniqueStorage()._requiredFixed32 = nil}
- var requiredFixed64: UInt64 {
- get {return _storage._requiredFixed64 ?? 0}
- set {_uniqueStorage()._requiredFixed64 = newValue}
- }
- /// Returns true if `requiredFixed64` has been explicitly set.
- var hasRequiredFixed64: Bool {return _storage._requiredFixed64 != nil}
- /// Clears the value of `requiredFixed64`. Subsequent reads from it will return its default value.
- mutating func clearRequiredFixed64() {_uniqueStorage()._requiredFixed64 = nil}
- var requiredSfixed32: Int32 {
- get {return _storage._requiredSfixed32 ?? 0}
- set {_uniqueStorage()._requiredSfixed32 = newValue}
- }
- /// Returns true if `requiredSfixed32` has been explicitly set.
- var hasRequiredSfixed32: Bool {return _storage._requiredSfixed32 != nil}
- /// Clears the value of `requiredSfixed32`. Subsequent reads from it will return its default value.
- mutating func clearRequiredSfixed32() {_uniqueStorage()._requiredSfixed32 = nil}
- var requiredSfixed64: Int64 {
- get {return _storage._requiredSfixed64 ?? 0}
- set {_uniqueStorage()._requiredSfixed64 = newValue}
- }
- /// Returns true if `requiredSfixed64` has been explicitly set.
- var hasRequiredSfixed64: Bool {return _storage._requiredSfixed64 != nil}
- /// Clears the value of `requiredSfixed64`. Subsequent reads from it will return its default value.
- mutating func clearRequiredSfixed64() {_uniqueStorage()._requiredSfixed64 = nil}
- var requiredFloat: Float {
- get {return _storage._requiredFloat ?? 0}
- set {_uniqueStorage()._requiredFloat = newValue}
- }
- /// Returns true if `requiredFloat` has been explicitly set.
- var hasRequiredFloat: Bool {return _storage._requiredFloat != nil}
- /// Clears the value of `requiredFloat`. Subsequent reads from it will return its default value.
- mutating func clearRequiredFloat() {_uniqueStorage()._requiredFloat = nil}
- var requiredDouble: Double {
- get {return _storage._requiredDouble ?? 0}
- set {_uniqueStorage()._requiredDouble = newValue}
- }
- /// Returns true if `requiredDouble` has been explicitly set.
- var hasRequiredDouble: Bool {return _storage._requiredDouble != nil}
- /// Clears the value of `requiredDouble`. Subsequent reads from it will return its default value.
- mutating func clearRequiredDouble() {_uniqueStorage()._requiredDouble = nil}
- var requiredBool: Bool {
- get {return _storage._requiredBool ?? false}
- set {_uniqueStorage()._requiredBool = newValue}
- }
- /// Returns true if `requiredBool` has been explicitly set.
- var hasRequiredBool: Bool {return _storage._requiredBool != nil}
- /// Clears the value of `requiredBool`. Subsequent reads from it will return its default value.
- mutating func clearRequiredBool() {_uniqueStorage()._requiredBool = nil}
- var requiredString: String {
- get {return _storage._requiredString ?? String()}
- set {_uniqueStorage()._requiredString = newValue}
- }
- /// Returns true if `requiredString` has been explicitly set.
- var hasRequiredString: Bool {return _storage._requiredString != nil}
- /// Clears the value of `requiredString`. Subsequent reads from it will return its default value.
- mutating func clearRequiredString() {_uniqueStorage()._requiredString = nil}
- var requiredBytes: Data {
- get {return _storage._requiredBytes ?? Data()}
- set {_uniqueStorage()._requiredBytes = newValue}
- }
- /// Returns true if `requiredBytes` has been explicitly set.
- var hasRequiredBytes: Bool {return _storage._requiredBytes != nil}
- /// Clears the value of `requiredBytes`. Subsequent reads from it will return its default value.
- mutating func clearRequiredBytes() {_uniqueStorage()._requiredBytes = nil}
- var requiredNestedMessage: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedMessage {
- get {return _storage._requiredNestedMessage ?? ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedMessage()}
- set {_uniqueStorage()._requiredNestedMessage = newValue}
- }
- /// Returns true if `requiredNestedMessage` has been explicitly set.
- var hasRequiredNestedMessage: Bool {return _storage._requiredNestedMessage != nil}
- /// Clears the value of `requiredNestedMessage`. Subsequent reads from it will return its default value.
- mutating func clearRequiredNestedMessage() {_uniqueStorage()._requiredNestedMessage = nil}
- var requiredForeignMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2 {
- get {return _storage._requiredForeignMessage ?? ProtobufTestMessages_Proto2_ForeignMessageProto2()}
- set {_uniqueStorage()._requiredForeignMessage = newValue}
- }
- /// Returns true if `requiredForeignMessage` has been explicitly set.
- var hasRequiredForeignMessage: Bool {return _storage._requiredForeignMessage != nil}
- /// Clears the value of `requiredForeignMessage`. Subsequent reads from it will return its default value.
- mutating func clearRequiredForeignMessage() {_uniqueStorage()._requiredForeignMessage = nil}
- var requiredNestedEnum: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedEnum {
- get {return _storage._requiredNestedEnum ?? .foo}
- set {_uniqueStorage()._requiredNestedEnum = newValue}
- }
- /// Returns true if `requiredNestedEnum` has been explicitly set.
- var hasRequiredNestedEnum: Bool {return _storage._requiredNestedEnum != nil}
- /// Clears the value of `requiredNestedEnum`. Subsequent reads from it will return its default value.
- mutating func clearRequiredNestedEnum() {_uniqueStorage()._requiredNestedEnum = nil}
- var requiredForeignEnum: ProtobufTestMessages_Proto2_ForeignEnumProto2 {
- get {return _storage._requiredForeignEnum ?? .foreignFoo}
- set {_uniqueStorage()._requiredForeignEnum = newValue}
- }
- /// Returns true if `requiredForeignEnum` has been explicitly set.
- var hasRequiredForeignEnum: Bool {return _storage._requiredForeignEnum != nil}
- /// Clears the value of `requiredForeignEnum`. Subsequent reads from it will return its default value.
- mutating func clearRequiredForeignEnum() {_uniqueStorage()._requiredForeignEnum = nil}
- var requiredStringPiece: String {
- get {return _storage._requiredStringPiece ?? String()}
- set {_uniqueStorage()._requiredStringPiece = newValue}
- }
- /// Returns true if `requiredStringPiece` has been explicitly set.
- var hasRequiredStringPiece: Bool {return _storage._requiredStringPiece != nil}
- /// Clears the value of `requiredStringPiece`. Subsequent reads from it will return its default value.
- mutating func clearRequiredStringPiece() {_uniqueStorage()._requiredStringPiece = nil}
- var requiredCord: String {
- get {return _storage._requiredCord ?? String()}
- set {_uniqueStorage()._requiredCord = newValue}
- }
- /// Returns true if `requiredCord` has been explicitly set.
- var hasRequiredCord: Bool {return _storage._requiredCord != nil}
- /// Clears the value of `requiredCord`. Subsequent reads from it will return its default value.
- mutating func clearRequiredCord() {_uniqueStorage()._requiredCord = nil}
- var recursiveMessage: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2 {
- get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2()}
- set {_uniqueStorage()._recursiveMessage = newValue}
- }
- /// Returns true if `recursiveMessage` has been explicitly set.
- var hasRecursiveMessage: Bool {return _storage._recursiveMessage != nil}
- /// Clears the value of `recursiveMessage`. Subsequent reads from it will return its default value.
- mutating func clearRecursiveMessage() {_uniqueStorage()._recursiveMessage = nil}
- var optionalRecursiveMessage: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2 {
- get {return _storage._optionalRecursiveMessage ?? ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2()}
- set {_uniqueStorage()._optionalRecursiveMessage = newValue}
- }
- /// Returns true if `optionalRecursiveMessage` has been explicitly set.
- var hasOptionalRecursiveMessage: Bool {return _storage._optionalRecursiveMessage != nil}
- /// Clears the value of `optionalRecursiveMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalRecursiveMessage() {_uniqueStorage()._optionalRecursiveMessage = nil}
- var data: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.DataMessage {
- get {return _storage._data ?? ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.DataMessage()}
- set {_uniqueStorage()._data = newValue}
- }
- /// Returns true if `data` has been explicitly set.
- var hasData: Bool {return _storage._data != nil}
- /// Clears the value of `data`. Subsequent reads from it will return its default value.
- mutating func clearData() {_uniqueStorage()._data = nil}
- /// default values
- var defaultInt32: Int32 {
- get {return _storage._defaultInt32 ?? -123456789}
- set {_uniqueStorage()._defaultInt32 = newValue}
- }
- /// Returns true if `defaultInt32` has been explicitly set.
- var hasDefaultInt32: Bool {return _storage._defaultInt32 != nil}
- /// Clears the value of `defaultInt32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultInt32() {_uniqueStorage()._defaultInt32 = nil}
- var defaultInt64: Int64 {
- get {return _storage._defaultInt64 ?? -9123456789123456789}
- set {_uniqueStorage()._defaultInt64 = newValue}
- }
- /// Returns true if `defaultInt64` has been explicitly set.
- var hasDefaultInt64: Bool {return _storage._defaultInt64 != nil}
- /// Clears the value of `defaultInt64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultInt64() {_uniqueStorage()._defaultInt64 = nil}
- var defaultUint32: UInt32 {
- get {return _storage._defaultUint32 ?? 2123456789}
- set {_uniqueStorage()._defaultUint32 = newValue}
- }
- /// Returns true if `defaultUint32` has been explicitly set.
- var hasDefaultUint32: Bool {return _storage._defaultUint32 != nil}
- /// Clears the value of `defaultUint32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultUint32() {_uniqueStorage()._defaultUint32 = nil}
- var defaultUint64: UInt64 {
- get {return _storage._defaultUint64 ?? 10123456789123456789}
- set {_uniqueStorage()._defaultUint64 = newValue}
- }
- /// Returns true if `defaultUint64` has been explicitly set.
- var hasDefaultUint64: Bool {return _storage._defaultUint64 != nil}
- /// Clears the value of `defaultUint64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultUint64() {_uniqueStorage()._defaultUint64 = nil}
- var defaultSint32: Int32 {
- get {return _storage._defaultSint32 ?? -123456789}
- set {_uniqueStorage()._defaultSint32 = newValue}
- }
- /// Returns true if `defaultSint32` has been explicitly set.
- var hasDefaultSint32: Bool {return _storage._defaultSint32 != nil}
- /// Clears the value of `defaultSint32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSint32() {_uniqueStorage()._defaultSint32 = nil}
- var defaultSint64: Int64 {
- get {return _storage._defaultSint64 ?? -9123456789123456789}
- set {_uniqueStorage()._defaultSint64 = newValue}
- }
- /// Returns true if `defaultSint64` has been explicitly set.
- var hasDefaultSint64: Bool {return _storage._defaultSint64 != nil}
- /// Clears the value of `defaultSint64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSint64() {_uniqueStorage()._defaultSint64 = nil}
- var defaultFixed32: UInt32 {
- get {return _storage._defaultFixed32 ?? 2123456789}
- set {_uniqueStorage()._defaultFixed32 = newValue}
- }
- /// Returns true if `defaultFixed32` has been explicitly set.
- var hasDefaultFixed32: Bool {return _storage._defaultFixed32 != nil}
- /// Clears the value of `defaultFixed32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultFixed32() {_uniqueStorage()._defaultFixed32 = nil}
- var defaultFixed64: UInt64 {
- get {return _storage._defaultFixed64 ?? 10123456789123456789}
- set {_uniqueStorage()._defaultFixed64 = newValue}
- }
- /// Returns true if `defaultFixed64` has been explicitly set.
- var hasDefaultFixed64: Bool {return _storage._defaultFixed64 != nil}
- /// Clears the value of `defaultFixed64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultFixed64() {_uniqueStorage()._defaultFixed64 = nil}
- var defaultSfixed32: Int32 {
- get {return _storage._defaultSfixed32 ?? -123456789}
- set {_uniqueStorage()._defaultSfixed32 = newValue}
- }
- /// Returns true if `defaultSfixed32` has been explicitly set.
- var hasDefaultSfixed32: Bool {return _storage._defaultSfixed32 != nil}
- /// Clears the value of `defaultSfixed32`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSfixed32() {_uniqueStorage()._defaultSfixed32 = nil}
- var defaultSfixed64: Int64 {
- get {return _storage._defaultSfixed64 ?? -9123456789123456789}
- set {_uniqueStorage()._defaultSfixed64 = newValue}
- }
- /// Returns true if `defaultSfixed64` has been explicitly set.
- var hasDefaultSfixed64: Bool {return _storage._defaultSfixed64 != nil}
- /// Clears the value of `defaultSfixed64`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSfixed64() {_uniqueStorage()._defaultSfixed64 = nil}
- var defaultFloat: Float {
- get {return _storage._defaultFloat ?? 9e+09}
- set {_uniqueStorage()._defaultFloat = newValue}
- }
- /// Returns true if `defaultFloat` has been explicitly set.
- var hasDefaultFloat: Bool {return _storage._defaultFloat != nil}
- /// Clears the value of `defaultFloat`. Subsequent reads from it will return its default value.
- mutating func clearDefaultFloat() {_uniqueStorage()._defaultFloat = nil}
- var defaultDouble: Double {
- get {return _storage._defaultDouble ?? 7e+22}
- set {_uniqueStorage()._defaultDouble = newValue}
- }
- /// Returns true if `defaultDouble` has been explicitly set.
- var hasDefaultDouble: Bool {return _storage._defaultDouble != nil}
- /// Clears the value of `defaultDouble`. Subsequent reads from it will return its default value.
- mutating func clearDefaultDouble() {_uniqueStorage()._defaultDouble = nil}
- var defaultBool: Bool {
- get {return _storage._defaultBool ?? true}
- set {_uniqueStorage()._defaultBool = newValue}
- }
- /// Returns true if `defaultBool` has been explicitly set.
- var hasDefaultBool: Bool {return _storage._defaultBool != nil}
- /// Clears the value of `defaultBool`. Subsequent reads from it will return its default value.
- mutating func clearDefaultBool() {_uniqueStorage()._defaultBool = nil}
- var defaultString: String {
- get {return _storage._defaultString ?? "Rosebud"}
- set {_uniqueStorage()._defaultString = newValue}
- }
- /// Returns true if `defaultString` has been explicitly set.
- var hasDefaultString: Bool {return _storage._defaultString != nil}
- /// Clears the value of `defaultString`. Subsequent reads from it will return its default value.
- mutating func clearDefaultString() {_uniqueStorage()._defaultString = nil}
- var defaultBytes: Data {
- get {return _storage._defaultBytes ?? Data([106, 111, 115, 104, 117, 97])}
- set {_uniqueStorage()._defaultBytes = newValue}
- }
- /// Returns true if `defaultBytes` has been explicitly set.
- var hasDefaultBytes: Bool {return _storage._defaultBytes != nil}
- /// Clears the value of `defaultBytes`. Subsequent reads from it will return its default value.
- mutating func clearDefaultBytes() {_uniqueStorage()._defaultBytes = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- enum NestedEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
- case foo = 0
- case bar = 1
- case baz = 2
- /// Intentionally negative.
- case neg = -1
- init() {
- self = .foo
- }
- }
- struct NestedMessage: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var a: Int32 {
- get {return _storage._a ?? 0}
- set {_uniqueStorage()._a = newValue}
- }
- /// Returns true if `a` has been explicitly set.
- var hasA: Bool {return _storage._a != nil}
- /// Clears the value of `a`. Subsequent reads from it will return its default value.
- mutating func clearA() {_uniqueStorage()._a = nil}
- var corecursive: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2 {
- get {return _storage._corecursive ?? ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2()}
- set {_uniqueStorage()._corecursive = newValue}
- }
- /// Returns true if `corecursive` has been explicitly set.
- var hasCorecursive: Bool {return _storage._corecursive != nil}
- /// Clears the value of `corecursive`. Subsequent reads from it will return its default value.
- mutating func clearCorecursive() {_uniqueStorage()._corecursive = nil}
- var optionalCorecursive: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2 {
- get {return _storage._optionalCorecursive ?? ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2()}
- set {_uniqueStorage()._optionalCorecursive = newValue}
- }
- /// Returns true if `optionalCorecursive` has been explicitly set.
- var hasOptionalCorecursive: Bool {return _storage._optionalCorecursive != nil}
- /// Clears the value of `optionalCorecursive`. Subsequent reads from it will return its default value.
- mutating func clearOptionalCorecursive() {_uniqueStorage()._optionalCorecursive = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- /// groups
- struct DataMessage: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var groupInt32: Int32 {
- get {return _groupInt32 ?? 0}
- set {_groupInt32 = newValue}
- }
- /// Returns true if `groupInt32` has been explicitly set.
- var hasGroupInt32: Bool {return self._groupInt32 != nil}
- /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value.
- mutating func clearGroupInt32() {self._groupInt32 = nil}
- var groupUint32: UInt32 {
- get {return _groupUint32 ?? 0}
- set {_groupUint32 = newValue}
- }
- /// Returns true if `groupUint32` has been explicitly set.
- var hasGroupUint32: Bool {return self._groupUint32 != nil}
- /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value.
- mutating func clearGroupUint32() {self._groupUint32 = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _groupInt32: Int32? = nil
- fileprivate var _groupUint32: UInt32? = nil
- }
- /// message_set test case.
- struct MessageSetCorrect: SwiftProtobuf.ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
- }
- struct MessageSetCorrectExtension1: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var str: String {
- get {return _str ?? String()}
- set {_str = newValue}
- }
- /// Returns true if `str` has been explicitly set.
- var hasStr: Bool {return self._str != nil}
- /// Clears the value of `str`. Subsequent reads from it will return its default value.
- mutating func clearStr() {self._str = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _str: String? = nil
- }
- struct MessageSetCorrectExtension2: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var i: Int32 {
- get {return _i ?? 0}
- set {_i = newValue}
- }
- /// Returns true if `i` has been explicitly set.
- var hasI: Bool {return self._i != nil}
- /// Clears the value of `i`. Subsequent reads from it will return its default value.
- mutating func clearI() {self._i = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _i: Int32? = nil
- }
- init() {}
- var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- struct ProtobufTestMessages_Proto2_TestLargeOneof: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var largeOneof: ProtobufTestMessages_Proto2_TestLargeOneof.OneOf_LargeOneof? = nil
- var a1: ProtobufTestMessages_Proto2_TestLargeOneof.A1 {
- get {
- if case .a1(let v)? = largeOneof {return v}
- return ProtobufTestMessages_Proto2_TestLargeOneof.A1()
- }
- set {largeOneof = .a1(newValue)}
- }
- var a2: ProtobufTestMessages_Proto2_TestLargeOneof.A2 {
- get {
- if case .a2(let v)? = largeOneof {return v}
- return ProtobufTestMessages_Proto2_TestLargeOneof.A2()
- }
- set {largeOneof = .a2(newValue)}
- }
- var a3: ProtobufTestMessages_Proto2_TestLargeOneof.A3 {
- get {
- if case .a3(let v)? = largeOneof {return v}
- return ProtobufTestMessages_Proto2_TestLargeOneof.A3()
- }
- set {largeOneof = .a3(newValue)}
- }
- var a4: ProtobufTestMessages_Proto2_TestLargeOneof.A4 {
- get {
- if case .a4(let v)? = largeOneof {return v}
- return ProtobufTestMessages_Proto2_TestLargeOneof.A4()
- }
- set {largeOneof = .a4(newValue)}
- }
- var a5: ProtobufTestMessages_Proto2_TestLargeOneof.A5 {
- get {
- if case .a5(let v)? = largeOneof {return v}
- return ProtobufTestMessages_Proto2_TestLargeOneof.A5()
- }
- set {largeOneof = .a5(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- enum OneOf_LargeOneof: Equatable, Sendable {
- case a1(ProtobufTestMessages_Proto2_TestLargeOneof.A1)
- case a2(ProtobufTestMessages_Proto2_TestLargeOneof.A2)
- case a3(ProtobufTestMessages_Proto2_TestLargeOneof.A3)
- case a4(ProtobufTestMessages_Proto2_TestLargeOneof.A4)
- case a5(ProtobufTestMessages_Proto2_TestLargeOneof.A5)
- }
- struct A1: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct A2: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct A3: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct A4: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- struct A5: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- init() {}
- }
- // MARK: - Extension support defined in test_messages_proto2.proto.
- // MARK: - Extension Properties
- // Swift Extensions on the extended Messages to add easy access to the declared
- // extension fields. The names are based on the extension field name from the proto
- // declaration. To avoid naming collisions, the names are prefixed with the name of
- // the scope where the extend directive occurs.
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrect {
- var ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2_MessageSetCorrectExtension1_messageSetExtension: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1 {
- get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1()}
- set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension, value: newValue)}
- }
- /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension`
- /// has been explicitly set.
- var hasProtobufTestMessages_Proto2_TestAllRequiredTypesProto2_MessageSetCorrectExtension1_messageSetExtension: Bool {
- return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension)
- }
- /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension`.
- /// Subsequent reads from it will return its default value.
- mutating func clearProtobufTestMessages_Proto2_TestAllRequiredTypesProto2_MessageSetCorrectExtension1_messageSetExtension() {
- clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension)
- }
- var ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2_MessageSetCorrectExtension2_messageSetExtension: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2 {
- get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2()}
- set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension, value: newValue)}
- }
- /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension`
- /// has been explicitly set.
- var hasProtobufTestMessages_Proto2_TestAllRequiredTypesProto2_MessageSetCorrectExtension2_messageSetExtension: Bool {
- return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension)
- }
- /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension`.
- /// Subsequent reads from it will return its default value.
- mutating func clearProtobufTestMessages_Proto2_TestAllRequiredTypesProto2_MessageSetCorrectExtension2_messageSetExtension() {
- clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension)
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2 {
- var ProtobufTestMessages_Proto2_extensionInt32: Int32 {
- get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32) ?? 0}
- set {setExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32, value: newValue)}
- }
- /// Returns true if extension `ProtobufTestMessages_Proto2_Extensions_extension_int32`
- /// has been explicitly set.
- var hasProtobufTestMessages_Proto2_extensionInt32: Bool {
- return hasExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32)
- }
- /// Clears the value of extension `ProtobufTestMessages_Proto2_Extensions_extension_int32`.
- /// Subsequent reads from it will return its default value.
- mutating func clearProtobufTestMessages_Proto2_extensionInt32() {
- clearExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32)
- }
- var ProtobufTestMessages_Proto2_groupField: ProtobufTestMessages_Proto2_GroupField {
- get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_GroupField) ?? ProtobufTestMessages_Proto2_GroupField()}
- set {setExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_GroupField, value: newValue)}
- }
- /// Returns true if extension `ProtobufTestMessages_Proto2_Extensions_GroupField`
- /// has been explicitly set.
- var hasProtobufTestMessages_Proto2_groupField: Bool {
- return hasExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_GroupField)
- }
- /// Clears the value of extension `ProtobufTestMessages_Proto2_Extensions_GroupField`.
- /// Subsequent reads from it will return its default value.
- mutating func clearProtobufTestMessages_Proto2_groupField() {
- clearExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_GroupField)
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect {
- var ProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1 {
- get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1()}
- set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension, value: newValue)}
- }
- /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension`
- /// has been explicitly set.
- var hasProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension: Bool {
- return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension)
- }
- /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension`.
- /// Subsequent reads from it will return its default value.
- mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension() {
- clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension)
- }
- var ProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2 {
- get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2()}
- set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension, value: newValue)}
- }
- /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension`
- /// has been explicitly set.
- var hasProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension: Bool {
- return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension)
- }
- /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension`.
- /// Subsequent reads from it will return its default value.
- mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension() {
- clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension)
- }
- var ProtobufTestMessages_Proto2_TestAllTypesProto2_ExtensionWithOneof_extensionWithOneof: ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof {
- get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof.Extensions.extension_with_oneof) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof()}
- set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof.Extensions.extension_with_oneof, value: newValue)}
- }
- /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof.Extensions.extension_with_oneof`
- /// has been explicitly set.
- var hasProtobufTestMessages_Proto2_TestAllTypesProto2_ExtensionWithOneof_extensionWithOneof: Bool {
- return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof.Extensions.extension_with_oneof)
- }
- /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof.Extensions.extension_with_oneof`.
- /// Subsequent reads from it will return its default value.
- mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_ExtensionWithOneof_extensionWithOneof() {
- clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof.Extensions.extension_with_oneof)
- }
- }
- // MARK: - File's ExtensionMap: ProtobufTestMessages_Proto2_TestMessagesProto2_Extensions
- /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
- /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
- /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
- /// a larger `SwiftProtobuf.SimpleExtensionMap`.
- let ProtobufTestMessages_Proto2_TestMessagesProto2_Extensions: SwiftProtobuf.SimpleExtensionMap = [
- ProtobufTestMessages_Proto2_Extensions_extension_int32,
- ProtobufTestMessages_Proto2_Extensions_GroupField,
- ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension,
- ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension,
- ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof.Extensions.extension_with_oneof,
- ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension,
- ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension
- ]
- // Extension Objects - The only reason these might be needed is when manually
- // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
- // accessors for the extension fields on the messages directly.
- let ProtobufTestMessages_Proto2_Extensions_extension_int32 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, ProtobufTestMessages_Proto2_TestAllTypesProto2>(
- _protobuf_fieldNumber: 120,
- fieldName: "protobuf_test_messages.proto2.extension_int32"
- )
- let ProtobufTestMessages_Proto2_Extensions_GroupField = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalGroupExtensionField<ProtobufTestMessages_Proto2_GroupField>, ProtobufTestMessages_Proto2_TestAllTypesProto2>(
- _protobuf_fieldNumber: 121,
- fieldName: "protobuf_test_messages.proto2.groupfield"
- )
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1 {
- enum Extensions {
- static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1>, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>(
- _protobuf_fieldNumber: 1547769,
- fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1"
- )
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2 {
- enum Extensions {
- static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2>, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>(
- _protobuf_fieldNumber: 4135312,
- fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2"
- )
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof {
- enum Extensions {
- static let extension_with_oneof = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof>, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>(
- _protobuf_fieldNumber: 123456789,
- fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.ExtensionWithOneof"
- )
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1 {
- enum Extensions {
- static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1>, ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrect>(
- _protobuf_fieldNumber: 1547769,
- fieldName: "protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1"
- )
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2 {
- enum Extensions {
- static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2>, ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrect>(
- _protobuf_fieldNumber: 4135312,
- fieldName: "protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2"
- )
- }
- }
- // MARK: - Code below here is support for the SwiftProtobuf runtime.
- fileprivate let _protobuf_package = "protobuf_test_messages.proto2"
- extension ProtobufTestMessages_Proto2_ForeignEnumProto2: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "FOREIGN_FOO"),
- 1: .same(proto: "FOREIGN_BAR"),
- 2: .same(proto: "FOREIGN_BAZ"),
- ]
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestAllTypesProto2"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "optional_int32"),
- 2: .standard(proto: "optional_int64"),
- 3: .standard(proto: "optional_uint32"),
- 4: .standard(proto: "optional_uint64"),
- 5: .standard(proto: "optional_sint32"),
- 6: .standard(proto: "optional_sint64"),
- 7: .standard(proto: "optional_fixed32"),
- 8: .standard(proto: "optional_fixed64"),
- 9: .standard(proto: "optional_sfixed32"),
- 10: .standard(proto: "optional_sfixed64"),
- 11: .standard(proto: "optional_float"),
- 12: .standard(proto: "optional_double"),
- 13: .standard(proto: "optional_bool"),
- 14: .standard(proto: "optional_string"),
- 15: .standard(proto: "optional_bytes"),
- 18: .standard(proto: "optional_nested_message"),
- 19: .standard(proto: "optional_foreign_message"),
- 21: .standard(proto: "optional_nested_enum"),
- 22: .standard(proto: "optional_foreign_enum"),
- 24: .standard(proto: "optional_string_piece"),
- 25: .standard(proto: "optional_cord"),
- 27: .standard(proto: "recursive_message"),
- 31: .standard(proto: "repeated_int32"),
- 32: .standard(proto: "repeated_int64"),
- 33: .standard(proto: "repeated_uint32"),
- 34: .standard(proto: "repeated_uint64"),
- 35: .standard(proto: "repeated_sint32"),
- 36: .standard(proto: "repeated_sint64"),
- 37: .standard(proto: "repeated_fixed32"),
- 38: .standard(proto: "repeated_fixed64"),
- 39: .standard(proto: "repeated_sfixed32"),
- 40: .standard(proto: "repeated_sfixed64"),
- 41: .standard(proto: "repeated_float"),
- 42: .standard(proto: "repeated_double"),
- 43: .standard(proto: "repeated_bool"),
- 44: .standard(proto: "repeated_string"),
- 45: .standard(proto: "repeated_bytes"),
- 48: .standard(proto: "repeated_nested_message"),
- 49: .standard(proto: "repeated_foreign_message"),
- 51: .standard(proto: "repeated_nested_enum"),
- 52: .standard(proto: "repeated_foreign_enum"),
- 54: .standard(proto: "repeated_string_piece"),
- 55: .standard(proto: "repeated_cord"),
- 75: .standard(proto: "packed_int32"),
- 76: .standard(proto: "packed_int64"),
- 77: .standard(proto: "packed_uint32"),
- 78: .standard(proto: "packed_uint64"),
- 79: .standard(proto: "packed_sint32"),
- 80: .standard(proto: "packed_sint64"),
- 81: .standard(proto: "packed_fixed32"),
- 82: .standard(proto: "packed_fixed64"),
- 83: .standard(proto: "packed_sfixed32"),
- 84: .standard(proto: "packed_sfixed64"),
- 85: .standard(proto: "packed_float"),
- 86: .standard(proto: "packed_double"),
- 87: .standard(proto: "packed_bool"),
- 88: .standard(proto: "packed_nested_enum"),
- 89: .standard(proto: "unpacked_int32"),
- 90: .standard(proto: "unpacked_int64"),
- 91: .standard(proto: "unpacked_uint32"),
- 92: .standard(proto: "unpacked_uint64"),
- 93: .standard(proto: "unpacked_sint32"),
- 94: .standard(proto: "unpacked_sint64"),
- 95: .standard(proto: "unpacked_fixed32"),
- 96: .standard(proto: "unpacked_fixed64"),
- 97: .standard(proto: "unpacked_sfixed32"),
- 98: .standard(proto: "unpacked_sfixed64"),
- 99: .standard(proto: "unpacked_float"),
- 100: .standard(proto: "unpacked_double"),
- 101: .standard(proto: "unpacked_bool"),
- 102: .standard(proto: "unpacked_nested_enum"),
- 56: .standard(proto: "map_int32_int32"),
- 57: .standard(proto: "map_int64_int64"),
- 58: .standard(proto: "map_uint32_uint32"),
- 59: .standard(proto: "map_uint64_uint64"),
- 60: .standard(proto: "map_sint32_sint32"),
- 61: .standard(proto: "map_sint64_sint64"),
- 62: .standard(proto: "map_fixed32_fixed32"),
- 63: .standard(proto: "map_fixed64_fixed64"),
- 64: .standard(proto: "map_sfixed32_sfixed32"),
- 65: .standard(proto: "map_sfixed64_sfixed64"),
- 104: .standard(proto: "map_int32_bool"),
- 66: .standard(proto: "map_int32_float"),
- 67: .standard(proto: "map_int32_double"),
- 103: .standard(proto: "map_int32_nested_message"),
- 68: .standard(proto: "map_bool_bool"),
- 69: .standard(proto: "map_string_string"),
- 70: .standard(proto: "map_string_bytes"),
- 71: .standard(proto: "map_string_nested_message"),
- 72: .standard(proto: "map_string_foreign_message"),
- 73: .standard(proto: "map_string_nested_enum"),
- 74: .standard(proto: "map_string_foreign_enum"),
- 111: .standard(proto: "oneof_uint32"),
- 112: .standard(proto: "oneof_nested_message"),
- 113: .standard(proto: "oneof_string"),
- 114: .standard(proto: "oneof_bytes"),
- 115: .standard(proto: "oneof_bool"),
- 116: .standard(proto: "oneof_uint64"),
- 117: .standard(proto: "oneof_float"),
- 118: .standard(proto: "oneof_double"),
- 119: .standard(proto: "oneof_enum"),
- 201: .same(proto: "data"),
- 201: .unique(proto: "Data", json: "data"),
- 204: .same(proto: "multiwordgroupfield"),
- 204: .unique(proto: "MultiWordGroupField", json: "multiwordgroupfield"),
- 241: .standard(proto: "default_int32"),
- 242: .standard(proto: "default_int64"),
- 243: .standard(proto: "default_uint32"),
- 244: .standard(proto: "default_uint64"),
- 245: .standard(proto: "default_sint32"),
- 246: .standard(proto: "default_sint64"),
- 247: .standard(proto: "default_fixed32"),
- 248: .standard(proto: "default_fixed64"),
- 249: .standard(proto: "default_sfixed32"),
- 250: .standard(proto: "default_sfixed64"),
- 251: .standard(proto: "default_float"),
- 252: .standard(proto: "default_double"),
- 253: .standard(proto: "default_bool"),
- 254: .standard(proto: "default_string"),
- 255: .standard(proto: "default_bytes"),
- 401: .same(proto: "fieldname1"),
- 402: .standard(proto: "field_name2"),
- 403: .standard(proto: "_field_name3"),
- 404: .standard(proto: "field__name4_"),
- 405: .same(proto: "field0name5"),
- 406: .standard(proto: "field_0_name6"),
- 407: .same(proto: "fieldName7"),
- 408: .same(proto: "FieldName8"),
- 409: .standard(proto: "field_Name9"),
- 410: .standard(proto: "Field_Name10"),
- 411: .standard(proto: "FIELD_NAME11"),
- 412: .standard(proto: "FIELD_name12"),
- 413: .standard(proto: "__field_name13"),
- 414: .standard(proto: "__Field_name14"),
- 415: .standard(proto: "field__name15"),
- 416: .standard(proto: "field__Name16"),
- 417: .standard(proto: "field_name17__"),
- 418: .standard(proto: "Field_name18__"),
- 500: .standard(proto: "message_set_correct"),
- ]
- fileprivate class _StorageClass {
- var _optionalInt32: Int32? = nil
- var _optionalInt64: Int64? = nil
- var _optionalUint32: UInt32? = nil
- var _optionalUint64: UInt64? = nil
- var _optionalSint32: Int32? = nil
- var _optionalSint64: Int64? = nil
- var _optionalFixed32: UInt32? = nil
- var _optionalFixed64: UInt64? = nil
- var _optionalSfixed32: Int32? = nil
- var _optionalSfixed64: Int64? = nil
- var _optionalFloat: Float? = nil
- var _optionalDouble: Double? = nil
- var _optionalBool: Bool? = nil
- var _optionalString: String? = nil
- var _optionalBytes: Data? = nil
- var _optionalNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage? = nil
- var _optionalForeignMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2? = nil
- var _optionalNestedEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum? = nil
- var _optionalForeignEnum: ProtobufTestMessages_Proto2_ForeignEnumProto2? = nil
- var _optionalStringPiece: String? = nil
- var _optionalCord: String? = nil
- var _recursiveMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2? = nil
- var _repeatedInt32: [Int32] = []
- var _repeatedInt64: [Int64] = []
- var _repeatedUint32: [UInt32] = []
- var _repeatedUint64: [UInt64] = []
- var _repeatedSint32: [Int32] = []
- var _repeatedSint64: [Int64] = []
- var _repeatedFixed32: [UInt32] = []
- var _repeatedFixed64: [UInt64] = []
- var _repeatedSfixed32: [Int32] = []
- var _repeatedSfixed64: [Int64] = []
- var _repeatedFloat: [Float] = []
- var _repeatedDouble: [Double] = []
- var _repeatedBool: [Bool] = []
- var _repeatedString: [String] = []
- var _repeatedBytes: [Data] = []
- var _repeatedNestedMessage: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage] = []
- var _repeatedForeignMessage: [ProtobufTestMessages_Proto2_ForeignMessageProto2] = []
- var _repeatedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] = []
- var _repeatedForeignEnum: [ProtobufTestMessages_Proto2_ForeignEnumProto2] = []
- var _repeatedStringPiece: [String] = []
- var _repeatedCord: [String] = []
- var _packedInt32: [Int32] = []
- var _packedInt64: [Int64] = []
- var _packedUint32: [UInt32] = []
- var _packedUint64: [UInt64] = []
- var _packedSint32: [Int32] = []
- var _packedSint64: [Int64] = []
- var _packedFixed32: [UInt32] = []
- var _packedFixed64: [UInt64] = []
- var _packedSfixed32: [Int32] = []
- var _packedSfixed64: [Int64] = []
- var _packedFloat: [Float] = []
- var _packedDouble: [Double] = []
- var _packedBool: [Bool] = []
- var _packedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] = []
- var _unpackedInt32: [Int32] = []
- var _unpackedInt64: [Int64] = []
- var _unpackedUint32: [UInt32] = []
- var _unpackedUint64: [UInt64] = []
- var _unpackedSint32: [Int32] = []
- var _unpackedSint64: [Int64] = []
- var _unpackedFixed32: [UInt32] = []
- var _unpackedFixed64: [UInt64] = []
- var _unpackedSfixed32: [Int32] = []
- var _unpackedSfixed64: [Int64] = []
- var _unpackedFloat: [Float] = []
- var _unpackedDouble: [Double] = []
- var _unpackedBool: [Bool] = []
- var _unpackedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] = []
- var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
- var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
- var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
- var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
- var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
- var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
- var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
- var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
- var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
- var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
- var _mapInt32Bool: Dictionary<Int32,Bool> = [:]
- var _mapInt32Float: Dictionary<Int32,Float> = [:]
- var _mapInt32Double: Dictionary<Int32,Double> = [:]
- var _mapInt32NestedMessage: Dictionary<Int32,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage> = [:]
- var _mapBoolBool: Dictionary<Bool,Bool> = [:]
- var _mapStringString: Dictionary<String,String> = [:]
- var _mapStringBytes: Dictionary<String,Data> = [:]
- var _mapStringNestedMessage: Dictionary<String,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage> = [:]
- var _mapStringForeignMessage: Dictionary<String,ProtobufTestMessages_Proto2_ForeignMessageProto2> = [:]
- var _mapStringNestedEnum: Dictionary<String,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum> = [:]
- var _mapStringForeignEnum: Dictionary<String,ProtobufTestMessages_Proto2_ForeignEnumProto2> = [:]
- var _oneofField: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField?
- var _data: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage? = nil
- var _multiWordGroupField: ProtobufTestMessages_Proto2_TestAllTypesProto2.MultiWordGroupField? = nil
- var _defaultInt32: Int32? = nil
- var _defaultInt64: Int64? = nil
- var _defaultUint32: UInt32? = nil
- var _defaultUint64: UInt64? = nil
- var _defaultSint32: Int32? = nil
- var _defaultSint64: Int64? = nil
- var _defaultFixed32: UInt32? = nil
- var _defaultFixed64: UInt64? = nil
- var _defaultSfixed32: Int32? = nil
- var _defaultSfixed64: Int64? = nil
- var _defaultFloat: Float? = nil
- var _defaultDouble: Double? = nil
- var _defaultBool: Bool? = nil
- var _defaultString: String? = nil
- var _defaultBytes: Data? = nil
- var _fieldname1: Int32? = nil
- var _fieldName2: Int32? = nil
- var _fieldName3: Int32? = nil
- var _field_Name4_: Int32? = nil
- var _field0Name5: Int32? = nil
- var _field0Name6: Int32? = nil
- var _fieldName7: Int32? = nil
- var _fieldName8: Int32? = nil
- var _fieldName9: Int32? = nil
- var _fieldName10: Int32? = nil
- var _fieldName11: Int32? = nil
- var _fieldName12: Int32? = nil
- var __FieldName13: Int32? = nil
- var __FieldName14: Int32? = nil
- var _field_Name15: Int32? = nil
- var _field_Name16: Int32? = nil
- var _fieldName17__: Int32? = nil
- var _fieldName18__: Int32? = nil
- var _messageSetCorrect: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _optionalInt32 = source._optionalInt32
- _optionalInt64 = source._optionalInt64
- _optionalUint32 = source._optionalUint32
- _optionalUint64 = source._optionalUint64
- _optionalSint32 = source._optionalSint32
- _optionalSint64 = source._optionalSint64
- _optionalFixed32 = source._optionalFixed32
- _optionalFixed64 = source._optionalFixed64
- _optionalSfixed32 = source._optionalSfixed32
- _optionalSfixed64 = source._optionalSfixed64
- _optionalFloat = source._optionalFloat
- _optionalDouble = source._optionalDouble
- _optionalBool = source._optionalBool
- _optionalString = source._optionalString
- _optionalBytes = source._optionalBytes
- _optionalNestedMessage = source._optionalNestedMessage
- _optionalForeignMessage = source._optionalForeignMessage
- _optionalNestedEnum = source._optionalNestedEnum
- _optionalForeignEnum = source._optionalForeignEnum
- _optionalStringPiece = source._optionalStringPiece
- _optionalCord = source._optionalCord
- _recursiveMessage = source._recursiveMessage
- _repeatedInt32 = source._repeatedInt32
- _repeatedInt64 = source._repeatedInt64
- _repeatedUint32 = source._repeatedUint32
- _repeatedUint64 = source._repeatedUint64
- _repeatedSint32 = source._repeatedSint32
- _repeatedSint64 = source._repeatedSint64
- _repeatedFixed32 = source._repeatedFixed32
- _repeatedFixed64 = source._repeatedFixed64
- _repeatedSfixed32 = source._repeatedSfixed32
- _repeatedSfixed64 = source._repeatedSfixed64
- _repeatedFloat = source._repeatedFloat
- _repeatedDouble = source._repeatedDouble
- _repeatedBool = source._repeatedBool
- _repeatedString = source._repeatedString
- _repeatedBytes = source._repeatedBytes
- _repeatedNestedMessage = source._repeatedNestedMessage
- _repeatedForeignMessage = source._repeatedForeignMessage
- _repeatedNestedEnum = source._repeatedNestedEnum
- _repeatedForeignEnum = source._repeatedForeignEnum
- _repeatedStringPiece = source._repeatedStringPiece
- _repeatedCord = source._repeatedCord
- _packedInt32 = source._packedInt32
- _packedInt64 = source._packedInt64
- _packedUint32 = source._packedUint32
- _packedUint64 = source._packedUint64
- _packedSint32 = source._packedSint32
- _packedSint64 = source._packedSint64
- _packedFixed32 = source._packedFixed32
- _packedFixed64 = source._packedFixed64
- _packedSfixed32 = source._packedSfixed32
- _packedSfixed64 = source._packedSfixed64
- _packedFloat = source._packedFloat
- _packedDouble = source._packedDouble
- _packedBool = source._packedBool
- _packedNestedEnum = source._packedNestedEnum
- _unpackedInt32 = source._unpackedInt32
- _unpackedInt64 = source._unpackedInt64
- _unpackedUint32 = source._unpackedUint32
- _unpackedUint64 = source._unpackedUint64
- _unpackedSint32 = source._unpackedSint32
- _unpackedSint64 = source._unpackedSint64
- _unpackedFixed32 = source._unpackedFixed32
- _unpackedFixed64 = source._unpackedFixed64
- _unpackedSfixed32 = source._unpackedSfixed32
- _unpackedSfixed64 = source._unpackedSfixed64
- _unpackedFloat = source._unpackedFloat
- _unpackedDouble = source._unpackedDouble
- _unpackedBool = source._unpackedBool
- _unpackedNestedEnum = source._unpackedNestedEnum
- _mapInt32Int32 = source._mapInt32Int32
- _mapInt64Int64 = source._mapInt64Int64
- _mapUint32Uint32 = source._mapUint32Uint32
- _mapUint64Uint64 = source._mapUint64Uint64
- _mapSint32Sint32 = source._mapSint32Sint32
- _mapSint64Sint64 = source._mapSint64Sint64
- _mapFixed32Fixed32 = source._mapFixed32Fixed32
- _mapFixed64Fixed64 = source._mapFixed64Fixed64
- _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
- _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
- _mapInt32Bool = source._mapInt32Bool
- _mapInt32Float = source._mapInt32Float
- _mapInt32Double = source._mapInt32Double
- _mapInt32NestedMessage = source._mapInt32NestedMessage
- _mapBoolBool = source._mapBoolBool
- _mapStringString = source._mapStringString
- _mapStringBytes = source._mapStringBytes
- _mapStringNestedMessage = source._mapStringNestedMessage
- _mapStringForeignMessage = source._mapStringForeignMessage
- _mapStringNestedEnum = source._mapStringNestedEnum
- _mapStringForeignEnum = source._mapStringForeignEnum
- _oneofField = source._oneofField
- _data = source._data
- _multiWordGroupField = source._multiWordGroupField
- _defaultInt32 = source._defaultInt32
- _defaultInt64 = source._defaultInt64
- _defaultUint32 = source._defaultUint32
- _defaultUint64 = source._defaultUint64
- _defaultSint32 = source._defaultSint32
- _defaultSint64 = source._defaultSint64
- _defaultFixed32 = source._defaultFixed32
- _defaultFixed64 = source._defaultFixed64
- _defaultSfixed32 = source._defaultSfixed32
- _defaultSfixed64 = source._defaultSfixed64
- _defaultFloat = source._defaultFloat
- _defaultDouble = source._defaultDouble
- _defaultBool = source._defaultBool
- _defaultString = source._defaultString
- _defaultBytes = source._defaultBytes
- _fieldname1 = source._fieldname1
- _fieldName2 = source._fieldName2
- _fieldName3 = source._fieldName3
- _field_Name4_ = source._field_Name4_
- _field0Name5 = source._field0Name5
- _field0Name6 = source._field0Name6
- _fieldName7 = source._fieldName7
- _fieldName8 = source._fieldName8
- _fieldName9 = source._fieldName9
- _fieldName10 = source._fieldName10
- _fieldName11 = source._fieldName11
- _fieldName12 = source._fieldName12
- __FieldName13 = source.__FieldName13
- __FieldName14 = source.__FieldName14
- _field_Name15 = source._field_Name15
- _field_Name16 = source._field_Name16
- _fieldName17__ = source._fieldName17__
- _fieldName18__ = source._fieldName18__
- _messageSetCorrect = source._messageSetCorrect
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if let v = _storage._optionalNestedMessage, !v.isInitialized {return false}
- if let v = _storage._recursiveMessage, !v.isInitialized {return false}
- if !SwiftProtobuf.Internal.areAllInitialized(_storage._repeatedNestedMessage) {return false}
- if !SwiftProtobuf.Internal.areAllInitialized(_storage._mapInt32NestedMessage) {return false}
- if !SwiftProtobuf.Internal.areAllInitialized(_storage._mapStringNestedMessage) {return false}
- if let v = _storage._oneofField, !v.isInitialized {return false}
- if let v = _storage._messageSetCorrect, !v.isInitialized {return false}
- return true
- }
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) }()
- case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) }()
- case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) }()
- case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) }()
- case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) }()
- case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) }()
- case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) }()
- case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) }()
- case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) }()
- case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) }()
- case 11: try { try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) }()
- case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) }()
- case 13: try { try decoder.decodeSingularBoolField(value: &_storage._optionalBool) }()
- case 14: try { try decoder.decodeSingularStringField(value: &_storage._optionalString) }()
- case 15: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) }()
- case 18: try { try decoder.decodeSingularMessageField(value: &_storage._optionalNestedMessage) }()
- case 19: try { try decoder.decodeSingularMessageField(value: &_storage._optionalForeignMessage) }()
- case 21: try { try decoder.decodeSingularEnumField(value: &_storage._optionalNestedEnum) }()
- case 22: try { try decoder.decodeSingularEnumField(value: &_storage._optionalForeignEnum) }()
- case 24: try { try decoder.decodeSingularStringField(value: &_storage._optionalStringPiece) }()
- case 25: try { try decoder.decodeSingularStringField(value: &_storage._optionalCord) }()
- case 27: try { try decoder.decodeSingularMessageField(value: &_storage._recursiveMessage) }()
- case 31: try { try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) }()
- case 32: try { try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) }()
- case 33: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) }()
- case 34: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) }()
- case 35: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) }()
- case 36: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) }()
- case 37: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) }()
- case 38: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) }()
- case 39: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) }()
- case 40: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) }()
- case 41: try { try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) }()
- case 42: try { try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) }()
- case 43: try { try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) }()
- case 44: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) }()
- case 45: try { try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) }()
- case 48: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNestedMessage) }()
- case 49: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedForeignMessage) }()
- case 51: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedNestedEnum) }()
- case 52: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedForeignEnum) }()
- case 54: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece) }()
- case 55: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord) }()
- case 56: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32) }()
- case 57: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64) }()
- case 58: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32) }()
- case 59: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64) }()
- case 60: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32) }()
- case 61: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64) }()
- case 62: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32) }()
- case 63: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64) }()
- case 64: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32) }()
- case 65: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64) }()
- case 66: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float) }()
- case 67: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double) }()
- case 68: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool) }()
- case 69: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString) }()
- case 70: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapStringBytes) }()
- case 71: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage>.self, value: &_storage._mapStringNestedMessage) }()
- case 72: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_ForeignMessageProto2>.self, value: &_storage._mapStringForeignMessage) }()
- case 73: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum>.self, value: &_storage._mapStringNestedEnum) }()
- case 74: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_ForeignEnumProto2>.self, value: &_storage._mapStringForeignEnum) }()
- case 75: try { try decoder.decodeRepeatedInt32Field(value: &_storage._packedInt32) }()
- case 76: try { try decoder.decodeRepeatedInt64Field(value: &_storage._packedInt64) }()
- case 77: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._packedUint32) }()
- case 78: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._packedUint64) }()
- case 79: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._packedSint32) }()
- case 80: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._packedSint64) }()
- case 81: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._packedFixed32) }()
- case 82: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._packedFixed64) }()
- case 83: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._packedSfixed32) }()
- case 84: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._packedSfixed64) }()
- case 85: try { try decoder.decodeRepeatedFloatField(value: &_storage._packedFloat) }()
- case 86: try { try decoder.decodeRepeatedDoubleField(value: &_storage._packedDouble) }()
- case 87: try { try decoder.decodeRepeatedBoolField(value: &_storage._packedBool) }()
- case 88: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedNestedEnum) }()
- case 89: try { try decoder.decodeRepeatedInt32Field(value: &_storage._unpackedInt32) }()
- case 90: try { try decoder.decodeRepeatedInt64Field(value: &_storage._unpackedInt64) }()
- case 91: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._unpackedUint32) }()
- case 92: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._unpackedUint64) }()
- case 93: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._unpackedSint32) }()
- case 94: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._unpackedSint64) }()
- case 95: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._unpackedFixed32) }()
- case 96: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._unpackedFixed64) }()
- case 97: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._unpackedSfixed32) }()
- case 98: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._unpackedSfixed64) }()
- case 99: try { try decoder.decodeRepeatedFloatField(value: &_storage._unpackedFloat) }()
- case 100: try { try decoder.decodeRepeatedDoubleField(value: &_storage._unpackedDouble) }()
- case 101: try { try decoder.decodeRepeatedBoolField(value: &_storage._unpackedBool) }()
- case 102: try { try decoder.decodeRepeatedEnumField(value: &_storage._unpackedNestedEnum) }()
- case 103: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage>.self, value: &_storage._mapInt32NestedMessage) }()
- case 104: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapInt32Bool) }()
- case 111: try {
- var v: UInt32?
- try decoder.decodeSingularUInt32Field(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofUint32(v)
- }
- }()
- case 112: try {
- var v: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage?
- var hadOneofValue = false
- if let current = _storage._oneofField {
- hadOneofValue = true
- if case .oneofNestedMessage(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofNestedMessage(v)
- }
- }()
- case 113: try {
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofString(v)
- }
- }()
- case 114: try {
- var v: Data?
- try decoder.decodeSingularBytesField(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofBytes(v)
- }
- }()
- case 115: try {
- var v: Bool?
- try decoder.decodeSingularBoolField(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofBool(v)
- }
- }()
- case 116: try {
- var v: UInt64?
- try decoder.decodeSingularUInt64Field(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofUint64(v)
- }
- }()
- case 117: try {
- var v: Float?
- try decoder.decodeSingularFloatField(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofFloat(v)
- }
- }()
- case 118: try {
- var v: Double?
- try decoder.decodeSingularDoubleField(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofDouble(v)
- }
- }()
- case 119: try {
- var v: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum?
- try decoder.decodeSingularEnumField(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofEnum(v)
- }
- }()
- case 201: try { try decoder.decodeSingularGroupField(value: &_storage._data) }()
- case 204: try { try decoder.decodeSingularGroupField(value: &_storage._multiWordGroupField) }()
- case 241: try { try decoder.decodeSingularInt32Field(value: &_storage._defaultInt32) }()
- case 242: try { try decoder.decodeSingularInt64Field(value: &_storage._defaultInt64) }()
- case 243: try { try decoder.decodeSingularUInt32Field(value: &_storage._defaultUint32) }()
- case 244: try { try decoder.decodeSingularUInt64Field(value: &_storage._defaultUint64) }()
- case 245: try { try decoder.decodeSingularSInt32Field(value: &_storage._defaultSint32) }()
- case 246: try { try decoder.decodeSingularSInt64Field(value: &_storage._defaultSint64) }()
- case 247: try { try decoder.decodeSingularFixed32Field(value: &_storage._defaultFixed32) }()
- case 248: try { try decoder.decodeSingularFixed64Field(value: &_storage._defaultFixed64) }()
- case 249: try { try decoder.decodeSingularSFixed32Field(value: &_storage._defaultSfixed32) }()
- case 250: try { try decoder.decodeSingularSFixed64Field(value: &_storage._defaultSfixed64) }()
- case 251: try { try decoder.decodeSingularFloatField(value: &_storage._defaultFloat) }()
- case 252: try { try decoder.decodeSingularDoubleField(value: &_storage._defaultDouble) }()
- case 253: try { try decoder.decodeSingularBoolField(value: &_storage._defaultBool) }()
- case 254: try { try decoder.decodeSingularStringField(value: &_storage._defaultString) }()
- case 255: try { try decoder.decodeSingularBytesField(value: &_storage._defaultBytes) }()
- case 401: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldname1) }()
- case 402: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName2) }()
- case 403: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName3) }()
- case 404: try { try decoder.decodeSingularInt32Field(value: &_storage._field_Name4_) }()
- case 405: try { try decoder.decodeSingularInt32Field(value: &_storage._field0Name5) }()
- case 406: try { try decoder.decodeSingularInt32Field(value: &_storage._field0Name6) }()
- case 407: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName7) }()
- case 408: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName8) }()
- case 409: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName9) }()
- case 410: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName10) }()
- case 411: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName11) }()
- case 412: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName12) }()
- case 413: try { try decoder.decodeSingularInt32Field(value: &_storage.__FieldName13) }()
- case 414: try { try decoder.decodeSingularInt32Field(value: &_storage.__FieldName14) }()
- case 415: try { try decoder.decodeSingularInt32Field(value: &_storage._field_Name15) }()
- case 416: try { try decoder.decodeSingularInt32Field(value: &_storage._field_Name16) }()
- case 417: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName17__) }()
- case 418: try { try decoder.decodeSingularInt32Field(value: &_storage._fieldName18__) }()
- case 500: try { try decoder.decodeSingularMessageField(value: &_storage._messageSetCorrect) }()
- case 120..<201:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Proto2_TestAllTypesProto2.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._optionalInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = _storage._optionalInt64 {
- try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
- } }()
- try { if let v = _storage._optionalUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
- } }()
- try { if let v = _storage._optionalUint64 {
- try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
- } }()
- try { if let v = _storage._optionalSint32 {
- try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5)
- } }()
- try { if let v = _storage._optionalSint64 {
- try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6)
- } }()
- try { if let v = _storage._optionalFixed32 {
- try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7)
- } }()
- try { if let v = _storage._optionalFixed64 {
- try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8)
- } }()
- try { if let v = _storage._optionalSfixed32 {
- try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9)
- } }()
- try { if let v = _storage._optionalSfixed64 {
- try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10)
- } }()
- try { if let v = _storage._optionalFloat {
- try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
- } }()
- try { if let v = _storage._optionalDouble {
- try visitor.visitSingularDoubleField(value: v, fieldNumber: 12)
- } }()
- try { if let v = _storage._optionalBool {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 13)
- } }()
- try { if let v = _storage._optionalString {
- try visitor.visitSingularStringField(value: v, fieldNumber: 14)
- } }()
- try { if let v = _storage._optionalBytes {
- try visitor.visitSingularBytesField(value: v, fieldNumber: 15)
- } }()
- try { if let v = _storage._optionalNestedMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
- } }()
- try { if let v = _storage._optionalForeignMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
- } }()
- try { if let v = _storage._optionalNestedEnum {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 21)
- } }()
- try { if let v = _storage._optionalForeignEnum {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 22)
- } }()
- try { if let v = _storage._optionalStringPiece {
- try visitor.visitSingularStringField(value: v, fieldNumber: 24)
- } }()
- try { if let v = _storage._optionalCord {
- try visitor.visitSingularStringField(value: v, fieldNumber: 25)
- } }()
- try { if let v = _storage._recursiveMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 27)
- } }()
- if !_storage._repeatedInt32.isEmpty {
- try visitor.visitRepeatedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31)
- }
- if !_storage._repeatedInt64.isEmpty {
- try visitor.visitRepeatedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32)
- }
- if !_storage._repeatedUint32.isEmpty {
- try visitor.visitRepeatedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33)
- }
- if !_storage._repeatedUint64.isEmpty {
- try visitor.visitRepeatedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34)
- }
- if !_storage._repeatedSint32.isEmpty {
- try visitor.visitRepeatedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35)
- }
- if !_storage._repeatedSint64.isEmpty {
- try visitor.visitRepeatedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36)
- }
- if !_storage._repeatedFixed32.isEmpty {
- try visitor.visitRepeatedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37)
- }
- if !_storage._repeatedFixed64.isEmpty {
- try visitor.visitRepeatedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38)
- }
- if !_storage._repeatedSfixed32.isEmpty {
- try visitor.visitRepeatedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39)
- }
- if !_storage._repeatedSfixed64.isEmpty {
- try visitor.visitRepeatedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40)
- }
- if !_storage._repeatedFloat.isEmpty {
- try visitor.visitRepeatedFloatField(value: _storage._repeatedFloat, fieldNumber: 41)
- }
- if !_storage._repeatedDouble.isEmpty {
- try visitor.visitRepeatedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42)
- }
- if !_storage._repeatedBool.isEmpty {
- try visitor.visitRepeatedBoolField(value: _storage._repeatedBool, fieldNumber: 43)
- }
- if !_storage._repeatedString.isEmpty {
- try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44)
- }
- if !_storage._repeatedBytes.isEmpty {
- try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45)
- }
- if !_storage._repeatedNestedMessage.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._repeatedNestedMessage, fieldNumber: 48)
- }
- if !_storage._repeatedForeignMessage.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._repeatedForeignMessage, fieldNumber: 49)
- }
- if !_storage._repeatedNestedEnum.isEmpty {
- try visitor.visitRepeatedEnumField(value: _storage._repeatedNestedEnum, fieldNumber: 51)
- }
- if !_storage._repeatedForeignEnum.isEmpty {
- try visitor.visitRepeatedEnumField(value: _storage._repeatedForeignEnum, fieldNumber: 52)
- }
- if !_storage._repeatedStringPiece.isEmpty {
- try visitor.visitRepeatedStringField(value: _storage._repeatedStringPiece, fieldNumber: 54)
- }
- if !_storage._repeatedCord.isEmpty {
- try visitor.visitRepeatedStringField(value: _storage._repeatedCord, fieldNumber: 55)
- }
- if !_storage._mapInt32Int32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 56)
- }
- if !_storage._mapInt64Int64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 57)
- }
- if !_storage._mapUint32Uint32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 58)
- }
- if !_storage._mapUint64Uint64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 59)
- }
- if !_storage._mapSint32Sint32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 60)
- }
- if !_storage._mapSint64Sint64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 61)
- }
- if !_storage._mapFixed32Fixed32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 62)
- }
- if !_storage._mapFixed64Fixed64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 63)
- }
- if !_storage._mapSfixed32Sfixed32.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 64)
- }
- if !_storage._mapSfixed64Sfixed64.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 65)
- }
- if !_storage._mapInt32Float.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 66)
- }
- if !_storage._mapInt32Double.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 67)
- }
- if !_storage._mapBoolBool.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 68)
- }
- if !_storage._mapStringString.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 69)
- }
- if !_storage._mapStringBytes.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapStringBytes, fieldNumber: 70)
- }
- if !_storage._mapStringNestedMessage.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage>.self, value: _storage._mapStringNestedMessage, fieldNumber: 71)
- }
- if !_storage._mapStringForeignMessage.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_ForeignMessageProto2>.self, value: _storage._mapStringForeignMessage, fieldNumber: 72)
- }
- if !_storage._mapStringNestedEnum.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum>.self, value: _storage._mapStringNestedEnum, fieldNumber: 73)
- }
- if !_storage._mapStringForeignEnum.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_ForeignEnumProto2>.self, value: _storage._mapStringForeignEnum, fieldNumber: 74)
- }
- if !_storage._packedInt32.isEmpty {
- try visitor.visitPackedInt32Field(value: _storage._packedInt32, fieldNumber: 75)
- }
- if !_storage._packedInt64.isEmpty {
- try visitor.visitPackedInt64Field(value: _storage._packedInt64, fieldNumber: 76)
- }
- if !_storage._packedUint32.isEmpty {
- try visitor.visitPackedUInt32Field(value: _storage._packedUint32, fieldNumber: 77)
- }
- if !_storage._packedUint64.isEmpty {
- try visitor.visitPackedUInt64Field(value: _storage._packedUint64, fieldNumber: 78)
- }
- if !_storage._packedSint32.isEmpty {
- try visitor.visitPackedSInt32Field(value: _storage._packedSint32, fieldNumber: 79)
- }
- if !_storage._packedSint64.isEmpty {
- try visitor.visitPackedSInt64Field(value: _storage._packedSint64, fieldNumber: 80)
- }
- if !_storage._packedFixed32.isEmpty {
- try visitor.visitPackedFixed32Field(value: _storage._packedFixed32, fieldNumber: 81)
- }
- if !_storage._packedFixed64.isEmpty {
- try visitor.visitPackedFixed64Field(value: _storage._packedFixed64, fieldNumber: 82)
- }
- if !_storage._packedSfixed32.isEmpty {
- try visitor.visitPackedSFixed32Field(value: _storage._packedSfixed32, fieldNumber: 83)
- }
- if !_storage._packedSfixed64.isEmpty {
- try visitor.visitPackedSFixed64Field(value: _storage._packedSfixed64, fieldNumber: 84)
- }
- if !_storage._packedFloat.isEmpty {
- try visitor.visitPackedFloatField(value: _storage._packedFloat, fieldNumber: 85)
- }
- if !_storage._packedDouble.isEmpty {
- try visitor.visitPackedDoubleField(value: _storage._packedDouble, fieldNumber: 86)
- }
- if !_storage._packedBool.isEmpty {
- try visitor.visitPackedBoolField(value: _storage._packedBool, fieldNumber: 87)
- }
- if !_storage._packedNestedEnum.isEmpty {
- try visitor.visitPackedEnumField(value: _storage._packedNestedEnum, fieldNumber: 88)
- }
- if !_storage._unpackedInt32.isEmpty {
- try visitor.visitRepeatedInt32Field(value: _storage._unpackedInt32, fieldNumber: 89)
- }
- if !_storage._unpackedInt64.isEmpty {
- try visitor.visitRepeatedInt64Field(value: _storage._unpackedInt64, fieldNumber: 90)
- }
- if !_storage._unpackedUint32.isEmpty {
- try visitor.visitRepeatedUInt32Field(value: _storage._unpackedUint32, fieldNumber: 91)
- }
- if !_storage._unpackedUint64.isEmpty {
- try visitor.visitRepeatedUInt64Field(value: _storage._unpackedUint64, fieldNumber: 92)
- }
- if !_storage._unpackedSint32.isEmpty {
- try visitor.visitRepeatedSInt32Field(value: _storage._unpackedSint32, fieldNumber: 93)
- }
- if !_storage._unpackedSint64.isEmpty {
- try visitor.visitRepeatedSInt64Field(value: _storage._unpackedSint64, fieldNumber: 94)
- }
- if !_storage._unpackedFixed32.isEmpty {
- try visitor.visitRepeatedFixed32Field(value: _storage._unpackedFixed32, fieldNumber: 95)
- }
- if !_storage._unpackedFixed64.isEmpty {
- try visitor.visitRepeatedFixed64Field(value: _storage._unpackedFixed64, fieldNumber: 96)
- }
- if !_storage._unpackedSfixed32.isEmpty {
- try visitor.visitRepeatedSFixed32Field(value: _storage._unpackedSfixed32, fieldNumber: 97)
- }
- if !_storage._unpackedSfixed64.isEmpty {
- try visitor.visitRepeatedSFixed64Field(value: _storage._unpackedSfixed64, fieldNumber: 98)
- }
- if !_storage._unpackedFloat.isEmpty {
- try visitor.visitRepeatedFloatField(value: _storage._unpackedFloat, fieldNumber: 99)
- }
- if !_storage._unpackedDouble.isEmpty {
- try visitor.visitRepeatedDoubleField(value: _storage._unpackedDouble, fieldNumber: 100)
- }
- if !_storage._unpackedBool.isEmpty {
- try visitor.visitRepeatedBoolField(value: _storage._unpackedBool, fieldNumber: 101)
- }
- if !_storage._unpackedNestedEnum.isEmpty {
- try visitor.visitRepeatedEnumField(value: _storage._unpackedNestedEnum, fieldNumber: 102)
- }
- if !_storage._mapInt32NestedMessage.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufInt32,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage>.self, value: _storage._mapInt32NestedMessage, fieldNumber: 103)
- }
- if !_storage._mapInt32Bool.isEmpty {
- try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapInt32Bool, fieldNumber: 104)
- }
- switch _storage._oneofField {
- case .oneofUint32?: try {
- guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 111)
- }()
- case .oneofNestedMessage?: try {
- guard case .oneofNestedMessage(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 112)
- }()
- case .oneofString?: try {
- guard case .oneofString(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularStringField(value: v, fieldNumber: 113)
- }()
- case .oneofBytes?: try {
- guard case .oneofBytes(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularBytesField(value: v, fieldNumber: 114)
- }()
- case .oneofBool?: try {
- guard case .oneofBool(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularBoolField(value: v, fieldNumber: 115)
- }()
- case .oneofUint64?: try {
- guard case .oneofUint64(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularUInt64Field(value: v, fieldNumber: 116)
- }()
- case .oneofFloat?: try {
- guard case .oneofFloat(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularFloatField(value: v, fieldNumber: 117)
- }()
- case .oneofDouble?: try {
- guard case .oneofDouble(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularDoubleField(value: v, fieldNumber: 118)
- }()
- case .oneofEnum?: try {
- guard case .oneofEnum(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularEnumField(value: v, fieldNumber: 119)
- }()
- case nil: break
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 120, end: 201)
- try { if let v = _storage._data {
- try visitor.visitSingularGroupField(value: v, fieldNumber: 201)
- } }()
- try { if let v = _storage._multiWordGroupField {
- try visitor.visitSingularGroupField(value: v, fieldNumber: 204)
- } }()
- try { if let v = _storage._defaultInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 241)
- } }()
- try { if let v = _storage._defaultInt64 {
- try visitor.visitSingularInt64Field(value: v, fieldNumber: 242)
- } }()
- try { if let v = _storage._defaultUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 243)
- } }()
- try { if let v = _storage._defaultUint64 {
- try visitor.visitSingularUInt64Field(value: v, fieldNumber: 244)
- } }()
- try { if let v = _storage._defaultSint32 {
- try visitor.visitSingularSInt32Field(value: v, fieldNumber: 245)
- } }()
- try { if let v = _storage._defaultSint64 {
- try visitor.visitSingularSInt64Field(value: v, fieldNumber: 246)
- } }()
- try { if let v = _storage._defaultFixed32 {
- try visitor.visitSingularFixed32Field(value: v, fieldNumber: 247)
- } }()
- try { if let v = _storage._defaultFixed64 {
- try visitor.visitSingularFixed64Field(value: v, fieldNumber: 248)
- } }()
- try { if let v = _storage._defaultSfixed32 {
- try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 249)
- } }()
- try { if let v = _storage._defaultSfixed64 {
- try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 250)
- } }()
- try { if let v = _storage._defaultFloat {
- try visitor.visitSingularFloatField(value: v, fieldNumber: 251)
- } }()
- try { if let v = _storage._defaultDouble {
- try visitor.visitSingularDoubleField(value: v, fieldNumber: 252)
- } }()
- try { if let v = _storage._defaultBool {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 253)
- } }()
- try { if let v = _storage._defaultString {
- try visitor.visitSingularStringField(value: v, fieldNumber: 254)
- } }()
- try { if let v = _storage._defaultBytes {
- try visitor.visitSingularBytesField(value: v, fieldNumber: 255)
- } }()
- try { if let v = _storage._fieldname1 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 401)
- } }()
- try { if let v = _storage._fieldName2 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 402)
- } }()
- try { if let v = _storage._fieldName3 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 403)
- } }()
- try { if let v = _storage._field_Name4_ {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 404)
- } }()
- try { if let v = _storage._field0Name5 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 405)
- } }()
- try { if let v = _storage._field0Name6 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 406)
- } }()
- try { if let v = _storage._fieldName7 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 407)
- } }()
- try { if let v = _storage._fieldName8 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 408)
- } }()
- try { if let v = _storage._fieldName9 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 409)
- } }()
- try { if let v = _storage._fieldName10 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 410)
- } }()
- try { if let v = _storage._fieldName11 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 411)
- } }()
- try { if let v = _storage._fieldName12 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 412)
- } }()
- try { if let v = _storage.__FieldName13 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 413)
- } }()
- try { if let v = _storage.__FieldName14 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 414)
- } }()
- try { if let v = _storage._field_Name15 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 415)
- } }()
- try { if let v = _storage._field_Name16 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 416)
- } }()
- try { if let v = _storage._fieldName17__ {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 417)
- } }()
- try { if let v = _storage._fieldName18__ {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 418)
- } }()
- try { if let v = _storage._messageSetCorrect {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 500)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._optionalInt32 != rhs_storage._optionalInt32 {return false}
- if _storage._optionalInt64 != rhs_storage._optionalInt64 {return false}
- if _storage._optionalUint32 != rhs_storage._optionalUint32 {return false}
- if _storage._optionalUint64 != rhs_storage._optionalUint64 {return false}
- if _storage._optionalSint32 != rhs_storage._optionalSint32 {return false}
- if _storage._optionalSint64 != rhs_storage._optionalSint64 {return false}
- if _storage._optionalFixed32 != rhs_storage._optionalFixed32 {return false}
- if _storage._optionalFixed64 != rhs_storage._optionalFixed64 {return false}
- if _storage._optionalSfixed32 != rhs_storage._optionalSfixed32 {return false}
- if _storage._optionalSfixed64 != rhs_storage._optionalSfixed64 {return false}
- if _storage._optionalFloat != rhs_storage._optionalFloat {return false}
- if _storage._optionalDouble != rhs_storage._optionalDouble {return false}
- if _storage._optionalBool != rhs_storage._optionalBool {return false}
- if _storage._optionalString != rhs_storage._optionalString {return false}
- if _storage._optionalBytes != rhs_storage._optionalBytes {return false}
- if _storage._optionalNestedMessage != rhs_storage._optionalNestedMessage {return false}
- if _storage._optionalForeignMessage != rhs_storage._optionalForeignMessage {return false}
- if _storage._optionalNestedEnum != rhs_storage._optionalNestedEnum {return false}
- if _storage._optionalForeignEnum != rhs_storage._optionalForeignEnum {return false}
- if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false}
- if _storage._optionalCord != rhs_storage._optionalCord {return false}
- if _storage._recursiveMessage != rhs_storage._recursiveMessage {return false}
- if _storage._repeatedInt32 != rhs_storage._repeatedInt32 {return false}
- if _storage._repeatedInt64 != rhs_storage._repeatedInt64 {return false}
- if _storage._repeatedUint32 != rhs_storage._repeatedUint32 {return false}
- if _storage._repeatedUint64 != rhs_storage._repeatedUint64 {return false}
- if _storage._repeatedSint32 != rhs_storage._repeatedSint32 {return false}
- if _storage._repeatedSint64 != rhs_storage._repeatedSint64 {return false}
- if _storage._repeatedFixed32 != rhs_storage._repeatedFixed32 {return false}
- if _storage._repeatedFixed64 != rhs_storage._repeatedFixed64 {return false}
- if _storage._repeatedSfixed32 != rhs_storage._repeatedSfixed32 {return false}
- if _storage._repeatedSfixed64 != rhs_storage._repeatedSfixed64 {return false}
- if _storage._repeatedFloat != rhs_storage._repeatedFloat {return false}
- if _storage._repeatedDouble != rhs_storage._repeatedDouble {return false}
- if _storage._repeatedBool != rhs_storage._repeatedBool {return false}
- if _storage._repeatedString != rhs_storage._repeatedString {return false}
- if _storage._repeatedBytes != rhs_storage._repeatedBytes {return false}
- if _storage._repeatedNestedMessage != rhs_storage._repeatedNestedMessage {return false}
- if _storage._repeatedForeignMessage != rhs_storage._repeatedForeignMessage {return false}
- if _storage._repeatedNestedEnum != rhs_storage._repeatedNestedEnum {return false}
- if _storage._repeatedForeignEnum != rhs_storage._repeatedForeignEnum {return false}
- if _storage._repeatedStringPiece != rhs_storage._repeatedStringPiece {return false}
- if _storage._repeatedCord != rhs_storage._repeatedCord {return false}
- if _storage._packedInt32 != rhs_storage._packedInt32 {return false}
- if _storage._packedInt64 != rhs_storage._packedInt64 {return false}
- if _storage._packedUint32 != rhs_storage._packedUint32 {return false}
- if _storage._packedUint64 != rhs_storage._packedUint64 {return false}
- if _storage._packedSint32 != rhs_storage._packedSint32 {return false}
- if _storage._packedSint64 != rhs_storage._packedSint64 {return false}
- if _storage._packedFixed32 != rhs_storage._packedFixed32 {return false}
- if _storage._packedFixed64 != rhs_storage._packedFixed64 {return false}
- if _storage._packedSfixed32 != rhs_storage._packedSfixed32 {return false}
- if _storage._packedSfixed64 != rhs_storage._packedSfixed64 {return false}
- if _storage._packedFloat != rhs_storage._packedFloat {return false}
- if _storage._packedDouble != rhs_storage._packedDouble {return false}
- if _storage._packedBool != rhs_storage._packedBool {return false}
- if _storage._packedNestedEnum != rhs_storage._packedNestedEnum {return false}
- if _storage._unpackedInt32 != rhs_storage._unpackedInt32 {return false}
- if _storage._unpackedInt64 != rhs_storage._unpackedInt64 {return false}
- if _storage._unpackedUint32 != rhs_storage._unpackedUint32 {return false}
- if _storage._unpackedUint64 != rhs_storage._unpackedUint64 {return false}
- if _storage._unpackedSint32 != rhs_storage._unpackedSint32 {return false}
- if _storage._unpackedSint64 != rhs_storage._unpackedSint64 {return false}
- if _storage._unpackedFixed32 != rhs_storage._unpackedFixed32 {return false}
- if _storage._unpackedFixed64 != rhs_storage._unpackedFixed64 {return false}
- if _storage._unpackedSfixed32 != rhs_storage._unpackedSfixed32 {return false}
- if _storage._unpackedSfixed64 != rhs_storage._unpackedSfixed64 {return false}
- if _storage._unpackedFloat != rhs_storage._unpackedFloat {return false}
- if _storage._unpackedDouble != rhs_storage._unpackedDouble {return false}
- if _storage._unpackedBool != rhs_storage._unpackedBool {return false}
- if _storage._unpackedNestedEnum != rhs_storage._unpackedNestedEnum {return false}
- if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
- if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
- if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
- if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
- if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
- if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
- if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
- if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
- if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
- if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
- if _storage._mapInt32Bool != rhs_storage._mapInt32Bool {return false}
- if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
- if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
- if _storage._mapInt32NestedMessage != rhs_storage._mapInt32NestedMessage {return false}
- if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
- if _storage._mapStringString != rhs_storage._mapStringString {return false}
- if _storage._mapStringBytes != rhs_storage._mapStringBytes {return false}
- if _storage._mapStringNestedMessage != rhs_storage._mapStringNestedMessage {return false}
- if _storage._mapStringForeignMessage != rhs_storage._mapStringForeignMessage {return false}
- if _storage._mapStringNestedEnum != rhs_storage._mapStringNestedEnum {return false}
- if _storage._mapStringForeignEnum != rhs_storage._mapStringForeignEnum {return false}
- if _storage._oneofField != rhs_storage._oneofField {return false}
- if _storage._data != rhs_storage._data {return false}
- if _storage._multiWordGroupField != rhs_storage._multiWordGroupField {return false}
- if _storage._defaultInt32 != rhs_storage._defaultInt32 {return false}
- if _storage._defaultInt64 != rhs_storage._defaultInt64 {return false}
- if _storage._defaultUint32 != rhs_storage._defaultUint32 {return false}
- if _storage._defaultUint64 != rhs_storage._defaultUint64 {return false}
- if _storage._defaultSint32 != rhs_storage._defaultSint32 {return false}
- if _storage._defaultSint64 != rhs_storage._defaultSint64 {return false}
- if _storage._defaultFixed32 != rhs_storage._defaultFixed32 {return false}
- if _storage._defaultFixed64 != rhs_storage._defaultFixed64 {return false}
- if _storage._defaultSfixed32 != rhs_storage._defaultSfixed32 {return false}
- if _storage._defaultSfixed64 != rhs_storage._defaultSfixed64 {return false}
- if _storage._defaultFloat != rhs_storage._defaultFloat {return false}
- if _storage._defaultDouble != rhs_storage._defaultDouble {return false}
- if _storage._defaultBool != rhs_storage._defaultBool {return false}
- if _storage._defaultString != rhs_storage._defaultString {return false}
- if _storage._defaultBytes != rhs_storage._defaultBytes {return false}
- if _storage._fieldname1 != rhs_storage._fieldname1 {return false}
- if _storage._fieldName2 != rhs_storage._fieldName2 {return false}
- if _storage._fieldName3 != rhs_storage._fieldName3 {return false}
- if _storage._field_Name4_ != rhs_storage._field_Name4_ {return false}
- if _storage._field0Name5 != rhs_storage._field0Name5 {return false}
- if _storage._field0Name6 != rhs_storage._field0Name6 {return false}
- if _storage._fieldName7 != rhs_storage._fieldName7 {return false}
- if _storage._fieldName8 != rhs_storage._fieldName8 {return false}
- if _storage._fieldName9 != rhs_storage._fieldName9 {return false}
- if _storage._fieldName10 != rhs_storage._fieldName10 {return false}
- if _storage._fieldName11 != rhs_storage._fieldName11 {return false}
- if _storage._fieldName12 != rhs_storage._fieldName12 {return false}
- if _storage.__FieldName13 != rhs_storage.__FieldName13 {return false}
- if _storage.__FieldName14 != rhs_storage.__FieldName14 {return false}
- if _storage._field_Name15 != rhs_storage._field_Name15 {return false}
- if _storage._field_Name16 != rhs_storage._field_Name16 {return false}
- if _storage._fieldName17__ != rhs_storage._fieldName17__ {return false}
- if _storage._fieldName18__ != rhs_storage._fieldName18__ {return false}
- if _storage._messageSetCorrect != rhs_storage._messageSetCorrect {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- -1: .same(proto: "NEG"),
- 0: .same(proto: "FOO"),
- 1: .same(proto: "BAR"),
- 2: .same(proto: "BAZ"),
- ]
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".NestedMessage"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "a"),
- 2: .same(proto: "corecursive"),
- ]
- fileprivate class _StorageClass {
- var _a: Int32? = nil
- var _corecursive: ProtobufTestMessages_Proto2_TestAllTypesProto2? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _a = source._a
- _corecursive = source._corecursive
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if let v = _storage._corecursive, !v.isInitialized {return false}
- return true
- }
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._a) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &_storage._corecursive) }()
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._a {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = _storage._corecursive {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._a != rhs_storage._a {return false}
- if _storage._corecursive != rhs_storage._corecursive {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".Data"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 202: .standard(proto: "group_int32"),
- 203: .standard(proto: "group_uint32"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 202: try { try decoder.decodeSingularInt32Field(value: &self._groupInt32) }()
- case 203: try { try decoder.decodeSingularUInt32Field(value: &self._groupUint32) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._groupInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 202)
- } }()
- try { if let v = self._groupUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 203)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage) -> Bool {
- if lhs._groupInt32 != rhs._groupInt32 {return false}
- if lhs._groupUint32 != rhs._groupUint32 {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MultiWordGroupField: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MultiWordGroupField"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 205: .standard(proto: "group_int32"),
- 206: .standard(proto: "group_uint32"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 205: try { try decoder.decodeSingularInt32Field(value: &self._groupInt32) }()
- case 206: try { try decoder.decodeSingularUInt32Field(value: &self._groupUint32) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._groupInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 205)
- } }()
- try { if let v = self._groupUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 206)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MultiWordGroupField, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MultiWordGroupField) -> Bool {
- if lhs._groupInt32 != rhs._groupInt32 {return false}
- if lhs._groupUint32 != rhs._groupUint32 {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrect"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- try decoder.decodeExtensionFieldsAsMessageSet(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect.self)
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try visitor.visitExtensionFieldsAsMessageSet(fields: _protobuf_extensionFieldValues, start: 4, end: 2147483647)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrectExtension1"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 25: .same(proto: "str"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 25: try { try decoder.decodeSingularStringField(value: &self._str) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._str {
- try visitor.visitSingularStringField(value: v, fieldNumber: 25)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1) -> Bool {
- if lhs._str != rhs._str {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrectExtension2"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 9: .same(proto: "i"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 9: try { try decoder.decodeSingularInt32Field(value: &self._i) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._i {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2) -> Bool {
- if lhs._i != rhs._i {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".ExtensionWithOneof"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "a"),
- 2: .same(proto: "b"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try {
- var v: Int32?
- try decoder.decodeSingularInt32Field(value: &v)
- if let v = v {
- if self.oneofField != nil {try decoder.handleConflictingOneOf()}
- self.oneofField = .a(v)
- }
- }()
- case 2: try {
- var v: Int32?
- try decoder.decodeSingularInt32Field(value: &v)
- if let v = v {
- if self.oneofField != nil {try decoder.handleConflictingOneOf()}
- self.oneofField = .b(v)
- }
- }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- switch self.oneofField {
- case .a?: try {
- guard case .a(let v)? = self.oneofField else { preconditionFailure() }
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- }()
- case .b?: try {
- guard case .b(let v)? = self.oneofField else { preconditionFailure() }
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
- }()
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.ExtensionWithOneof) -> Bool {
- if lhs.oneofField != rhs.oneofField {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_ForeignMessageProto2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ForeignMessageProto2"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "c"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._c {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_ForeignMessageProto2, rhs: ProtobufTestMessages_Proto2_ForeignMessageProto2) -> Bool {
- if lhs._c != rhs._c {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_GroupField: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".GroupField"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 122: .standard(proto: "group_int32"),
- 123: .standard(proto: "group_uint32"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 122: try { try decoder.decodeSingularInt32Field(value: &self._groupInt32) }()
- case 123: try { try decoder.decodeSingularUInt32Field(value: &self._groupUint32) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._groupInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 122)
- } }()
- try { if let v = self._groupUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 123)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_GroupField, rhs: ProtobufTestMessages_Proto2_GroupField) -> Bool {
- if lhs._groupInt32 != rhs._groupInt32 {return false}
- if lhs._groupUint32 != rhs._groupUint32 {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_UnknownToTestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".UnknownToTestAllTypes"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1001: .standard(proto: "optional_int32"),
- 1002: .standard(proto: "optional_string"),
- 1003: .standard(proto: "nested_message"),
- 1004: .same(proto: "optionalgroup"),
- 1004: .unique(proto: "OptionalGroup", json: "optionalgroup"),
- 1006: .standard(proto: "optional_bool"),
- 1011: .standard(proto: "repeated_int32"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1001: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt32) }()
- case 1002: try { try decoder.decodeSingularStringField(value: &self._optionalString) }()
- case 1003: try { try decoder.decodeSingularMessageField(value: &self._nestedMessage) }()
- case 1004: try { try decoder.decodeSingularGroupField(value: &self._optionalGroup) }()
- case 1006: try { try decoder.decodeSingularBoolField(value: &self._optionalBool) }()
- case 1011: try { try decoder.decodeRepeatedInt32Field(value: &self.repeatedInt32) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._optionalInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1001)
- } }()
- try { if let v = self._optionalString {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1002)
- } }()
- try { if let v = self._nestedMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1003)
- } }()
- try { if let v = self._optionalGroup {
- try visitor.visitSingularGroupField(value: v, fieldNumber: 1004)
- } }()
- try { if let v = self._optionalBool {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 1006)
- } }()
- if !self.repeatedInt32.isEmpty {
- try visitor.visitRepeatedInt32Field(value: self.repeatedInt32, fieldNumber: 1011)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_UnknownToTestAllTypes, rhs: ProtobufTestMessages_Proto2_UnknownToTestAllTypes) -> Bool {
- if lhs._optionalInt32 != rhs._optionalInt32 {return false}
- if lhs._optionalString != rhs._optionalString {return false}
- if lhs._nestedMessage != rhs._nestedMessage {return false}
- if lhs._optionalGroup != rhs._optionalGroup {return false}
- if lhs._optionalBool != rhs._optionalBool {return false}
- if lhs.repeatedInt32 != rhs.repeatedInt32 {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_UnknownToTestAllTypes.protoMessageName + ".OptionalGroup"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "a"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._a {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup, rhs: ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup) -> Bool {
- if lhs._a != rhs._a {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_NullHypothesisProto2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".NullHypothesisProto2"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_NullHypothesisProto2, rhs: ProtobufTestMessages_Proto2_NullHypothesisProto2) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_EnumOnlyProto2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".EnumOnlyProto2"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_EnumOnlyProto2, rhs: ProtobufTestMessages_Proto2_EnumOnlyProto2) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_EnumOnlyProto2.BoolEnum: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "kFalse"),
- 1: .same(proto: "kTrue"),
- ]
- }
- extension ProtobufTestMessages_Proto2_OneStringProto2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".OneStringProto2"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "data"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self._data) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._data {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_OneStringProto2, rhs: ProtobufTestMessages_Proto2_OneStringProto2) -> Bool {
- if lhs._data != rhs._data {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_ProtoWithKeywords: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ProtoWithKeywords"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "inline"),
- 2: .same(proto: "concept"),
- 3: .same(proto: "requires"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._inline) }()
- case 2: try { try decoder.decodeSingularStringField(value: &self._concept) }()
- case 3: try { try decoder.decodeRepeatedStringField(value: &self.requires) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._inline {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._concept {
- try visitor.visitSingularStringField(value: v, fieldNumber: 2)
- } }()
- if !self.requires.isEmpty {
- try visitor.visitRepeatedStringField(value: self.requires, fieldNumber: 3)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_ProtoWithKeywords, rhs: ProtobufTestMessages_Proto2_ProtoWithKeywords) -> Bool {
- if lhs._inline != rhs._inline {return false}
- if lhs._concept != rhs._concept {return false}
- if lhs.requires != rhs.requires {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestAllRequiredTypesProto2"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "required_int32"),
- 2: .standard(proto: "required_int64"),
- 3: .standard(proto: "required_uint32"),
- 4: .standard(proto: "required_uint64"),
- 5: .standard(proto: "required_sint32"),
- 6: .standard(proto: "required_sint64"),
- 7: .standard(proto: "required_fixed32"),
- 8: .standard(proto: "required_fixed64"),
- 9: .standard(proto: "required_sfixed32"),
- 10: .standard(proto: "required_sfixed64"),
- 11: .standard(proto: "required_float"),
- 12: .standard(proto: "required_double"),
- 13: .standard(proto: "required_bool"),
- 14: .standard(proto: "required_string"),
- 15: .standard(proto: "required_bytes"),
- 18: .standard(proto: "required_nested_message"),
- 19: .standard(proto: "required_foreign_message"),
- 21: .standard(proto: "required_nested_enum"),
- 22: .standard(proto: "required_foreign_enum"),
- 24: .standard(proto: "required_string_piece"),
- 25: .standard(proto: "required_cord"),
- 27: .standard(proto: "recursive_message"),
- 28: .standard(proto: "optional_recursive_message"),
- 201: .same(proto: "data"),
- 201: .unique(proto: "Data", json: "data"),
- 241: .standard(proto: "default_int32"),
- 242: .standard(proto: "default_int64"),
- 243: .standard(proto: "default_uint32"),
- 244: .standard(proto: "default_uint64"),
- 245: .standard(proto: "default_sint32"),
- 246: .standard(proto: "default_sint64"),
- 247: .standard(proto: "default_fixed32"),
- 248: .standard(proto: "default_fixed64"),
- 249: .standard(proto: "default_sfixed32"),
- 250: .standard(proto: "default_sfixed64"),
- 251: .standard(proto: "default_float"),
- 252: .standard(proto: "default_double"),
- 253: .standard(proto: "default_bool"),
- 254: .standard(proto: "default_string"),
- 255: .standard(proto: "default_bytes"),
- ]
- fileprivate class _StorageClass {
- var _requiredInt32: Int32? = nil
- var _requiredInt64: Int64? = nil
- var _requiredUint32: UInt32? = nil
- var _requiredUint64: UInt64? = nil
- var _requiredSint32: Int32? = nil
- var _requiredSint64: Int64? = nil
- var _requiredFixed32: UInt32? = nil
- var _requiredFixed64: UInt64? = nil
- var _requiredSfixed32: Int32? = nil
- var _requiredSfixed64: Int64? = nil
- var _requiredFloat: Float? = nil
- var _requiredDouble: Double? = nil
- var _requiredBool: Bool? = nil
- var _requiredString: String? = nil
- var _requiredBytes: Data? = nil
- var _requiredNestedMessage: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedMessage? = nil
- var _requiredForeignMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2? = nil
- var _requiredNestedEnum: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedEnum? = nil
- var _requiredForeignEnum: ProtobufTestMessages_Proto2_ForeignEnumProto2? = nil
- var _requiredStringPiece: String? = nil
- var _requiredCord: String? = nil
- var _recursiveMessage: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2? = nil
- var _optionalRecursiveMessage: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2? = nil
- var _data: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.DataMessage? = nil
- var _defaultInt32: Int32? = nil
- var _defaultInt64: Int64? = nil
- var _defaultUint32: UInt32? = nil
- var _defaultUint64: UInt64? = nil
- var _defaultSint32: Int32? = nil
- var _defaultSint64: Int64? = nil
- var _defaultFixed32: UInt32? = nil
- var _defaultFixed64: UInt64? = nil
- var _defaultSfixed32: Int32? = nil
- var _defaultSfixed64: Int64? = nil
- var _defaultFloat: Float? = nil
- var _defaultDouble: Double? = nil
- var _defaultBool: Bool? = nil
- var _defaultString: String? = nil
- var _defaultBytes: Data? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _requiredInt32 = source._requiredInt32
- _requiredInt64 = source._requiredInt64
- _requiredUint32 = source._requiredUint32
- _requiredUint64 = source._requiredUint64
- _requiredSint32 = source._requiredSint32
- _requiredSint64 = source._requiredSint64
- _requiredFixed32 = source._requiredFixed32
- _requiredFixed64 = source._requiredFixed64
- _requiredSfixed32 = source._requiredSfixed32
- _requiredSfixed64 = source._requiredSfixed64
- _requiredFloat = source._requiredFloat
- _requiredDouble = source._requiredDouble
- _requiredBool = source._requiredBool
- _requiredString = source._requiredString
- _requiredBytes = source._requiredBytes
- _requiredNestedMessage = source._requiredNestedMessage
- _requiredForeignMessage = source._requiredForeignMessage
- _requiredNestedEnum = source._requiredNestedEnum
- _requiredForeignEnum = source._requiredForeignEnum
- _requiredStringPiece = source._requiredStringPiece
- _requiredCord = source._requiredCord
- _recursiveMessage = source._recursiveMessage
- _optionalRecursiveMessage = source._optionalRecursiveMessage
- _data = source._data
- _defaultInt32 = source._defaultInt32
- _defaultInt64 = source._defaultInt64
- _defaultUint32 = source._defaultUint32
- _defaultUint64 = source._defaultUint64
- _defaultSint32 = source._defaultSint32
- _defaultSint64 = source._defaultSint64
- _defaultFixed32 = source._defaultFixed32
- _defaultFixed64 = source._defaultFixed64
- _defaultSfixed32 = source._defaultSfixed32
- _defaultSfixed64 = source._defaultSfixed64
- _defaultFloat = source._defaultFloat
- _defaultDouble = source._defaultDouble
- _defaultBool = source._defaultBool
- _defaultString = source._defaultString
- _defaultBytes = source._defaultBytes
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if _storage._requiredInt32 == nil {return false}
- if _storage._requiredInt64 == nil {return false}
- if _storage._requiredUint32 == nil {return false}
- if _storage._requiredUint64 == nil {return false}
- if _storage._requiredSint32 == nil {return false}
- if _storage._requiredSint64 == nil {return false}
- if _storage._requiredFixed32 == nil {return false}
- if _storage._requiredFixed64 == nil {return false}
- if _storage._requiredSfixed32 == nil {return false}
- if _storage._requiredSfixed64 == nil {return false}
- if _storage._requiredFloat == nil {return false}
- if _storage._requiredDouble == nil {return false}
- if _storage._requiredBool == nil {return false}
- if _storage._requiredString == nil {return false}
- if _storage._requiredBytes == nil {return false}
- if _storage._requiredNestedMessage == nil {return false}
- if _storage._requiredForeignMessage == nil {return false}
- if _storage._requiredNestedEnum == nil {return false}
- if _storage._requiredForeignEnum == nil {return false}
- if _storage._requiredStringPiece == nil {return false}
- if _storage._requiredCord == nil {return false}
- if _storage._recursiveMessage == nil {return false}
- if _storage._data == nil {return false}
- if _storage._defaultInt32 == nil {return false}
- if _storage._defaultInt64 == nil {return false}
- if _storage._defaultUint32 == nil {return false}
- if _storage._defaultUint64 == nil {return false}
- if _storage._defaultSint32 == nil {return false}
- if _storage._defaultSint64 == nil {return false}
- if _storage._defaultFixed32 == nil {return false}
- if _storage._defaultFixed64 == nil {return false}
- if _storage._defaultSfixed32 == nil {return false}
- if _storage._defaultSfixed64 == nil {return false}
- if _storage._defaultFloat == nil {return false}
- if _storage._defaultDouble == nil {return false}
- if _storage._defaultBool == nil {return false}
- if _storage._defaultString == nil {return false}
- if _storage._defaultBytes == nil {return false}
- if let v = _storage._requiredNestedMessage, !v.isInitialized {return false}
- if let v = _storage._recursiveMessage, !v.isInitialized {return false}
- if let v = _storage._optionalRecursiveMessage, !v.isInitialized {return false}
- if let v = _storage._data, !v.isInitialized {return false}
- return true
- }
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._requiredInt32) }()
- case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._requiredInt64) }()
- case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._requiredUint32) }()
- case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._requiredUint64) }()
- case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._requiredSint32) }()
- case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._requiredSint64) }()
- case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._requiredFixed32) }()
- case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._requiredFixed64) }()
- case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._requiredSfixed32) }()
- case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._requiredSfixed64) }()
- case 11: try { try decoder.decodeSingularFloatField(value: &_storage._requiredFloat) }()
- case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._requiredDouble) }()
- case 13: try { try decoder.decodeSingularBoolField(value: &_storage._requiredBool) }()
- case 14: try { try decoder.decodeSingularStringField(value: &_storage._requiredString) }()
- case 15: try { try decoder.decodeSingularBytesField(value: &_storage._requiredBytes) }()
- case 18: try { try decoder.decodeSingularMessageField(value: &_storage._requiredNestedMessage) }()
- case 19: try { try decoder.decodeSingularMessageField(value: &_storage._requiredForeignMessage) }()
- case 21: try { try decoder.decodeSingularEnumField(value: &_storage._requiredNestedEnum) }()
- case 22: try { try decoder.decodeSingularEnumField(value: &_storage._requiredForeignEnum) }()
- case 24: try { try decoder.decodeSingularStringField(value: &_storage._requiredStringPiece) }()
- case 25: try { try decoder.decodeSingularStringField(value: &_storage._requiredCord) }()
- case 27: try { try decoder.decodeSingularMessageField(value: &_storage._recursiveMessage) }()
- case 28: try { try decoder.decodeSingularMessageField(value: &_storage._optionalRecursiveMessage) }()
- case 201: try { try decoder.decodeSingularGroupField(value: &_storage._data) }()
- case 241: try { try decoder.decodeSingularInt32Field(value: &_storage._defaultInt32) }()
- case 242: try { try decoder.decodeSingularInt64Field(value: &_storage._defaultInt64) }()
- case 243: try { try decoder.decodeSingularUInt32Field(value: &_storage._defaultUint32) }()
- case 244: try { try decoder.decodeSingularUInt64Field(value: &_storage._defaultUint64) }()
- case 245: try { try decoder.decodeSingularSInt32Field(value: &_storage._defaultSint32) }()
- case 246: try { try decoder.decodeSingularSInt64Field(value: &_storage._defaultSint64) }()
- case 247: try { try decoder.decodeSingularFixed32Field(value: &_storage._defaultFixed32) }()
- case 248: try { try decoder.decodeSingularFixed64Field(value: &_storage._defaultFixed64) }()
- case 249: try { try decoder.decodeSingularSFixed32Field(value: &_storage._defaultSfixed32) }()
- case 250: try { try decoder.decodeSingularSFixed64Field(value: &_storage._defaultSfixed64) }()
- case 251: try { try decoder.decodeSingularFloatField(value: &_storage._defaultFloat) }()
- case 252: try { try decoder.decodeSingularDoubleField(value: &_storage._defaultDouble) }()
- case 253: try { try decoder.decodeSingularBoolField(value: &_storage._defaultBool) }()
- case 254: try { try decoder.decodeSingularStringField(value: &_storage._defaultString) }()
- case 255: try { try decoder.decodeSingularBytesField(value: &_storage._defaultBytes) }()
- case 120..<201:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._requiredInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = _storage._requiredInt64 {
- try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
- } }()
- try { if let v = _storage._requiredUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
- } }()
- try { if let v = _storage._requiredUint64 {
- try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
- } }()
- try { if let v = _storage._requiredSint32 {
- try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5)
- } }()
- try { if let v = _storage._requiredSint64 {
- try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6)
- } }()
- try { if let v = _storage._requiredFixed32 {
- try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7)
- } }()
- try { if let v = _storage._requiredFixed64 {
- try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8)
- } }()
- try { if let v = _storage._requiredSfixed32 {
- try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9)
- } }()
- try { if let v = _storage._requiredSfixed64 {
- try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10)
- } }()
- try { if let v = _storage._requiredFloat {
- try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
- } }()
- try { if let v = _storage._requiredDouble {
- try visitor.visitSingularDoubleField(value: v, fieldNumber: 12)
- } }()
- try { if let v = _storage._requiredBool {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 13)
- } }()
- try { if let v = _storage._requiredString {
- try visitor.visitSingularStringField(value: v, fieldNumber: 14)
- } }()
- try { if let v = _storage._requiredBytes {
- try visitor.visitSingularBytesField(value: v, fieldNumber: 15)
- } }()
- try { if let v = _storage._requiredNestedMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
- } }()
- try { if let v = _storage._requiredForeignMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
- } }()
- try { if let v = _storage._requiredNestedEnum {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 21)
- } }()
- try { if let v = _storage._requiredForeignEnum {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 22)
- } }()
- try { if let v = _storage._requiredStringPiece {
- try visitor.visitSingularStringField(value: v, fieldNumber: 24)
- } }()
- try { if let v = _storage._requiredCord {
- try visitor.visitSingularStringField(value: v, fieldNumber: 25)
- } }()
- try { if let v = _storage._recursiveMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 27)
- } }()
- try { if let v = _storage._optionalRecursiveMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 28)
- } }()
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 120, end: 201)
- try { if let v = _storage._data {
- try visitor.visitSingularGroupField(value: v, fieldNumber: 201)
- } }()
- try { if let v = _storage._defaultInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 241)
- } }()
- try { if let v = _storage._defaultInt64 {
- try visitor.visitSingularInt64Field(value: v, fieldNumber: 242)
- } }()
- try { if let v = _storage._defaultUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 243)
- } }()
- try { if let v = _storage._defaultUint64 {
- try visitor.visitSingularUInt64Field(value: v, fieldNumber: 244)
- } }()
- try { if let v = _storage._defaultSint32 {
- try visitor.visitSingularSInt32Field(value: v, fieldNumber: 245)
- } }()
- try { if let v = _storage._defaultSint64 {
- try visitor.visitSingularSInt64Field(value: v, fieldNumber: 246)
- } }()
- try { if let v = _storage._defaultFixed32 {
- try visitor.visitSingularFixed32Field(value: v, fieldNumber: 247)
- } }()
- try { if let v = _storage._defaultFixed64 {
- try visitor.visitSingularFixed64Field(value: v, fieldNumber: 248)
- } }()
- try { if let v = _storage._defaultSfixed32 {
- try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 249)
- } }()
- try { if let v = _storage._defaultSfixed64 {
- try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 250)
- } }()
- try { if let v = _storage._defaultFloat {
- try visitor.visitSingularFloatField(value: v, fieldNumber: 251)
- } }()
- try { if let v = _storage._defaultDouble {
- try visitor.visitSingularDoubleField(value: v, fieldNumber: 252)
- } }()
- try { if let v = _storage._defaultBool {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 253)
- } }()
- try { if let v = _storage._defaultString {
- try visitor.visitSingularStringField(value: v, fieldNumber: 254)
- } }()
- try { if let v = _storage._defaultBytes {
- try visitor.visitSingularBytesField(value: v, fieldNumber: 255)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2, rhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._requiredInt32 != rhs_storage._requiredInt32 {return false}
- if _storage._requiredInt64 != rhs_storage._requiredInt64 {return false}
- if _storage._requiredUint32 != rhs_storage._requiredUint32 {return false}
- if _storage._requiredUint64 != rhs_storage._requiredUint64 {return false}
- if _storage._requiredSint32 != rhs_storage._requiredSint32 {return false}
- if _storage._requiredSint64 != rhs_storage._requiredSint64 {return false}
- if _storage._requiredFixed32 != rhs_storage._requiredFixed32 {return false}
- if _storage._requiredFixed64 != rhs_storage._requiredFixed64 {return false}
- if _storage._requiredSfixed32 != rhs_storage._requiredSfixed32 {return false}
- if _storage._requiredSfixed64 != rhs_storage._requiredSfixed64 {return false}
- if _storage._requiredFloat != rhs_storage._requiredFloat {return false}
- if _storage._requiredDouble != rhs_storage._requiredDouble {return false}
- if _storage._requiredBool != rhs_storage._requiredBool {return false}
- if _storage._requiredString != rhs_storage._requiredString {return false}
- if _storage._requiredBytes != rhs_storage._requiredBytes {return false}
- if _storage._requiredNestedMessage != rhs_storage._requiredNestedMessage {return false}
- if _storage._requiredForeignMessage != rhs_storage._requiredForeignMessage {return false}
- if _storage._requiredNestedEnum != rhs_storage._requiredNestedEnum {return false}
- if _storage._requiredForeignEnum != rhs_storage._requiredForeignEnum {return false}
- if _storage._requiredStringPiece != rhs_storage._requiredStringPiece {return false}
- if _storage._requiredCord != rhs_storage._requiredCord {return false}
- if _storage._recursiveMessage != rhs_storage._recursiveMessage {return false}
- if _storage._optionalRecursiveMessage != rhs_storage._optionalRecursiveMessage {return false}
- if _storage._data != rhs_storage._data {return false}
- if _storage._defaultInt32 != rhs_storage._defaultInt32 {return false}
- if _storage._defaultInt64 != rhs_storage._defaultInt64 {return false}
- if _storage._defaultUint32 != rhs_storage._defaultUint32 {return false}
- if _storage._defaultUint64 != rhs_storage._defaultUint64 {return false}
- if _storage._defaultSint32 != rhs_storage._defaultSint32 {return false}
- if _storage._defaultSint64 != rhs_storage._defaultSint64 {return false}
- if _storage._defaultFixed32 != rhs_storage._defaultFixed32 {return false}
- if _storage._defaultFixed64 != rhs_storage._defaultFixed64 {return false}
- if _storage._defaultSfixed32 != rhs_storage._defaultSfixed32 {return false}
- if _storage._defaultSfixed64 != rhs_storage._defaultSfixed64 {return false}
- if _storage._defaultFloat != rhs_storage._defaultFloat {return false}
- if _storage._defaultDouble != rhs_storage._defaultDouble {return false}
- if _storage._defaultBool != rhs_storage._defaultBool {return false}
- if _storage._defaultString != rhs_storage._defaultString {return false}
- if _storage._defaultBytes != rhs_storage._defaultBytes {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedEnum: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- -1: .same(proto: "NEG"),
- 0: .same(proto: "FOO"),
- 1: .same(proto: "BAR"),
- 2: .same(proto: "BAZ"),
- ]
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.protoMessageName + ".NestedMessage"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "a"),
- 2: .same(proto: "corecursive"),
- 3: .standard(proto: "optional_corecursive"),
- ]
- fileprivate class _StorageClass {
- var _a: Int32? = nil
- var _corecursive: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2? = nil
- var _optionalCorecursive: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _a = source._a
- _corecursive = source._corecursive
- _optionalCorecursive = source._optionalCorecursive
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if _storage._a == nil {return false}
- if _storage._corecursive == nil {return false}
- if let v = _storage._corecursive, !v.isInitialized {return false}
- if let v = _storage._optionalCorecursive, !v.isInitialized {return false}
- return true
- }
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._a) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &_storage._corecursive) }()
- case 3: try { try decoder.decodeSingularMessageField(value: &_storage._optionalCorecursive) }()
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._a {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = _storage._corecursive {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try { if let v = _storage._optionalCorecursive {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedMessage, rhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.NestedMessage) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._a != rhs_storage._a {return false}
- if _storage._corecursive != rhs_storage._corecursive {return false}
- if _storage._optionalCorecursive != rhs_storage._optionalCorecursive {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.protoMessageName + ".Data"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 202: .standard(proto: "group_int32"),
- 203: .standard(proto: "group_uint32"),
- ]
- public var isInitialized: Bool {
- if self._groupInt32 == nil {return false}
- if self._groupUint32 == nil {return false}
- return true
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 202: try { try decoder.decodeSingularInt32Field(value: &self._groupInt32) }()
- case 203: try { try decoder.decodeSingularUInt32Field(value: &self._groupUint32) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._groupInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 202)
- } }()
- try { if let v = self._groupUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 203)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.DataMessage, rhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.DataMessage) -> Bool {
- if lhs._groupInt32 != rhs._groupInt32 {return false}
- if lhs._groupUint32 != rhs._groupUint32 {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.protoMessageName + ".MessageSetCorrect"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- try decoder.decodeExtensionFieldsAsMessageSet(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrect.self)
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try visitor.visitExtensionFieldsAsMessageSet(fields: _protobuf_extensionFieldValues, start: 4, end: 2147483647)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrect, rhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrect) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.protoMessageName + ".MessageSetCorrectExtension1"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 25: .same(proto: "str"),
- ]
- public var isInitialized: Bool {
- if self._str == nil {return false}
- return true
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 25: try { try decoder.decodeSingularStringField(value: &self._str) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._str {
- try visitor.visitSingularStringField(value: v, fieldNumber: 25)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1, rhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension1) -> Bool {
- if lhs._str != rhs._str {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.protoMessageName + ".MessageSetCorrectExtension2"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 9: .same(proto: "i"),
- ]
- public var isInitialized: Bool {
- if self._i == nil {return false}
- return true
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 9: try { try decoder.decodeSingularInt32Field(value: &self._i) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._i {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2, rhs: ProtobufTestMessages_Proto2_TestAllRequiredTypesProto2.MessageSetCorrectExtension2) -> Bool {
- if lhs._i != rhs._i {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestLargeOneof: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestLargeOneof"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "a1"),
- 2: .same(proto: "a2"),
- 3: .same(proto: "a3"),
- 4: .same(proto: "a4"),
- 5: .same(proto: "a5"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try {
- var v: ProtobufTestMessages_Proto2_TestLargeOneof.A1?
- var hadOneofValue = false
- if let current = self.largeOneof {
- hadOneofValue = true
- if case .a1(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.largeOneof = .a1(v)
- }
- }()
- case 2: try {
- var v: ProtobufTestMessages_Proto2_TestLargeOneof.A2?
- var hadOneofValue = false
- if let current = self.largeOneof {
- hadOneofValue = true
- if case .a2(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.largeOneof = .a2(v)
- }
- }()
- case 3: try {
- var v: ProtobufTestMessages_Proto2_TestLargeOneof.A3?
- var hadOneofValue = false
- if let current = self.largeOneof {
- hadOneofValue = true
- if case .a3(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.largeOneof = .a3(v)
- }
- }()
- case 4: try {
- var v: ProtobufTestMessages_Proto2_TestLargeOneof.A4?
- var hadOneofValue = false
- if let current = self.largeOneof {
- hadOneofValue = true
- if case .a4(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.largeOneof = .a4(v)
- }
- }()
- case 5: try {
- var v: ProtobufTestMessages_Proto2_TestLargeOneof.A5?
- var hadOneofValue = false
- if let current = self.largeOneof {
- hadOneofValue = true
- if case .a5(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.largeOneof = .a5(v)
- }
- }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- switch self.largeOneof {
- case .a1?: try {
- guard case .a1(let v)? = self.largeOneof else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }()
- case .a2?: try {
- guard case .a2(let v)? = self.largeOneof else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- }()
- case .a3?: try {
- guard case .a3(let v)? = self.largeOneof else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- }()
- case .a4?: try {
- guard case .a4(let v)? = self.largeOneof else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- }()
- case .a5?: try {
- guard case .a5(let v)? = self.largeOneof else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
- }()
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestLargeOneof, rhs: ProtobufTestMessages_Proto2_TestLargeOneof) -> Bool {
- if lhs.largeOneof != rhs.largeOneof {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestLargeOneof.A1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestLargeOneof.protoMessageName + ".A1"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestLargeOneof.A1, rhs: ProtobufTestMessages_Proto2_TestLargeOneof.A1) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestLargeOneof.A2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestLargeOneof.protoMessageName + ".A2"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestLargeOneof.A2, rhs: ProtobufTestMessages_Proto2_TestLargeOneof.A2) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestLargeOneof.A3: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestLargeOneof.protoMessageName + ".A3"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestLargeOneof.A3, rhs: ProtobufTestMessages_Proto2_TestLargeOneof.A3) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestLargeOneof.A4: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestLargeOneof.protoMessageName + ".A4"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestLargeOneof.A4, rhs: ProtobufTestMessages_Proto2_TestLargeOneof.A4) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension ProtobufTestMessages_Proto2_TestLargeOneof.A5: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = ProtobufTestMessages_Proto2_TestLargeOneof.protoMessageName + ".A5"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: ProtobufTestMessages_Proto2_TestLargeOneof.A5, rhs: ProtobufTestMessages_Proto2_TestLargeOneof.A5) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
|