unittest.pb.swift 972 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. // swiftlint:disable all
  4. //
  5. // Generated by the Swift generator plugin for the protocol buffer compiler.
  6. // Source: google/protobuf/unittest.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. // Protocol Buffers - Google's data interchange format
  11. // Copyright 2008 Google Inc. All rights reserved.
  12. //
  13. // Use of this source code is governed by a BSD-style
  14. // license that can be found in the LICENSE file or at
  15. // https://developers.google.com/open-source/licenses/bsd
  16. // Author: kenton@google.com (Kenton Varda)
  17. // Based on original Protocol Buffers design by
  18. // Sanjay Ghemawat, Jeff Dean, and others.
  19. //
  20. // A proto file we will use for unit testing.
  21. //
  22. // LINT: ALLOW_GROUPS, LEGACY_NAMES
  23. import Foundation
  24. import SwiftProtobuf
  25. // If the compiler emits an error on this type, it is because this file
  26. // was generated by a version of the `protoc` Swift plug-in that is
  27. // incompatible with the version of SwiftProtobuf to which you are linking.
  28. // Please ensure that you are building against the same version of the API
  29. // that was used to generate this file.
  30. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  31. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  32. typealias Version = _2
  33. }
  34. enum Proto2Unittest_ForeignEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  35. case foreignFoo = 4
  36. case foreignBar = 5
  37. case foreignBaz = 6
  38. /// (1 << 32) to generate a 64b bitmask would be incorrect.
  39. case foreignBax = 32
  40. /// Large enough to escape the Boxed Integer cache.
  41. case foreignLarge = 123456
  42. init() {
  43. self = .foreignFoo
  44. }
  45. }
  46. enum Proto2Unittest_TestReservedEnumFields: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  47. case unknown = 0
  48. init() {
  49. self = .unknown
  50. }
  51. }
  52. /// Required and open enum accepts invalid enum values.
  53. enum Proto2Unittest_ForeignOpenEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
  54. typealias RawValue = Int
  55. case foreignOpenUnknown // = 0
  56. case foreignOpenFoo // = 4
  57. case foreignOpenBar // = 5
  58. case foreignOpenBaz // = 6
  59. /// (1 << 32) to generate a 64b bitmask would be
  60. case foreignOpenBax // = 32
  61. case UNRECOGNIZED(Int)
  62. init() {
  63. self = .foreignOpenUnknown
  64. }
  65. init?(rawValue: Int) {
  66. switch rawValue {
  67. case 0: self = .foreignOpenUnknown
  68. case 4: self = .foreignOpenFoo
  69. case 5: self = .foreignOpenBar
  70. case 6: self = .foreignOpenBaz
  71. case 32: self = .foreignOpenBax
  72. default: self = .UNRECOGNIZED(rawValue)
  73. }
  74. }
  75. var rawValue: Int {
  76. switch self {
  77. case .foreignOpenUnknown: return 0
  78. case .foreignOpenFoo: return 4
  79. case .foreignOpenBar: return 5
  80. case .foreignOpenBaz: return 6
  81. case .foreignOpenBax: return 32
  82. case .UNRECOGNIZED(let i): return i
  83. }
  84. }
  85. // The compiler won't synthesize support with the UNRECOGNIZED case.
  86. static let allCases: [Proto2Unittest_ForeignOpenEnum] = [
  87. .foreignOpenUnknown,
  88. .foreignOpenFoo,
  89. .foreignOpenBar,
  90. .foreignOpenBaz,
  91. .foreignOpenBax,
  92. ]
  93. }
  94. /// Test an enum that has multiple values with the same number.
  95. enum Proto2Unittest_TestEnumWithDupValue: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  96. case foo1 = 1
  97. case bar1 = 2
  98. case baz = 3
  99. static let foo2 = foo1
  100. static let bar2 = bar1
  101. init() {
  102. self = .foo1
  103. }
  104. }
  105. /// Test an enum with large, unordered values.
  106. enum Proto2Unittest_TestSparseEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  107. case sparseA = 123
  108. case sparseB = 62374
  109. case sparseC = 12589234
  110. case sparseD = -15
  111. case sparseE = -53452
  112. case sparseF = 0
  113. case sparseG = 2
  114. init() {
  115. self = .sparseA
  116. }
  117. }
  118. enum Proto2Unittest_VeryLargeEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  119. case enumLabelDefault = 0
  120. case enumLabel1 = 1
  121. case enumLabel2 = 2
  122. case enumLabel3 = 3
  123. case enumLabel4 = 4
  124. case enumLabel5 = 5
  125. case enumLabel6 = 6
  126. case enumLabel7 = 7
  127. case enumLabel8 = 8
  128. case enumLabel9 = 9
  129. case enumLabel10 = 10
  130. case enumLabel11 = 11
  131. case enumLabel12 = 12
  132. case enumLabel13 = 13
  133. case enumLabel14 = 14
  134. case enumLabel15 = 15
  135. case enumLabel16 = 16
  136. case enumLabel17 = 17
  137. case enumLabel18 = 18
  138. case enumLabel19 = 19
  139. case enumLabel20 = 20
  140. case enumLabel21 = 21
  141. case enumLabel22 = 22
  142. case enumLabel23 = 23
  143. case enumLabel24 = 24
  144. case enumLabel25 = 25
  145. case enumLabel26 = 26
  146. case enumLabel27 = 27
  147. case enumLabel28 = 28
  148. case enumLabel29 = 29
  149. case enumLabel30 = 30
  150. case enumLabel31 = 31
  151. case enumLabel32 = 32
  152. case enumLabel33 = 33
  153. case enumLabel34 = 34
  154. case enumLabel35 = 35
  155. case enumLabel36 = 36
  156. case enumLabel37 = 37
  157. case enumLabel38 = 38
  158. case enumLabel39 = 39
  159. case enumLabel40 = 40
  160. case enumLabel41 = 41
  161. case enumLabel42 = 42
  162. case enumLabel43 = 43
  163. case enumLabel44 = 44
  164. case enumLabel45 = 45
  165. case enumLabel46 = 46
  166. case enumLabel47 = 47
  167. case enumLabel48 = 48
  168. case enumLabel49 = 49
  169. case enumLabel50 = 50
  170. case enumLabel51 = 51
  171. case enumLabel52 = 52
  172. case enumLabel53 = 53
  173. case enumLabel54 = 54
  174. case enumLabel55 = 55
  175. case enumLabel56 = 56
  176. case enumLabel57 = 57
  177. case enumLabel58 = 58
  178. case enumLabel59 = 59
  179. case enumLabel60 = 60
  180. case enumLabel61 = 61
  181. case enumLabel62 = 62
  182. case enumLabel63 = 63
  183. case enumLabel64 = 64
  184. case enumLabel65 = 65
  185. case enumLabel66 = 66
  186. case enumLabel67 = 67
  187. case enumLabel68 = 68
  188. case enumLabel69 = 69
  189. case enumLabel70 = 70
  190. case enumLabel71 = 71
  191. case enumLabel72 = 72
  192. case enumLabel73 = 73
  193. case enumLabel74 = 74
  194. case enumLabel75 = 75
  195. case enumLabel76 = 76
  196. case enumLabel77 = 77
  197. case enumLabel78 = 78
  198. case enumLabel79 = 79
  199. case enumLabel80 = 80
  200. case enumLabel81 = 81
  201. case enumLabel82 = 82
  202. case enumLabel83 = 83
  203. case enumLabel84 = 84
  204. case enumLabel85 = 85
  205. case enumLabel86 = 86
  206. case enumLabel87 = 87
  207. case enumLabel88 = 88
  208. case enumLabel89 = 89
  209. case enumLabel90 = 90
  210. case enumLabel91 = 91
  211. case enumLabel92 = 92
  212. case enumLabel93 = 93
  213. case enumLabel94 = 94
  214. case enumLabel95 = 95
  215. case enumLabel96 = 96
  216. case enumLabel97 = 97
  217. case enumLabel98 = 98
  218. case enumLabel99 = 99
  219. case enumLabel100 = 100
  220. init() {
  221. self = .enumLabelDefault
  222. }
  223. }
  224. /// This proto includes every type of field in both singular and repeated
  225. /// forms.
  226. struct Proto2Unittest_TestAllTypes: @unchecked Sendable {
  227. // SwiftProtobuf.Message conformance is added in an extension below. See the
  228. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  229. // methods supported on all messages.
  230. /// Singular
  231. var optionalInt32: Int32 {
  232. get {return _storage._optionalInt32 ?? 0}
  233. set {_uniqueStorage()._optionalInt32 = newValue}
  234. }
  235. /// Returns true if `optionalInt32` has been explicitly set.
  236. var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil}
  237. /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  238. mutating func clearOptionalInt32() {_uniqueStorage()._optionalInt32 = nil}
  239. var optionalInt64: Int64 {
  240. get {return _storage._optionalInt64 ?? 0}
  241. set {_uniqueStorage()._optionalInt64 = newValue}
  242. }
  243. /// Returns true if `optionalInt64` has been explicitly set.
  244. var hasOptionalInt64: Bool {return _storage._optionalInt64 != nil}
  245. /// Clears the value of `optionalInt64`. Subsequent reads from it will return its default value.
  246. mutating func clearOptionalInt64() {_uniqueStorage()._optionalInt64 = nil}
  247. var optionalUint32: UInt32 {
  248. get {return _storage._optionalUint32 ?? 0}
  249. set {_uniqueStorage()._optionalUint32 = newValue}
  250. }
  251. /// Returns true if `optionalUint32` has been explicitly set.
  252. var hasOptionalUint32: Bool {return _storage._optionalUint32 != nil}
  253. /// Clears the value of `optionalUint32`. Subsequent reads from it will return its default value.
  254. mutating func clearOptionalUint32() {_uniqueStorage()._optionalUint32 = nil}
  255. var optionalUint64: UInt64 {
  256. get {return _storage._optionalUint64 ?? 0}
  257. set {_uniqueStorage()._optionalUint64 = newValue}
  258. }
  259. /// Returns true if `optionalUint64` has been explicitly set.
  260. var hasOptionalUint64: Bool {return _storage._optionalUint64 != nil}
  261. /// Clears the value of `optionalUint64`. Subsequent reads from it will return its default value.
  262. mutating func clearOptionalUint64() {_uniqueStorage()._optionalUint64 = nil}
  263. var optionalSint32: Int32 {
  264. get {return _storage._optionalSint32 ?? 0}
  265. set {_uniqueStorage()._optionalSint32 = newValue}
  266. }
  267. /// Returns true if `optionalSint32` has been explicitly set.
  268. var hasOptionalSint32: Bool {return _storage._optionalSint32 != nil}
  269. /// Clears the value of `optionalSint32`. Subsequent reads from it will return its default value.
  270. mutating func clearOptionalSint32() {_uniqueStorage()._optionalSint32 = nil}
  271. var optionalSint64: Int64 {
  272. get {return _storage._optionalSint64 ?? 0}
  273. set {_uniqueStorage()._optionalSint64 = newValue}
  274. }
  275. /// Returns true if `optionalSint64` has been explicitly set.
  276. var hasOptionalSint64: Bool {return _storage._optionalSint64 != nil}
  277. /// Clears the value of `optionalSint64`. Subsequent reads from it will return its default value.
  278. mutating func clearOptionalSint64() {_uniqueStorage()._optionalSint64 = nil}
  279. var optionalFixed32: UInt32 {
  280. get {return _storage._optionalFixed32 ?? 0}
  281. set {_uniqueStorage()._optionalFixed32 = newValue}
  282. }
  283. /// Returns true if `optionalFixed32` has been explicitly set.
  284. var hasOptionalFixed32: Bool {return _storage._optionalFixed32 != nil}
  285. /// Clears the value of `optionalFixed32`. Subsequent reads from it will return its default value.
  286. mutating func clearOptionalFixed32() {_uniqueStorage()._optionalFixed32 = nil}
  287. var optionalFixed64: UInt64 {
  288. get {return _storage._optionalFixed64 ?? 0}
  289. set {_uniqueStorage()._optionalFixed64 = newValue}
  290. }
  291. /// Returns true if `optionalFixed64` has been explicitly set.
  292. var hasOptionalFixed64: Bool {return _storage._optionalFixed64 != nil}
  293. /// Clears the value of `optionalFixed64`. Subsequent reads from it will return its default value.
  294. mutating func clearOptionalFixed64() {_uniqueStorage()._optionalFixed64 = nil}
  295. var optionalSfixed32: Int32 {
  296. get {return _storage._optionalSfixed32 ?? 0}
  297. set {_uniqueStorage()._optionalSfixed32 = newValue}
  298. }
  299. /// Returns true if `optionalSfixed32` has been explicitly set.
  300. var hasOptionalSfixed32: Bool {return _storage._optionalSfixed32 != nil}
  301. /// Clears the value of `optionalSfixed32`. Subsequent reads from it will return its default value.
  302. mutating func clearOptionalSfixed32() {_uniqueStorage()._optionalSfixed32 = nil}
  303. var optionalSfixed64: Int64 {
  304. get {return _storage._optionalSfixed64 ?? 0}
  305. set {_uniqueStorage()._optionalSfixed64 = newValue}
  306. }
  307. /// Returns true if `optionalSfixed64` has been explicitly set.
  308. var hasOptionalSfixed64: Bool {return _storage._optionalSfixed64 != nil}
  309. /// Clears the value of `optionalSfixed64`. Subsequent reads from it will return its default value.
  310. mutating func clearOptionalSfixed64() {_uniqueStorage()._optionalSfixed64 = nil}
  311. var optionalFloat: Float {
  312. get {return _storage._optionalFloat ?? 0}
  313. set {_uniqueStorage()._optionalFloat = newValue}
  314. }
  315. /// Returns true if `optionalFloat` has been explicitly set.
  316. var hasOptionalFloat: Bool {return _storage._optionalFloat != nil}
  317. /// Clears the value of `optionalFloat`. Subsequent reads from it will return its default value.
  318. mutating func clearOptionalFloat() {_uniqueStorage()._optionalFloat = nil}
  319. var optionalDouble: Double {
  320. get {return _storage._optionalDouble ?? 0}
  321. set {_uniqueStorage()._optionalDouble = newValue}
  322. }
  323. /// Returns true if `optionalDouble` has been explicitly set.
  324. var hasOptionalDouble: Bool {return _storage._optionalDouble != nil}
  325. /// Clears the value of `optionalDouble`. Subsequent reads from it will return its default value.
  326. mutating func clearOptionalDouble() {_uniqueStorage()._optionalDouble = nil}
  327. var optionalBool: Bool {
  328. get {return _storage._optionalBool ?? false}
  329. set {_uniqueStorage()._optionalBool = newValue}
  330. }
  331. /// Returns true if `optionalBool` has been explicitly set.
  332. var hasOptionalBool: Bool {return _storage._optionalBool != nil}
  333. /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
  334. mutating func clearOptionalBool() {_uniqueStorage()._optionalBool = nil}
  335. var optionalString: String {
  336. get {return _storage._optionalString ?? String()}
  337. set {_uniqueStorage()._optionalString = newValue}
  338. }
  339. /// Returns true if `optionalString` has been explicitly set.
  340. var hasOptionalString: Bool {return _storage._optionalString != nil}
  341. /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  342. mutating func clearOptionalString() {_uniqueStorage()._optionalString = nil}
  343. var optionalBytes: Data {
  344. get {return _storage._optionalBytes ?? Data()}
  345. set {_uniqueStorage()._optionalBytes = newValue}
  346. }
  347. /// Returns true if `optionalBytes` has been explicitly set.
  348. var hasOptionalBytes: Bool {return _storage._optionalBytes != nil}
  349. /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value.
  350. mutating func clearOptionalBytes() {_uniqueStorage()._optionalBytes = nil}
  351. var optionalGroup: Proto2Unittest_TestAllTypes.OptionalGroup {
  352. get {return _storage._optionalGroup ?? Proto2Unittest_TestAllTypes.OptionalGroup()}
  353. set {_uniqueStorage()._optionalGroup = newValue}
  354. }
  355. /// Returns true if `optionalGroup` has been explicitly set.
  356. var hasOptionalGroup: Bool {return _storage._optionalGroup != nil}
  357. /// Clears the value of `optionalGroup`. Subsequent reads from it will return its default value.
  358. mutating func clearOptionalGroup() {_uniqueStorage()._optionalGroup = nil}
  359. var optionalNestedMessage: Proto2Unittest_TestAllTypes.NestedMessage {
  360. get {return _storage._optionalNestedMessage ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  361. set {_uniqueStorage()._optionalNestedMessage = newValue}
  362. }
  363. /// Returns true if `optionalNestedMessage` has been explicitly set.
  364. var hasOptionalNestedMessage: Bool {return _storage._optionalNestedMessage != nil}
  365. /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value.
  366. mutating func clearOptionalNestedMessage() {_uniqueStorage()._optionalNestedMessage = nil}
  367. var optionalForeignMessage: Proto2Unittest_ForeignMessage {
  368. get {return _storage._optionalForeignMessage ?? Proto2Unittest_ForeignMessage()}
  369. set {_uniqueStorage()._optionalForeignMessage = newValue}
  370. }
  371. /// Returns true if `optionalForeignMessage` has been explicitly set.
  372. var hasOptionalForeignMessage: Bool {return _storage._optionalForeignMessage != nil}
  373. /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value.
  374. mutating func clearOptionalForeignMessage() {_uniqueStorage()._optionalForeignMessage = nil}
  375. var optionalImportMessage: Proto2UnittestImport_ImportMessage {
  376. get {return _storage._optionalImportMessage ?? Proto2UnittestImport_ImportMessage()}
  377. set {_uniqueStorage()._optionalImportMessage = newValue}
  378. }
  379. /// Returns true if `optionalImportMessage` has been explicitly set.
  380. var hasOptionalImportMessage: Bool {return _storage._optionalImportMessage != nil}
  381. /// Clears the value of `optionalImportMessage`. Subsequent reads from it will return its default value.
  382. mutating func clearOptionalImportMessage() {_uniqueStorage()._optionalImportMessage = nil}
  383. var optionalNestedEnum: Proto2Unittest_TestAllTypes.NestedEnum {
  384. get {return _storage._optionalNestedEnum ?? .foo}
  385. set {_uniqueStorage()._optionalNestedEnum = newValue}
  386. }
  387. /// Returns true if `optionalNestedEnum` has been explicitly set.
  388. var hasOptionalNestedEnum: Bool {return _storage._optionalNestedEnum != nil}
  389. /// Clears the value of `optionalNestedEnum`. Subsequent reads from it will return its default value.
  390. mutating func clearOptionalNestedEnum() {_uniqueStorage()._optionalNestedEnum = nil}
  391. var optionalForeignEnum: Proto2Unittest_ForeignEnum {
  392. get {return _storage._optionalForeignEnum ?? .foreignFoo}
  393. set {_uniqueStorage()._optionalForeignEnum = newValue}
  394. }
  395. /// Returns true if `optionalForeignEnum` has been explicitly set.
  396. var hasOptionalForeignEnum: Bool {return _storage._optionalForeignEnum != nil}
  397. /// Clears the value of `optionalForeignEnum`. Subsequent reads from it will return its default value.
  398. mutating func clearOptionalForeignEnum() {_uniqueStorage()._optionalForeignEnum = nil}
  399. var optionalImportEnum: Proto2UnittestImport_ImportEnum {
  400. get {return _storage._optionalImportEnum ?? .importFoo}
  401. set {_uniqueStorage()._optionalImportEnum = newValue}
  402. }
  403. /// Returns true if `optionalImportEnum` has been explicitly set.
  404. var hasOptionalImportEnum: Bool {return _storage._optionalImportEnum != nil}
  405. /// Clears the value of `optionalImportEnum`. Subsequent reads from it will return its default value.
  406. mutating func clearOptionalImportEnum() {_uniqueStorage()._optionalImportEnum = nil}
  407. var optionalStringPiece: String {
  408. get {return _storage._optionalStringPiece ?? String()}
  409. set {_uniqueStorage()._optionalStringPiece = newValue}
  410. }
  411. /// Returns true if `optionalStringPiece` has been explicitly set.
  412. var hasOptionalStringPiece: Bool {return _storage._optionalStringPiece != nil}
  413. /// Clears the value of `optionalStringPiece`. Subsequent reads from it will return its default value.
  414. mutating func clearOptionalStringPiece() {_uniqueStorage()._optionalStringPiece = nil}
  415. var optionalCord: String {
  416. get {return _storage._optionalCord ?? String()}
  417. set {_uniqueStorage()._optionalCord = newValue}
  418. }
  419. /// Returns true if `optionalCord` has been explicitly set.
  420. var hasOptionalCord: Bool {return _storage._optionalCord != nil}
  421. /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value.
  422. mutating func clearOptionalCord() {_uniqueStorage()._optionalCord = nil}
  423. var optionalBytesCord: Data {
  424. get {return _storage._optionalBytesCord ?? Data()}
  425. set {_uniqueStorage()._optionalBytesCord = newValue}
  426. }
  427. /// Returns true if `optionalBytesCord` has been explicitly set.
  428. var hasOptionalBytesCord: Bool {return _storage._optionalBytesCord != nil}
  429. /// Clears the value of `optionalBytesCord`. Subsequent reads from it will return its default value.
  430. mutating func clearOptionalBytesCord() {_uniqueStorage()._optionalBytesCord = nil}
  431. /// Defined in unittest_import_public.proto
  432. var optionalPublicImportMessage: Proto2UnittestImport_PublicImportMessage {
  433. get {return _storage._optionalPublicImportMessage ?? Proto2UnittestImport_PublicImportMessage()}
  434. set {_uniqueStorage()._optionalPublicImportMessage = newValue}
  435. }
  436. /// Returns true if `optionalPublicImportMessage` has been explicitly set.
  437. var hasOptionalPublicImportMessage: Bool {return _storage._optionalPublicImportMessage != nil}
  438. /// Clears the value of `optionalPublicImportMessage`. Subsequent reads from it will return its default value.
  439. mutating func clearOptionalPublicImportMessage() {_uniqueStorage()._optionalPublicImportMessage = nil}
  440. var optionalLazyMessage: Proto2Unittest_TestAllTypes.NestedMessage {
  441. get {return _storage._optionalLazyMessage ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  442. set {_uniqueStorage()._optionalLazyMessage = newValue}
  443. }
  444. /// Returns true if `optionalLazyMessage` has been explicitly set.
  445. var hasOptionalLazyMessage: Bool {return _storage._optionalLazyMessage != nil}
  446. /// Clears the value of `optionalLazyMessage`. Subsequent reads from it will return its default value.
  447. mutating func clearOptionalLazyMessage() {_uniqueStorage()._optionalLazyMessage = nil}
  448. var optionalUnverifiedLazyMessage: Proto2Unittest_TestAllTypes.NestedMessage {
  449. get {return _storage._optionalUnverifiedLazyMessage ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  450. set {_uniqueStorage()._optionalUnverifiedLazyMessage = newValue}
  451. }
  452. /// Returns true if `optionalUnverifiedLazyMessage` has been explicitly set.
  453. var hasOptionalUnverifiedLazyMessage: Bool {return _storage._optionalUnverifiedLazyMessage != nil}
  454. /// Clears the value of `optionalUnverifiedLazyMessage`. Subsequent reads from it will return its default value.
  455. mutating func clearOptionalUnverifiedLazyMessage() {_uniqueStorage()._optionalUnverifiedLazyMessage = nil}
  456. /// Repeated
  457. var repeatedInt32: [Int32] {
  458. get {return _storage._repeatedInt32}
  459. set {_uniqueStorage()._repeatedInt32 = newValue}
  460. }
  461. var repeatedInt64: [Int64] {
  462. get {return _storage._repeatedInt64}
  463. set {_uniqueStorage()._repeatedInt64 = newValue}
  464. }
  465. var repeatedUint32: [UInt32] {
  466. get {return _storage._repeatedUint32}
  467. set {_uniqueStorage()._repeatedUint32 = newValue}
  468. }
  469. var repeatedUint64: [UInt64] {
  470. get {return _storage._repeatedUint64}
  471. set {_uniqueStorage()._repeatedUint64 = newValue}
  472. }
  473. var repeatedSint32: [Int32] {
  474. get {return _storage._repeatedSint32}
  475. set {_uniqueStorage()._repeatedSint32 = newValue}
  476. }
  477. var repeatedSint64: [Int64] {
  478. get {return _storage._repeatedSint64}
  479. set {_uniqueStorage()._repeatedSint64 = newValue}
  480. }
  481. var repeatedFixed32: [UInt32] {
  482. get {return _storage._repeatedFixed32}
  483. set {_uniqueStorage()._repeatedFixed32 = newValue}
  484. }
  485. var repeatedFixed64: [UInt64] {
  486. get {return _storage._repeatedFixed64}
  487. set {_uniqueStorage()._repeatedFixed64 = newValue}
  488. }
  489. var repeatedSfixed32: [Int32] {
  490. get {return _storage._repeatedSfixed32}
  491. set {_uniqueStorage()._repeatedSfixed32 = newValue}
  492. }
  493. var repeatedSfixed64: [Int64] {
  494. get {return _storage._repeatedSfixed64}
  495. set {_uniqueStorage()._repeatedSfixed64 = newValue}
  496. }
  497. var repeatedFloat: [Float] {
  498. get {return _storage._repeatedFloat}
  499. set {_uniqueStorage()._repeatedFloat = newValue}
  500. }
  501. var repeatedDouble: [Double] {
  502. get {return _storage._repeatedDouble}
  503. set {_uniqueStorage()._repeatedDouble = newValue}
  504. }
  505. var repeatedBool: [Bool] {
  506. get {return _storage._repeatedBool}
  507. set {_uniqueStorage()._repeatedBool = newValue}
  508. }
  509. var repeatedString: [String] {
  510. get {return _storage._repeatedString}
  511. set {_uniqueStorage()._repeatedString = newValue}
  512. }
  513. var repeatedBytes: [Data] {
  514. get {return _storage._repeatedBytes}
  515. set {_uniqueStorage()._repeatedBytes = newValue}
  516. }
  517. var repeatedGroup: [Proto2Unittest_TestAllTypes.RepeatedGroup] {
  518. get {return _storage._repeatedGroup}
  519. set {_uniqueStorage()._repeatedGroup = newValue}
  520. }
  521. var repeatedNestedMessage: [Proto2Unittest_TestAllTypes.NestedMessage] {
  522. get {return _storage._repeatedNestedMessage}
  523. set {_uniqueStorage()._repeatedNestedMessage = newValue}
  524. }
  525. var repeatedForeignMessage: [Proto2Unittest_ForeignMessage] {
  526. get {return _storage._repeatedForeignMessage}
  527. set {_uniqueStorage()._repeatedForeignMessage = newValue}
  528. }
  529. var repeatedImportMessage: [Proto2UnittestImport_ImportMessage] {
  530. get {return _storage._repeatedImportMessage}
  531. set {_uniqueStorage()._repeatedImportMessage = newValue}
  532. }
  533. var repeatedNestedEnum: [Proto2Unittest_TestAllTypes.NestedEnum] {
  534. get {return _storage._repeatedNestedEnum}
  535. set {_uniqueStorage()._repeatedNestedEnum = newValue}
  536. }
  537. var repeatedForeignEnum: [Proto2Unittest_ForeignEnum] {
  538. get {return _storage._repeatedForeignEnum}
  539. set {_uniqueStorage()._repeatedForeignEnum = newValue}
  540. }
  541. var repeatedImportEnum: [Proto2UnittestImport_ImportEnum] {
  542. get {return _storage._repeatedImportEnum}
  543. set {_uniqueStorage()._repeatedImportEnum = newValue}
  544. }
  545. var repeatedStringPiece: [String] {
  546. get {return _storage._repeatedStringPiece}
  547. set {_uniqueStorage()._repeatedStringPiece = newValue}
  548. }
  549. var repeatedCord: [String] {
  550. get {return _storage._repeatedCord}
  551. set {_uniqueStorage()._repeatedCord = newValue}
  552. }
  553. var repeatedLazyMessage: [Proto2Unittest_TestAllTypes.NestedMessage] {
  554. get {return _storage._repeatedLazyMessage}
  555. set {_uniqueStorage()._repeatedLazyMessage = newValue}
  556. }
  557. /// Singular with defaults
  558. var defaultInt32: Int32 {
  559. get {return _storage._defaultInt32 ?? 41}
  560. set {_uniqueStorage()._defaultInt32 = newValue}
  561. }
  562. /// Returns true if `defaultInt32` has been explicitly set.
  563. var hasDefaultInt32: Bool {return _storage._defaultInt32 != nil}
  564. /// Clears the value of `defaultInt32`. Subsequent reads from it will return its default value.
  565. mutating func clearDefaultInt32() {_uniqueStorage()._defaultInt32 = nil}
  566. var defaultInt64: Int64 {
  567. get {return _storage._defaultInt64 ?? 42}
  568. set {_uniqueStorage()._defaultInt64 = newValue}
  569. }
  570. /// Returns true if `defaultInt64` has been explicitly set.
  571. var hasDefaultInt64: Bool {return _storage._defaultInt64 != nil}
  572. /// Clears the value of `defaultInt64`. Subsequent reads from it will return its default value.
  573. mutating func clearDefaultInt64() {_uniqueStorage()._defaultInt64 = nil}
  574. var defaultUint32: UInt32 {
  575. get {return _storage._defaultUint32 ?? 43}
  576. set {_uniqueStorage()._defaultUint32 = newValue}
  577. }
  578. /// Returns true if `defaultUint32` has been explicitly set.
  579. var hasDefaultUint32: Bool {return _storage._defaultUint32 != nil}
  580. /// Clears the value of `defaultUint32`. Subsequent reads from it will return its default value.
  581. mutating func clearDefaultUint32() {_uniqueStorage()._defaultUint32 = nil}
  582. var defaultUint64: UInt64 {
  583. get {return _storage._defaultUint64 ?? 44}
  584. set {_uniqueStorage()._defaultUint64 = newValue}
  585. }
  586. /// Returns true if `defaultUint64` has been explicitly set.
  587. var hasDefaultUint64: Bool {return _storage._defaultUint64 != nil}
  588. /// Clears the value of `defaultUint64`. Subsequent reads from it will return its default value.
  589. mutating func clearDefaultUint64() {_uniqueStorage()._defaultUint64 = nil}
  590. var defaultSint32: Int32 {
  591. get {return _storage._defaultSint32 ?? -45}
  592. set {_uniqueStorage()._defaultSint32 = newValue}
  593. }
  594. /// Returns true if `defaultSint32` has been explicitly set.
  595. var hasDefaultSint32: Bool {return _storage._defaultSint32 != nil}
  596. /// Clears the value of `defaultSint32`. Subsequent reads from it will return its default value.
  597. mutating func clearDefaultSint32() {_uniqueStorage()._defaultSint32 = nil}
  598. var defaultSint64: Int64 {
  599. get {return _storage._defaultSint64 ?? 46}
  600. set {_uniqueStorage()._defaultSint64 = newValue}
  601. }
  602. /// Returns true if `defaultSint64` has been explicitly set.
  603. var hasDefaultSint64: Bool {return _storage._defaultSint64 != nil}
  604. /// Clears the value of `defaultSint64`. Subsequent reads from it will return its default value.
  605. mutating func clearDefaultSint64() {_uniqueStorage()._defaultSint64 = nil}
  606. var defaultFixed32: UInt32 {
  607. get {return _storage._defaultFixed32 ?? 47}
  608. set {_uniqueStorage()._defaultFixed32 = newValue}
  609. }
  610. /// Returns true if `defaultFixed32` has been explicitly set.
  611. var hasDefaultFixed32: Bool {return _storage._defaultFixed32 != nil}
  612. /// Clears the value of `defaultFixed32`. Subsequent reads from it will return its default value.
  613. mutating func clearDefaultFixed32() {_uniqueStorage()._defaultFixed32 = nil}
  614. var defaultFixed64: UInt64 {
  615. get {return _storage._defaultFixed64 ?? 48}
  616. set {_uniqueStorage()._defaultFixed64 = newValue}
  617. }
  618. /// Returns true if `defaultFixed64` has been explicitly set.
  619. var hasDefaultFixed64: Bool {return _storage._defaultFixed64 != nil}
  620. /// Clears the value of `defaultFixed64`. Subsequent reads from it will return its default value.
  621. mutating func clearDefaultFixed64() {_uniqueStorage()._defaultFixed64 = nil}
  622. var defaultSfixed32: Int32 {
  623. get {return _storage._defaultSfixed32 ?? 49}
  624. set {_uniqueStorage()._defaultSfixed32 = newValue}
  625. }
  626. /// Returns true if `defaultSfixed32` has been explicitly set.
  627. var hasDefaultSfixed32: Bool {return _storage._defaultSfixed32 != nil}
  628. /// Clears the value of `defaultSfixed32`. Subsequent reads from it will return its default value.
  629. mutating func clearDefaultSfixed32() {_uniqueStorage()._defaultSfixed32 = nil}
  630. var defaultSfixed64: Int64 {
  631. get {return _storage._defaultSfixed64 ?? -50}
  632. set {_uniqueStorage()._defaultSfixed64 = newValue}
  633. }
  634. /// Returns true if `defaultSfixed64` has been explicitly set.
  635. var hasDefaultSfixed64: Bool {return _storage._defaultSfixed64 != nil}
  636. /// Clears the value of `defaultSfixed64`. Subsequent reads from it will return its default value.
  637. mutating func clearDefaultSfixed64() {_uniqueStorage()._defaultSfixed64 = nil}
  638. var defaultFloat: Float {
  639. get {return _storage._defaultFloat ?? 51.5}
  640. set {_uniqueStorage()._defaultFloat = newValue}
  641. }
  642. /// Returns true if `defaultFloat` has been explicitly set.
  643. var hasDefaultFloat: Bool {return _storage._defaultFloat != nil}
  644. /// Clears the value of `defaultFloat`. Subsequent reads from it will return its default value.
  645. mutating func clearDefaultFloat() {_uniqueStorage()._defaultFloat = nil}
  646. var defaultDouble: Double {
  647. get {return _storage._defaultDouble ?? 52000}
  648. set {_uniqueStorage()._defaultDouble = newValue}
  649. }
  650. /// Returns true if `defaultDouble` has been explicitly set.
  651. var hasDefaultDouble: Bool {return _storage._defaultDouble != nil}
  652. /// Clears the value of `defaultDouble`. Subsequent reads from it will return its default value.
  653. mutating func clearDefaultDouble() {_uniqueStorage()._defaultDouble = nil}
  654. var defaultBool: Bool {
  655. get {return _storage._defaultBool ?? true}
  656. set {_uniqueStorage()._defaultBool = newValue}
  657. }
  658. /// Returns true if `defaultBool` has been explicitly set.
  659. var hasDefaultBool: Bool {return _storage._defaultBool != nil}
  660. /// Clears the value of `defaultBool`. Subsequent reads from it will return its default value.
  661. mutating func clearDefaultBool() {_uniqueStorage()._defaultBool = nil}
  662. var defaultString: String {
  663. get {return _storage._defaultString ?? "hello"}
  664. set {_uniqueStorage()._defaultString = newValue}
  665. }
  666. /// Returns true if `defaultString` has been explicitly set.
  667. var hasDefaultString: Bool {return _storage._defaultString != nil}
  668. /// Clears the value of `defaultString`. Subsequent reads from it will return its default value.
  669. mutating func clearDefaultString() {_uniqueStorage()._defaultString = nil}
  670. var defaultBytes: Data {
  671. get {return _storage._defaultBytes ?? Data([119, 111, 114, 108, 100])}
  672. set {_uniqueStorage()._defaultBytes = newValue}
  673. }
  674. /// Returns true if `defaultBytes` has been explicitly set.
  675. var hasDefaultBytes: Bool {return _storage._defaultBytes != nil}
  676. /// Clears the value of `defaultBytes`. Subsequent reads from it will return its default value.
  677. mutating func clearDefaultBytes() {_uniqueStorage()._defaultBytes = nil}
  678. var defaultNestedEnum: Proto2Unittest_TestAllTypes.NestedEnum {
  679. get {return _storage._defaultNestedEnum ?? .bar}
  680. set {_uniqueStorage()._defaultNestedEnum = newValue}
  681. }
  682. /// Returns true if `defaultNestedEnum` has been explicitly set.
  683. var hasDefaultNestedEnum: Bool {return _storage._defaultNestedEnum != nil}
  684. /// Clears the value of `defaultNestedEnum`. Subsequent reads from it will return its default value.
  685. mutating func clearDefaultNestedEnum() {_uniqueStorage()._defaultNestedEnum = nil}
  686. var defaultForeignEnum: Proto2Unittest_ForeignEnum {
  687. get {return _storage._defaultForeignEnum ?? .foreignBar}
  688. set {_uniqueStorage()._defaultForeignEnum = newValue}
  689. }
  690. /// Returns true if `defaultForeignEnum` has been explicitly set.
  691. var hasDefaultForeignEnum: Bool {return _storage._defaultForeignEnum != nil}
  692. /// Clears the value of `defaultForeignEnum`. Subsequent reads from it will return its default value.
  693. mutating func clearDefaultForeignEnum() {_uniqueStorage()._defaultForeignEnum = nil}
  694. var defaultImportEnum: Proto2UnittestImport_ImportEnum {
  695. get {return _storage._defaultImportEnum ?? .importBar}
  696. set {_uniqueStorage()._defaultImportEnum = newValue}
  697. }
  698. /// Returns true if `defaultImportEnum` has been explicitly set.
  699. var hasDefaultImportEnum: Bool {return _storage._defaultImportEnum != nil}
  700. /// Clears the value of `defaultImportEnum`. Subsequent reads from it will return its default value.
  701. mutating func clearDefaultImportEnum() {_uniqueStorage()._defaultImportEnum = nil}
  702. var defaultStringPiece: String {
  703. get {return _storage._defaultStringPiece ?? "abc"}
  704. set {_uniqueStorage()._defaultStringPiece = newValue}
  705. }
  706. /// Returns true if `defaultStringPiece` has been explicitly set.
  707. var hasDefaultStringPiece: Bool {return _storage._defaultStringPiece != nil}
  708. /// Clears the value of `defaultStringPiece`. Subsequent reads from it will return its default value.
  709. mutating func clearDefaultStringPiece() {_uniqueStorage()._defaultStringPiece = nil}
  710. var defaultCord: String {
  711. get {return _storage._defaultCord ?? "123"}
  712. set {_uniqueStorage()._defaultCord = newValue}
  713. }
  714. /// Returns true if `defaultCord` has been explicitly set.
  715. var hasDefaultCord: Bool {return _storage._defaultCord != nil}
  716. /// Clears the value of `defaultCord`. Subsequent reads from it will return its default value.
  717. mutating func clearDefaultCord() {_uniqueStorage()._defaultCord = nil}
  718. /// For oneof test
  719. var oneofField: OneOf_OneofField? {
  720. get {return _storage._oneofField}
  721. set {_uniqueStorage()._oneofField = newValue}
  722. }
  723. var oneofUint32: UInt32 {
  724. get {
  725. if case .oneofUint32(let v)? = _storage._oneofField {return v}
  726. return 0
  727. }
  728. set {_uniqueStorage()._oneofField = .oneofUint32(newValue)}
  729. }
  730. var oneofNestedMessage: Proto2Unittest_TestAllTypes.NestedMessage {
  731. get {
  732. if case .oneofNestedMessage(let v)? = _storage._oneofField {return v}
  733. return Proto2Unittest_TestAllTypes.NestedMessage()
  734. }
  735. set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)}
  736. }
  737. var oneofString: String {
  738. get {
  739. if case .oneofString(let v)? = _storage._oneofField {return v}
  740. return String()
  741. }
  742. set {_uniqueStorage()._oneofField = .oneofString(newValue)}
  743. }
  744. var oneofBytes: Data {
  745. get {
  746. if case .oneofBytes(let v)? = _storage._oneofField {return v}
  747. return Data()
  748. }
  749. set {_uniqueStorage()._oneofField = .oneofBytes(newValue)}
  750. }
  751. var oneofCord: String {
  752. get {
  753. if case .oneofCord(let v)? = _storage._oneofField {return v}
  754. return String()
  755. }
  756. set {_uniqueStorage()._oneofField = .oneofCord(newValue)}
  757. }
  758. var oneofStringPiece: String {
  759. get {
  760. if case .oneofStringPiece(let v)? = _storage._oneofField {return v}
  761. return String()
  762. }
  763. set {_uniqueStorage()._oneofField = .oneofStringPiece(newValue)}
  764. }
  765. var oneofLazyNestedMessage: Proto2Unittest_TestAllTypes.NestedMessage {
  766. get {
  767. if case .oneofLazyNestedMessage(let v)? = _storage._oneofField {return v}
  768. return Proto2Unittest_TestAllTypes.NestedMessage()
  769. }
  770. set {_uniqueStorage()._oneofField = .oneofLazyNestedMessage(newValue)}
  771. }
  772. var unknownFields = SwiftProtobuf.UnknownStorage()
  773. /// For oneof test
  774. enum OneOf_OneofField: Equatable, @unchecked Sendable {
  775. case oneofUint32(UInt32)
  776. case oneofNestedMessage(Proto2Unittest_TestAllTypes.NestedMessage)
  777. case oneofString(String)
  778. case oneofBytes(Data)
  779. case oneofCord(String)
  780. case oneofStringPiece(String)
  781. case oneofLazyNestedMessage(Proto2Unittest_TestAllTypes.NestedMessage)
  782. }
  783. enum NestedEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  784. case foo = 1
  785. case bar = 2
  786. case baz = 3
  787. /// Intentionally negative.
  788. case neg = -1
  789. init() {
  790. self = .foo
  791. }
  792. }
  793. struct NestedMessage: Sendable {
  794. // SwiftProtobuf.Message conformance is added in an extension below. See the
  795. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  796. // methods supported on all messages.
  797. /// The field name "b" fails to compile in proto1 because it conflicts with
  798. /// a local variable named "b" in one of the generated methods. Doh.
  799. /// This file needs to compile in proto1 to test backwards-compatibility.
  800. var bb: Int32 {
  801. get {return _bb ?? 0}
  802. set {_bb = newValue}
  803. }
  804. /// Returns true if `bb` has been explicitly set.
  805. var hasBb: Bool {return self._bb != nil}
  806. /// Clears the value of `bb`. Subsequent reads from it will return its default value.
  807. mutating func clearBb() {self._bb = nil}
  808. var unknownFields = SwiftProtobuf.UnknownStorage()
  809. init() {}
  810. fileprivate var _bb: Int32? = nil
  811. }
  812. struct OptionalGroup: Sendable {
  813. // SwiftProtobuf.Message conformance is added in an extension below. See the
  814. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  815. // methods supported on all messages.
  816. var a: Int32 {
  817. get {return _a ?? 0}
  818. set {_a = newValue}
  819. }
  820. /// Returns true if `a` has been explicitly set.
  821. var hasA: Bool {return self._a != nil}
  822. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  823. mutating func clearA() {self._a = nil}
  824. var unknownFields = SwiftProtobuf.UnknownStorage()
  825. init() {}
  826. fileprivate var _a: Int32? = nil
  827. }
  828. struct RepeatedGroup: Sendable {
  829. // SwiftProtobuf.Message conformance is added in an extension below. See the
  830. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  831. // methods supported on all messages.
  832. var a: Int32 {
  833. get {return _a ?? 0}
  834. set {_a = newValue}
  835. }
  836. /// Returns true if `a` has been explicitly set.
  837. var hasA: Bool {return self._a != nil}
  838. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  839. mutating func clearA() {self._a = nil}
  840. var unknownFields = SwiftProtobuf.UnknownStorage()
  841. init() {}
  842. fileprivate var _a: Int32? = nil
  843. }
  844. init() {}
  845. fileprivate var _storage = _StorageClass.defaultInstance
  846. }
  847. /// This proto includes a recursively nested message.
  848. struct Proto2Unittest_NestedTestAllTypes: @unchecked Sendable {
  849. // SwiftProtobuf.Message conformance is added in an extension below. See the
  850. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  851. // methods supported on all messages.
  852. var child: Proto2Unittest_NestedTestAllTypes {
  853. get {return _storage._child ?? Proto2Unittest_NestedTestAllTypes()}
  854. set {_uniqueStorage()._child = newValue}
  855. }
  856. /// Returns true if `child` has been explicitly set.
  857. var hasChild: Bool {return _storage._child != nil}
  858. /// Clears the value of `child`. Subsequent reads from it will return its default value.
  859. mutating func clearChild() {_uniqueStorage()._child = nil}
  860. var payload: Proto2Unittest_TestAllTypes {
  861. get {return _storage._payload ?? Proto2Unittest_TestAllTypes()}
  862. set {_uniqueStorage()._payload = newValue}
  863. }
  864. /// Returns true if `payload` has been explicitly set.
  865. var hasPayload: Bool {return _storage._payload != nil}
  866. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  867. mutating func clearPayload() {_uniqueStorage()._payload = nil}
  868. var repeatedChild: [Proto2Unittest_NestedTestAllTypes] {
  869. get {return _storage._repeatedChild}
  870. set {_uniqueStorage()._repeatedChild = newValue}
  871. }
  872. var lazyChild: Proto2Unittest_NestedTestAllTypes {
  873. get {return _storage._lazyChild ?? Proto2Unittest_NestedTestAllTypes()}
  874. set {_uniqueStorage()._lazyChild = newValue}
  875. }
  876. /// Returns true if `lazyChild` has been explicitly set.
  877. var hasLazyChild: Bool {return _storage._lazyChild != nil}
  878. /// Clears the value of `lazyChild`. Subsequent reads from it will return its default value.
  879. mutating func clearLazyChild() {_uniqueStorage()._lazyChild = nil}
  880. var eagerChild: Proto2Unittest_TestAllTypes {
  881. get {return _storage._eagerChild ?? Proto2Unittest_TestAllTypes()}
  882. set {_uniqueStorage()._eagerChild = newValue}
  883. }
  884. /// Returns true if `eagerChild` has been explicitly set.
  885. var hasEagerChild: Bool {return _storage._eagerChild != nil}
  886. /// Clears the value of `eagerChild`. Subsequent reads from it will return its default value.
  887. mutating func clearEagerChild() {_uniqueStorage()._eagerChild = nil}
  888. var unknownFields = SwiftProtobuf.UnknownStorage()
  889. init() {}
  890. fileprivate var _storage = _StorageClass.defaultInstance
  891. }
  892. struct Proto2Unittest_TestDeprecatedFields: @unchecked Sendable {
  893. // SwiftProtobuf.Message conformance is added in an extension below. See the
  894. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  895. // methods supported on all messages.
  896. /// NOTE: This field was marked as deprecated in the .proto file.
  897. var deprecatedInt32: Int32 {
  898. get {return _storage._deprecatedInt32 ?? 0}
  899. set {_uniqueStorage()._deprecatedInt32 = newValue}
  900. }
  901. /// Returns true if `deprecatedInt32` has been explicitly set.
  902. var hasDeprecatedInt32: Bool {return _storage._deprecatedInt32 != nil}
  903. /// Clears the value of `deprecatedInt32`. Subsequent reads from it will return its default value.
  904. mutating func clearDeprecatedInt32() {_uniqueStorage()._deprecatedInt32 = nil}
  905. /// NOTE: This field was marked as deprecated in the .proto file.
  906. var deprecatedRepeatedString: [String] {
  907. get {return _storage._deprecatedRepeatedString}
  908. set {_uniqueStorage()._deprecatedRepeatedString = newValue}
  909. }
  910. /// NOTE: This field was marked as deprecated in the .proto file.
  911. var deprecatedMessage: Proto2Unittest_TestAllTypes.NestedMessage {
  912. get {return _storage._deprecatedMessage ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  913. set {_uniqueStorage()._deprecatedMessage = newValue}
  914. }
  915. /// Returns true if `deprecatedMessage` has been explicitly set.
  916. var hasDeprecatedMessage: Bool {return _storage._deprecatedMessage != nil}
  917. /// Clears the value of `deprecatedMessage`. Subsequent reads from it will return its default value.
  918. mutating func clearDeprecatedMessage() {_uniqueStorage()._deprecatedMessage = nil}
  919. var oneofFields: OneOf_OneofFields? {
  920. get {return _storage._oneofFields}
  921. set {_uniqueStorage()._oneofFields = newValue}
  922. }
  923. /// NOTE: This field was marked as deprecated in the .proto file.
  924. var deprecatedInt32InOneof: Int32 {
  925. get {
  926. if case .deprecatedInt32InOneof(let v)? = _storage._oneofFields {return v}
  927. return 0
  928. }
  929. set {_uniqueStorage()._oneofFields = .deprecatedInt32InOneof(newValue)}
  930. }
  931. var nested: Proto2Unittest_TestDeprecatedFields {
  932. get {return _storage._nested ?? Proto2Unittest_TestDeprecatedFields()}
  933. set {_uniqueStorage()._nested = newValue}
  934. }
  935. /// Returns true if `nested` has been explicitly set.
  936. var hasNested: Bool {return _storage._nested != nil}
  937. /// Clears the value of `nested`. Subsequent reads from it will return its default value.
  938. mutating func clearNested() {_uniqueStorage()._nested = nil}
  939. var unknownFields = SwiftProtobuf.UnknownStorage()
  940. enum OneOf_OneofFields: Equatable, Sendable {
  941. /// NOTE: This field was marked as deprecated in the .proto file.
  942. case deprecatedInt32InOneof(Int32)
  943. }
  944. init() {}
  945. fileprivate var _storage = _StorageClass.defaultInstance
  946. }
  947. /// NOTE: This message was marked as deprecated in the .proto file.
  948. struct Proto2Unittest_TestDeprecatedMessage: Sendable {
  949. // SwiftProtobuf.Message conformance is added in an extension below. See the
  950. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  951. // methods supported on all messages.
  952. var unknownFields = SwiftProtobuf.UnknownStorage()
  953. init() {}
  954. }
  955. /// Define these after TestAllTypes to make sure the compiler can handle
  956. /// that.
  957. struct Proto2Unittest_ForeignMessage: Sendable {
  958. // SwiftProtobuf.Message conformance is added in an extension below. See the
  959. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  960. // methods supported on all messages.
  961. var c: Int32 {
  962. get {return _c ?? 0}
  963. set {_c = newValue}
  964. }
  965. /// Returns true if `c` has been explicitly set.
  966. var hasC: Bool {return self._c != nil}
  967. /// Clears the value of `c`. Subsequent reads from it will return its default value.
  968. mutating func clearC() {self._c = nil}
  969. var d: Int32 {
  970. get {return _d ?? 0}
  971. set {_d = newValue}
  972. }
  973. /// Returns true if `d` has been explicitly set.
  974. var hasD: Bool {return self._d != nil}
  975. /// Clears the value of `d`. Subsequent reads from it will return its default value.
  976. mutating func clearD() {self._d = nil}
  977. var unknownFields = SwiftProtobuf.UnknownStorage()
  978. init() {}
  979. fileprivate var _c: Int32? = nil
  980. fileprivate var _d: Int32? = nil
  981. }
  982. struct Proto2Unittest_TestReservedFields: Sendable {
  983. // SwiftProtobuf.Message conformance is added in an extension below. See the
  984. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  985. // methods supported on all messages.
  986. var unknownFields = SwiftProtobuf.UnknownStorage()
  987. init() {}
  988. }
  989. struct Proto2Unittest_TestAllExtensions: SwiftProtobuf.ExtensibleMessage, Sendable {
  990. // SwiftProtobuf.Message conformance is added in an extension below. See the
  991. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  992. // methods supported on all messages.
  993. var unknownFields = SwiftProtobuf.UnknownStorage()
  994. init() {}
  995. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  996. }
  997. struct Proto2Unittest_OptionalGroup_extension: Sendable {
  998. // SwiftProtobuf.Message conformance is added in an extension below. See the
  999. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1000. // methods supported on all messages.
  1001. var a: Int32 {
  1002. get {return _a ?? 0}
  1003. set {_a = newValue}
  1004. }
  1005. /// Returns true if `a` has been explicitly set.
  1006. var hasA: Bool {return self._a != nil}
  1007. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1008. mutating func clearA() {self._a = nil}
  1009. var unknownFields = SwiftProtobuf.UnknownStorage()
  1010. init() {}
  1011. fileprivate var _a: Int32? = nil
  1012. }
  1013. struct Proto2Unittest_RepeatedGroup_extension: Sendable {
  1014. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1015. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1016. // methods supported on all messages.
  1017. var a: Int32 {
  1018. get {return _a ?? 0}
  1019. set {_a = newValue}
  1020. }
  1021. /// Returns true if `a` has been explicitly set.
  1022. var hasA: Bool {return self._a != nil}
  1023. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1024. mutating func clearA() {self._a = nil}
  1025. var unknownFields = SwiftProtobuf.UnknownStorage()
  1026. init() {}
  1027. fileprivate var _a: Int32? = nil
  1028. }
  1029. struct Proto2Unittest_TestMixedFieldsAndExtensions: SwiftProtobuf.ExtensibleMessage, Sendable {
  1030. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1031. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1032. // methods supported on all messages.
  1033. var a: Int32 {
  1034. get {return _a ?? 0}
  1035. set {_a = newValue}
  1036. }
  1037. /// Returns true if `a` has been explicitly set.
  1038. var hasA: Bool {return self._a != nil}
  1039. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1040. mutating func clearA() {self._a = nil}
  1041. var b: [UInt32] = []
  1042. var unknownFields = SwiftProtobuf.UnknownStorage()
  1043. init() {}
  1044. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  1045. fileprivate var _a: Int32? = nil
  1046. }
  1047. struct Proto2Unittest_TestGroup: Sendable {
  1048. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1049. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1050. // methods supported on all messages.
  1051. var optionalGroup: Proto2Unittest_TestGroup.OptionalGroup {
  1052. get {return _optionalGroup ?? Proto2Unittest_TestGroup.OptionalGroup()}
  1053. set {_optionalGroup = newValue}
  1054. }
  1055. /// Returns true if `optionalGroup` has been explicitly set.
  1056. var hasOptionalGroup: Bool {return self._optionalGroup != nil}
  1057. /// Clears the value of `optionalGroup`. Subsequent reads from it will return its default value.
  1058. mutating func clearOptionalGroup() {self._optionalGroup = nil}
  1059. var optionalForeignEnum: Proto2Unittest_ForeignEnum {
  1060. get {return _optionalForeignEnum ?? .foreignFoo}
  1061. set {_optionalForeignEnum = newValue}
  1062. }
  1063. /// Returns true if `optionalForeignEnum` has been explicitly set.
  1064. var hasOptionalForeignEnum: Bool {return self._optionalForeignEnum != nil}
  1065. /// Clears the value of `optionalForeignEnum`. Subsequent reads from it will return its default value.
  1066. mutating func clearOptionalForeignEnum() {self._optionalForeignEnum = nil}
  1067. var unknownFields = SwiftProtobuf.UnknownStorage()
  1068. struct OptionalGroup: Sendable {
  1069. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1070. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1071. // methods supported on all messages.
  1072. var a: Int32 {
  1073. get {return _a ?? 0}
  1074. set {_a = newValue}
  1075. }
  1076. /// Returns true if `a` has been explicitly set.
  1077. var hasA: Bool {return self._a != nil}
  1078. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1079. mutating func clearA() {self._a = nil}
  1080. /// fast table size must be at least 16, for this
  1081. var zz: Int32 {
  1082. get {return _zz ?? 0}
  1083. set {_zz = newValue}
  1084. }
  1085. /// Returns true if `zz` has been explicitly set.
  1086. var hasZz: Bool {return self._zz != nil}
  1087. /// Clears the value of `zz`. Subsequent reads from it will return its default value.
  1088. mutating func clearZz() {self._zz = nil}
  1089. var unknownFields = SwiftProtobuf.UnknownStorage()
  1090. init() {}
  1091. fileprivate var _a: Int32? = nil
  1092. fileprivate var _zz: Int32? = nil
  1093. }
  1094. init() {}
  1095. fileprivate var _optionalGroup: Proto2Unittest_TestGroup.OptionalGroup? = nil
  1096. fileprivate var _optionalForeignEnum: Proto2Unittest_ForeignEnum? = nil
  1097. }
  1098. struct Proto2Unittest_TestGroupExtension: SwiftProtobuf.ExtensibleMessage, Sendable {
  1099. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1100. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1101. // methods supported on all messages.
  1102. var unknownFields = SwiftProtobuf.UnknownStorage()
  1103. init() {}
  1104. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  1105. }
  1106. struct Proto2Unittest_TestNestedExtension: Sendable {
  1107. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1108. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1109. // methods supported on all messages.
  1110. var unknownFields = SwiftProtobuf.UnknownStorage()
  1111. struct OptionalGroup_extension: Sendable {
  1112. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1113. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1114. // methods supported on all messages.
  1115. var a: Int32 {
  1116. get {return _a ?? 0}
  1117. set {_a = newValue}
  1118. }
  1119. /// Returns true if `a` has been explicitly set.
  1120. var hasA: Bool {return self._a != nil}
  1121. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1122. mutating func clearA() {self._a = nil}
  1123. var unknownFields = SwiftProtobuf.UnknownStorage()
  1124. init() {}
  1125. fileprivate var _a: Int32? = nil
  1126. }
  1127. init() {}
  1128. }
  1129. struct Proto2Unittest_TestChildExtension: Sendable {
  1130. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1131. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1132. // methods supported on all messages.
  1133. var a: String {
  1134. get {return _a ?? String()}
  1135. set {_a = newValue}
  1136. }
  1137. /// Returns true if `a` has been explicitly set.
  1138. var hasA: Bool {return self._a != nil}
  1139. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1140. mutating func clearA() {self._a = nil}
  1141. var b: String {
  1142. get {return _b ?? String()}
  1143. set {_b = newValue}
  1144. }
  1145. /// Returns true if `b` has been explicitly set.
  1146. var hasB: Bool {return self._b != nil}
  1147. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  1148. mutating func clearB() {self._b = nil}
  1149. var optionalExtension: Proto2Unittest_TestAllExtensions {
  1150. get {return _optionalExtension ?? Proto2Unittest_TestAllExtensions()}
  1151. set {_optionalExtension = newValue}
  1152. }
  1153. /// Returns true if `optionalExtension` has been explicitly set.
  1154. var hasOptionalExtension: Bool {return self._optionalExtension != nil}
  1155. /// Clears the value of `optionalExtension`. Subsequent reads from it will return its default value.
  1156. mutating func clearOptionalExtension() {self._optionalExtension = nil}
  1157. var unknownFields = SwiftProtobuf.UnknownStorage()
  1158. init() {}
  1159. fileprivate var _a: String? = nil
  1160. fileprivate var _b: String? = nil
  1161. fileprivate var _optionalExtension: Proto2Unittest_TestAllExtensions? = nil
  1162. }
  1163. /// Emulates wireformat data of TestChildExtension with dynamic extension
  1164. /// (DynamicExtension).
  1165. struct Proto2Unittest_TestChildExtensionData: Sendable {
  1166. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1167. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1168. // methods supported on all messages.
  1169. var a: String {
  1170. get {return _a ?? String()}
  1171. set {_a = newValue}
  1172. }
  1173. /// Returns true if `a` has been explicitly set.
  1174. var hasA: Bool {return self._a != nil}
  1175. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1176. mutating func clearA() {self._a = nil}
  1177. var b: String {
  1178. get {return _b ?? String()}
  1179. set {_b = newValue}
  1180. }
  1181. /// Returns true if `b` has been explicitly set.
  1182. var hasB: Bool {return self._b != nil}
  1183. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  1184. mutating func clearB() {self._b = nil}
  1185. var optionalExtension: Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData {
  1186. get {return _optionalExtension ?? Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData()}
  1187. set {_optionalExtension = newValue}
  1188. }
  1189. /// Returns true if `optionalExtension` has been explicitly set.
  1190. var hasOptionalExtension: Bool {return self._optionalExtension != nil}
  1191. /// Clears the value of `optionalExtension`. Subsequent reads from it will return its default value.
  1192. mutating func clearOptionalExtension() {self._optionalExtension = nil}
  1193. var unknownFields = SwiftProtobuf.UnknownStorage()
  1194. struct NestedTestAllExtensionsData: Sendable {
  1195. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1196. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1197. // methods supported on all messages.
  1198. var dynamic: Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData.NestedDynamicExtensions {
  1199. get {return _dynamic ?? Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData.NestedDynamicExtensions()}
  1200. set {_dynamic = newValue}
  1201. }
  1202. /// Returns true if `dynamic` has been explicitly set.
  1203. var hasDynamic: Bool {return self._dynamic != nil}
  1204. /// Clears the value of `dynamic`. Subsequent reads from it will return its default value.
  1205. mutating func clearDynamic() {self._dynamic = nil}
  1206. var unknownFields = SwiftProtobuf.UnknownStorage()
  1207. struct NestedDynamicExtensions: Sendable {
  1208. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1209. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1210. // methods supported on all messages.
  1211. var a: Int32 {
  1212. get {return _a ?? 0}
  1213. set {_a = newValue}
  1214. }
  1215. /// Returns true if `a` has been explicitly set.
  1216. var hasA: Bool {return self._a != nil}
  1217. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1218. mutating func clearA() {self._a = nil}
  1219. var b: Int32 {
  1220. get {return _b ?? 0}
  1221. set {_b = newValue}
  1222. }
  1223. /// Returns true if `b` has been explicitly set.
  1224. var hasB: Bool {return self._b != nil}
  1225. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  1226. mutating func clearB() {self._b = nil}
  1227. var unknownFields = SwiftProtobuf.UnknownStorage()
  1228. init() {}
  1229. fileprivate var _a: Int32? = nil
  1230. fileprivate var _b: Int32? = nil
  1231. }
  1232. init() {}
  1233. fileprivate var _dynamic: Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData.NestedDynamicExtensions? = nil
  1234. }
  1235. init() {}
  1236. fileprivate var _a: String? = nil
  1237. fileprivate var _b: String? = nil
  1238. fileprivate var _optionalExtension: Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData? = nil
  1239. }
  1240. struct Proto2Unittest_TestNestedChildExtension: Sendable {
  1241. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1242. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1243. // methods supported on all messages.
  1244. var a: Int32 {
  1245. get {return _a ?? 0}
  1246. set {_a = newValue}
  1247. }
  1248. /// Returns true if `a` has been explicitly set.
  1249. var hasA: Bool {return self._a != nil}
  1250. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1251. mutating func clearA() {self._a = nil}
  1252. var child: Proto2Unittest_TestChildExtension {
  1253. get {return _child ?? Proto2Unittest_TestChildExtension()}
  1254. set {_child = newValue}
  1255. }
  1256. /// Returns true if `child` has been explicitly set.
  1257. var hasChild: Bool {return self._child != nil}
  1258. /// Clears the value of `child`. Subsequent reads from it will return its default value.
  1259. mutating func clearChild() {self._child = nil}
  1260. var unknownFields = SwiftProtobuf.UnknownStorage()
  1261. init() {}
  1262. fileprivate var _a: Int32? = nil
  1263. fileprivate var _child: Proto2Unittest_TestChildExtension? = nil
  1264. }
  1265. /// Emulates wireformat data of TestNestedChildExtension with dynamic extension
  1266. /// (DynamicExtension).
  1267. struct Proto2Unittest_TestNestedChildExtensionData: Sendable {
  1268. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1269. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1270. // methods supported on all messages.
  1271. var a: Int32 {
  1272. get {return _a ?? 0}
  1273. set {_a = newValue}
  1274. }
  1275. /// Returns true if `a` has been explicitly set.
  1276. var hasA: Bool {return self._a != nil}
  1277. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1278. mutating func clearA() {self._a = nil}
  1279. var child: Proto2Unittest_TestChildExtensionData {
  1280. get {return _child ?? Proto2Unittest_TestChildExtensionData()}
  1281. set {_child = newValue}
  1282. }
  1283. /// Returns true if `child` has been explicitly set.
  1284. var hasChild: Bool {return self._child != nil}
  1285. /// Clears the value of `child`. Subsequent reads from it will return its default value.
  1286. mutating func clearChild() {self._child = nil}
  1287. var unknownFields = SwiftProtobuf.UnknownStorage()
  1288. init() {}
  1289. fileprivate var _a: Int32? = nil
  1290. fileprivate var _child: Proto2Unittest_TestChildExtensionData? = nil
  1291. }
  1292. /// Required and closed enum fields are considered unknown fields if the value is
  1293. /// not valid. We need to make sure it functions as expected.
  1294. struct Proto2Unittest_TestRequiredEnum: Sendable {
  1295. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1296. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1297. // methods supported on all messages.
  1298. var requiredEnum: Proto2Unittest_ForeignEnum {
  1299. get {return _requiredEnum ?? .foreignFoo}
  1300. set {_requiredEnum = newValue}
  1301. }
  1302. /// Returns true if `requiredEnum` has been explicitly set.
  1303. var hasRequiredEnum: Bool {return self._requiredEnum != nil}
  1304. /// Clears the value of `requiredEnum`. Subsequent reads from it will return its default value.
  1305. mutating func clearRequiredEnum() {self._requiredEnum = nil}
  1306. /// A dummy optional field.
  1307. var a: Int32 {
  1308. get {return _a ?? 0}
  1309. set {_a = newValue}
  1310. }
  1311. /// Returns true if `a` has been explicitly set.
  1312. var hasA: Bool {return self._a != nil}
  1313. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1314. mutating func clearA() {self._a = nil}
  1315. var unknownFields = SwiftProtobuf.UnknownStorage()
  1316. init() {}
  1317. fileprivate var _requiredEnum: Proto2Unittest_ForeignEnum? = nil
  1318. fileprivate var _a: Int32? = nil
  1319. }
  1320. struct Proto2Unittest_TestRequiredOpenEnum: Sendable {
  1321. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1322. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1323. // methods supported on all messages.
  1324. var requiredEnum: Proto2Unittest_ForeignOpenEnum {
  1325. get {return _requiredEnum ?? .foreignOpenUnknown}
  1326. set {_requiredEnum = newValue}
  1327. }
  1328. /// Returns true if `requiredEnum` has been explicitly set.
  1329. var hasRequiredEnum: Bool {return self._requiredEnum != nil}
  1330. /// Clears the value of `requiredEnum`. Subsequent reads from it will return its default value.
  1331. mutating func clearRequiredEnum() {self._requiredEnum = nil}
  1332. /// A dummy optional field.
  1333. var a: Int32 {
  1334. get {return _a ?? 0}
  1335. set {_a = newValue}
  1336. }
  1337. /// Returns true if `a` has been explicitly set.
  1338. var hasA: Bool {return self._a != nil}
  1339. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1340. mutating func clearA() {self._a = nil}
  1341. var unknownFields = SwiftProtobuf.UnknownStorage()
  1342. init() {}
  1343. fileprivate var _requiredEnum: Proto2Unittest_ForeignOpenEnum? = nil
  1344. fileprivate var _a: Int32? = nil
  1345. }
  1346. /// TestRequiredEnum + using enum values that won't fit to 64 bitmask.
  1347. struct Proto2Unittest_TestRequiredEnumNoMask: Sendable {
  1348. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1349. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1350. // methods supported on all messages.
  1351. var requiredEnum: Proto2Unittest_TestRequiredEnumNoMask.NestedEnum {
  1352. get {return _requiredEnum ?? .unspecified}
  1353. set {_requiredEnum = newValue}
  1354. }
  1355. /// Returns true if `requiredEnum` has been explicitly set.
  1356. var hasRequiredEnum: Bool {return self._requiredEnum != nil}
  1357. /// Clears the value of `requiredEnum`. Subsequent reads from it will return its default value.
  1358. mutating func clearRequiredEnum() {self._requiredEnum = nil}
  1359. /// A dummy optional field.
  1360. var a: Int32 {
  1361. get {return _a ?? 0}
  1362. set {_a = newValue}
  1363. }
  1364. /// Returns true if `a` has been explicitly set.
  1365. var hasA: Bool {return self._a != nil}
  1366. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1367. mutating func clearA() {self._a = nil}
  1368. var unknownFields = SwiftProtobuf.UnknownStorage()
  1369. enum NestedEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  1370. case unspecified = 0
  1371. case foo = 2
  1372. case bar = 100
  1373. /// Intentionally negative.
  1374. case baz = -1
  1375. init() {
  1376. self = .unspecified
  1377. }
  1378. }
  1379. init() {}
  1380. fileprivate var _requiredEnum: Proto2Unittest_TestRequiredEnumNoMask.NestedEnum? = nil
  1381. fileprivate var _a: Int32? = nil
  1382. }
  1383. struct Proto2Unittest_TestRequiredEnumMulti: Sendable {
  1384. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1385. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1386. // methods supported on all messages.
  1387. /// Intentionally placed in descending field number to force sorting in closed
  1388. /// enum verification.
  1389. var requiredEnum4: Proto2Unittest_TestRequiredEnumMulti.NestedEnum {
  1390. get {return _requiredEnum4 ?? .unspecified}
  1391. set {_requiredEnum4 = newValue}
  1392. }
  1393. /// Returns true if `requiredEnum4` has been explicitly set.
  1394. var hasRequiredEnum4: Bool {return self._requiredEnum4 != nil}
  1395. /// Clears the value of `requiredEnum4`. Subsequent reads from it will return its default value.
  1396. mutating func clearRequiredEnum4() {self._requiredEnum4 = nil}
  1397. var a3: Int32 {
  1398. get {return _a3 ?? 0}
  1399. set {_a3 = newValue}
  1400. }
  1401. /// Returns true if `a3` has been explicitly set.
  1402. var hasA3: Bool {return self._a3 != nil}
  1403. /// Clears the value of `a3`. Subsequent reads from it will return its default value.
  1404. mutating func clearA3() {self._a3 = nil}
  1405. var requiredEnum2: Proto2Unittest_TestRequiredEnumMulti.NestedEnum {
  1406. get {return _requiredEnum2 ?? .unspecified}
  1407. set {_requiredEnum2 = newValue}
  1408. }
  1409. /// Returns true if `requiredEnum2` has been explicitly set.
  1410. var hasRequiredEnum2: Bool {return self._requiredEnum2 != nil}
  1411. /// Clears the value of `requiredEnum2`. Subsequent reads from it will return its default value.
  1412. mutating func clearRequiredEnum2() {self._requiredEnum2 = nil}
  1413. var requiredEnum1: Proto2Unittest_ForeignEnum {
  1414. get {return _requiredEnum1 ?? .foreignFoo}
  1415. set {_requiredEnum1 = newValue}
  1416. }
  1417. /// Returns true if `requiredEnum1` has been explicitly set.
  1418. var hasRequiredEnum1: Bool {return self._requiredEnum1 != nil}
  1419. /// Clears the value of `requiredEnum1`. Subsequent reads from it will return its default value.
  1420. mutating func clearRequiredEnum1() {self._requiredEnum1 = nil}
  1421. var unknownFields = SwiftProtobuf.UnknownStorage()
  1422. enum NestedEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  1423. case unspecified = 0
  1424. case foo = 1
  1425. case bar = 2
  1426. case baz = 100
  1427. init() {
  1428. self = .unspecified
  1429. }
  1430. }
  1431. init() {}
  1432. fileprivate var _requiredEnum4: Proto2Unittest_TestRequiredEnumMulti.NestedEnum? = nil
  1433. fileprivate var _a3: Int32? = nil
  1434. fileprivate var _requiredEnum2: Proto2Unittest_TestRequiredEnumMulti.NestedEnum? = nil
  1435. fileprivate var _requiredEnum1: Proto2Unittest_ForeignEnum? = nil
  1436. }
  1437. struct Proto2Unittest_TestRequiredNoMaskMulti: Sendable {
  1438. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1439. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1440. // methods supported on all messages.
  1441. /// Intentionally placed in descending field number to force sorting in closed
  1442. /// enum verification. Also, using large field numbers to use tag only
  1443. /// matching for required fields.
  1444. var requiredFixed3280: UInt32 {
  1445. get {return _requiredFixed3280 ?? 0}
  1446. set {_requiredFixed3280 = newValue}
  1447. }
  1448. /// Returns true if `requiredFixed3280` has been explicitly set.
  1449. var hasRequiredFixed3280: Bool {return self._requiredFixed3280 != nil}
  1450. /// Clears the value of `requiredFixed3280`. Subsequent reads from it will return its default value.
  1451. mutating func clearRequiredFixed3280() {self._requiredFixed3280 = nil}
  1452. var requiredFixed3270: UInt32 {
  1453. get {return _requiredFixed3270 ?? 0}
  1454. set {_requiredFixed3270 = newValue}
  1455. }
  1456. /// Returns true if `requiredFixed3270` has been explicitly set.
  1457. var hasRequiredFixed3270: Bool {return self._requiredFixed3270 != nil}
  1458. /// Clears the value of `requiredFixed3270`. Subsequent reads from it will return its default value.
  1459. mutating func clearRequiredFixed3270() {self._requiredFixed3270 = nil}
  1460. var requiredEnum64: Proto2Unittest_TestRequiredNoMaskMulti.NestedEnum {
  1461. get {return _requiredEnum64 ?? .unspecified}
  1462. set {_requiredEnum64 = newValue}
  1463. }
  1464. /// Returns true if `requiredEnum64` has been explicitly set.
  1465. var hasRequiredEnum64: Bool {return self._requiredEnum64 != nil}
  1466. /// Clears the value of `requiredEnum64`. Subsequent reads from it will return its default value.
  1467. mutating func clearRequiredEnum64() {self._requiredEnum64 = nil}
  1468. var requiredEnum4: Proto2Unittest_TestRequiredNoMaskMulti.NestedEnum {
  1469. get {return _requiredEnum4 ?? .unspecified}
  1470. set {_requiredEnum4 = newValue}
  1471. }
  1472. /// Returns true if `requiredEnum4` has been explicitly set.
  1473. var hasRequiredEnum4: Bool {return self._requiredEnum4 != nil}
  1474. /// Clears the value of `requiredEnum4`. Subsequent reads from it will return its default value.
  1475. mutating func clearRequiredEnum4() {self._requiredEnum4 = nil}
  1476. var a3: Int32 {
  1477. get {return _a3 ?? 0}
  1478. set {_a3 = newValue}
  1479. }
  1480. /// Returns true if `a3` has been explicitly set.
  1481. var hasA3: Bool {return self._a3 != nil}
  1482. /// Clears the value of `a3`. Subsequent reads from it will return its default value.
  1483. mutating func clearA3() {self._a3 = nil}
  1484. var requiredEnum2: Proto2Unittest_TestRequiredNoMaskMulti.NestedEnum {
  1485. get {return _requiredEnum2 ?? .unspecified}
  1486. set {_requiredEnum2 = newValue}
  1487. }
  1488. /// Returns true if `requiredEnum2` has been explicitly set.
  1489. var hasRequiredEnum2: Bool {return self._requiredEnum2 != nil}
  1490. /// Clears the value of `requiredEnum2`. Subsequent reads from it will return its default value.
  1491. mutating func clearRequiredEnum2() {self._requiredEnum2 = nil}
  1492. var requiredEnum1: Proto2Unittest_ForeignEnum {
  1493. get {return _requiredEnum1 ?? .foreignFoo}
  1494. set {_requiredEnum1 = newValue}
  1495. }
  1496. /// Returns true if `requiredEnum1` has been explicitly set.
  1497. var hasRequiredEnum1: Bool {return self._requiredEnum1 != nil}
  1498. /// Clears the value of `requiredEnum1`. Subsequent reads from it will return its default value.
  1499. mutating func clearRequiredEnum1() {self._requiredEnum1 = nil}
  1500. var unknownFields = SwiftProtobuf.UnknownStorage()
  1501. enum NestedEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  1502. case unspecified = 0
  1503. case foo = 1
  1504. case bar = 2
  1505. case baz = 100
  1506. init() {
  1507. self = .unspecified
  1508. }
  1509. }
  1510. init() {}
  1511. fileprivate var _requiredFixed3280: UInt32? = nil
  1512. fileprivate var _requiredFixed3270: UInt32? = nil
  1513. fileprivate var _requiredEnum64: Proto2Unittest_TestRequiredNoMaskMulti.NestedEnum? = nil
  1514. fileprivate var _requiredEnum4: Proto2Unittest_TestRequiredNoMaskMulti.NestedEnum? = nil
  1515. fileprivate var _a3: Int32? = nil
  1516. fileprivate var _requiredEnum2: Proto2Unittest_TestRequiredNoMaskMulti.NestedEnum? = nil
  1517. fileprivate var _requiredEnum1: Proto2Unittest_ForeignEnum? = nil
  1518. }
  1519. /// We have separate messages for testing required fields because it's
  1520. /// annoying to have to fill in required fields in TestProto in order to
  1521. /// do anything with it. Note that we don't need to test every type of
  1522. /// required filed because the code output is basically identical to
  1523. /// optional fields for all types.
  1524. struct Proto2Unittest_TestRequired: @unchecked Sendable {
  1525. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1526. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1527. // methods supported on all messages.
  1528. var a: Int32 {
  1529. get {return _storage._a ?? 0}
  1530. set {_uniqueStorage()._a = newValue}
  1531. }
  1532. /// Returns true if `a` has been explicitly set.
  1533. var hasA: Bool {return _storage._a != nil}
  1534. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  1535. mutating func clearA() {_uniqueStorage()._a = nil}
  1536. var dummy2: Int32 {
  1537. get {return _storage._dummy2 ?? 0}
  1538. set {_uniqueStorage()._dummy2 = newValue}
  1539. }
  1540. /// Returns true if `dummy2` has been explicitly set.
  1541. var hasDummy2: Bool {return _storage._dummy2 != nil}
  1542. /// Clears the value of `dummy2`. Subsequent reads from it will return its default value.
  1543. mutating func clearDummy2() {_uniqueStorage()._dummy2 = nil}
  1544. var b: Int32 {
  1545. get {return _storage._b ?? 0}
  1546. set {_uniqueStorage()._b = newValue}
  1547. }
  1548. /// Returns true if `b` has been explicitly set.
  1549. var hasB: Bool {return _storage._b != nil}
  1550. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  1551. mutating func clearB() {_uniqueStorage()._b = nil}
  1552. /// Pad the field count to 32 so that we can test that IsInitialized()
  1553. /// properly checks multiple elements of has_bits_.
  1554. var dummy4: Int32 {
  1555. get {return _storage._dummy4 ?? 0}
  1556. set {_uniqueStorage()._dummy4 = newValue}
  1557. }
  1558. /// Returns true if `dummy4` has been explicitly set.
  1559. var hasDummy4: Bool {return _storage._dummy4 != nil}
  1560. /// Clears the value of `dummy4`. Subsequent reads from it will return its default value.
  1561. mutating func clearDummy4() {_uniqueStorage()._dummy4 = nil}
  1562. var dummy5: Int32 {
  1563. get {return _storage._dummy5 ?? 0}
  1564. set {_uniqueStorage()._dummy5 = newValue}
  1565. }
  1566. /// Returns true if `dummy5` has been explicitly set.
  1567. var hasDummy5: Bool {return _storage._dummy5 != nil}
  1568. /// Clears the value of `dummy5`. Subsequent reads from it will return its default value.
  1569. mutating func clearDummy5() {_uniqueStorage()._dummy5 = nil}
  1570. var dummy6: Int32 {
  1571. get {return _storage._dummy6 ?? 0}
  1572. set {_uniqueStorage()._dummy6 = newValue}
  1573. }
  1574. /// Returns true if `dummy6` has been explicitly set.
  1575. var hasDummy6: Bool {return _storage._dummy6 != nil}
  1576. /// Clears the value of `dummy6`. Subsequent reads from it will return its default value.
  1577. mutating func clearDummy6() {_uniqueStorage()._dummy6 = nil}
  1578. var dummy7: Int32 {
  1579. get {return _storage._dummy7 ?? 0}
  1580. set {_uniqueStorage()._dummy7 = newValue}
  1581. }
  1582. /// Returns true if `dummy7` has been explicitly set.
  1583. var hasDummy7: Bool {return _storage._dummy7 != nil}
  1584. /// Clears the value of `dummy7`. Subsequent reads from it will return its default value.
  1585. mutating func clearDummy7() {_uniqueStorage()._dummy7 = nil}
  1586. var dummy8: Int32 {
  1587. get {return _storage._dummy8 ?? 0}
  1588. set {_uniqueStorage()._dummy8 = newValue}
  1589. }
  1590. /// Returns true if `dummy8` has been explicitly set.
  1591. var hasDummy8: Bool {return _storage._dummy8 != nil}
  1592. /// Clears the value of `dummy8`. Subsequent reads from it will return its default value.
  1593. mutating func clearDummy8() {_uniqueStorage()._dummy8 = nil}
  1594. var dummy9: Int32 {
  1595. get {return _storage._dummy9 ?? 0}
  1596. set {_uniqueStorage()._dummy9 = newValue}
  1597. }
  1598. /// Returns true if `dummy9` has been explicitly set.
  1599. var hasDummy9: Bool {return _storage._dummy9 != nil}
  1600. /// Clears the value of `dummy9`. Subsequent reads from it will return its default value.
  1601. mutating func clearDummy9() {_uniqueStorage()._dummy9 = nil}
  1602. var dummy10: Int32 {
  1603. get {return _storage._dummy10 ?? 0}
  1604. set {_uniqueStorage()._dummy10 = newValue}
  1605. }
  1606. /// Returns true if `dummy10` has been explicitly set.
  1607. var hasDummy10: Bool {return _storage._dummy10 != nil}
  1608. /// Clears the value of `dummy10`. Subsequent reads from it will return its default value.
  1609. mutating func clearDummy10() {_uniqueStorage()._dummy10 = nil}
  1610. var dummy11: Int32 {
  1611. get {return _storage._dummy11 ?? 0}
  1612. set {_uniqueStorage()._dummy11 = newValue}
  1613. }
  1614. /// Returns true if `dummy11` has been explicitly set.
  1615. var hasDummy11: Bool {return _storage._dummy11 != nil}
  1616. /// Clears the value of `dummy11`. Subsequent reads from it will return its default value.
  1617. mutating func clearDummy11() {_uniqueStorage()._dummy11 = nil}
  1618. var dummy12: Int32 {
  1619. get {return _storage._dummy12 ?? 0}
  1620. set {_uniqueStorage()._dummy12 = newValue}
  1621. }
  1622. /// Returns true if `dummy12` has been explicitly set.
  1623. var hasDummy12: Bool {return _storage._dummy12 != nil}
  1624. /// Clears the value of `dummy12`. Subsequent reads from it will return its default value.
  1625. mutating func clearDummy12() {_uniqueStorage()._dummy12 = nil}
  1626. var dummy13: Int32 {
  1627. get {return _storage._dummy13 ?? 0}
  1628. set {_uniqueStorage()._dummy13 = newValue}
  1629. }
  1630. /// Returns true if `dummy13` has been explicitly set.
  1631. var hasDummy13: Bool {return _storage._dummy13 != nil}
  1632. /// Clears the value of `dummy13`. Subsequent reads from it will return its default value.
  1633. mutating func clearDummy13() {_uniqueStorage()._dummy13 = nil}
  1634. var dummy14: Int32 {
  1635. get {return _storage._dummy14 ?? 0}
  1636. set {_uniqueStorage()._dummy14 = newValue}
  1637. }
  1638. /// Returns true if `dummy14` has been explicitly set.
  1639. var hasDummy14: Bool {return _storage._dummy14 != nil}
  1640. /// Clears the value of `dummy14`. Subsequent reads from it will return its default value.
  1641. mutating func clearDummy14() {_uniqueStorage()._dummy14 = nil}
  1642. var dummy15: Int32 {
  1643. get {return _storage._dummy15 ?? 0}
  1644. set {_uniqueStorage()._dummy15 = newValue}
  1645. }
  1646. /// Returns true if `dummy15` has been explicitly set.
  1647. var hasDummy15: Bool {return _storage._dummy15 != nil}
  1648. /// Clears the value of `dummy15`. Subsequent reads from it will return its default value.
  1649. mutating func clearDummy15() {_uniqueStorage()._dummy15 = nil}
  1650. var dummy16: Int32 {
  1651. get {return _storage._dummy16 ?? 0}
  1652. set {_uniqueStorage()._dummy16 = newValue}
  1653. }
  1654. /// Returns true if `dummy16` has been explicitly set.
  1655. var hasDummy16: Bool {return _storage._dummy16 != nil}
  1656. /// Clears the value of `dummy16`. Subsequent reads from it will return its default value.
  1657. mutating func clearDummy16() {_uniqueStorage()._dummy16 = nil}
  1658. var dummy17: Int32 {
  1659. get {return _storage._dummy17 ?? 0}
  1660. set {_uniqueStorage()._dummy17 = newValue}
  1661. }
  1662. /// Returns true if `dummy17` has been explicitly set.
  1663. var hasDummy17: Bool {return _storage._dummy17 != nil}
  1664. /// Clears the value of `dummy17`. Subsequent reads from it will return its default value.
  1665. mutating func clearDummy17() {_uniqueStorage()._dummy17 = nil}
  1666. var dummy18: Int32 {
  1667. get {return _storage._dummy18 ?? 0}
  1668. set {_uniqueStorage()._dummy18 = newValue}
  1669. }
  1670. /// Returns true if `dummy18` has been explicitly set.
  1671. var hasDummy18: Bool {return _storage._dummy18 != nil}
  1672. /// Clears the value of `dummy18`. Subsequent reads from it will return its default value.
  1673. mutating func clearDummy18() {_uniqueStorage()._dummy18 = nil}
  1674. var dummy19: Int32 {
  1675. get {return _storage._dummy19 ?? 0}
  1676. set {_uniqueStorage()._dummy19 = newValue}
  1677. }
  1678. /// Returns true if `dummy19` has been explicitly set.
  1679. var hasDummy19: Bool {return _storage._dummy19 != nil}
  1680. /// Clears the value of `dummy19`. Subsequent reads from it will return its default value.
  1681. mutating func clearDummy19() {_uniqueStorage()._dummy19 = nil}
  1682. var dummy20: Int32 {
  1683. get {return _storage._dummy20 ?? 0}
  1684. set {_uniqueStorage()._dummy20 = newValue}
  1685. }
  1686. /// Returns true if `dummy20` has been explicitly set.
  1687. var hasDummy20: Bool {return _storage._dummy20 != nil}
  1688. /// Clears the value of `dummy20`. Subsequent reads from it will return its default value.
  1689. mutating func clearDummy20() {_uniqueStorage()._dummy20 = nil}
  1690. var dummy21: Int32 {
  1691. get {return _storage._dummy21 ?? 0}
  1692. set {_uniqueStorage()._dummy21 = newValue}
  1693. }
  1694. /// Returns true if `dummy21` has been explicitly set.
  1695. var hasDummy21: Bool {return _storage._dummy21 != nil}
  1696. /// Clears the value of `dummy21`. Subsequent reads from it will return its default value.
  1697. mutating func clearDummy21() {_uniqueStorage()._dummy21 = nil}
  1698. var dummy22: Int32 {
  1699. get {return _storage._dummy22 ?? 0}
  1700. set {_uniqueStorage()._dummy22 = newValue}
  1701. }
  1702. /// Returns true if `dummy22` has been explicitly set.
  1703. var hasDummy22: Bool {return _storage._dummy22 != nil}
  1704. /// Clears the value of `dummy22`. Subsequent reads from it will return its default value.
  1705. mutating func clearDummy22() {_uniqueStorage()._dummy22 = nil}
  1706. var dummy23: Int32 {
  1707. get {return _storage._dummy23 ?? 0}
  1708. set {_uniqueStorage()._dummy23 = newValue}
  1709. }
  1710. /// Returns true if `dummy23` has been explicitly set.
  1711. var hasDummy23: Bool {return _storage._dummy23 != nil}
  1712. /// Clears the value of `dummy23`. Subsequent reads from it will return its default value.
  1713. mutating func clearDummy23() {_uniqueStorage()._dummy23 = nil}
  1714. var dummy24: Int32 {
  1715. get {return _storage._dummy24 ?? 0}
  1716. set {_uniqueStorage()._dummy24 = newValue}
  1717. }
  1718. /// Returns true if `dummy24` has been explicitly set.
  1719. var hasDummy24: Bool {return _storage._dummy24 != nil}
  1720. /// Clears the value of `dummy24`. Subsequent reads from it will return its default value.
  1721. mutating func clearDummy24() {_uniqueStorage()._dummy24 = nil}
  1722. var dummy25: Int32 {
  1723. get {return _storage._dummy25 ?? 0}
  1724. set {_uniqueStorage()._dummy25 = newValue}
  1725. }
  1726. /// Returns true if `dummy25` has been explicitly set.
  1727. var hasDummy25: Bool {return _storage._dummy25 != nil}
  1728. /// Clears the value of `dummy25`. Subsequent reads from it will return its default value.
  1729. mutating func clearDummy25() {_uniqueStorage()._dummy25 = nil}
  1730. var dummy26: Int32 {
  1731. get {return _storage._dummy26 ?? 0}
  1732. set {_uniqueStorage()._dummy26 = newValue}
  1733. }
  1734. /// Returns true if `dummy26` has been explicitly set.
  1735. var hasDummy26: Bool {return _storage._dummy26 != nil}
  1736. /// Clears the value of `dummy26`. Subsequent reads from it will return its default value.
  1737. mutating func clearDummy26() {_uniqueStorage()._dummy26 = nil}
  1738. var dummy27: Int32 {
  1739. get {return _storage._dummy27 ?? 0}
  1740. set {_uniqueStorage()._dummy27 = newValue}
  1741. }
  1742. /// Returns true if `dummy27` has been explicitly set.
  1743. var hasDummy27: Bool {return _storage._dummy27 != nil}
  1744. /// Clears the value of `dummy27`. Subsequent reads from it will return its default value.
  1745. mutating func clearDummy27() {_uniqueStorage()._dummy27 = nil}
  1746. var dummy28: Int32 {
  1747. get {return _storage._dummy28 ?? 0}
  1748. set {_uniqueStorage()._dummy28 = newValue}
  1749. }
  1750. /// Returns true if `dummy28` has been explicitly set.
  1751. var hasDummy28: Bool {return _storage._dummy28 != nil}
  1752. /// Clears the value of `dummy28`. Subsequent reads from it will return its default value.
  1753. mutating func clearDummy28() {_uniqueStorage()._dummy28 = nil}
  1754. var dummy29: Int32 {
  1755. get {return _storage._dummy29 ?? 0}
  1756. set {_uniqueStorage()._dummy29 = newValue}
  1757. }
  1758. /// Returns true if `dummy29` has been explicitly set.
  1759. var hasDummy29: Bool {return _storage._dummy29 != nil}
  1760. /// Clears the value of `dummy29`. Subsequent reads from it will return its default value.
  1761. mutating func clearDummy29() {_uniqueStorage()._dummy29 = nil}
  1762. var dummy30: Int32 {
  1763. get {return _storage._dummy30 ?? 0}
  1764. set {_uniqueStorage()._dummy30 = newValue}
  1765. }
  1766. /// Returns true if `dummy30` has been explicitly set.
  1767. var hasDummy30: Bool {return _storage._dummy30 != nil}
  1768. /// Clears the value of `dummy30`. Subsequent reads from it will return its default value.
  1769. mutating func clearDummy30() {_uniqueStorage()._dummy30 = nil}
  1770. var dummy31: Int32 {
  1771. get {return _storage._dummy31 ?? 0}
  1772. set {_uniqueStorage()._dummy31 = newValue}
  1773. }
  1774. /// Returns true if `dummy31` has been explicitly set.
  1775. var hasDummy31: Bool {return _storage._dummy31 != nil}
  1776. /// Clears the value of `dummy31`. Subsequent reads from it will return its default value.
  1777. mutating func clearDummy31() {_uniqueStorage()._dummy31 = nil}
  1778. var dummy32: Int32 {
  1779. get {return _storage._dummy32 ?? 0}
  1780. set {_uniqueStorage()._dummy32 = newValue}
  1781. }
  1782. /// Returns true if `dummy32` has been explicitly set.
  1783. var hasDummy32: Bool {return _storage._dummy32 != nil}
  1784. /// Clears the value of `dummy32`. Subsequent reads from it will return its default value.
  1785. mutating func clearDummy32() {_uniqueStorage()._dummy32 = nil}
  1786. var c: Int32 {
  1787. get {return _storage._c ?? 0}
  1788. set {_uniqueStorage()._c = newValue}
  1789. }
  1790. /// Returns true if `c` has been explicitly set.
  1791. var hasC: Bool {return _storage._c != nil}
  1792. /// Clears the value of `c`. Subsequent reads from it will return its default value.
  1793. mutating func clearC() {_uniqueStorage()._c = nil}
  1794. /// Add an optional child message to make this non-trivial for go/pdlazy.
  1795. var optionalForeign: Proto2Unittest_ForeignMessage {
  1796. get {return _storage._optionalForeign ?? Proto2Unittest_ForeignMessage()}
  1797. set {_uniqueStorage()._optionalForeign = newValue}
  1798. }
  1799. /// Returns true if `optionalForeign` has been explicitly set.
  1800. var hasOptionalForeign: Bool {return _storage._optionalForeign != nil}
  1801. /// Clears the value of `optionalForeign`. Subsequent reads from it will return its default value.
  1802. mutating func clearOptionalForeign() {_uniqueStorage()._optionalForeign = nil}
  1803. var unknownFields = SwiftProtobuf.UnknownStorage()
  1804. init() {}
  1805. fileprivate var _storage = _StorageClass.defaultInstance
  1806. }
  1807. struct Proto2Unittest_TestRequiredForeign: Sendable {
  1808. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1809. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1810. // methods supported on all messages.
  1811. var optionalMessage: Proto2Unittest_TestRequired {
  1812. get {return _optionalMessage ?? Proto2Unittest_TestRequired()}
  1813. set {_optionalMessage = newValue}
  1814. }
  1815. /// Returns true if `optionalMessage` has been explicitly set.
  1816. var hasOptionalMessage: Bool {return self._optionalMessage != nil}
  1817. /// Clears the value of `optionalMessage`. Subsequent reads from it will return its default value.
  1818. mutating func clearOptionalMessage() {self._optionalMessage = nil}
  1819. var repeatedMessage: [Proto2Unittest_TestRequired] = []
  1820. var dummy: Int32 {
  1821. get {return _dummy ?? 0}
  1822. set {_dummy = newValue}
  1823. }
  1824. /// Returns true if `dummy` has been explicitly set.
  1825. var hasDummy: Bool {return self._dummy != nil}
  1826. /// Clears the value of `dummy`. Subsequent reads from it will return its default value.
  1827. mutating func clearDummy() {self._dummy = nil}
  1828. /// Missing required fields must not affect verification of child messages.
  1829. var optionalLazyMessage: Proto2Unittest_NestedTestAllTypes {
  1830. get {return _optionalLazyMessage ?? Proto2Unittest_NestedTestAllTypes()}
  1831. set {_optionalLazyMessage = newValue}
  1832. }
  1833. /// Returns true if `optionalLazyMessage` has been explicitly set.
  1834. var hasOptionalLazyMessage: Bool {return self._optionalLazyMessage != nil}
  1835. /// Clears the value of `optionalLazyMessage`. Subsequent reads from it will return its default value.
  1836. mutating func clearOptionalLazyMessage() {self._optionalLazyMessage = nil}
  1837. var unknownFields = SwiftProtobuf.UnknownStorage()
  1838. init() {}
  1839. fileprivate var _optionalMessage: Proto2Unittest_TestRequired? = nil
  1840. fileprivate var _dummy: Int32? = nil
  1841. fileprivate var _optionalLazyMessage: Proto2Unittest_NestedTestAllTypes? = nil
  1842. }
  1843. struct Proto2Unittest_TestRequiredMessage: Sendable {
  1844. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1845. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1846. // methods supported on all messages.
  1847. var optionalMessage: Proto2Unittest_TestRequired {
  1848. get {return _optionalMessage ?? Proto2Unittest_TestRequired()}
  1849. set {_optionalMessage = newValue}
  1850. }
  1851. /// Returns true if `optionalMessage` has been explicitly set.
  1852. var hasOptionalMessage: Bool {return self._optionalMessage != nil}
  1853. /// Clears the value of `optionalMessage`. Subsequent reads from it will return its default value.
  1854. mutating func clearOptionalMessage() {self._optionalMessage = nil}
  1855. var repeatedMessage: [Proto2Unittest_TestRequired] = []
  1856. var requiredMessage: Proto2Unittest_TestRequired {
  1857. get {return _requiredMessage ?? Proto2Unittest_TestRequired()}
  1858. set {_requiredMessage = newValue}
  1859. }
  1860. /// Returns true if `requiredMessage` has been explicitly set.
  1861. var hasRequiredMessage: Bool {return self._requiredMessage != nil}
  1862. /// Clears the value of `requiredMessage`. Subsequent reads from it will return its default value.
  1863. mutating func clearRequiredMessage() {self._requiredMessage = nil}
  1864. var unknownFields = SwiftProtobuf.UnknownStorage()
  1865. init() {}
  1866. fileprivate var _optionalMessage: Proto2Unittest_TestRequired? = nil
  1867. fileprivate var _requiredMessage: Proto2Unittest_TestRequired? = nil
  1868. }
  1869. struct Proto2Unittest_TestNestedRequiredForeign: @unchecked Sendable {
  1870. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1871. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1872. // methods supported on all messages.
  1873. var child: Proto2Unittest_TestNestedRequiredForeign {
  1874. get {return _storage._child ?? Proto2Unittest_TestNestedRequiredForeign()}
  1875. set {_uniqueStorage()._child = newValue}
  1876. }
  1877. /// Returns true if `child` has been explicitly set.
  1878. var hasChild: Bool {return _storage._child != nil}
  1879. /// Clears the value of `child`. Subsequent reads from it will return its default value.
  1880. mutating func clearChild() {_uniqueStorage()._child = nil}
  1881. var payload: Proto2Unittest_TestRequiredForeign {
  1882. get {return _storage._payload ?? Proto2Unittest_TestRequiredForeign()}
  1883. set {_uniqueStorage()._payload = newValue}
  1884. }
  1885. /// Returns true if `payload` has been explicitly set.
  1886. var hasPayload: Bool {return _storage._payload != nil}
  1887. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  1888. mutating func clearPayload() {_uniqueStorage()._payload = nil}
  1889. var dummy: Int32 {
  1890. get {return _storage._dummy ?? 0}
  1891. set {_uniqueStorage()._dummy = newValue}
  1892. }
  1893. /// Returns true if `dummy` has been explicitly set.
  1894. var hasDummy: Bool {return _storage._dummy != nil}
  1895. /// Clears the value of `dummy`. Subsequent reads from it will return its default value.
  1896. mutating func clearDummy() {_uniqueStorage()._dummy = nil}
  1897. /// optional message to test required closed enum.
  1898. var requiredEnum: Proto2Unittest_TestRequiredEnum {
  1899. get {return _storage._requiredEnum ?? Proto2Unittest_TestRequiredEnum()}
  1900. set {_uniqueStorage()._requiredEnum = newValue}
  1901. }
  1902. /// Returns true if `requiredEnum` has been explicitly set.
  1903. var hasRequiredEnum: Bool {return _storage._requiredEnum != nil}
  1904. /// Clears the value of `requiredEnum`. Subsequent reads from it will return its default value.
  1905. mutating func clearRequiredEnum() {_uniqueStorage()._requiredEnum = nil}
  1906. var requiredEnumNoMask: Proto2Unittest_TestRequiredEnumNoMask {
  1907. get {return _storage._requiredEnumNoMask ?? Proto2Unittest_TestRequiredEnumNoMask()}
  1908. set {_uniqueStorage()._requiredEnumNoMask = newValue}
  1909. }
  1910. /// Returns true if `requiredEnumNoMask` has been explicitly set.
  1911. var hasRequiredEnumNoMask: Bool {return _storage._requiredEnumNoMask != nil}
  1912. /// Clears the value of `requiredEnumNoMask`. Subsequent reads from it will return its default value.
  1913. mutating func clearRequiredEnumNoMask() {_uniqueStorage()._requiredEnumNoMask = nil}
  1914. var requiredEnumMulti: Proto2Unittest_TestRequiredEnumMulti {
  1915. get {return _storage._requiredEnumMulti ?? Proto2Unittest_TestRequiredEnumMulti()}
  1916. set {_uniqueStorage()._requiredEnumMulti = newValue}
  1917. }
  1918. /// Returns true if `requiredEnumMulti` has been explicitly set.
  1919. var hasRequiredEnumMulti: Bool {return _storage._requiredEnumMulti != nil}
  1920. /// Clears the value of `requiredEnumMulti`. Subsequent reads from it will return its default value.
  1921. mutating func clearRequiredEnumMulti() {_uniqueStorage()._requiredEnumMulti = nil}
  1922. var requiredNoMask: Proto2Unittest_TestRequiredNoMaskMulti {
  1923. get {return _storage._requiredNoMask ?? Proto2Unittest_TestRequiredNoMaskMulti()}
  1924. set {_uniqueStorage()._requiredNoMask = newValue}
  1925. }
  1926. /// Returns true if `requiredNoMask` has been explicitly set.
  1927. var hasRequiredNoMask: Bool {return _storage._requiredNoMask != nil}
  1928. /// Clears the value of `requiredNoMask`. Subsequent reads from it will return its default value.
  1929. mutating func clearRequiredNoMask() {_uniqueStorage()._requiredNoMask = nil}
  1930. var unknownFields = SwiftProtobuf.UnknownStorage()
  1931. init() {}
  1932. fileprivate var _storage = _StorageClass.defaultInstance
  1933. }
  1934. /// Test that we can use NestedMessage from outside TestAllTypes.
  1935. struct Proto2Unittest_TestForeignNested: Sendable {
  1936. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1937. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1938. // methods supported on all messages.
  1939. var foreignNested: Proto2Unittest_TestAllTypes.NestedMessage {
  1940. get {return _foreignNested ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  1941. set {_foreignNested = newValue}
  1942. }
  1943. /// Returns true if `foreignNested` has been explicitly set.
  1944. var hasForeignNested: Bool {return self._foreignNested != nil}
  1945. /// Clears the value of `foreignNested`. Subsequent reads from it will return its default value.
  1946. mutating func clearForeignNested() {self._foreignNested = nil}
  1947. var unknownFields = SwiftProtobuf.UnknownStorage()
  1948. init() {}
  1949. fileprivate var _foreignNested: Proto2Unittest_TestAllTypes.NestedMessage? = nil
  1950. }
  1951. /// TestEmptyMessage is used to test unknown field support.
  1952. struct Proto2Unittest_TestEmptyMessage: Sendable {
  1953. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1954. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1955. // methods supported on all messages.
  1956. var unknownFields = SwiftProtobuf.UnknownStorage()
  1957. init() {}
  1958. }
  1959. /// Like above, but declare all field numbers as potential extensions. No
  1960. /// actual extensions should ever be defined for this type.
  1961. struct Proto2Unittest_TestEmptyMessageWithExtensions: SwiftProtobuf.ExtensibleMessage, Sendable {
  1962. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1963. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1964. // methods supported on all messages.
  1965. var unknownFields = SwiftProtobuf.UnknownStorage()
  1966. init() {}
  1967. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  1968. }
  1969. /// Needed for a Python test.
  1970. struct Proto2Unittest_TestPickleNestedMessage: Sendable {
  1971. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1972. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1973. // methods supported on all messages.
  1974. var unknownFields = SwiftProtobuf.UnknownStorage()
  1975. struct NestedMessage: Sendable {
  1976. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1977. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1978. // methods supported on all messages.
  1979. var bb: Int32 {
  1980. get {return _bb ?? 0}
  1981. set {_bb = newValue}
  1982. }
  1983. /// Returns true if `bb` has been explicitly set.
  1984. var hasBb: Bool {return self._bb != nil}
  1985. /// Clears the value of `bb`. Subsequent reads from it will return its default value.
  1986. mutating func clearBb() {self._bb = nil}
  1987. var unknownFields = SwiftProtobuf.UnknownStorage()
  1988. struct NestedNestedMessage: Sendable {
  1989. // SwiftProtobuf.Message conformance is added in an extension below. See the
  1990. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  1991. // methods supported on all messages.
  1992. var cc: Int32 {
  1993. get {return _cc ?? 0}
  1994. set {_cc = newValue}
  1995. }
  1996. /// Returns true if `cc` has been explicitly set.
  1997. var hasCc: Bool {return self._cc != nil}
  1998. /// Clears the value of `cc`. Subsequent reads from it will return its default value.
  1999. mutating func clearCc() {self._cc = nil}
  2000. var unknownFields = SwiftProtobuf.UnknownStorage()
  2001. init() {}
  2002. fileprivate var _cc: Int32? = nil
  2003. }
  2004. init() {}
  2005. fileprivate var _bb: Int32? = nil
  2006. }
  2007. init() {}
  2008. }
  2009. struct Proto2Unittest_TestMultipleExtensionRanges: SwiftProtobuf.ExtensibleMessage, Sendable {
  2010. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2011. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2012. // methods supported on all messages.
  2013. var unknownFields = SwiftProtobuf.UnknownStorage()
  2014. init() {}
  2015. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  2016. }
  2017. /// Test that really large tag numbers don't break anything.
  2018. struct Proto2Unittest_TestReallyLargeTagNumber: Sendable {
  2019. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2020. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2021. // methods supported on all messages.
  2022. /// The largest possible tag number is 2^28 - 1, since the wire format uses
  2023. /// three bits to communicate wire type.
  2024. var a: Int32 {
  2025. get {return _a ?? 0}
  2026. set {_a = newValue}
  2027. }
  2028. /// Returns true if `a` has been explicitly set.
  2029. var hasA: Bool {return self._a != nil}
  2030. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  2031. mutating func clearA() {self._a = nil}
  2032. var bb: Int32 {
  2033. get {return _bb ?? 0}
  2034. set {_bb = newValue}
  2035. }
  2036. /// Returns true if `bb` has been explicitly set.
  2037. var hasBb: Bool {return self._bb != nil}
  2038. /// Clears the value of `bb`. Subsequent reads from it will return its default value.
  2039. mutating func clearBb() {self._bb = nil}
  2040. var unknownFields = SwiftProtobuf.UnknownStorage()
  2041. init() {}
  2042. fileprivate var _a: Int32? = nil
  2043. fileprivate var _bb: Int32? = nil
  2044. }
  2045. struct Proto2Unittest_TestRecursiveMessage: @unchecked Sendable {
  2046. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2047. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2048. // methods supported on all messages.
  2049. var a: Proto2Unittest_TestRecursiveMessage {
  2050. get {return _storage._a ?? Proto2Unittest_TestRecursiveMessage()}
  2051. set {_uniqueStorage()._a = newValue}
  2052. }
  2053. /// Returns true if `a` has been explicitly set.
  2054. var hasA: Bool {return _storage._a != nil}
  2055. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  2056. mutating func clearA() {_uniqueStorage()._a = nil}
  2057. var i: Int32 {
  2058. get {return _storage._i ?? 0}
  2059. set {_uniqueStorage()._i = newValue}
  2060. }
  2061. /// Returns true if `i` has been explicitly set.
  2062. var hasI: Bool {return _storage._i != nil}
  2063. /// Clears the value of `i`. Subsequent reads from it will return its default value.
  2064. mutating func clearI() {_uniqueStorage()._i = nil}
  2065. var unknownFields = SwiftProtobuf.UnknownStorage()
  2066. init() {}
  2067. fileprivate var _storage = _StorageClass.defaultInstance
  2068. }
  2069. /// Test that mutual recursion works.
  2070. struct Proto2Unittest_TestMutualRecursionA: @unchecked Sendable {
  2071. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2072. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2073. // methods supported on all messages.
  2074. var bb: Proto2Unittest_TestMutualRecursionB {
  2075. get {return _storage._bb ?? Proto2Unittest_TestMutualRecursionB()}
  2076. set {_uniqueStorage()._bb = newValue}
  2077. }
  2078. /// Returns true if `bb` has been explicitly set.
  2079. var hasBb: Bool {return _storage._bb != nil}
  2080. /// Clears the value of `bb`. Subsequent reads from it will return its default value.
  2081. mutating func clearBb() {_uniqueStorage()._bb = nil}
  2082. var subGroup: Proto2Unittest_TestMutualRecursionA.SubGroup {
  2083. get {return _storage._subGroup ?? Proto2Unittest_TestMutualRecursionA.SubGroup()}
  2084. set {_uniqueStorage()._subGroup = newValue}
  2085. }
  2086. /// Returns true if `subGroup` has been explicitly set.
  2087. var hasSubGroup: Bool {return _storage._subGroup != nil}
  2088. /// Clears the value of `subGroup`. Subsequent reads from it will return its default value.
  2089. mutating func clearSubGroup() {_uniqueStorage()._subGroup = nil}
  2090. var subGroupR: [Proto2Unittest_TestMutualRecursionA.SubGroupR] {
  2091. get {return _storage._subGroupR}
  2092. set {_uniqueStorage()._subGroupR = newValue}
  2093. }
  2094. var unknownFields = SwiftProtobuf.UnknownStorage()
  2095. struct SubMessage: @unchecked Sendable {
  2096. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2097. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2098. // methods supported on all messages.
  2099. var b: Proto2Unittest_TestMutualRecursionB {
  2100. get {return _storage._b ?? Proto2Unittest_TestMutualRecursionB()}
  2101. set {_uniqueStorage()._b = newValue}
  2102. }
  2103. /// Returns true if `b` has been explicitly set.
  2104. var hasB: Bool {return _storage._b != nil}
  2105. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  2106. mutating func clearB() {_uniqueStorage()._b = nil}
  2107. var unknownFields = SwiftProtobuf.UnknownStorage()
  2108. init() {}
  2109. fileprivate var _storage = _StorageClass.defaultInstance
  2110. }
  2111. struct SubGroup: @unchecked Sendable {
  2112. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2113. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2114. // methods supported on all messages.
  2115. /// Needed because of bug in javatest
  2116. var subMessage: Proto2Unittest_TestMutualRecursionA.SubMessage {
  2117. get {return _storage._subMessage ?? Proto2Unittest_TestMutualRecursionA.SubMessage()}
  2118. set {_uniqueStorage()._subMessage = newValue}
  2119. }
  2120. /// Returns true if `subMessage` has been explicitly set.
  2121. var hasSubMessage: Bool {return _storage._subMessage != nil}
  2122. /// Clears the value of `subMessage`. Subsequent reads from it will return its default value.
  2123. mutating func clearSubMessage() {_uniqueStorage()._subMessage = nil}
  2124. var notInThisScc: Proto2Unittest_TestAllTypes {
  2125. get {return _storage._notInThisScc ?? Proto2Unittest_TestAllTypes()}
  2126. set {_uniqueStorage()._notInThisScc = newValue}
  2127. }
  2128. /// Returns true if `notInThisScc` has been explicitly set.
  2129. var hasNotInThisScc: Bool {return _storage._notInThisScc != nil}
  2130. /// Clears the value of `notInThisScc`. Subsequent reads from it will return its default value.
  2131. mutating func clearNotInThisScc() {_uniqueStorage()._notInThisScc = nil}
  2132. var unknownFields = SwiftProtobuf.UnknownStorage()
  2133. init() {}
  2134. fileprivate var _storage = _StorageClass.defaultInstance
  2135. }
  2136. struct SubGroupR: Sendable {
  2137. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2138. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2139. // methods supported on all messages.
  2140. var payload: Proto2Unittest_TestAllTypes {
  2141. get {return _payload ?? Proto2Unittest_TestAllTypes()}
  2142. set {_payload = newValue}
  2143. }
  2144. /// Returns true if `payload` has been explicitly set.
  2145. var hasPayload: Bool {return self._payload != nil}
  2146. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  2147. mutating func clearPayload() {self._payload = nil}
  2148. var unknownFields = SwiftProtobuf.UnknownStorage()
  2149. init() {}
  2150. fileprivate var _payload: Proto2Unittest_TestAllTypes? = nil
  2151. }
  2152. init() {}
  2153. fileprivate var _storage = _StorageClass.defaultInstance
  2154. }
  2155. struct Proto2Unittest_TestMutualRecursionB: @unchecked Sendable {
  2156. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2157. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2158. // methods supported on all messages.
  2159. var a: Proto2Unittest_TestMutualRecursionA {
  2160. get {return _storage._a ?? Proto2Unittest_TestMutualRecursionA()}
  2161. set {_uniqueStorage()._a = newValue}
  2162. }
  2163. /// Returns true if `a` has been explicitly set.
  2164. var hasA: Bool {return _storage._a != nil}
  2165. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  2166. mutating func clearA() {_uniqueStorage()._a = nil}
  2167. var optionalInt32: Int32 {
  2168. get {return _storage._optionalInt32 ?? 0}
  2169. set {_uniqueStorage()._optionalInt32 = newValue}
  2170. }
  2171. /// Returns true if `optionalInt32` has been explicitly set.
  2172. var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil}
  2173. /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  2174. mutating func clearOptionalInt32() {_uniqueStorage()._optionalInt32 = nil}
  2175. var unknownFields = SwiftProtobuf.UnknownStorage()
  2176. init() {}
  2177. fileprivate var _storage = _StorageClass.defaultInstance
  2178. }
  2179. struct Proto2Unittest_TestIsInitialized: Sendable {
  2180. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2181. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2182. // methods supported on all messages.
  2183. var subMessage: Proto2Unittest_TestIsInitialized.SubMessage {
  2184. get {return _subMessage ?? Proto2Unittest_TestIsInitialized.SubMessage()}
  2185. set {_subMessage = newValue}
  2186. }
  2187. /// Returns true if `subMessage` has been explicitly set.
  2188. var hasSubMessage: Bool {return self._subMessage != nil}
  2189. /// Clears the value of `subMessage`. Subsequent reads from it will return its default value.
  2190. mutating func clearSubMessage() {self._subMessage = nil}
  2191. var unknownFields = SwiftProtobuf.UnknownStorage()
  2192. struct SubMessage: Sendable {
  2193. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2194. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2195. // methods supported on all messages.
  2196. var subGroup: Proto2Unittest_TestIsInitialized.SubMessage.SubGroup {
  2197. get {return _subGroup ?? Proto2Unittest_TestIsInitialized.SubMessage.SubGroup()}
  2198. set {_subGroup = newValue}
  2199. }
  2200. /// Returns true if `subGroup` has been explicitly set.
  2201. var hasSubGroup: Bool {return self._subGroup != nil}
  2202. /// Clears the value of `subGroup`. Subsequent reads from it will return its default value.
  2203. mutating func clearSubGroup() {self._subGroup = nil}
  2204. var unknownFields = SwiftProtobuf.UnknownStorage()
  2205. struct SubGroup: Sendable {
  2206. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2207. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2208. // methods supported on all messages.
  2209. var i: Int32 {
  2210. get {return _i ?? 0}
  2211. set {_i = newValue}
  2212. }
  2213. /// Returns true if `i` has been explicitly set.
  2214. var hasI: Bool {return self._i != nil}
  2215. /// Clears the value of `i`. Subsequent reads from it will return its default value.
  2216. mutating func clearI() {self._i = nil}
  2217. var unknownFields = SwiftProtobuf.UnknownStorage()
  2218. init() {}
  2219. fileprivate var _i: Int32? = nil
  2220. }
  2221. init() {}
  2222. fileprivate var _subGroup: Proto2Unittest_TestIsInitialized.SubMessage.SubGroup? = nil
  2223. }
  2224. init() {}
  2225. fileprivate var _subMessage: Proto2Unittest_TestIsInitialized.SubMessage? = nil
  2226. }
  2227. /// Test that groups have disjoint field numbers from their siblings and
  2228. /// parents. This is NOT possible in proto1; only google.protobuf. When attempting
  2229. /// to compile with proto1, this will emit an error; so we only include it
  2230. /// in proto2_unittest_proto.
  2231. struct Proto2Unittest_TestDupFieldNumber: Sendable {
  2232. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2233. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2234. // methods supported on all messages.
  2235. /// NO_PROTO1
  2236. var a: Int32 {
  2237. get {return _a ?? 0}
  2238. set {_a = newValue}
  2239. }
  2240. /// Returns true if `a` has been explicitly set.
  2241. var hasA: Bool {return self._a != nil}
  2242. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  2243. mutating func clearA() {self._a = nil}
  2244. /// NO_PROTO1
  2245. var foo: Proto2Unittest_TestDupFieldNumber.Foo {
  2246. get {return _foo ?? Proto2Unittest_TestDupFieldNumber.Foo()}
  2247. set {_foo = newValue}
  2248. }
  2249. /// Returns true if `foo` has been explicitly set.
  2250. var hasFoo: Bool {return self._foo != nil}
  2251. /// Clears the value of `foo`. Subsequent reads from it will return its default value.
  2252. mutating func clearFoo() {self._foo = nil}
  2253. /// NO_PROTO1
  2254. var bar: Proto2Unittest_TestDupFieldNumber.Bar {
  2255. get {return _bar ?? Proto2Unittest_TestDupFieldNumber.Bar()}
  2256. set {_bar = newValue}
  2257. }
  2258. /// Returns true if `bar` has been explicitly set.
  2259. var hasBar: Bool {return self._bar != nil}
  2260. /// Clears the value of `bar`. Subsequent reads from it will return its default value.
  2261. mutating func clearBar() {self._bar = nil}
  2262. var unknownFields = SwiftProtobuf.UnknownStorage()
  2263. /// NO_PROTO1
  2264. struct Foo: Sendable {
  2265. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2266. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2267. // methods supported on all messages.
  2268. /// NO_PROTO1
  2269. var a: Int32 {
  2270. get {return _a ?? 0}
  2271. set {_a = newValue}
  2272. }
  2273. /// Returns true if `a` has been explicitly set.
  2274. var hasA: Bool {return self._a != nil}
  2275. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  2276. mutating func clearA() {self._a = nil}
  2277. var unknownFields = SwiftProtobuf.UnknownStorage()
  2278. init() {}
  2279. fileprivate var _a: Int32? = nil
  2280. }
  2281. /// NO_PROTO1
  2282. struct Bar: Sendable {
  2283. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2284. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2285. // methods supported on all messages.
  2286. /// NO_PROTO1
  2287. var a: Int32 {
  2288. get {return _a ?? 0}
  2289. set {_a = newValue}
  2290. }
  2291. /// Returns true if `a` has been explicitly set.
  2292. var hasA: Bool {return self._a != nil}
  2293. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  2294. mutating func clearA() {self._a = nil}
  2295. var unknownFields = SwiftProtobuf.UnknownStorage()
  2296. init() {}
  2297. fileprivate var _a: Int32? = nil
  2298. }
  2299. init() {}
  2300. fileprivate var _a: Int32? = nil
  2301. fileprivate var _foo: Proto2Unittest_TestDupFieldNumber.Foo? = nil
  2302. fileprivate var _bar: Proto2Unittest_TestDupFieldNumber.Bar? = nil
  2303. }
  2304. /// Additional messages for testing lazy fields.
  2305. struct Proto2Unittest_TestEagerMessage: Sendable {
  2306. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2307. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2308. // methods supported on all messages.
  2309. var subMessage: Proto2Unittest_TestAllTypes {
  2310. get {return _subMessage ?? Proto2Unittest_TestAllTypes()}
  2311. set {_subMessage = newValue}
  2312. }
  2313. /// Returns true if `subMessage` has been explicitly set.
  2314. var hasSubMessage: Bool {return self._subMessage != nil}
  2315. /// Clears the value of `subMessage`. Subsequent reads from it will return its default value.
  2316. mutating func clearSubMessage() {self._subMessage = nil}
  2317. var unknownFields = SwiftProtobuf.UnknownStorage()
  2318. init() {}
  2319. fileprivate var _subMessage: Proto2Unittest_TestAllTypes? = nil
  2320. }
  2321. struct Proto2Unittest_TestLazyMessage: Sendable {
  2322. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2323. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2324. // methods supported on all messages.
  2325. var subMessage: Proto2Unittest_TestAllTypes {
  2326. get {return _subMessage ?? Proto2Unittest_TestAllTypes()}
  2327. set {_subMessage = newValue}
  2328. }
  2329. /// Returns true if `subMessage` has been explicitly set.
  2330. var hasSubMessage: Bool {return self._subMessage != nil}
  2331. /// Clears the value of `subMessage`. Subsequent reads from it will return its default value.
  2332. mutating func clearSubMessage() {self._subMessage = nil}
  2333. var unknownFields = SwiftProtobuf.UnknownStorage()
  2334. init() {}
  2335. fileprivate var _subMessage: Proto2Unittest_TestAllTypes? = nil
  2336. }
  2337. struct Proto2Unittest_TestLazyMessageRepeated: Sendable {
  2338. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2339. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2340. // methods supported on all messages.
  2341. var repeatedMessage: [Proto2Unittest_TestLazyMessage] = []
  2342. var unknownFields = SwiftProtobuf.UnknownStorage()
  2343. init() {}
  2344. }
  2345. struct Proto2Unittest_TestEagerMaybeLazy: Sendable {
  2346. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2347. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2348. // methods supported on all messages.
  2349. var messageFoo: Proto2Unittest_TestAllTypes {
  2350. get {return _messageFoo ?? Proto2Unittest_TestAllTypes()}
  2351. set {_messageFoo = newValue}
  2352. }
  2353. /// Returns true if `messageFoo` has been explicitly set.
  2354. var hasMessageFoo: Bool {return self._messageFoo != nil}
  2355. /// Clears the value of `messageFoo`. Subsequent reads from it will return its default value.
  2356. mutating func clearMessageFoo() {self._messageFoo = nil}
  2357. var messageBar: Proto2Unittest_TestAllTypes {
  2358. get {return _messageBar ?? Proto2Unittest_TestAllTypes()}
  2359. set {_messageBar = newValue}
  2360. }
  2361. /// Returns true if `messageBar` has been explicitly set.
  2362. var hasMessageBar: Bool {return self._messageBar != nil}
  2363. /// Clears the value of `messageBar`. Subsequent reads from it will return its default value.
  2364. mutating func clearMessageBar() {self._messageBar = nil}
  2365. var messageBaz: Proto2Unittest_TestEagerMaybeLazy.NestedMessage {
  2366. get {return _messageBaz ?? Proto2Unittest_TestEagerMaybeLazy.NestedMessage()}
  2367. set {_messageBaz = newValue}
  2368. }
  2369. /// Returns true if `messageBaz` has been explicitly set.
  2370. var hasMessageBaz: Bool {return self._messageBaz != nil}
  2371. /// Clears the value of `messageBaz`. Subsequent reads from it will return its default value.
  2372. mutating func clearMessageBaz() {self._messageBaz = nil}
  2373. var unknownFields = SwiftProtobuf.UnknownStorage()
  2374. struct NestedMessage: Sendable {
  2375. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2376. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2377. // methods supported on all messages.
  2378. var packed: Proto2Unittest_TestPackedTypes {
  2379. get {return _packed ?? Proto2Unittest_TestPackedTypes()}
  2380. set {_packed = newValue}
  2381. }
  2382. /// Returns true if `packed` has been explicitly set.
  2383. var hasPacked: Bool {return self._packed != nil}
  2384. /// Clears the value of `packed`. Subsequent reads from it will return its default value.
  2385. mutating func clearPacked() {self._packed = nil}
  2386. var unknownFields = SwiftProtobuf.UnknownStorage()
  2387. init() {}
  2388. fileprivate var _packed: Proto2Unittest_TestPackedTypes? = nil
  2389. }
  2390. init() {}
  2391. fileprivate var _messageFoo: Proto2Unittest_TestAllTypes? = nil
  2392. fileprivate var _messageBar: Proto2Unittest_TestAllTypes? = nil
  2393. fileprivate var _messageBaz: Proto2Unittest_TestEagerMaybeLazy.NestedMessage? = nil
  2394. }
  2395. /// Needed for a Python test.
  2396. struct Proto2Unittest_TestNestedMessageHasBits: Sendable {
  2397. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2398. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2399. // methods supported on all messages.
  2400. var optionalNestedMessage: Proto2Unittest_TestNestedMessageHasBits.NestedMessage {
  2401. get {return _optionalNestedMessage ?? Proto2Unittest_TestNestedMessageHasBits.NestedMessage()}
  2402. set {_optionalNestedMessage = newValue}
  2403. }
  2404. /// Returns true if `optionalNestedMessage` has been explicitly set.
  2405. var hasOptionalNestedMessage: Bool {return self._optionalNestedMessage != nil}
  2406. /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value.
  2407. mutating func clearOptionalNestedMessage() {self._optionalNestedMessage = nil}
  2408. var unknownFields = SwiftProtobuf.UnknownStorage()
  2409. struct NestedMessage: Sendable {
  2410. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2411. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2412. // methods supported on all messages.
  2413. var nestedmessageRepeatedInt32: [Int32] = []
  2414. var nestedmessageRepeatedForeignmessage: [Proto2Unittest_ForeignMessage] = []
  2415. var unknownFields = SwiftProtobuf.UnknownStorage()
  2416. init() {}
  2417. }
  2418. init() {}
  2419. fileprivate var _optionalNestedMessage: Proto2Unittest_TestNestedMessageHasBits.NestedMessage? = nil
  2420. }
  2421. /// Test message with CamelCase field names. This violates Protocol Buffer
  2422. /// standard style.
  2423. struct Proto2Unittest_TestCamelCaseFieldNames: Sendable {
  2424. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2425. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2426. // methods supported on all messages.
  2427. var primitiveField: Int32 {
  2428. get {return _primitiveField ?? 0}
  2429. set {_primitiveField = newValue}
  2430. }
  2431. /// Returns true if `primitiveField` has been explicitly set.
  2432. var hasPrimitiveField: Bool {return self._primitiveField != nil}
  2433. /// Clears the value of `primitiveField`. Subsequent reads from it will return its default value.
  2434. mutating func clearPrimitiveField() {self._primitiveField = nil}
  2435. var stringField: String {
  2436. get {return _stringField ?? String()}
  2437. set {_stringField = newValue}
  2438. }
  2439. /// Returns true if `stringField` has been explicitly set.
  2440. var hasStringField: Bool {return self._stringField != nil}
  2441. /// Clears the value of `stringField`. Subsequent reads from it will return its default value.
  2442. mutating func clearStringField() {self._stringField = nil}
  2443. var enumField: Proto2Unittest_ForeignEnum {
  2444. get {return _enumField ?? .foreignFoo}
  2445. set {_enumField = newValue}
  2446. }
  2447. /// Returns true if `enumField` has been explicitly set.
  2448. var hasEnumField: Bool {return self._enumField != nil}
  2449. /// Clears the value of `enumField`. Subsequent reads from it will return its default value.
  2450. mutating func clearEnumField() {self._enumField = nil}
  2451. var messageField: Proto2Unittest_ForeignMessage {
  2452. get {return _messageField ?? Proto2Unittest_ForeignMessage()}
  2453. set {_messageField = newValue}
  2454. }
  2455. /// Returns true if `messageField` has been explicitly set.
  2456. var hasMessageField: Bool {return self._messageField != nil}
  2457. /// Clears the value of `messageField`. Subsequent reads from it will return its default value.
  2458. mutating func clearMessageField() {self._messageField = nil}
  2459. var stringPieceField: String {
  2460. get {return _stringPieceField ?? String()}
  2461. set {_stringPieceField = newValue}
  2462. }
  2463. /// Returns true if `stringPieceField` has been explicitly set.
  2464. var hasStringPieceField: Bool {return self._stringPieceField != nil}
  2465. /// Clears the value of `stringPieceField`. Subsequent reads from it will return its default value.
  2466. mutating func clearStringPieceField() {self._stringPieceField = nil}
  2467. var cordField: String {
  2468. get {return _cordField ?? String()}
  2469. set {_cordField = newValue}
  2470. }
  2471. /// Returns true if `cordField` has been explicitly set.
  2472. var hasCordField: Bool {return self._cordField != nil}
  2473. /// Clears the value of `cordField`. Subsequent reads from it will return its default value.
  2474. mutating func clearCordField() {self._cordField = nil}
  2475. var repeatedPrimitiveField: [Int32] = []
  2476. var repeatedStringField: [String] = []
  2477. var repeatedEnumField: [Proto2Unittest_ForeignEnum] = []
  2478. var repeatedMessageField: [Proto2Unittest_ForeignMessage] = []
  2479. var repeatedStringPieceField: [String] = []
  2480. var repeatedCordField: [String] = []
  2481. var unknownFields = SwiftProtobuf.UnknownStorage()
  2482. init() {}
  2483. fileprivate var _primitiveField: Int32? = nil
  2484. fileprivate var _stringField: String? = nil
  2485. fileprivate var _enumField: Proto2Unittest_ForeignEnum? = nil
  2486. fileprivate var _messageField: Proto2Unittest_ForeignMessage? = nil
  2487. fileprivate var _stringPieceField: String? = nil
  2488. fileprivate var _cordField: String? = nil
  2489. }
  2490. /// We list fields out of order, to ensure that we're using field number and not
  2491. /// field index to determine serialization order.
  2492. struct Proto2Unittest_TestFieldOrderings: SwiftProtobuf.ExtensibleMessage, Sendable {
  2493. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2494. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2495. // methods supported on all messages.
  2496. var myString: String {
  2497. get {return _myString ?? String()}
  2498. set {_myString = newValue}
  2499. }
  2500. /// Returns true if `myString` has been explicitly set.
  2501. var hasMyString: Bool {return self._myString != nil}
  2502. /// Clears the value of `myString`. Subsequent reads from it will return its default value.
  2503. mutating func clearMyString() {self._myString = nil}
  2504. var myInt: Int64 {
  2505. get {return _myInt ?? 0}
  2506. set {_myInt = newValue}
  2507. }
  2508. /// Returns true if `myInt` has been explicitly set.
  2509. var hasMyInt: Bool {return self._myInt != nil}
  2510. /// Clears the value of `myInt`. Subsequent reads from it will return its default value.
  2511. mutating func clearMyInt() {self._myInt = nil}
  2512. var myFloat: Float {
  2513. get {return _myFloat ?? 0}
  2514. set {_myFloat = newValue}
  2515. }
  2516. /// Returns true if `myFloat` has been explicitly set.
  2517. var hasMyFloat: Bool {return self._myFloat != nil}
  2518. /// Clears the value of `myFloat`. Subsequent reads from it will return its default value.
  2519. mutating func clearMyFloat() {self._myFloat = nil}
  2520. var optionalNestedMessage: Proto2Unittest_TestFieldOrderings.NestedMessage {
  2521. get {return _optionalNestedMessage ?? Proto2Unittest_TestFieldOrderings.NestedMessage()}
  2522. set {_optionalNestedMessage = newValue}
  2523. }
  2524. /// Returns true if `optionalNestedMessage` has been explicitly set.
  2525. var hasOptionalNestedMessage: Bool {return self._optionalNestedMessage != nil}
  2526. /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value.
  2527. mutating func clearOptionalNestedMessage() {self._optionalNestedMessage = nil}
  2528. var unknownFields = SwiftProtobuf.UnknownStorage()
  2529. struct NestedMessage: Sendable {
  2530. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2531. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2532. // methods supported on all messages.
  2533. var oo: Int64 {
  2534. get {return _oo ?? 0}
  2535. set {_oo = newValue}
  2536. }
  2537. /// Returns true if `oo` has been explicitly set.
  2538. var hasOo: Bool {return self._oo != nil}
  2539. /// Clears the value of `oo`. Subsequent reads from it will return its default value.
  2540. mutating func clearOo() {self._oo = nil}
  2541. /// The field name "b" fails to compile in proto1 because it conflicts with
  2542. /// a local variable named "b" in one of the generated methods. Doh.
  2543. /// This file needs to compile in proto1 to test backwards-compatibility.
  2544. var bb: Int32 {
  2545. get {return _bb ?? 0}
  2546. set {_bb = newValue}
  2547. }
  2548. /// Returns true if `bb` has been explicitly set.
  2549. var hasBb: Bool {return self._bb != nil}
  2550. /// Clears the value of `bb`. Subsequent reads from it will return its default value.
  2551. mutating func clearBb() {self._bb = nil}
  2552. var unknownFields = SwiftProtobuf.UnknownStorage()
  2553. init() {}
  2554. fileprivate var _oo: Int64? = nil
  2555. fileprivate var _bb: Int32? = nil
  2556. }
  2557. init() {}
  2558. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  2559. fileprivate var _myString: String? = nil
  2560. fileprivate var _myInt: Int64? = nil
  2561. fileprivate var _myFloat: Float? = nil
  2562. fileprivate var _optionalNestedMessage: Proto2Unittest_TestFieldOrderings.NestedMessage? = nil
  2563. }
  2564. struct Proto2Unittest_TestExtensionOrderings1: Sendable {
  2565. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2566. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2567. // methods supported on all messages.
  2568. var myString: String {
  2569. get {return _myString ?? String()}
  2570. set {_myString = newValue}
  2571. }
  2572. /// Returns true if `myString` has been explicitly set.
  2573. var hasMyString: Bool {return self._myString != nil}
  2574. /// Clears the value of `myString`. Subsequent reads from it will return its default value.
  2575. mutating func clearMyString() {self._myString = nil}
  2576. var unknownFields = SwiftProtobuf.UnknownStorage()
  2577. init() {}
  2578. fileprivate var _myString: String? = nil
  2579. }
  2580. struct Proto2Unittest_TestExtensionOrderings2: Sendable {
  2581. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2582. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2583. // methods supported on all messages.
  2584. var myString: String {
  2585. get {return _myString ?? String()}
  2586. set {_myString = newValue}
  2587. }
  2588. /// Returns true if `myString` has been explicitly set.
  2589. var hasMyString: Bool {return self._myString != nil}
  2590. /// Clears the value of `myString`. Subsequent reads from it will return its default value.
  2591. mutating func clearMyString() {self._myString = nil}
  2592. var unknownFields = SwiftProtobuf.UnknownStorage()
  2593. struct TestExtensionOrderings3: Sendable {
  2594. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2595. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2596. // methods supported on all messages.
  2597. var myString: String {
  2598. get {return _myString ?? String()}
  2599. set {_myString = newValue}
  2600. }
  2601. /// Returns true if `myString` has been explicitly set.
  2602. var hasMyString: Bool {return self._myString != nil}
  2603. /// Clears the value of `myString`. Subsequent reads from it will return its default value.
  2604. mutating func clearMyString() {self._myString = nil}
  2605. var unknownFields = SwiftProtobuf.UnknownStorage()
  2606. init() {}
  2607. fileprivate var _myString: String? = nil
  2608. }
  2609. init() {}
  2610. fileprivate var _myString: String? = nil
  2611. }
  2612. struct Proto2Unittest_TestExtremeDefaultValues: @unchecked Sendable {
  2613. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2614. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2615. // methods supported on all messages.
  2616. var escapedBytes: Data {
  2617. get {return _storage._escapedBytes ?? Data([0, 1, 7, 8, 12, 10, 13, 9, 11, 92, 39, 34, 254])}
  2618. set {_uniqueStorage()._escapedBytes = newValue}
  2619. }
  2620. /// Returns true if `escapedBytes` has been explicitly set.
  2621. var hasEscapedBytes: Bool {return _storage._escapedBytes != nil}
  2622. /// Clears the value of `escapedBytes`. Subsequent reads from it will return its default value.
  2623. mutating func clearEscapedBytes() {_uniqueStorage()._escapedBytes = nil}
  2624. var largeUint32: UInt32 {
  2625. get {return _storage._largeUint32 ?? 4294967295}
  2626. set {_uniqueStorage()._largeUint32 = newValue}
  2627. }
  2628. /// Returns true if `largeUint32` has been explicitly set.
  2629. var hasLargeUint32: Bool {return _storage._largeUint32 != nil}
  2630. /// Clears the value of `largeUint32`. Subsequent reads from it will return its default value.
  2631. mutating func clearLargeUint32() {_uniqueStorage()._largeUint32 = nil}
  2632. var largeUint64: UInt64 {
  2633. get {return _storage._largeUint64 ?? 18446744073709551615}
  2634. set {_uniqueStorage()._largeUint64 = newValue}
  2635. }
  2636. /// Returns true if `largeUint64` has been explicitly set.
  2637. var hasLargeUint64: Bool {return _storage._largeUint64 != nil}
  2638. /// Clears the value of `largeUint64`. Subsequent reads from it will return its default value.
  2639. mutating func clearLargeUint64() {_uniqueStorage()._largeUint64 = nil}
  2640. var smallInt32: Int32 {
  2641. get {return _storage._smallInt32 ?? -2147483647}
  2642. set {_uniqueStorage()._smallInt32 = newValue}
  2643. }
  2644. /// Returns true if `smallInt32` has been explicitly set.
  2645. var hasSmallInt32: Bool {return _storage._smallInt32 != nil}
  2646. /// Clears the value of `smallInt32`. Subsequent reads from it will return its default value.
  2647. mutating func clearSmallInt32() {_uniqueStorage()._smallInt32 = nil}
  2648. var smallInt64: Int64 {
  2649. get {return _storage._smallInt64 ?? -9223372036854775807}
  2650. set {_uniqueStorage()._smallInt64 = newValue}
  2651. }
  2652. /// Returns true if `smallInt64` has been explicitly set.
  2653. var hasSmallInt64: Bool {return _storage._smallInt64 != nil}
  2654. /// Clears the value of `smallInt64`. Subsequent reads from it will return its default value.
  2655. mutating func clearSmallInt64() {_uniqueStorage()._smallInt64 = nil}
  2656. var reallySmallInt32: Int32 {
  2657. get {return _storage._reallySmallInt32 ?? -2147483648}
  2658. set {_uniqueStorage()._reallySmallInt32 = newValue}
  2659. }
  2660. /// Returns true if `reallySmallInt32` has been explicitly set.
  2661. var hasReallySmallInt32: Bool {return _storage._reallySmallInt32 != nil}
  2662. /// Clears the value of `reallySmallInt32`. Subsequent reads from it will return its default value.
  2663. mutating func clearReallySmallInt32() {_uniqueStorage()._reallySmallInt32 = nil}
  2664. var reallySmallInt64: Int64 {
  2665. get {return _storage._reallySmallInt64 ?? -9223372036854775808}
  2666. set {_uniqueStorage()._reallySmallInt64 = newValue}
  2667. }
  2668. /// Returns true if `reallySmallInt64` has been explicitly set.
  2669. var hasReallySmallInt64: Bool {return _storage._reallySmallInt64 != nil}
  2670. /// Clears the value of `reallySmallInt64`. Subsequent reads from it will return its default value.
  2671. mutating func clearReallySmallInt64() {_uniqueStorage()._reallySmallInt64 = nil}
  2672. /// The default value here is UTF-8 for "\u1234". (We could also just type
  2673. /// the UTF-8 text directly into this text file rather than escape it, but
  2674. /// lots of people use editors that would be confused by this.)
  2675. var utf8String: String {
  2676. get {return _storage._utf8String ?? "ሴ"}
  2677. set {_uniqueStorage()._utf8String = newValue}
  2678. }
  2679. /// Returns true if `utf8String` has been explicitly set.
  2680. var hasUtf8String: Bool {return _storage._utf8String != nil}
  2681. /// Clears the value of `utf8String`. Subsequent reads from it will return its default value.
  2682. mutating func clearUtf8String() {_uniqueStorage()._utf8String = nil}
  2683. /// Tests for single-precision floating-point values.
  2684. var zeroFloat: Float {
  2685. get {return _storage._zeroFloat ?? 0}
  2686. set {_uniqueStorage()._zeroFloat = newValue}
  2687. }
  2688. /// Returns true if `zeroFloat` has been explicitly set.
  2689. var hasZeroFloat: Bool {return _storage._zeroFloat != nil}
  2690. /// Clears the value of `zeroFloat`. Subsequent reads from it will return its default value.
  2691. mutating func clearZeroFloat() {_uniqueStorage()._zeroFloat = nil}
  2692. var oneFloat: Float {
  2693. get {return _storage._oneFloat ?? 1}
  2694. set {_uniqueStorage()._oneFloat = newValue}
  2695. }
  2696. /// Returns true if `oneFloat` has been explicitly set.
  2697. var hasOneFloat: Bool {return _storage._oneFloat != nil}
  2698. /// Clears the value of `oneFloat`. Subsequent reads from it will return its default value.
  2699. mutating func clearOneFloat() {_uniqueStorage()._oneFloat = nil}
  2700. var smallFloat: Float {
  2701. get {return _storage._smallFloat ?? 1.5}
  2702. set {_uniqueStorage()._smallFloat = newValue}
  2703. }
  2704. /// Returns true if `smallFloat` has been explicitly set.
  2705. var hasSmallFloat: Bool {return _storage._smallFloat != nil}
  2706. /// Clears the value of `smallFloat`. Subsequent reads from it will return its default value.
  2707. mutating func clearSmallFloat() {_uniqueStorage()._smallFloat = nil}
  2708. var negativeOneFloat: Float {
  2709. get {return _storage._negativeOneFloat ?? -1}
  2710. set {_uniqueStorage()._negativeOneFloat = newValue}
  2711. }
  2712. /// Returns true if `negativeOneFloat` has been explicitly set.
  2713. var hasNegativeOneFloat: Bool {return _storage._negativeOneFloat != nil}
  2714. /// Clears the value of `negativeOneFloat`. Subsequent reads from it will return its default value.
  2715. mutating func clearNegativeOneFloat() {_uniqueStorage()._negativeOneFloat = nil}
  2716. var negativeFloat: Float {
  2717. get {return _storage._negativeFloat ?? -1.5}
  2718. set {_uniqueStorage()._negativeFloat = newValue}
  2719. }
  2720. /// Returns true if `negativeFloat` has been explicitly set.
  2721. var hasNegativeFloat: Bool {return _storage._negativeFloat != nil}
  2722. /// Clears the value of `negativeFloat`. Subsequent reads from it will return its default value.
  2723. mutating func clearNegativeFloat() {_uniqueStorage()._negativeFloat = nil}
  2724. /// Using exponents
  2725. var largeFloat: Float {
  2726. get {return _storage._largeFloat ?? 2e+08}
  2727. set {_uniqueStorage()._largeFloat = newValue}
  2728. }
  2729. /// Returns true if `largeFloat` has been explicitly set.
  2730. var hasLargeFloat: Bool {return _storage._largeFloat != nil}
  2731. /// Clears the value of `largeFloat`. Subsequent reads from it will return its default value.
  2732. mutating func clearLargeFloat() {_uniqueStorage()._largeFloat = nil}
  2733. var smallNegativeFloat: Float {
  2734. get {return _storage._smallNegativeFloat ?? -8e-28}
  2735. set {_uniqueStorage()._smallNegativeFloat = newValue}
  2736. }
  2737. /// Returns true if `smallNegativeFloat` has been explicitly set.
  2738. var hasSmallNegativeFloat: Bool {return _storage._smallNegativeFloat != nil}
  2739. /// Clears the value of `smallNegativeFloat`. Subsequent reads from it will return its default value.
  2740. mutating func clearSmallNegativeFloat() {_uniqueStorage()._smallNegativeFloat = nil}
  2741. /// Text for nonfinite floating-point values.
  2742. var infDouble: Double {
  2743. get {return _storage._infDouble ?? Double.infinity}
  2744. set {_uniqueStorage()._infDouble = newValue}
  2745. }
  2746. /// Returns true if `infDouble` has been explicitly set.
  2747. var hasInfDouble: Bool {return _storage._infDouble != nil}
  2748. /// Clears the value of `infDouble`. Subsequent reads from it will return its default value.
  2749. mutating func clearInfDouble() {_uniqueStorage()._infDouble = nil}
  2750. var negInfDouble: Double {
  2751. get {return _storage._negInfDouble ?? -Double.infinity}
  2752. set {_uniqueStorage()._negInfDouble = newValue}
  2753. }
  2754. /// Returns true if `negInfDouble` has been explicitly set.
  2755. var hasNegInfDouble: Bool {return _storage._negInfDouble != nil}
  2756. /// Clears the value of `negInfDouble`. Subsequent reads from it will return its default value.
  2757. mutating func clearNegInfDouble() {_uniqueStorage()._negInfDouble = nil}
  2758. var nanDouble: Double {
  2759. get {return _storage._nanDouble ?? Double.nan}
  2760. set {_uniqueStorage()._nanDouble = newValue}
  2761. }
  2762. /// Returns true if `nanDouble` has been explicitly set.
  2763. var hasNanDouble: Bool {return _storage._nanDouble != nil}
  2764. /// Clears the value of `nanDouble`. Subsequent reads from it will return its default value.
  2765. mutating func clearNanDouble() {_uniqueStorage()._nanDouble = nil}
  2766. var infFloat: Float {
  2767. get {return _storage._infFloat ?? Float.infinity}
  2768. set {_uniqueStorage()._infFloat = newValue}
  2769. }
  2770. /// Returns true if `infFloat` has been explicitly set.
  2771. var hasInfFloat: Bool {return _storage._infFloat != nil}
  2772. /// Clears the value of `infFloat`. Subsequent reads from it will return its default value.
  2773. mutating func clearInfFloat() {_uniqueStorage()._infFloat = nil}
  2774. var negInfFloat: Float {
  2775. get {return _storage._negInfFloat ?? -Float.infinity}
  2776. set {_uniqueStorage()._negInfFloat = newValue}
  2777. }
  2778. /// Returns true if `negInfFloat` has been explicitly set.
  2779. var hasNegInfFloat: Bool {return _storage._negInfFloat != nil}
  2780. /// Clears the value of `negInfFloat`. Subsequent reads from it will return its default value.
  2781. mutating func clearNegInfFloat() {_uniqueStorage()._negInfFloat = nil}
  2782. var nanFloat: Float {
  2783. get {return _storage._nanFloat ?? Float.nan}
  2784. set {_uniqueStorage()._nanFloat = newValue}
  2785. }
  2786. /// Returns true if `nanFloat` has been explicitly set.
  2787. var hasNanFloat: Bool {return _storage._nanFloat != nil}
  2788. /// Clears the value of `nanFloat`. Subsequent reads from it will return its default value.
  2789. mutating func clearNanFloat() {_uniqueStorage()._nanFloat = nil}
  2790. /// Tests for C++ trigraphs.
  2791. /// Trigraphs should be escaped in C++ generated files, but they should not be
  2792. /// escaped for other languages.
  2793. /// Note that in .proto file, "\?" is a valid way to escape ? in string
  2794. /// literals.
  2795. var cppTrigraph: String {
  2796. get {return _storage._cppTrigraph ?? "? ? ?? ?? ??? ??/ ??-"}
  2797. set {_uniqueStorage()._cppTrigraph = newValue}
  2798. }
  2799. /// Returns true if `cppTrigraph` has been explicitly set.
  2800. var hasCppTrigraph: Bool {return _storage._cppTrigraph != nil}
  2801. /// Clears the value of `cppTrigraph`. Subsequent reads from it will return its default value.
  2802. mutating func clearCppTrigraph() {_uniqueStorage()._cppTrigraph = nil}
  2803. /// String defaults containing the character '\000'
  2804. var stringWithZero: String {
  2805. get {return _storage._stringWithZero ?? "hel\0lo"}
  2806. set {_uniqueStorage()._stringWithZero = newValue}
  2807. }
  2808. /// Returns true if `stringWithZero` has been explicitly set.
  2809. var hasStringWithZero: Bool {return _storage._stringWithZero != nil}
  2810. /// Clears the value of `stringWithZero`. Subsequent reads from it will return its default value.
  2811. mutating func clearStringWithZero() {_uniqueStorage()._stringWithZero = nil}
  2812. var bytesWithZero: Data {
  2813. get {return _storage._bytesWithZero ?? Data([119, 111, 114, 0, 108, 100])}
  2814. set {_uniqueStorage()._bytesWithZero = newValue}
  2815. }
  2816. /// Returns true if `bytesWithZero` has been explicitly set.
  2817. var hasBytesWithZero: Bool {return _storage._bytesWithZero != nil}
  2818. /// Clears the value of `bytesWithZero`. Subsequent reads from it will return its default value.
  2819. mutating func clearBytesWithZero() {_uniqueStorage()._bytesWithZero = nil}
  2820. var stringPieceWithZero: String {
  2821. get {return _storage._stringPieceWithZero ?? "ab\0c"}
  2822. set {_uniqueStorage()._stringPieceWithZero = newValue}
  2823. }
  2824. /// Returns true if `stringPieceWithZero` has been explicitly set.
  2825. var hasStringPieceWithZero: Bool {return _storage._stringPieceWithZero != nil}
  2826. /// Clears the value of `stringPieceWithZero`. Subsequent reads from it will return its default value.
  2827. mutating func clearStringPieceWithZero() {_uniqueStorage()._stringPieceWithZero = nil}
  2828. var cordWithZero: String {
  2829. get {return _storage._cordWithZero ?? "12\03"}
  2830. set {_uniqueStorage()._cordWithZero = newValue}
  2831. }
  2832. /// Returns true if `cordWithZero` has been explicitly set.
  2833. var hasCordWithZero: Bool {return _storage._cordWithZero != nil}
  2834. /// Clears the value of `cordWithZero`. Subsequent reads from it will return its default value.
  2835. mutating func clearCordWithZero() {_uniqueStorage()._cordWithZero = nil}
  2836. var replacementString: String {
  2837. get {return _storage._replacementString ?? "${unknown}"}
  2838. set {_uniqueStorage()._replacementString = newValue}
  2839. }
  2840. /// Returns true if `replacementString` has been explicitly set.
  2841. var hasReplacementString: Bool {return _storage._replacementString != nil}
  2842. /// Clears the value of `replacementString`. Subsequent reads from it will return its default value.
  2843. mutating func clearReplacementString() {_uniqueStorage()._replacementString = nil}
  2844. var unknownFields = SwiftProtobuf.UnknownStorage()
  2845. init() {}
  2846. fileprivate var _storage = _StorageClass.defaultInstance
  2847. }
  2848. struct Proto2Unittest_SparseEnumMessage: Sendable {
  2849. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2850. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2851. // methods supported on all messages.
  2852. var sparseEnum: Proto2Unittest_TestSparseEnum {
  2853. get {return _sparseEnum ?? .sparseA}
  2854. set {_sparseEnum = newValue}
  2855. }
  2856. /// Returns true if `sparseEnum` has been explicitly set.
  2857. var hasSparseEnum: Bool {return self._sparseEnum != nil}
  2858. /// Clears the value of `sparseEnum`. Subsequent reads from it will return its default value.
  2859. mutating func clearSparseEnum() {self._sparseEnum = nil}
  2860. var unknownFields = SwiftProtobuf.UnknownStorage()
  2861. init() {}
  2862. fileprivate var _sparseEnum: Proto2Unittest_TestSparseEnum? = nil
  2863. }
  2864. /// Test String and Bytes: string is for valid UTF-8 strings
  2865. struct Proto2Unittest_OneString: Sendable {
  2866. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2867. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2868. // methods supported on all messages.
  2869. var data: String {
  2870. get {return _data ?? String()}
  2871. set {_data = newValue}
  2872. }
  2873. /// Returns true if `data` has been explicitly set.
  2874. var hasData: Bool {return self._data != nil}
  2875. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  2876. mutating func clearData() {self._data = nil}
  2877. var unknownFields = SwiftProtobuf.UnknownStorage()
  2878. init() {}
  2879. fileprivate var _data: String? = nil
  2880. }
  2881. struct Proto2Unittest_MoreString: Sendable {
  2882. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2883. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2884. // methods supported on all messages.
  2885. var data: [String] = []
  2886. var unknownFields = SwiftProtobuf.UnknownStorage()
  2887. init() {}
  2888. }
  2889. struct Proto2Unittest_OneBytes: @unchecked Sendable {
  2890. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2891. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2892. // methods supported on all messages.
  2893. var data: Data {
  2894. get {return _data ?? Data()}
  2895. set {_data = newValue}
  2896. }
  2897. /// Returns true if `data` has been explicitly set.
  2898. var hasData: Bool {return self._data != nil}
  2899. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  2900. mutating func clearData() {self._data = nil}
  2901. var unknownFields = SwiftProtobuf.UnknownStorage()
  2902. init() {}
  2903. fileprivate var _data: Data? = nil
  2904. }
  2905. struct Proto2Unittest_MoreBytes: @unchecked Sendable {
  2906. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2907. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2908. // methods supported on all messages.
  2909. var data: [Data] = []
  2910. var unknownFields = SwiftProtobuf.UnknownStorage()
  2911. init() {}
  2912. }
  2913. struct Proto2Unittest_ManyOptionalString: @unchecked Sendable {
  2914. // SwiftProtobuf.Message conformance is added in an extension below. See the
  2915. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  2916. // methods supported on all messages.
  2917. var str1: String {
  2918. get {return _storage._str1 ?? String()}
  2919. set {_uniqueStorage()._str1 = newValue}
  2920. }
  2921. /// Returns true if `str1` has been explicitly set.
  2922. var hasStr1: Bool {return _storage._str1 != nil}
  2923. /// Clears the value of `str1`. Subsequent reads from it will return its default value.
  2924. mutating func clearStr1() {_uniqueStorage()._str1 = nil}
  2925. var str2: String {
  2926. get {return _storage._str2 ?? String()}
  2927. set {_uniqueStorage()._str2 = newValue}
  2928. }
  2929. /// Returns true if `str2` has been explicitly set.
  2930. var hasStr2: Bool {return _storage._str2 != nil}
  2931. /// Clears the value of `str2`. Subsequent reads from it will return its default value.
  2932. mutating func clearStr2() {_uniqueStorage()._str2 = nil}
  2933. var str3: String {
  2934. get {return _storage._str3 ?? String()}
  2935. set {_uniqueStorage()._str3 = newValue}
  2936. }
  2937. /// Returns true if `str3` has been explicitly set.
  2938. var hasStr3: Bool {return _storage._str3 != nil}
  2939. /// Clears the value of `str3`. Subsequent reads from it will return its default value.
  2940. mutating func clearStr3() {_uniqueStorage()._str3 = nil}
  2941. var str4: String {
  2942. get {return _storage._str4 ?? String()}
  2943. set {_uniqueStorage()._str4 = newValue}
  2944. }
  2945. /// Returns true if `str4` has been explicitly set.
  2946. var hasStr4: Bool {return _storage._str4 != nil}
  2947. /// Clears the value of `str4`. Subsequent reads from it will return its default value.
  2948. mutating func clearStr4() {_uniqueStorage()._str4 = nil}
  2949. var str5: String {
  2950. get {return _storage._str5 ?? String()}
  2951. set {_uniqueStorage()._str5 = newValue}
  2952. }
  2953. /// Returns true if `str5` has been explicitly set.
  2954. var hasStr5: Bool {return _storage._str5 != nil}
  2955. /// Clears the value of `str5`. Subsequent reads from it will return its default value.
  2956. mutating func clearStr5() {_uniqueStorage()._str5 = nil}
  2957. var str6: String {
  2958. get {return _storage._str6 ?? String()}
  2959. set {_uniqueStorage()._str6 = newValue}
  2960. }
  2961. /// Returns true if `str6` has been explicitly set.
  2962. var hasStr6: Bool {return _storage._str6 != nil}
  2963. /// Clears the value of `str6`. Subsequent reads from it will return its default value.
  2964. mutating func clearStr6() {_uniqueStorage()._str6 = nil}
  2965. var str7: String {
  2966. get {return _storage._str7 ?? String()}
  2967. set {_uniqueStorage()._str7 = newValue}
  2968. }
  2969. /// Returns true if `str7` has been explicitly set.
  2970. var hasStr7: Bool {return _storage._str7 != nil}
  2971. /// Clears the value of `str7`. Subsequent reads from it will return its default value.
  2972. mutating func clearStr7() {_uniqueStorage()._str7 = nil}
  2973. var str8: String {
  2974. get {return _storage._str8 ?? String()}
  2975. set {_uniqueStorage()._str8 = newValue}
  2976. }
  2977. /// Returns true if `str8` has been explicitly set.
  2978. var hasStr8: Bool {return _storage._str8 != nil}
  2979. /// Clears the value of `str8`. Subsequent reads from it will return its default value.
  2980. mutating func clearStr8() {_uniqueStorage()._str8 = nil}
  2981. var str9: String {
  2982. get {return _storage._str9 ?? String()}
  2983. set {_uniqueStorage()._str9 = newValue}
  2984. }
  2985. /// Returns true if `str9` has been explicitly set.
  2986. var hasStr9: Bool {return _storage._str9 != nil}
  2987. /// Clears the value of `str9`. Subsequent reads from it will return its default value.
  2988. mutating func clearStr9() {_uniqueStorage()._str9 = nil}
  2989. var str10: String {
  2990. get {return _storage._str10 ?? String()}
  2991. set {_uniqueStorage()._str10 = newValue}
  2992. }
  2993. /// Returns true if `str10` has been explicitly set.
  2994. var hasStr10: Bool {return _storage._str10 != nil}
  2995. /// Clears the value of `str10`. Subsequent reads from it will return its default value.
  2996. mutating func clearStr10() {_uniqueStorage()._str10 = nil}
  2997. var str11: String {
  2998. get {return _storage._str11 ?? String()}
  2999. set {_uniqueStorage()._str11 = newValue}
  3000. }
  3001. /// Returns true if `str11` has been explicitly set.
  3002. var hasStr11: Bool {return _storage._str11 != nil}
  3003. /// Clears the value of `str11`. Subsequent reads from it will return its default value.
  3004. mutating func clearStr11() {_uniqueStorage()._str11 = nil}
  3005. var str12: String {
  3006. get {return _storage._str12 ?? String()}
  3007. set {_uniqueStorage()._str12 = newValue}
  3008. }
  3009. /// Returns true if `str12` has been explicitly set.
  3010. var hasStr12: Bool {return _storage._str12 != nil}
  3011. /// Clears the value of `str12`. Subsequent reads from it will return its default value.
  3012. mutating func clearStr12() {_uniqueStorage()._str12 = nil}
  3013. var str13: String {
  3014. get {return _storage._str13 ?? String()}
  3015. set {_uniqueStorage()._str13 = newValue}
  3016. }
  3017. /// Returns true if `str13` has been explicitly set.
  3018. var hasStr13: Bool {return _storage._str13 != nil}
  3019. /// Clears the value of `str13`. Subsequent reads from it will return its default value.
  3020. mutating func clearStr13() {_uniqueStorage()._str13 = nil}
  3021. var str14: String {
  3022. get {return _storage._str14 ?? String()}
  3023. set {_uniqueStorage()._str14 = newValue}
  3024. }
  3025. /// Returns true if `str14` has been explicitly set.
  3026. var hasStr14: Bool {return _storage._str14 != nil}
  3027. /// Clears the value of `str14`. Subsequent reads from it will return its default value.
  3028. mutating func clearStr14() {_uniqueStorage()._str14 = nil}
  3029. var str15: String {
  3030. get {return _storage._str15 ?? String()}
  3031. set {_uniqueStorage()._str15 = newValue}
  3032. }
  3033. /// Returns true if `str15` has been explicitly set.
  3034. var hasStr15: Bool {return _storage._str15 != nil}
  3035. /// Clears the value of `str15`. Subsequent reads from it will return its default value.
  3036. mutating func clearStr15() {_uniqueStorage()._str15 = nil}
  3037. var str16: String {
  3038. get {return _storage._str16 ?? String()}
  3039. set {_uniqueStorage()._str16 = newValue}
  3040. }
  3041. /// Returns true if `str16` has been explicitly set.
  3042. var hasStr16: Bool {return _storage._str16 != nil}
  3043. /// Clears the value of `str16`. Subsequent reads from it will return its default value.
  3044. mutating func clearStr16() {_uniqueStorage()._str16 = nil}
  3045. var str17: String {
  3046. get {return _storage._str17 ?? String()}
  3047. set {_uniqueStorage()._str17 = newValue}
  3048. }
  3049. /// Returns true if `str17` has been explicitly set.
  3050. var hasStr17: Bool {return _storage._str17 != nil}
  3051. /// Clears the value of `str17`. Subsequent reads from it will return its default value.
  3052. mutating func clearStr17() {_uniqueStorage()._str17 = nil}
  3053. var str18: String {
  3054. get {return _storage._str18 ?? String()}
  3055. set {_uniqueStorage()._str18 = newValue}
  3056. }
  3057. /// Returns true if `str18` has been explicitly set.
  3058. var hasStr18: Bool {return _storage._str18 != nil}
  3059. /// Clears the value of `str18`. Subsequent reads from it will return its default value.
  3060. mutating func clearStr18() {_uniqueStorage()._str18 = nil}
  3061. var str19: String {
  3062. get {return _storage._str19 ?? String()}
  3063. set {_uniqueStorage()._str19 = newValue}
  3064. }
  3065. /// Returns true if `str19` has been explicitly set.
  3066. var hasStr19: Bool {return _storage._str19 != nil}
  3067. /// Clears the value of `str19`. Subsequent reads from it will return its default value.
  3068. mutating func clearStr19() {_uniqueStorage()._str19 = nil}
  3069. var str20: String {
  3070. get {return _storage._str20 ?? String()}
  3071. set {_uniqueStorage()._str20 = newValue}
  3072. }
  3073. /// Returns true if `str20` has been explicitly set.
  3074. var hasStr20: Bool {return _storage._str20 != nil}
  3075. /// Clears the value of `str20`. Subsequent reads from it will return its default value.
  3076. mutating func clearStr20() {_uniqueStorage()._str20 = nil}
  3077. var str21: String {
  3078. get {return _storage._str21 ?? String()}
  3079. set {_uniqueStorage()._str21 = newValue}
  3080. }
  3081. /// Returns true if `str21` has been explicitly set.
  3082. var hasStr21: Bool {return _storage._str21 != nil}
  3083. /// Clears the value of `str21`. Subsequent reads from it will return its default value.
  3084. mutating func clearStr21() {_uniqueStorage()._str21 = nil}
  3085. var str22: String {
  3086. get {return _storage._str22 ?? String()}
  3087. set {_uniqueStorage()._str22 = newValue}
  3088. }
  3089. /// Returns true if `str22` has been explicitly set.
  3090. var hasStr22: Bool {return _storage._str22 != nil}
  3091. /// Clears the value of `str22`. Subsequent reads from it will return its default value.
  3092. mutating func clearStr22() {_uniqueStorage()._str22 = nil}
  3093. var str23: String {
  3094. get {return _storage._str23 ?? String()}
  3095. set {_uniqueStorage()._str23 = newValue}
  3096. }
  3097. /// Returns true if `str23` has been explicitly set.
  3098. var hasStr23: Bool {return _storage._str23 != nil}
  3099. /// Clears the value of `str23`. Subsequent reads from it will return its default value.
  3100. mutating func clearStr23() {_uniqueStorage()._str23 = nil}
  3101. var str24: String {
  3102. get {return _storage._str24 ?? String()}
  3103. set {_uniqueStorage()._str24 = newValue}
  3104. }
  3105. /// Returns true if `str24` has been explicitly set.
  3106. var hasStr24: Bool {return _storage._str24 != nil}
  3107. /// Clears the value of `str24`. Subsequent reads from it will return its default value.
  3108. mutating func clearStr24() {_uniqueStorage()._str24 = nil}
  3109. var str25: String {
  3110. get {return _storage._str25 ?? String()}
  3111. set {_uniqueStorage()._str25 = newValue}
  3112. }
  3113. /// Returns true if `str25` has been explicitly set.
  3114. var hasStr25: Bool {return _storage._str25 != nil}
  3115. /// Clears the value of `str25`. Subsequent reads from it will return its default value.
  3116. mutating func clearStr25() {_uniqueStorage()._str25 = nil}
  3117. var str26: String {
  3118. get {return _storage._str26 ?? String()}
  3119. set {_uniqueStorage()._str26 = newValue}
  3120. }
  3121. /// Returns true if `str26` has been explicitly set.
  3122. var hasStr26: Bool {return _storage._str26 != nil}
  3123. /// Clears the value of `str26`. Subsequent reads from it will return its default value.
  3124. mutating func clearStr26() {_uniqueStorage()._str26 = nil}
  3125. var str27: String {
  3126. get {return _storage._str27 ?? String()}
  3127. set {_uniqueStorage()._str27 = newValue}
  3128. }
  3129. /// Returns true if `str27` has been explicitly set.
  3130. var hasStr27: Bool {return _storage._str27 != nil}
  3131. /// Clears the value of `str27`. Subsequent reads from it will return its default value.
  3132. mutating func clearStr27() {_uniqueStorage()._str27 = nil}
  3133. var str28: String {
  3134. get {return _storage._str28 ?? String()}
  3135. set {_uniqueStorage()._str28 = newValue}
  3136. }
  3137. /// Returns true if `str28` has been explicitly set.
  3138. var hasStr28: Bool {return _storage._str28 != nil}
  3139. /// Clears the value of `str28`. Subsequent reads from it will return its default value.
  3140. mutating func clearStr28() {_uniqueStorage()._str28 = nil}
  3141. var str29: String {
  3142. get {return _storage._str29 ?? String()}
  3143. set {_uniqueStorage()._str29 = newValue}
  3144. }
  3145. /// Returns true if `str29` has been explicitly set.
  3146. var hasStr29: Bool {return _storage._str29 != nil}
  3147. /// Clears the value of `str29`. Subsequent reads from it will return its default value.
  3148. mutating func clearStr29() {_uniqueStorage()._str29 = nil}
  3149. var str30: String {
  3150. get {return _storage._str30 ?? String()}
  3151. set {_uniqueStorage()._str30 = newValue}
  3152. }
  3153. /// Returns true if `str30` has been explicitly set.
  3154. var hasStr30: Bool {return _storage._str30 != nil}
  3155. /// Clears the value of `str30`. Subsequent reads from it will return its default value.
  3156. mutating func clearStr30() {_uniqueStorage()._str30 = nil}
  3157. var str31: String {
  3158. get {return _storage._str31 ?? String()}
  3159. set {_uniqueStorage()._str31 = newValue}
  3160. }
  3161. /// Returns true if `str31` has been explicitly set.
  3162. var hasStr31: Bool {return _storage._str31 != nil}
  3163. /// Clears the value of `str31`. Subsequent reads from it will return its default value.
  3164. mutating func clearStr31() {_uniqueStorage()._str31 = nil}
  3165. var str32: String {
  3166. get {return _storage._str32 ?? String()}
  3167. set {_uniqueStorage()._str32 = newValue}
  3168. }
  3169. /// Returns true if `str32` has been explicitly set.
  3170. var hasStr32: Bool {return _storage._str32 != nil}
  3171. /// Clears the value of `str32`. Subsequent reads from it will return its default value.
  3172. mutating func clearStr32() {_uniqueStorage()._str32 = nil}
  3173. var unknownFields = SwiftProtobuf.UnknownStorage()
  3174. init() {}
  3175. fileprivate var _storage = _StorageClass.defaultInstance
  3176. }
  3177. /// Test int32, uint32, int64, uint64, and bool are all compatible
  3178. struct Proto2Unittest_Int32Message: Sendable {
  3179. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3180. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3181. // methods supported on all messages.
  3182. var data: Int32 {
  3183. get {return _data ?? 0}
  3184. set {_data = newValue}
  3185. }
  3186. /// Returns true if `data` has been explicitly set.
  3187. var hasData: Bool {return self._data != nil}
  3188. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  3189. mutating func clearData() {self._data = nil}
  3190. var unknownFields = SwiftProtobuf.UnknownStorage()
  3191. init() {}
  3192. fileprivate var _data: Int32? = nil
  3193. }
  3194. struct Proto2Unittest_Uint32Message: Sendable {
  3195. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3196. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3197. // methods supported on all messages.
  3198. var data: UInt32 {
  3199. get {return _data ?? 0}
  3200. set {_data = newValue}
  3201. }
  3202. /// Returns true if `data` has been explicitly set.
  3203. var hasData: Bool {return self._data != nil}
  3204. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  3205. mutating func clearData() {self._data = nil}
  3206. var unknownFields = SwiftProtobuf.UnknownStorage()
  3207. init() {}
  3208. fileprivate var _data: UInt32? = nil
  3209. }
  3210. struct Proto2Unittest_Int64Message: Sendable {
  3211. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3212. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3213. // methods supported on all messages.
  3214. var data: Int64 {
  3215. get {return _data ?? 0}
  3216. set {_data = newValue}
  3217. }
  3218. /// Returns true if `data` has been explicitly set.
  3219. var hasData: Bool {return self._data != nil}
  3220. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  3221. mutating func clearData() {self._data = nil}
  3222. var unknownFields = SwiftProtobuf.UnknownStorage()
  3223. init() {}
  3224. fileprivate var _data: Int64? = nil
  3225. }
  3226. struct Proto2Unittest_Uint64Message: Sendable {
  3227. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3228. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3229. // methods supported on all messages.
  3230. var data: UInt64 {
  3231. get {return _data ?? 0}
  3232. set {_data = newValue}
  3233. }
  3234. /// Returns true if `data` has been explicitly set.
  3235. var hasData: Bool {return self._data != nil}
  3236. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  3237. mutating func clearData() {self._data = nil}
  3238. var unknownFields = SwiftProtobuf.UnknownStorage()
  3239. init() {}
  3240. fileprivate var _data: UInt64? = nil
  3241. }
  3242. struct Proto2Unittest_BoolMessage: Sendable {
  3243. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3244. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3245. // methods supported on all messages.
  3246. var data: Bool {
  3247. get {return _data ?? false}
  3248. set {_data = newValue}
  3249. }
  3250. /// Returns true if `data` has been explicitly set.
  3251. var hasData: Bool {return self._data != nil}
  3252. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  3253. mutating func clearData() {self._data = nil}
  3254. var unknownFields = SwiftProtobuf.UnknownStorage()
  3255. init() {}
  3256. fileprivate var _data: Bool? = nil
  3257. }
  3258. /// Test oneofs.
  3259. struct Proto2Unittest_TestOneof: Sendable {
  3260. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3261. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3262. // methods supported on all messages.
  3263. var foo: Proto2Unittest_TestOneof.OneOf_Foo? = nil
  3264. var fooInt: Int32 {
  3265. get {
  3266. if case .fooInt(let v)? = foo {return v}
  3267. return 0
  3268. }
  3269. set {foo = .fooInt(newValue)}
  3270. }
  3271. var fooString: String {
  3272. get {
  3273. if case .fooString(let v)? = foo {return v}
  3274. return String()
  3275. }
  3276. set {foo = .fooString(newValue)}
  3277. }
  3278. var fooMessage: Proto2Unittest_TestAllTypes {
  3279. get {
  3280. if case .fooMessage(let v)? = foo {return v}
  3281. return Proto2Unittest_TestAllTypes()
  3282. }
  3283. set {foo = .fooMessage(newValue)}
  3284. }
  3285. var fooGroup: Proto2Unittest_TestOneof.FooGroup {
  3286. get {
  3287. if case .fooGroup(let v)? = foo {return v}
  3288. return Proto2Unittest_TestOneof.FooGroup()
  3289. }
  3290. set {foo = .fooGroup(newValue)}
  3291. }
  3292. var unknownFields = SwiftProtobuf.UnknownStorage()
  3293. enum OneOf_Foo: Equatable, Sendable {
  3294. case fooInt(Int32)
  3295. case fooString(String)
  3296. case fooMessage(Proto2Unittest_TestAllTypes)
  3297. case fooGroup(Proto2Unittest_TestOneof.FooGroup)
  3298. }
  3299. struct FooGroup: Sendable {
  3300. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3301. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3302. // methods supported on all messages.
  3303. var a: Int32 {
  3304. get {return _a ?? 0}
  3305. set {_a = newValue}
  3306. }
  3307. /// Returns true if `a` has been explicitly set.
  3308. var hasA: Bool {return self._a != nil}
  3309. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  3310. mutating func clearA() {self._a = nil}
  3311. var b: String {
  3312. get {return _b ?? String()}
  3313. set {_b = newValue}
  3314. }
  3315. /// Returns true if `b` has been explicitly set.
  3316. var hasB: Bool {return self._b != nil}
  3317. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  3318. mutating func clearB() {self._b = nil}
  3319. var unknownFields = SwiftProtobuf.UnknownStorage()
  3320. init() {}
  3321. fileprivate var _a: Int32? = nil
  3322. fileprivate var _b: String? = nil
  3323. }
  3324. init() {}
  3325. }
  3326. struct Proto2Unittest_TestOneofBackwardsCompatible: Sendable {
  3327. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3328. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3329. // methods supported on all messages.
  3330. var fooInt: Int32 {
  3331. get {return _fooInt ?? 0}
  3332. set {_fooInt = newValue}
  3333. }
  3334. /// Returns true if `fooInt` has been explicitly set.
  3335. var hasFooInt: Bool {return self._fooInt != nil}
  3336. /// Clears the value of `fooInt`. Subsequent reads from it will return its default value.
  3337. mutating func clearFooInt() {self._fooInt = nil}
  3338. var fooString: String {
  3339. get {return _fooString ?? String()}
  3340. set {_fooString = newValue}
  3341. }
  3342. /// Returns true if `fooString` has been explicitly set.
  3343. var hasFooString: Bool {return self._fooString != nil}
  3344. /// Clears the value of `fooString`. Subsequent reads from it will return its default value.
  3345. mutating func clearFooString() {self._fooString = nil}
  3346. var fooMessage: Proto2Unittest_TestAllTypes {
  3347. get {return _fooMessage ?? Proto2Unittest_TestAllTypes()}
  3348. set {_fooMessage = newValue}
  3349. }
  3350. /// Returns true if `fooMessage` has been explicitly set.
  3351. var hasFooMessage: Bool {return self._fooMessage != nil}
  3352. /// Clears the value of `fooMessage`. Subsequent reads from it will return its default value.
  3353. mutating func clearFooMessage() {self._fooMessage = nil}
  3354. var fooGroup: Proto2Unittest_TestOneofBackwardsCompatible.FooGroup {
  3355. get {return _fooGroup ?? Proto2Unittest_TestOneofBackwardsCompatible.FooGroup()}
  3356. set {_fooGroup = newValue}
  3357. }
  3358. /// Returns true if `fooGroup` has been explicitly set.
  3359. var hasFooGroup: Bool {return self._fooGroup != nil}
  3360. /// Clears the value of `fooGroup`. Subsequent reads from it will return its default value.
  3361. mutating func clearFooGroup() {self._fooGroup = nil}
  3362. var unknownFields = SwiftProtobuf.UnknownStorage()
  3363. struct FooGroup: Sendable {
  3364. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3365. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3366. // methods supported on all messages.
  3367. var a: Int32 {
  3368. get {return _a ?? 0}
  3369. set {_a = newValue}
  3370. }
  3371. /// Returns true if `a` has been explicitly set.
  3372. var hasA: Bool {return self._a != nil}
  3373. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  3374. mutating func clearA() {self._a = nil}
  3375. var b: String {
  3376. get {return _b ?? String()}
  3377. set {_b = newValue}
  3378. }
  3379. /// Returns true if `b` has been explicitly set.
  3380. var hasB: Bool {return self._b != nil}
  3381. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  3382. mutating func clearB() {self._b = nil}
  3383. var unknownFields = SwiftProtobuf.UnknownStorage()
  3384. init() {}
  3385. fileprivate var _a: Int32? = nil
  3386. fileprivate var _b: String? = nil
  3387. }
  3388. init() {}
  3389. fileprivate var _fooInt: Int32? = nil
  3390. fileprivate var _fooString: String? = nil
  3391. fileprivate var _fooMessage: Proto2Unittest_TestAllTypes? = nil
  3392. fileprivate var _fooGroup: Proto2Unittest_TestOneofBackwardsCompatible.FooGroup? = nil
  3393. }
  3394. struct Proto2Unittest_TestOneof2: @unchecked Sendable {
  3395. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3396. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3397. // methods supported on all messages.
  3398. var foo: Proto2Unittest_TestOneof2.OneOf_Foo? = nil
  3399. var fooInt: Int32 {
  3400. get {
  3401. if case .fooInt(let v)? = foo {return v}
  3402. return 0
  3403. }
  3404. set {foo = .fooInt(newValue)}
  3405. }
  3406. var fooString: String {
  3407. get {
  3408. if case .fooString(let v)? = foo {return v}
  3409. return String()
  3410. }
  3411. set {foo = .fooString(newValue)}
  3412. }
  3413. var fooCord: String {
  3414. get {
  3415. if case .fooCord(let v)? = foo {return v}
  3416. return String()
  3417. }
  3418. set {foo = .fooCord(newValue)}
  3419. }
  3420. var fooStringPiece: String {
  3421. get {
  3422. if case .fooStringPiece(let v)? = foo {return v}
  3423. return String()
  3424. }
  3425. set {foo = .fooStringPiece(newValue)}
  3426. }
  3427. var fooBytes: Data {
  3428. get {
  3429. if case .fooBytes(let v)? = foo {return v}
  3430. return Data()
  3431. }
  3432. set {foo = .fooBytes(newValue)}
  3433. }
  3434. var fooEnum: Proto2Unittest_TestOneof2.NestedEnum {
  3435. get {
  3436. if case .fooEnum(let v)? = foo {return v}
  3437. return .foo
  3438. }
  3439. set {foo = .fooEnum(newValue)}
  3440. }
  3441. var fooMessage: Proto2Unittest_TestOneof2.NestedMessage {
  3442. get {
  3443. if case .fooMessage(let v)? = foo {return v}
  3444. return Proto2Unittest_TestOneof2.NestedMessage()
  3445. }
  3446. set {foo = .fooMessage(newValue)}
  3447. }
  3448. var fooGroup: Proto2Unittest_TestOneof2.FooGroup {
  3449. get {
  3450. if case .fooGroup(let v)? = foo {return v}
  3451. return Proto2Unittest_TestOneof2.FooGroup()
  3452. }
  3453. set {foo = .fooGroup(newValue)}
  3454. }
  3455. var fooLazyMessage: Proto2Unittest_TestOneof2.NestedMessage {
  3456. get {
  3457. if case .fooLazyMessage(let v)? = foo {return v}
  3458. return Proto2Unittest_TestOneof2.NestedMessage()
  3459. }
  3460. set {foo = .fooLazyMessage(newValue)}
  3461. }
  3462. var fooBytesCord: Data {
  3463. get {
  3464. if case .fooBytesCord(let v)? = foo {return v}
  3465. return Data()
  3466. }
  3467. set {foo = .fooBytesCord(newValue)}
  3468. }
  3469. var bar: Proto2Unittest_TestOneof2.OneOf_Bar? = nil
  3470. var barInt: Int32 {
  3471. get {
  3472. if case .barInt(let v)? = bar {return v}
  3473. return 5
  3474. }
  3475. set {bar = .barInt(newValue)}
  3476. }
  3477. var barString: String {
  3478. get {
  3479. if case .barString(let v)? = bar {return v}
  3480. return "STRING"
  3481. }
  3482. set {bar = .barString(newValue)}
  3483. }
  3484. var barCord: String {
  3485. get {
  3486. if case .barCord(let v)? = bar {return v}
  3487. return "CORD"
  3488. }
  3489. set {bar = .barCord(newValue)}
  3490. }
  3491. var barStringPiece: String {
  3492. get {
  3493. if case .barStringPiece(let v)? = bar {return v}
  3494. return "SPIECE"
  3495. }
  3496. set {bar = .barStringPiece(newValue)}
  3497. }
  3498. var barBytes: Data {
  3499. get {
  3500. if case .barBytes(let v)? = bar {return v}
  3501. return Data([66, 89, 84, 69, 83])
  3502. }
  3503. set {bar = .barBytes(newValue)}
  3504. }
  3505. var barEnum: Proto2Unittest_TestOneof2.NestedEnum {
  3506. get {
  3507. if case .barEnum(let v)? = bar {return v}
  3508. return .bar
  3509. }
  3510. set {bar = .barEnum(newValue)}
  3511. }
  3512. var barStringWithEmptyDefault: String {
  3513. get {
  3514. if case .barStringWithEmptyDefault(let v)? = bar {return v}
  3515. return String()
  3516. }
  3517. set {bar = .barStringWithEmptyDefault(newValue)}
  3518. }
  3519. var barCordWithEmptyDefault: String {
  3520. get {
  3521. if case .barCordWithEmptyDefault(let v)? = bar {return v}
  3522. return String()
  3523. }
  3524. set {bar = .barCordWithEmptyDefault(newValue)}
  3525. }
  3526. var barStringPieceWithEmptyDefault: String {
  3527. get {
  3528. if case .barStringPieceWithEmptyDefault(let v)? = bar {return v}
  3529. return String()
  3530. }
  3531. set {bar = .barStringPieceWithEmptyDefault(newValue)}
  3532. }
  3533. var barBytesWithEmptyDefault: Data {
  3534. get {
  3535. if case .barBytesWithEmptyDefault(let v)? = bar {return v}
  3536. return Data()
  3537. }
  3538. set {bar = .barBytesWithEmptyDefault(newValue)}
  3539. }
  3540. var bazInt: Int32 {
  3541. get {return _bazInt ?? 0}
  3542. set {_bazInt = newValue}
  3543. }
  3544. /// Returns true if `bazInt` has been explicitly set.
  3545. var hasBazInt: Bool {return self._bazInt != nil}
  3546. /// Clears the value of `bazInt`. Subsequent reads from it will return its default value.
  3547. mutating func clearBazInt() {self._bazInt = nil}
  3548. var bazString: String {
  3549. get {return _bazString ?? "BAZ"}
  3550. set {_bazString = newValue}
  3551. }
  3552. /// Returns true if `bazString` has been explicitly set.
  3553. var hasBazString: Bool {return self._bazString != nil}
  3554. /// Clears the value of `bazString`. Subsequent reads from it will return its default value.
  3555. mutating func clearBazString() {self._bazString = nil}
  3556. var unknownFields = SwiftProtobuf.UnknownStorage()
  3557. enum OneOf_Foo: Equatable, @unchecked Sendable {
  3558. case fooInt(Int32)
  3559. case fooString(String)
  3560. case fooCord(String)
  3561. case fooStringPiece(String)
  3562. case fooBytes(Data)
  3563. case fooEnum(Proto2Unittest_TestOneof2.NestedEnum)
  3564. case fooMessage(Proto2Unittest_TestOneof2.NestedMessage)
  3565. case fooGroup(Proto2Unittest_TestOneof2.FooGroup)
  3566. case fooLazyMessage(Proto2Unittest_TestOneof2.NestedMessage)
  3567. case fooBytesCord(Data)
  3568. }
  3569. enum OneOf_Bar: Equatable, @unchecked Sendable {
  3570. case barInt(Int32)
  3571. case barString(String)
  3572. case barCord(String)
  3573. case barStringPiece(String)
  3574. case barBytes(Data)
  3575. case barEnum(Proto2Unittest_TestOneof2.NestedEnum)
  3576. case barStringWithEmptyDefault(String)
  3577. case barCordWithEmptyDefault(String)
  3578. case barStringPieceWithEmptyDefault(String)
  3579. case barBytesWithEmptyDefault(Data)
  3580. }
  3581. enum NestedEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  3582. case foo = 1
  3583. case bar = 2
  3584. case baz = 3
  3585. init() {
  3586. self = .foo
  3587. }
  3588. }
  3589. struct FooGroup: Sendable {
  3590. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3591. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3592. // methods supported on all messages.
  3593. var a: Int32 {
  3594. get {return _a ?? 0}
  3595. set {_a = newValue}
  3596. }
  3597. /// Returns true if `a` has been explicitly set.
  3598. var hasA: Bool {return self._a != nil}
  3599. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  3600. mutating func clearA() {self._a = nil}
  3601. var b: String {
  3602. get {return _b ?? String()}
  3603. set {_b = newValue}
  3604. }
  3605. /// Returns true if `b` has been explicitly set.
  3606. var hasB: Bool {return self._b != nil}
  3607. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  3608. mutating func clearB() {self._b = nil}
  3609. var unknownFields = SwiftProtobuf.UnknownStorage()
  3610. init() {}
  3611. fileprivate var _a: Int32? = nil
  3612. fileprivate var _b: String? = nil
  3613. }
  3614. struct NestedMessage: @unchecked Sendable {
  3615. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3616. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3617. // methods supported on all messages.
  3618. var mooInt: Int64 {
  3619. get {return _storage._mooInt ?? 0}
  3620. set {_uniqueStorage()._mooInt = newValue}
  3621. }
  3622. /// Returns true if `mooInt` has been explicitly set.
  3623. var hasMooInt: Bool {return _storage._mooInt != nil}
  3624. /// Clears the value of `mooInt`. Subsequent reads from it will return its default value.
  3625. mutating func clearMooInt() {_uniqueStorage()._mooInt = nil}
  3626. var corgeInt: [Int32] {
  3627. get {return _storage._corgeInt}
  3628. set {_uniqueStorage()._corgeInt = newValue}
  3629. }
  3630. var child: Proto2Unittest_TestOneof2.NestedMessage {
  3631. get {return _storage._child ?? Proto2Unittest_TestOneof2.NestedMessage()}
  3632. set {_uniqueStorage()._child = newValue}
  3633. }
  3634. /// Returns true if `child` has been explicitly set.
  3635. var hasChild: Bool {return _storage._child != nil}
  3636. /// Clears the value of `child`. Subsequent reads from it will return its default value.
  3637. mutating func clearChild() {_uniqueStorage()._child = nil}
  3638. var unknownFields = SwiftProtobuf.UnknownStorage()
  3639. init() {}
  3640. fileprivate var _storage = _StorageClass.defaultInstance
  3641. }
  3642. init() {}
  3643. fileprivate var _bazInt: Int32? = nil
  3644. fileprivate var _bazString: String? = nil
  3645. }
  3646. struct Proto2Unittest_TestRequiredOneof: Sendable {
  3647. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3648. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3649. // methods supported on all messages.
  3650. var foo: Proto2Unittest_TestRequiredOneof.OneOf_Foo? = nil
  3651. var fooInt: Int32 {
  3652. get {
  3653. if case .fooInt(let v)? = foo {return v}
  3654. return 0
  3655. }
  3656. set {foo = .fooInt(newValue)}
  3657. }
  3658. var fooString: String {
  3659. get {
  3660. if case .fooString(let v)? = foo {return v}
  3661. return String()
  3662. }
  3663. set {foo = .fooString(newValue)}
  3664. }
  3665. var fooMessage: Proto2Unittest_TestRequiredOneof.NestedMessage {
  3666. get {
  3667. if case .fooMessage(let v)? = foo {return v}
  3668. return Proto2Unittest_TestRequiredOneof.NestedMessage()
  3669. }
  3670. set {foo = .fooMessage(newValue)}
  3671. }
  3672. var fooLazyMessage: Proto2Unittest_TestRequiredOneof.NestedMessage {
  3673. get {
  3674. if case .fooLazyMessage(let v)? = foo {return v}
  3675. return Proto2Unittest_TestRequiredOneof.NestedMessage()
  3676. }
  3677. set {foo = .fooLazyMessage(newValue)}
  3678. }
  3679. var unknownFields = SwiftProtobuf.UnknownStorage()
  3680. enum OneOf_Foo: Equatable, Sendable {
  3681. case fooInt(Int32)
  3682. case fooString(String)
  3683. case fooMessage(Proto2Unittest_TestRequiredOneof.NestedMessage)
  3684. case fooLazyMessage(Proto2Unittest_TestRequiredOneof.NestedMessage)
  3685. fileprivate var isInitialized: Bool {
  3686. // The use of inline closures is to circumvent an issue where the compiler
  3687. // allocates stack space for every case branch when no optimizations are
  3688. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  3689. switch self {
  3690. case .fooMessage: return {
  3691. guard case .fooMessage(let v) = self else { preconditionFailure() }
  3692. return v.isInitialized
  3693. }()
  3694. case .fooLazyMessage: return {
  3695. guard case .fooLazyMessage(let v) = self else { preconditionFailure() }
  3696. return v.isInitialized
  3697. }()
  3698. default: return true
  3699. }
  3700. }
  3701. }
  3702. struct NestedMessage: Sendable {
  3703. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3704. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3705. // methods supported on all messages.
  3706. var requiredDouble: Double {
  3707. get {return _requiredDouble ?? 0}
  3708. set {_requiredDouble = newValue}
  3709. }
  3710. /// Returns true if `requiredDouble` has been explicitly set.
  3711. var hasRequiredDouble: Bool {return self._requiredDouble != nil}
  3712. /// Clears the value of `requiredDouble`. Subsequent reads from it will return its default value.
  3713. mutating func clearRequiredDouble() {self._requiredDouble = nil}
  3714. var unknownFields = SwiftProtobuf.UnknownStorage()
  3715. init() {}
  3716. fileprivate var _requiredDouble: Double? = nil
  3717. }
  3718. init() {}
  3719. }
  3720. struct Proto2Unittest_TestPackedTypes: Sendable {
  3721. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3722. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3723. // methods supported on all messages.
  3724. var packedInt32: [Int32] = []
  3725. var packedInt64: [Int64] = []
  3726. var packedUint32: [UInt32] = []
  3727. var packedUint64: [UInt64] = []
  3728. var packedSint32: [Int32] = []
  3729. var packedSint64: [Int64] = []
  3730. var packedFixed32: [UInt32] = []
  3731. var packedFixed64: [UInt64] = []
  3732. var packedSfixed32: [Int32] = []
  3733. var packedSfixed64: [Int64] = []
  3734. var packedFloat: [Float] = []
  3735. var packedDouble: [Double] = []
  3736. var packedBool: [Bool] = []
  3737. var packedEnum: [Proto2Unittest_ForeignEnum] = []
  3738. var unknownFields = SwiftProtobuf.UnknownStorage()
  3739. init() {}
  3740. }
  3741. /// A message with the same fields as TestPackedTypes, but without packing. Used
  3742. /// to test packed <-> unpacked wire compatibility.
  3743. struct Proto2Unittest_TestUnpackedTypes: Sendable {
  3744. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3745. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3746. // methods supported on all messages.
  3747. var unpackedInt32: [Int32] = []
  3748. var unpackedInt64: [Int64] = []
  3749. var unpackedUint32: [UInt32] = []
  3750. var unpackedUint64: [UInt64] = []
  3751. var unpackedSint32: [Int32] = []
  3752. var unpackedSint64: [Int64] = []
  3753. var unpackedFixed32: [UInt32] = []
  3754. var unpackedFixed64: [UInt64] = []
  3755. var unpackedSfixed32: [Int32] = []
  3756. var unpackedSfixed64: [Int64] = []
  3757. var unpackedFloat: [Float] = []
  3758. var unpackedDouble: [Double] = []
  3759. var unpackedBool: [Bool] = []
  3760. var unpackedEnum: [Proto2Unittest_ForeignEnum] = []
  3761. var unknownFields = SwiftProtobuf.UnknownStorage()
  3762. init() {}
  3763. }
  3764. struct Proto2Unittest_TestPackedExtensions: SwiftProtobuf.ExtensibleMessage, Sendable {
  3765. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3766. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3767. // methods supported on all messages.
  3768. var unknownFields = SwiftProtobuf.UnknownStorage()
  3769. init() {}
  3770. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  3771. }
  3772. struct Proto2Unittest_TestUnpackedExtensions: SwiftProtobuf.ExtensibleMessage, Sendable {
  3773. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3774. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3775. // methods supported on all messages.
  3776. var unknownFields = SwiftProtobuf.UnknownStorage()
  3777. init() {}
  3778. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  3779. }
  3780. /// Used by ExtensionSetTest/DynamicExtensions. The test actually builds
  3781. /// a set of extensions to TestAllExtensions dynamically, based on the fields
  3782. /// of this message type.
  3783. struct Proto2Unittest_TestDynamicExtensions: Sendable {
  3784. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3785. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3786. // methods supported on all messages.
  3787. var scalarExtension: UInt32 {
  3788. get {return _scalarExtension ?? 0}
  3789. set {_scalarExtension = newValue}
  3790. }
  3791. /// Returns true if `scalarExtension` has been explicitly set.
  3792. var hasScalarExtension: Bool {return self._scalarExtension != nil}
  3793. /// Clears the value of `scalarExtension`. Subsequent reads from it will return its default value.
  3794. mutating func clearScalarExtension() {self._scalarExtension = nil}
  3795. var enumExtension: Proto2Unittest_ForeignEnum {
  3796. get {return _enumExtension ?? .foreignFoo}
  3797. set {_enumExtension = newValue}
  3798. }
  3799. /// Returns true if `enumExtension` has been explicitly set.
  3800. var hasEnumExtension: Bool {return self._enumExtension != nil}
  3801. /// Clears the value of `enumExtension`. Subsequent reads from it will return its default value.
  3802. mutating func clearEnumExtension() {self._enumExtension = nil}
  3803. var dynamicEnumExtension: Proto2Unittest_TestDynamicExtensions.DynamicEnumType {
  3804. get {return _dynamicEnumExtension ?? .dynamicFoo}
  3805. set {_dynamicEnumExtension = newValue}
  3806. }
  3807. /// Returns true if `dynamicEnumExtension` has been explicitly set.
  3808. var hasDynamicEnumExtension: Bool {return self._dynamicEnumExtension != nil}
  3809. /// Clears the value of `dynamicEnumExtension`. Subsequent reads from it will return its default value.
  3810. mutating func clearDynamicEnumExtension() {self._dynamicEnumExtension = nil}
  3811. var messageExtension: Proto2Unittest_ForeignMessage {
  3812. get {return _messageExtension ?? Proto2Unittest_ForeignMessage()}
  3813. set {_messageExtension = newValue}
  3814. }
  3815. /// Returns true if `messageExtension` has been explicitly set.
  3816. var hasMessageExtension: Bool {return self._messageExtension != nil}
  3817. /// Clears the value of `messageExtension`. Subsequent reads from it will return its default value.
  3818. mutating func clearMessageExtension() {self._messageExtension = nil}
  3819. var dynamicMessageExtension: Proto2Unittest_TestDynamicExtensions.DynamicMessageType {
  3820. get {return _dynamicMessageExtension ?? Proto2Unittest_TestDynamicExtensions.DynamicMessageType()}
  3821. set {_dynamicMessageExtension = newValue}
  3822. }
  3823. /// Returns true if `dynamicMessageExtension` has been explicitly set.
  3824. var hasDynamicMessageExtension: Bool {return self._dynamicMessageExtension != nil}
  3825. /// Clears the value of `dynamicMessageExtension`. Subsequent reads from it will return its default value.
  3826. mutating func clearDynamicMessageExtension() {self._dynamicMessageExtension = nil}
  3827. var repeatedExtension: [String] = []
  3828. var packedExtension: [Int32] = []
  3829. var unknownFields = SwiftProtobuf.UnknownStorage()
  3830. enum DynamicEnumType: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  3831. case dynamicFoo = 2200
  3832. case dynamicBar = 2201
  3833. case dynamicBaz = 2202
  3834. init() {
  3835. self = .dynamicFoo
  3836. }
  3837. }
  3838. struct DynamicMessageType: Sendable {
  3839. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3840. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3841. // methods supported on all messages.
  3842. var dynamicField: Int32 {
  3843. get {return _dynamicField ?? 0}
  3844. set {_dynamicField = newValue}
  3845. }
  3846. /// Returns true if `dynamicField` has been explicitly set.
  3847. var hasDynamicField: Bool {return self._dynamicField != nil}
  3848. /// Clears the value of `dynamicField`. Subsequent reads from it will return its default value.
  3849. mutating func clearDynamicField() {self._dynamicField = nil}
  3850. var unknownFields = SwiftProtobuf.UnknownStorage()
  3851. init() {}
  3852. fileprivate var _dynamicField: Int32? = nil
  3853. }
  3854. init() {}
  3855. fileprivate var _scalarExtension: UInt32? = nil
  3856. fileprivate var _enumExtension: Proto2Unittest_ForeignEnum? = nil
  3857. fileprivate var _dynamicEnumExtension: Proto2Unittest_TestDynamicExtensions.DynamicEnumType? = nil
  3858. fileprivate var _messageExtension: Proto2Unittest_ForeignMessage? = nil
  3859. fileprivate var _dynamicMessageExtension: Proto2Unittest_TestDynamicExtensions.DynamicMessageType? = nil
  3860. }
  3861. struct Proto2Unittest_TestRepeatedString: @unchecked Sendable {
  3862. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3863. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3864. // methods supported on all messages.
  3865. var repeatedString1: [String] = []
  3866. var repeatedString2: [String] = []
  3867. var repeatedBytes11: [Data] = []
  3868. var repeatedBytes12: [Data] = []
  3869. var unknownFields = SwiftProtobuf.UnknownStorage()
  3870. init() {}
  3871. }
  3872. struct Proto2Unittest_TestRepeatedScalarDifferentTagSizes: Sendable {
  3873. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3874. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3875. // methods supported on all messages.
  3876. /// Parsing repeated fixed size values used to fail. This message needs to be
  3877. /// used in order to get a tag of the right size; all of the repeated fields
  3878. /// in TestAllTypes didn't trigger the check.
  3879. var repeatedFixed32: [UInt32] = []
  3880. /// Check for a varint type, just for good measure.
  3881. var repeatedInt32: [Int32] = []
  3882. /// These have two-byte tags.
  3883. var repeatedFixed64: [UInt64] = []
  3884. var repeatedInt64: [Int64] = []
  3885. /// Three byte tags.
  3886. var repeatedFloat: [Float] = []
  3887. var repeatedUint64: [UInt64] = []
  3888. var unknownFields = SwiftProtobuf.UnknownStorage()
  3889. init() {}
  3890. }
  3891. /// Test that if an optional or required message/group field appears multiple
  3892. /// times in the input, they need to be merged.
  3893. struct Proto2Unittest_TestParsingMerge: SwiftProtobuf.ExtensibleMessage, Sendable {
  3894. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3895. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3896. // methods supported on all messages.
  3897. var requiredAllTypes: Proto2Unittest_TestAllTypes {
  3898. get {return _requiredAllTypes ?? Proto2Unittest_TestAllTypes()}
  3899. set {_requiredAllTypes = newValue}
  3900. }
  3901. /// Returns true if `requiredAllTypes` has been explicitly set.
  3902. var hasRequiredAllTypes: Bool {return self._requiredAllTypes != nil}
  3903. /// Clears the value of `requiredAllTypes`. Subsequent reads from it will return its default value.
  3904. mutating func clearRequiredAllTypes() {self._requiredAllTypes = nil}
  3905. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  3906. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  3907. set {_optionalAllTypes = newValue}
  3908. }
  3909. /// Returns true if `optionalAllTypes` has been explicitly set.
  3910. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  3911. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  3912. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  3913. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  3914. var optionalGroup: Proto2Unittest_TestParsingMerge.OptionalGroup {
  3915. get {return _optionalGroup ?? Proto2Unittest_TestParsingMerge.OptionalGroup()}
  3916. set {_optionalGroup = newValue}
  3917. }
  3918. /// Returns true if `optionalGroup` has been explicitly set.
  3919. var hasOptionalGroup: Bool {return self._optionalGroup != nil}
  3920. /// Clears the value of `optionalGroup`. Subsequent reads from it will return its default value.
  3921. mutating func clearOptionalGroup() {self._optionalGroup = nil}
  3922. var repeatedGroup: [Proto2Unittest_TestParsingMerge.RepeatedGroup] = []
  3923. var unknownFields = SwiftProtobuf.UnknownStorage()
  3924. /// RepeatedFieldsGenerator defines matching field types as TestParsingMerge,
  3925. /// except that all fields are repeated. In the tests, we will serialize the
  3926. /// RepeatedFieldsGenerator to bytes, and parse the bytes to TestParsingMerge.
  3927. /// Repeated fields in RepeatedFieldsGenerator are expected to be merged into
  3928. /// the corresponding required/optional fields in TestParsingMerge.
  3929. struct RepeatedFieldsGenerator: Sendable {
  3930. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3931. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3932. // methods supported on all messages.
  3933. var field1: [Proto2Unittest_TestAllTypes] = []
  3934. var field2: [Proto2Unittest_TestAllTypes] = []
  3935. var field3: [Proto2Unittest_TestAllTypes] = []
  3936. var group1: [Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.Group1] = []
  3937. var group2: [Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.Group2] = []
  3938. var ext1: [Proto2Unittest_TestAllTypes] = []
  3939. var ext2: [Proto2Unittest_TestAllTypes] = []
  3940. var unknownFields = SwiftProtobuf.UnknownStorage()
  3941. struct Group1: Sendable {
  3942. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3943. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3944. // methods supported on all messages.
  3945. var field1: Proto2Unittest_TestAllTypes {
  3946. get {return _field1 ?? Proto2Unittest_TestAllTypes()}
  3947. set {_field1 = newValue}
  3948. }
  3949. /// Returns true if `field1` has been explicitly set.
  3950. var hasField1: Bool {return self._field1 != nil}
  3951. /// Clears the value of `field1`. Subsequent reads from it will return its default value.
  3952. mutating func clearField1() {self._field1 = nil}
  3953. var unknownFields = SwiftProtobuf.UnknownStorage()
  3954. init() {}
  3955. fileprivate var _field1: Proto2Unittest_TestAllTypes? = nil
  3956. }
  3957. struct Group2: Sendable {
  3958. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3959. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3960. // methods supported on all messages.
  3961. var field1: Proto2Unittest_TestAllTypes {
  3962. get {return _field1 ?? Proto2Unittest_TestAllTypes()}
  3963. set {_field1 = newValue}
  3964. }
  3965. /// Returns true if `field1` has been explicitly set.
  3966. var hasField1: Bool {return self._field1 != nil}
  3967. /// Clears the value of `field1`. Subsequent reads from it will return its default value.
  3968. mutating func clearField1() {self._field1 = nil}
  3969. var unknownFields = SwiftProtobuf.UnknownStorage()
  3970. init() {}
  3971. fileprivate var _field1: Proto2Unittest_TestAllTypes? = nil
  3972. }
  3973. init() {}
  3974. }
  3975. struct OptionalGroup: Sendable {
  3976. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3977. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3978. // methods supported on all messages.
  3979. var optionalGroupAllTypes: Proto2Unittest_TestAllTypes {
  3980. get {return _optionalGroupAllTypes ?? Proto2Unittest_TestAllTypes()}
  3981. set {_optionalGroupAllTypes = newValue}
  3982. }
  3983. /// Returns true if `optionalGroupAllTypes` has been explicitly set.
  3984. var hasOptionalGroupAllTypes: Bool {return self._optionalGroupAllTypes != nil}
  3985. /// Clears the value of `optionalGroupAllTypes`. Subsequent reads from it will return its default value.
  3986. mutating func clearOptionalGroupAllTypes() {self._optionalGroupAllTypes = nil}
  3987. var unknownFields = SwiftProtobuf.UnknownStorage()
  3988. init() {}
  3989. fileprivate var _optionalGroupAllTypes: Proto2Unittest_TestAllTypes? = nil
  3990. }
  3991. struct RepeatedGroup: Sendable {
  3992. // SwiftProtobuf.Message conformance is added in an extension below. See the
  3993. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  3994. // methods supported on all messages.
  3995. var repeatedGroupAllTypes: Proto2Unittest_TestAllTypes {
  3996. get {return _repeatedGroupAllTypes ?? Proto2Unittest_TestAllTypes()}
  3997. set {_repeatedGroupAllTypes = newValue}
  3998. }
  3999. /// Returns true if `repeatedGroupAllTypes` has been explicitly set.
  4000. var hasRepeatedGroupAllTypes: Bool {return self._repeatedGroupAllTypes != nil}
  4001. /// Clears the value of `repeatedGroupAllTypes`. Subsequent reads from it will return its default value.
  4002. mutating func clearRepeatedGroupAllTypes() {self._repeatedGroupAllTypes = nil}
  4003. var unknownFields = SwiftProtobuf.UnknownStorage()
  4004. init() {}
  4005. fileprivate var _repeatedGroupAllTypes: Proto2Unittest_TestAllTypes? = nil
  4006. }
  4007. init() {}
  4008. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  4009. fileprivate var _requiredAllTypes: Proto2Unittest_TestAllTypes? = nil
  4010. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  4011. fileprivate var _optionalGroup: Proto2Unittest_TestParsingMerge.OptionalGroup? = nil
  4012. }
  4013. /// Test that the correct exception is thrown by parseFrom in a corner case
  4014. /// involving merging, extensions, and required fields.
  4015. struct Proto2Unittest_TestMergeException: Sendable {
  4016. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4017. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4018. // methods supported on all messages.
  4019. var allExtensions: Proto2Unittest_TestAllExtensions {
  4020. get {return _allExtensions ?? Proto2Unittest_TestAllExtensions()}
  4021. set {_allExtensions = newValue}
  4022. }
  4023. /// Returns true if `allExtensions` has been explicitly set.
  4024. var hasAllExtensions: Bool {return self._allExtensions != nil}
  4025. /// Clears the value of `allExtensions`. Subsequent reads from it will return its default value.
  4026. mutating func clearAllExtensions() {self._allExtensions = nil}
  4027. var unknownFields = SwiftProtobuf.UnknownStorage()
  4028. init() {}
  4029. fileprivate var _allExtensions: Proto2Unittest_TestAllExtensions? = nil
  4030. }
  4031. struct Proto2Unittest_TestCommentInjectionMessage: Sendable {
  4032. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4033. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4034. // methods supported on all messages.
  4035. /// */ <- This should not close the generated doc comment
  4036. var a: String {
  4037. get {return _a ?? "*/ <- Neither should this."}
  4038. set {_a = newValue}
  4039. }
  4040. /// Returns true if `a` has been explicitly set.
  4041. var hasA: Bool {return self._a != nil}
  4042. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  4043. mutating func clearA() {self._a = nil}
  4044. var unknownFields = SwiftProtobuf.UnknownStorage()
  4045. init() {}
  4046. fileprivate var _a: String? = nil
  4047. }
  4048. /// Used to check that the c++ code generator re-orders messages to reduce
  4049. /// padding.
  4050. struct Proto2Unittest_TestMessageSize: Sendable {
  4051. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4052. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4053. // methods supported on all messages.
  4054. var m1: Bool {
  4055. get {return _m1 ?? false}
  4056. set {_m1 = newValue}
  4057. }
  4058. /// Returns true if `m1` has been explicitly set.
  4059. var hasM1: Bool {return self._m1 != nil}
  4060. /// Clears the value of `m1`. Subsequent reads from it will return its default value.
  4061. mutating func clearM1() {self._m1 = nil}
  4062. var m2: Int64 {
  4063. get {return _m2 ?? 0}
  4064. set {_m2 = newValue}
  4065. }
  4066. /// Returns true if `m2` has been explicitly set.
  4067. var hasM2: Bool {return self._m2 != nil}
  4068. /// Clears the value of `m2`. Subsequent reads from it will return its default value.
  4069. mutating func clearM2() {self._m2 = nil}
  4070. var m3: Bool {
  4071. get {return _m3 ?? false}
  4072. set {_m3 = newValue}
  4073. }
  4074. /// Returns true if `m3` has been explicitly set.
  4075. var hasM3: Bool {return self._m3 != nil}
  4076. /// Clears the value of `m3`. Subsequent reads from it will return its default value.
  4077. mutating func clearM3() {self._m3 = nil}
  4078. var m4: String {
  4079. get {return _m4 ?? String()}
  4080. set {_m4 = newValue}
  4081. }
  4082. /// Returns true if `m4` has been explicitly set.
  4083. var hasM4: Bool {return self._m4 != nil}
  4084. /// Clears the value of `m4`. Subsequent reads from it will return its default value.
  4085. mutating func clearM4() {self._m4 = nil}
  4086. var m5: Int32 {
  4087. get {return _m5 ?? 0}
  4088. set {_m5 = newValue}
  4089. }
  4090. /// Returns true if `m5` has been explicitly set.
  4091. var hasM5: Bool {return self._m5 != nil}
  4092. /// Clears the value of `m5`. Subsequent reads from it will return its default value.
  4093. mutating func clearM5() {self._m5 = nil}
  4094. var m6: Int64 {
  4095. get {return _m6 ?? 0}
  4096. set {_m6 = newValue}
  4097. }
  4098. /// Returns true if `m6` has been explicitly set.
  4099. var hasM6: Bool {return self._m6 != nil}
  4100. /// Clears the value of `m6`. Subsequent reads from it will return its default value.
  4101. mutating func clearM6() {self._m6 = nil}
  4102. var unknownFields = SwiftProtobuf.UnknownStorage()
  4103. init() {}
  4104. fileprivate var _m1: Bool? = nil
  4105. fileprivate var _m2: Int64? = nil
  4106. fileprivate var _m3: Bool? = nil
  4107. fileprivate var _m4: String? = nil
  4108. fileprivate var _m5: Int32? = nil
  4109. fileprivate var _m6: Int64? = nil
  4110. }
  4111. struct Proto2Unittest_OpenEnumMessage: Sendable {
  4112. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4113. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4114. // methods supported on all messages.
  4115. var optOpen: Proto2Unittest_OpenEnumMessage.TestEnum {
  4116. get {return _optOpen ?? .unknown}
  4117. set {_optOpen = newValue}
  4118. }
  4119. /// Returns true if `optOpen` has been explicitly set.
  4120. var hasOptOpen: Bool {return self._optOpen != nil}
  4121. /// Clears the value of `optOpen`. Subsequent reads from it will return its default value.
  4122. mutating func clearOptOpen() {self._optOpen = nil}
  4123. var optClosed: Proto2Unittest_ForeignEnum {
  4124. get {return _optClosed ?? .foreignFoo}
  4125. set {_optClosed = newValue}
  4126. }
  4127. /// Returns true if `optClosed` has been explicitly set.
  4128. var hasOptClosed: Bool {return self._optClosed != nil}
  4129. /// Clears the value of `optClosed`. Subsequent reads from it will return its default value.
  4130. mutating func clearOptClosed() {self._optClosed = nil}
  4131. var repeatedOpen: [Proto2Unittest_OpenEnumMessage.TestEnum] = []
  4132. var repeatedClosed: [Proto2Unittest_ForeignEnum] = []
  4133. var unknownFields = SwiftProtobuf.UnknownStorage()
  4134. enum TestEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
  4135. typealias RawValue = Int
  4136. case unknown // = 0
  4137. case foo // = 1
  4138. case bar // = 2
  4139. case baz // = 3
  4140. case UNRECOGNIZED(Int)
  4141. init() {
  4142. self = .unknown
  4143. }
  4144. init?(rawValue: Int) {
  4145. switch rawValue {
  4146. case 0: self = .unknown
  4147. case 1: self = .foo
  4148. case 2: self = .bar
  4149. case 3: self = .baz
  4150. default: self = .UNRECOGNIZED(rawValue)
  4151. }
  4152. }
  4153. var rawValue: Int {
  4154. switch self {
  4155. case .unknown: return 0
  4156. case .foo: return 1
  4157. case .bar: return 2
  4158. case .baz: return 3
  4159. case .UNRECOGNIZED(let i): return i
  4160. }
  4161. }
  4162. // The compiler won't synthesize support with the UNRECOGNIZED case.
  4163. static let allCases: [Proto2Unittest_OpenEnumMessage.TestEnum] = [
  4164. .unknown,
  4165. .foo,
  4166. .bar,
  4167. .baz,
  4168. ]
  4169. }
  4170. init() {}
  4171. fileprivate var _optOpen: Proto2Unittest_OpenEnumMessage.TestEnum? = nil
  4172. fileprivate var _optClosed: Proto2Unittest_ForeignEnum? = nil
  4173. }
  4174. /// Tests eager verification of a lazy message field.
  4175. struct Proto2Unittest_TestEagerlyVerifiedLazyMessage: Sendable {
  4176. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4177. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4178. // methods supported on all messages.
  4179. var lazyMessage: Proto2Unittest_TestEagerlyVerifiedLazyMessage.LazyMessage {
  4180. get {return _lazyMessage ?? Proto2Unittest_TestEagerlyVerifiedLazyMessage.LazyMessage()}
  4181. set {_lazyMessage = newValue}
  4182. }
  4183. /// Returns true if `lazyMessage` has been explicitly set.
  4184. var hasLazyMessage: Bool {return self._lazyMessage != nil}
  4185. /// Clears the value of `lazyMessage`. Subsequent reads from it will return its default value.
  4186. mutating func clearLazyMessage() {self._lazyMessage = nil}
  4187. var unknownFields = SwiftProtobuf.UnknownStorage()
  4188. struct LazyMessage: @unchecked Sendable {
  4189. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4190. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4191. // methods supported on all messages.
  4192. var bytesField: Data {
  4193. get {return _bytesField ?? Data()}
  4194. set {_bytesField = newValue}
  4195. }
  4196. /// Returns true if `bytesField` has been explicitly set.
  4197. var hasBytesField: Bool {return self._bytesField != nil}
  4198. /// Clears the value of `bytesField`. Subsequent reads from it will return its default value.
  4199. mutating func clearBytesField() {self._bytesField = nil}
  4200. var unknownFields = SwiftProtobuf.UnknownStorage()
  4201. init() {}
  4202. fileprivate var _bytesField: Data? = nil
  4203. }
  4204. init() {}
  4205. fileprivate var _lazyMessage: Proto2Unittest_TestEagerlyVerifiedLazyMessage.LazyMessage? = nil
  4206. }
  4207. /// Test that RPC services work.
  4208. struct Proto2Unittest_FooRequest: Sendable {
  4209. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4210. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4211. // methods supported on all messages.
  4212. var unknownFields = SwiftProtobuf.UnknownStorage()
  4213. init() {}
  4214. }
  4215. struct Proto2Unittest_FooResponse: Sendable {
  4216. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4217. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4218. // methods supported on all messages.
  4219. var unknownFields = SwiftProtobuf.UnknownStorage()
  4220. init() {}
  4221. }
  4222. struct Proto2Unittest_FooClientMessage: Sendable {
  4223. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4224. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4225. // methods supported on all messages.
  4226. var unknownFields = SwiftProtobuf.UnknownStorage()
  4227. init() {}
  4228. }
  4229. struct Proto2Unittest_FooServerMessage: Sendable {
  4230. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4231. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4232. // methods supported on all messages.
  4233. var unknownFields = SwiftProtobuf.UnknownStorage()
  4234. init() {}
  4235. }
  4236. struct Proto2Unittest_BarRequest: Sendable {
  4237. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4238. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4239. // methods supported on all messages.
  4240. var unknownFields = SwiftProtobuf.UnknownStorage()
  4241. init() {}
  4242. }
  4243. struct Proto2Unittest_BarResponse: Sendable {
  4244. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4245. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4246. // methods supported on all messages.
  4247. var unknownFields = SwiftProtobuf.UnknownStorage()
  4248. init() {}
  4249. }
  4250. struct Proto2Unittest_TestJsonName: Sendable {
  4251. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4252. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4253. // methods supported on all messages.
  4254. var fieldName1: Int32 {
  4255. get {return _fieldName1 ?? 0}
  4256. set {_fieldName1 = newValue}
  4257. }
  4258. /// Returns true if `fieldName1` has been explicitly set.
  4259. var hasFieldName1: Bool {return self._fieldName1 != nil}
  4260. /// Clears the value of `fieldName1`. Subsequent reads from it will return its default value.
  4261. mutating func clearFieldName1() {self._fieldName1 = nil}
  4262. var fieldName2: Int32 {
  4263. get {return _fieldName2 ?? 0}
  4264. set {_fieldName2 = newValue}
  4265. }
  4266. /// Returns true if `fieldName2` has been explicitly set.
  4267. var hasFieldName2: Bool {return self._fieldName2 != nil}
  4268. /// Clears the value of `fieldName2`. Subsequent reads from it will return its default value.
  4269. mutating func clearFieldName2() {self._fieldName2 = nil}
  4270. var fieldName3: Int32 {
  4271. get {return _fieldName3 ?? 0}
  4272. set {_fieldName3 = newValue}
  4273. }
  4274. /// Returns true if `fieldName3` has been explicitly set.
  4275. var hasFieldName3: Bool {return self._fieldName3 != nil}
  4276. /// Clears the value of `fieldName3`. Subsequent reads from it will return its default value.
  4277. mutating func clearFieldName3() {self._fieldName3 = nil}
  4278. var fieldName4: Int32 {
  4279. get {return _fieldName4 ?? 0}
  4280. set {_fieldName4 = newValue}
  4281. }
  4282. /// Returns true if `fieldName4` has been explicitly set.
  4283. var hasFieldName4: Bool {return self._fieldName4 != nil}
  4284. /// Clears the value of `fieldName4`. Subsequent reads from it will return its default value.
  4285. mutating func clearFieldName4() {self._fieldName4 = nil}
  4286. var fieldName5: Int32 {
  4287. get {return _fieldName5 ?? 0}
  4288. set {_fieldName5 = newValue}
  4289. }
  4290. /// Returns true if `fieldName5` has been explicitly set.
  4291. var hasFieldName5: Bool {return self._fieldName5 != nil}
  4292. /// Clears the value of `fieldName5`. Subsequent reads from it will return its default value.
  4293. mutating func clearFieldName5() {self._fieldName5 = nil}
  4294. var fieldName6: Int32 {
  4295. get {return _fieldName6 ?? 0}
  4296. set {_fieldName6 = newValue}
  4297. }
  4298. /// Returns true if `fieldName6` has been explicitly set.
  4299. var hasFieldName6: Bool {return self._fieldName6 != nil}
  4300. /// Clears the value of `fieldName6`. Subsequent reads from it will return its default value.
  4301. mutating func clearFieldName6() {self._fieldName6 = nil}
  4302. var fieldname7: Int32 {
  4303. get {return _fieldname7 ?? 0}
  4304. set {_fieldname7 = newValue}
  4305. }
  4306. /// Returns true if `fieldname7` has been explicitly set.
  4307. var hasFieldname7: Bool {return self._fieldname7 != nil}
  4308. /// Clears the value of `fieldname7`. Subsequent reads from it will return its default value.
  4309. mutating func clearFieldname7() {self._fieldname7 = nil}
  4310. var unknownFields = SwiftProtobuf.UnknownStorage()
  4311. init() {}
  4312. fileprivate var _fieldName1: Int32? = nil
  4313. fileprivate var _fieldName2: Int32? = nil
  4314. fileprivate var _fieldName3: Int32? = nil
  4315. fileprivate var _fieldName4: Int32? = nil
  4316. fileprivate var _fieldName5: Int32? = nil
  4317. fileprivate var _fieldName6: Int32? = nil
  4318. fileprivate var _fieldname7: Int32? = nil
  4319. }
  4320. struct Proto2Unittest_TestHugeFieldNumbers: SwiftProtobuf.ExtensibleMessage, @unchecked Sendable {
  4321. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4322. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4323. // methods supported on all messages.
  4324. var optionalInt32: Int32 {
  4325. get {return _optionalInt32 ?? 0}
  4326. set {_optionalInt32 = newValue}
  4327. }
  4328. /// Returns true if `optionalInt32` has been explicitly set.
  4329. var hasOptionalInt32: Bool {return self._optionalInt32 != nil}
  4330. /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  4331. mutating func clearOptionalInt32() {self._optionalInt32 = nil}
  4332. var fixed32: Int32 {
  4333. get {return _fixed32 ?? 0}
  4334. set {_fixed32 = newValue}
  4335. }
  4336. /// Returns true if `fixed32` has been explicitly set.
  4337. var hasFixed32: Bool {return self._fixed32 != nil}
  4338. /// Clears the value of `fixed32`. Subsequent reads from it will return its default value.
  4339. mutating func clearFixed32() {self._fixed32 = nil}
  4340. var repeatedInt32: [Int32] = []
  4341. var packedInt32: [Int32] = []
  4342. var optionalEnum: Proto2Unittest_ForeignEnum {
  4343. get {return _optionalEnum ?? .foreignFoo}
  4344. set {_optionalEnum = newValue}
  4345. }
  4346. /// Returns true if `optionalEnum` has been explicitly set.
  4347. var hasOptionalEnum: Bool {return self._optionalEnum != nil}
  4348. /// Clears the value of `optionalEnum`. Subsequent reads from it will return its default value.
  4349. mutating func clearOptionalEnum() {self._optionalEnum = nil}
  4350. var optionalString: String {
  4351. get {return _optionalString ?? String()}
  4352. set {_optionalString = newValue}
  4353. }
  4354. /// Returns true if `optionalString` has been explicitly set.
  4355. var hasOptionalString: Bool {return self._optionalString != nil}
  4356. /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  4357. mutating func clearOptionalString() {self._optionalString = nil}
  4358. var optionalBytes: Data {
  4359. get {return _optionalBytes ?? Data()}
  4360. set {_optionalBytes = newValue}
  4361. }
  4362. /// Returns true if `optionalBytes` has been explicitly set.
  4363. var hasOptionalBytes: Bool {return self._optionalBytes != nil}
  4364. /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value.
  4365. mutating func clearOptionalBytes() {self._optionalBytes = nil}
  4366. var optionalMessage: Proto2Unittest_ForeignMessage {
  4367. get {return _optionalMessage ?? Proto2Unittest_ForeignMessage()}
  4368. set {_optionalMessage = newValue}
  4369. }
  4370. /// Returns true if `optionalMessage` has been explicitly set.
  4371. var hasOptionalMessage: Bool {return self._optionalMessage != nil}
  4372. /// Clears the value of `optionalMessage`. Subsequent reads from it will return its default value.
  4373. mutating func clearOptionalMessage() {self._optionalMessage = nil}
  4374. var optionalGroup: Proto2Unittest_TestHugeFieldNumbers.OptionalGroup {
  4375. get {return _optionalGroup ?? Proto2Unittest_TestHugeFieldNumbers.OptionalGroup()}
  4376. set {_optionalGroup = newValue}
  4377. }
  4378. /// Returns true if `optionalGroup` has been explicitly set.
  4379. var hasOptionalGroup: Bool {return self._optionalGroup != nil}
  4380. /// Clears the value of `optionalGroup`. Subsequent reads from it will return its default value.
  4381. mutating func clearOptionalGroup() {self._optionalGroup = nil}
  4382. var stringStringMap: Dictionary<String,String> = [:]
  4383. var oneofField: Proto2Unittest_TestHugeFieldNumbers.OneOf_OneofField? = nil
  4384. var oneofUint32: UInt32 {
  4385. get {
  4386. if case .oneofUint32(let v)? = oneofField {return v}
  4387. return 0
  4388. }
  4389. set {oneofField = .oneofUint32(newValue)}
  4390. }
  4391. var oneofTestAllTypes: Proto2Unittest_TestAllTypes {
  4392. get {
  4393. if case .oneofTestAllTypes(let v)? = oneofField {return v}
  4394. return Proto2Unittest_TestAllTypes()
  4395. }
  4396. set {oneofField = .oneofTestAllTypes(newValue)}
  4397. }
  4398. var oneofString: String {
  4399. get {
  4400. if case .oneofString(let v)? = oneofField {return v}
  4401. return String()
  4402. }
  4403. set {oneofField = .oneofString(newValue)}
  4404. }
  4405. var oneofBytes: Data {
  4406. get {
  4407. if case .oneofBytes(let v)? = oneofField {return v}
  4408. return Data()
  4409. }
  4410. set {oneofField = .oneofBytes(newValue)}
  4411. }
  4412. var unknownFields = SwiftProtobuf.UnknownStorage()
  4413. enum OneOf_OneofField: Equatable, @unchecked Sendable {
  4414. case oneofUint32(UInt32)
  4415. case oneofTestAllTypes(Proto2Unittest_TestAllTypes)
  4416. case oneofString(String)
  4417. case oneofBytes(Data)
  4418. }
  4419. struct OptionalGroup: Sendable {
  4420. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4421. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4422. // methods supported on all messages.
  4423. var groupA: Int32 {
  4424. get {return _groupA ?? 0}
  4425. set {_groupA = newValue}
  4426. }
  4427. /// Returns true if `groupA` has been explicitly set.
  4428. var hasGroupA: Bool {return self._groupA != nil}
  4429. /// Clears the value of `groupA`. Subsequent reads from it will return its default value.
  4430. mutating func clearGroupA() {self._groupA = nil}
  4431. var unknownFields = SwiftProtobuf.UnknownStorage()
  4432. init() {}
  4433. fileprivate var _groupA: Int32? = nil
  4434. }
  4435. init() {}
  4436. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  4437. fileprivate var _optionalInt32: Int32? = nil
  4438. fileprivate var _fixed32: Int32? = nil
  4439. fileprivate var _optionalEnum: Proto2Unittest_ForeignEnum? = nil
  4440. fileprivate var _optionalString: String? = nil
  4441. fileprivate var _optionalBytes: Data? = nil
  4442. fileprivate var _optionalMessage: Proto2Unittest_ForeignMessage? = nil
  4443. fileprivate var _optionalGroup: Proto2Unittest_TestHugeFieldNumbers.OptionalGroup? = nil
  4444. }
  4445. struct Proto2Unittest_TestExtensionInsideTable: SwiftProtobuf.ExtensibleMessage, Sendable {
  4446. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4447. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4448. // methods supported on all messages.
  4449. var field1: Int32 {
  4450. get {return _field1 ?? 0}
  4451. set {_field1 = newValue}
  4452. }
  4453. /// Returns true if `field1` has been explicitly set.
  4454. var hasField1: Bool {return self._field1 != nil}
  4455. /// Clears the value of `field1`. Subsequent reads from it will return its default value.
  4456. mutating func clearField1() {self._field1 = nil}
  4457. var field2: Int32 {
  4458. get {return _field2 ?? 0}
  4459. set {_field2 = newValue}
  4460. }
  4461. /// Returns true if `field2` has been explicitly set.
  4462. var hasField2: Bool {return self._field2 != nil}
  4463. /// Clears the value of `field2`. Subsequent reads from it will return its default value.
  4464. mutating func clearField2() {self._field2 = nil}
  4465. var field3: Int32 {
  4466. get {return _field3 ?? 0}
  4467. set {_field3 = newValue}
  4468. }
  4469. /// Returns true if `field3` has been explicitly set.
  4470. var hasField3: Bool {return self._field3 != nil}
  4471. /// Clears the value of `field3`. Subsequent reads from it will return its default value.
  4472. mutating func clearField3() {self._field3 = nil}
  4473. var field4: Int32 {
  4474. get {return _field4 ?? 0}
  4475. set {_field4 = newValue}
  4476. }
  4477. /// Returns true if `field4` has been explicitly set.
  4478. var hasField4: Bool {return self._field4 != nil}
  4479. /// Clears the value of `field4`. Subsequent reads from it will return its default value.
  4480. mutating func clearField4() {self._field4 = nil}
  4481. var field6: Int32 {
  4482. get {return _field6 ?? 0}
  4483. set {_field6 = newValue}
  4484. }
  4485. /// Returns true if `field6` has been explicitly set.
  4486. var hasField6: Bool {return self._field6 != nil}
  4487. /// Clears the value of `field6`. Subsequent reads from it will return its default value.
  4488. mutating func clearField6() {self._field6 = nil}
  4489. var field7: Int32 {
  4490. get {return _field7 ?? 0}
  4491. set {_field7 = newValue}
  4492. }
  4493. /// Returns true if `field7` has been explicitly set.
  4494. var hasField7: Bool {return self._field7 != nil}
  4495. /// Clears the value of `field7`. Subsequent reads from it will return its default value.
  4496. mutating func clearField7() {self._field7 = nil}
  4497. var field8: Int32 {
  4498. get {return _field8 ?? 0}
  4499. set {_field8 = newValue}
  4500. }
  4501. /// Returns true if `field8` has been explicitly set.
  4502. var hasField8: Bool {return self._field8 != nil}
  4503. /// Clears the value of `field8`. Subsequent reads from it will return its default value.
  4504. mutating func clearField8() {self._field8 = nil}
  4505. var field9: Int32 {
  4506. get {return _field9 ?? 0}
  4507. set {_field9 = newValue}
  4508. }
  4509. /// Returns true if `field9` has been explicitly set.
  4510. var hasField9: Bool {return self._field9 != nil}
  4511. /// Clears the value of `field9`. Subsequent reads from it will return its default value.
  4512. mutating func clearField9() {self._field9 = nil}
  4513. var field10: Int32 {
  4514. get {return _field10 ?? 0}
  4515. set {_field10 = newValue}
  4516. }
  4517. /// Returns true if `field10` has been explicitly set.
  4518. var hasField10: Bool {return self._field10 != nil}
  4519. /// Clears the value of `field10`. Subsequent reads from it will return its default value.
  4520. mutating func clearField10() {self._field10 = nil}
  4521. var unknownFields = SwiftProtobuf.UnknownStorage()
  4522. init() {}
  4523. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  4524. fileprivate var _field1: Int32? = nil
  4525. fileprivate var _field2: Int32? = nil
  4526. fileprivate var _field3: Int32? = nil
  4527. fileprivate var _field4: Int32? = nil
  4528. fileprivate var _field6: Int32? = nil
  4529. fileprivate var _field7: Int32? = nil
  4530. fileprivate var _field8: Int32? = nil
  4531. fileprivate var _field9: Int32? = nil
  4532. fileprivate var _field10: Int32? = nil
  4533. }
  4534. /// NOTE: Intentionally nested to mirror go/glep.
  4535. struct Proto2Unittest_TestNestedGroupExtensionOuter: Sendable {
  4536. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4537. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4538. // methods supported on all messages.
  4539. var layer1OptionalGroup: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup {
  4540. get {return _layer1OptionalGroup ?? Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup()}
  4541. set {_layer1OptionalGroup = newValue}
  4542. }
  4543. /// Returns true if `layer1OptionalGroup` has been explicitly set.
  4544. var hasLayer1OptionalGroup: Bool {return self._layer1OptionalGroup != nil}
  4545. /// Clears the value of `layer1OptionalGroup`. Subsequent reads from it will return its default value.
  4546. mutating func clearLayer1OptionalGroup() {self._layer1OptionalGroup = nil}
  4547. var unknownFields = SwiftProtobuf.UnknownStorage()
  4548. struct Layer1OptionalGroup: Sendable {
  4549. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4550. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4551. // methods supported on all messages.
  4552. var layer2RepeatedGroup: [Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup] = []
  4553. var layer2AnotherOptionalRepeatedGroup: [Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2AnotherOptionalRepeatedGroup] = []
  4554. var unknownFields = SwiftProtobuf.UnknownStorage()
  4555. struct Layer2RepeatedGroup: SwiftProtobuf.ExtensibleMessage, Sendable {
  4556. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4557. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4558. // methods supported on all messages.
  4559. var anotherField: String {
  4560. get {return _anotherField ?? String()}
  4561. set {_anotherField = newValue}
  4562. }
  4563. /// Returns true if `anotherField` has been explicitly set.
  4564. var hasAnotherField: Bool {return self._anotherField != nil}
  4565. /// Clears the value of `anotherField`. Subsequent reads from it will return its default value.
  4566. mutating func clearAnotherField() {self._anotherField = nil}
  4567. var unknownFields = SwiftProtobuf.UnknownStorage()
  4568. init() {}
  4569. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  4570. fileprivate var _anotherField: String? = nil
  4571. }
  4572. struct Layer2AnotherOptionalRepeatedGroup: Sendable {
  4573. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4574. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4575. // methods supported on all messages.
  4576. var butWhyTho: String {
  4577. get {return _butWhyTho ?? String()}
  4578. set {_butWhyTho = newValue}
  4579. }
  4580. /// Returns true if `butWhyTho` has been explicitly set.
  4581. var hasButWhyTho: Bool {return self._butWhyTho != nil}
  4582. /// Clears the value of `butWhyTho`. Subsequent reads from it will return its default value.
  4583. mutating func clearButWhyTho() {self._butWhyTho = nil}
  4584. var unknownFields = SwiftProtobuf.UnknownStorage()
  4585. init() {}
  4586. fileprivate var _butWhyTho: String? = nil
  4587. }
  4588. init() {}
  4589. }
  4590. init() {}
  4591. fileprivate var _layer1OptionalGroup: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup? = nil
  4592. }
  4593. struct Proto2Unittest_TestNestedGroupExtensionInnerExtension: Sendable {
  4594. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4595. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4596. // methods supported on all messages.
  4597. var innerName: String {
  4598. get {return _innerName ?? String()}
  4599. set {_innerName = newValue}
  4600. }
  4601. /// Returns true if `innerName` has been explicitly set.
  4602. var hasInnerName: Bool {return self._innerName != nil}
  4603. /// Clears the value of `innerName`. Subsequent reads from it will return its default value.
  4604. mutating func clearInnerName() {self._innerName = nil}
  4605. var unknownFields = SwiftProtobuf.UnknownStorage()
  4606. init() {}
  4607. fileprivate var _innerName: String? = nil
  4608. }
  4609. struct Proto2Unittest_TestExtensionRangeSerialize: SwiftProtobuf.ExtensibleMessage, Sendable {
  4610. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4611. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4612. // methods supported on all messages.
  4613. var fooOne: Int32 {
  4614. get {return _fooOne ?? 0}
  4615. set {_fooOne = newValue}
  4616. }
  4617. /// Returns true if `fooOne` has been explicitly set.
  4618. var hasFooOne: Bool {return self._fooOne != nil}
  4619. /// Clears the value of `fooOne`. Subsequent reads from it will return its default value.
  4620. mutating func clearFooOne() {self._fooOne = nil}
  4621. var fooTwo: Int32 {
  4622. get {return _fooTwo ?? 0}
  4623. set {_fooTwo = newValue}
  4624. }
  4625. /// Returns true if `fooTwo` has been explicitly set.
  4626. var hasFooTwo: Bool {return self._fooTwo != nil}
  4627. /// Clears the value of `fooTwo`. Subsequent reads from it will return its default value.
  4628. mutating func clearFooTwo() {self._fooTwo = nil}
  4629. var fooThree: Int32 {
  4630. get {return _fooThree ?? 0}
  4631. set {_fooThree = newValue}
  4632. }
  4633. /// Returns true if `fooThree` has been explicitly set.
  4634. var hasFooThree: Bool {return self._fooThree != nil}
  4635. /// Clears the value of `fooThree`. Subsequent reads from it will return its default value.
  4636. mutating func clearFooThree() {self._fooThree = nil}
  4637. var fooFour: Int32 {
  4638. get {return _fooFour ?? 0}
  4639. set {_fooFour = newValue}
  4640. }
  4641. /// Returns true if `fooFour` has been explicitly set.
  4642. var hasFooFour: Bool {return self._fooFour != nil}
  4643. /// Clears the value of `fooFour`. Subsequent reads from it will return its default value.
  4644. mutating func clearFooFour() {self._fooFour = nil}
  4645. var unknownFields = SwiftProtobuf.UnknownStorage()
  4646. init() {}
  4647. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  4648. fileprivate var _fooOne: Int32? = nil
  4649. fileprivate var _fooTwo: Int32? = nil
  4650. fileprivate var _fooThree: Int32? = nil
  4651. fileprivate var _fooFour: Int32? = nil
  4652. }
  4653. struct Proto2Unittest_TestVerifyInt32Simple: Sendable {
  4654. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4655. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4656. // methods supported on all messages.
  4657. var optionalInt321: Int32 {
  4658. get {return _optionalInt321 ?? 0}
  4659. set {_optionalInt321 = newValue}
  4660. }
  4661. /// Returns true if `optionalInt321` has been explicitly set.
  4662. var hasOptionalInt321: Bool {return self._optionalInt321 != nil}
  4663. /// Clears the value of `optionalInt321`. Subsequent reads from it will return its default value.
  4664. mutating func clearOptionalInt321() {self._optionalInt321 = nil}
  4665. var optionalInt322: Int32 {
  4666. get {return _optionalInt322 ?? 0}
  4667. set {_optionalInt322 = newValue}
  4668. }
  4669. /// Returns true if `optionalInt322` has been explicitly set.
  4670. var hasOptionalInt322: Bool {return self._optionalInt322 != nil}
  4671. /// Clears the value of `optionalInt322`. Subsequent reads from it will return its default value.
  4672. mutating func clearOptionalInt322() {self._optionalInt322 = nil}
  4673. var optionalInt3263: Int32 {
  4674. get {return _optionalInt3263 ?? 0}
  4675. set {_optionalInt3263 = newValue}
  4676. }
  4677. /// Returns true if `optionalInt3263` has been explicitly set.
  4678. var hasOptionalInt3263: Bool {return self._optionalInt3263 != nil}
  4679. /// Clears the value of `optionalInt3263`. Subsequent reads from it will return its default value.
  4680. mutating func clearOptionalInt3263() {self._optionalInt3263 = nil}
  4681. var optionalInt3264: Int32 {
  4682. get {return _optionalInt3264 ?? 0}
  4683. set {_optionalInt3264 = newValue}
  4684. }
  4685. /// Returns true if `optionalInt3264` has been explicitly set.
  4686. var hasOptionalInt3264: Bool {return self._optionalInt3264 != nil}
  4687. /// Clears the value of `optionalInt3264`. Subsequent reads from it will return its default value.
  4688. mutating func clearOptionalInt3264() {self._optionalInt3264 = nil}
  4689. var unknownFields = SwiftProtobuf.UnknownStorage()
  4690. init() {}
  4691. fileprivate var _optionalInt321: Int32? = nil
  4692. fileprivate var _optionalInt322: Int32? = nil
  4693. fileprivate var _optionalInt3263: Int32? = nil
  4694. fileprivate var _optionalInt3264: Int32? = nil
  4695. }
  4696. struct Proto2Unittest_TestVerifyInt32: Sendable {
  4697. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4698. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4699. // methods supported on all messages.
  4700. var optionalInt321: Int32 {
  4701. get {return _optionalInt321 ?? 0}
  4702. set {_optionalInt321 = newValue}
  4703. }
  4704. /// Returns true if `optionalInt321` has been explicitly set.
  4705. var hasOptionalInt321: Bool {return self._optionalInt321 != nil}
  4706. /// Clears the value of `optionalInt321`. Subsequent reads from it will return its default value.
  4707. mutating func clearOptionalInt321() {self._optionalInt321 = nil}
  4708. var optionalInt322: Int32 {
  4709. get {return _optionalInt322 ?? 0}
  4710. set {_optionalInt322 = newValue}
  4711. }
  4712. /// Returns true if `optionalInt322` has been explicitly set.
  4713. var hasOptionalInt322: Bool {return self._optionalInt322 != nil}
  4714. /// Clears the value of `optionalInt322`. Subsequent reads from it will return its default value.
  4715. mutating func clearOptionalInt322() {self._optionalInt322 = nil}
  4716. var optionalInt3263: Int32 {
  4717. get {return _optionalInt3263 ?? 0}
  4718. set {_optionalInt3263 = newValue}
  4719. }
  4720. /// Returns true if `optionalInt3263` has been explicitly set.
  4721. var hasOptionalInt3263: Bool {return self._optionalInt3263 != nil}
  4722. /// Clears the value of `optionalInt3263`. Subsequent reads from it will return its default value.
  4723. mutating func clearOptionalInt3263() {self._optionalInt3263 = nil}
  4724. var optionalInt3264: Int32 {
  4725. get {return _optionalInt3264 ?? 0}
  4726. set {_optionalInt3264 = newValue}
  4727. }
  4728. /// Returns true if `optionalInt3264` has been explicitly set.
  4729. var hasOptionalInt3264: Bool {return self._optionalInt3264 != nil}
  4730. /// Clears the value of `optionalInt3264`. Subsequent reads from it will return its default value.
  4731. mutating func clearOptionalInt3264() {self._optionalInt3264 = nil}
  4732. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  4733. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  4734. set {_optionalAllTypes = newValue}
  4735. }
  4736. /// Returns true if `optionalAllTypes` has been explicitly set.
  4737. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  4738. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  4739. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  4740. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  4741. var unknownFields = SwiftProtobuf.UnknownStorage()
  4742. init() {}
  4743. fileprivate var _optionalInt321: Int32? = nil
  4744. fileprivate var _optionalInt322: Int32? = nil
  4745. fileprivate var _optionalInt3263: Int32? = nil
  4746. fileprivate var _optionalInt3264: Int32? = nil
  4747. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  4748. }
  4749. struct Proto2Unittest_TestVerifyMostlyInt32: Sendable {
  4750. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4751. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4752. // methods supported on all messages.
  4753. var optionalInt6430: Int64 {
  4754. get {return _optionalInt6430 ?? 0}
  4755. set {_optionalInt6430 = newValue}
  4756. }
  4757. /// Returns true if `optionalInt6430` has been explicitly set.
  4758. var hasOptionalInt6430: Bool {return self._optionalInt6430 != nil}
  4759. /// Clears the value of `optionalInt6430`. Subsequent reads from it will return its default value.
  4760. mutating func clearOptionalInt6430() {self._optionalInt6430 = nil}
  4761. var optionalInt321: Int32 {
  4762. get {return _optionalInt321 ?? 0}
  4763. set {_optionalInt321 = newValue}
  4764. }
  4765. /// Returns true if `optionalInt321` has been explicitly set.
  4766. var hasOptionalInt321: Bool {return self._optionalInt321 != nil}
  4767. /// Clears the value of `optionalInt321`. Subsequent reads from it will return its default value.
  4768. mutating func clearOptionalInt321() {self._optionalInt321 = nil}
  4769. var optionalInt322: Int32 {
  4770. get {return _optionalInt322 ?? 0}
  4771. set {_optionalInt322 = newValue}
  4772. }
  4773. /// Returns true if `optionalInt322` has been explicitly set.
  4774. var hasOptionalInt322: Bool {return self._optionalInt322 != nil}
  4775. /// Clears the value of `optionalInt322`. Subsequent reads from it will return its default value.
  4776. mutating func clearOptionalInt322() {self._optionalInt322 = nil}
  4777. var optionalInt323: Int32 {
  4778. get {return _optionalInt323 ?? 0}
  4779. set {_optionalInt323 = newValue}
  4780. }
  4781. /// Returns true if `optionalInt323` has been explicitly set.
  4782. var hasOptionalInt323: Bool {return self._optionalInt323 != nil}
  4783. /// Clears the value of `optionalInt323`. Subsequent reads from it will return its default value.
  4784. mutating func clearOptionalInt323() {self._optionalInt323 = nil}
  4785. var optionalInt324: Int32 {
  4786. get {return _optionalInt324 ?? 0}
  4787. set {_optionalInt324 = newValue}
  4788. }
  4789. /// Returns true if `optionalInt324` has been explicitly set.
  4790. var hasOptionalInt324: Bool {return self._optionalInt324 != nil}
  4791. /// Clears the value of `optionalInt324`. Subsequent reads from it will return its default value.
  4792. mutating func clearOptionalInt324() {self._optionalInt324 = nil}
  4793. var optionalInt3263: Int32 {
  4794. get {return _optionalInt3263 ?? 0}
  4795. set {_optionalInt3263 = newValue}
  4796. }
  4797. /// Returns true if `optionalInt3263` has been explicitly set.
  4798. var hasOptionalInt3263: Bool {return self._optionalInt3263 != nil}
  4799. /// Clears the value of `optionalInt3263`. Subsequent reads from it will return its default value.
  4800. mutating func clearOptionalInt3263() {self._optionalInt3263 = nil}
  4801. var optionalInt3264: Int32 {
  4802. get {return _optionalInt3264 ?? 0}
  4803. set {_optionalInt3264 = newValue}
  4804. }
  4805. /// Returns true if `optionalInt3264` has been explicitly set.
  4806. var hasOptionalInt3264: Bool {return self._optionalInt3264 != nil}
  4807. /// Clears the value of `optionalInt3264`. Subsequent reads from it will return its default value.
  4808. mutating func clearOptionalInt3264() {self._optionalInt3264 = nil}
  4809. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  4810. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  4811. set {_optionalAllTypes = newValue}
  4812. }
  4813. /// Returns true if `optionalAllTypes` has been explicitly set.
  4814. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  4815. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  4816. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  4817. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  4818. var unknownFields = SwiftProtobuf.UnknownStorage()
  4819. init() {}
  4820. fileprivate var _optionalInt6430: Int64? = nil
  4821. fileprivate var _optionalInt321: Int32? = nil
  4822. fileprivate var _optionalInt322: Int32? = nil
  4823. fileprivate var _optionalInt323: Int32? = nil
  4824. fileprivate var _optionalInt324: Int32? = nil
  4825. fileprivate var _optionalInt3263: Int32? = nil
  4826. fileprivate var _optionalInt3264: Int32? = nil
  4827. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  4828. }
  4829. struct Proto2Unittest_TestVerifyMostlyInt32BigFieldNumber: Sendable {
  4830. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4831. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4832. // methods supported on all messages.
  4833. var optionalInt6430: Int64 {
  4834. get {return _optionalInt6430 ?? 0}
  4835. set {_optionalInt6430 = newValue}
  4836. }
  4837. /// Returns true if `optionalInt6430` has been explicitly set.
  4838. var hasOptionalInt6430: Bool {return self._optionalInt6430 != nil}
  4839. /// Clears the value of `optionalInt6430`. Subsequent reads from it will return its default value.
  4840. mutating func clearOptionalInt6430() {self._optionalInt6430 = nil}
  4841. var optionalInt32300: Int32 {
  4842. get {return _optionalInt32300 ?? 0}
  4843. set {_optionalInt32300 = newValue}
  4844. }
  4845. /// Returns true if `optionalInt32300` has been explicitly set.
  4846. var hasOptionalInt32300: Bool {return self._optionalInt32300 != nil}
  4847. /// Clears the value of `optionalInt32300`. Subsequent reads from it will return its default value.
  4848. mutating func clearOptionalInt32300() {self._optionalInt32300 = nil}
  4849. var optionalInt321: Int32 {
  4850. get {return _optionalInt321 ?? 0}
  4851. set {_optionalInt321 = newValue}
  4852. }
  4853. /// Returns true if `optionalInt321` has been explicitly set.
  4854. var hasOptionalInt321: Bool {return self._optionalInt321 != nil}
  4855. /// Clears the value of `optionalInt321`. Subsequent reads from it will return its default value.
  4856. mutating func clearOptionalInt321() {self._optionalInt321 = nil}
  4857. var optionalInt322: Int32 {
  4858. get {return _optionalInt322 ?? 0}
  4859. set {_optionalInt322 = newValue}
  4860. }
  4861. /// Returns true if `optionalInt322` has been explicitly set.
  4862. var hasOptionalInt322: Bool {return self._optionalInt322 != nil}
  4863. /// Clears the value of `optionalInt322`. Subsequent reads from it will return its default value.
  4864. mutating func clearOptionalInt322() {self._optionalInt322 = nil}
  4865. var optionalInt323: Int32 {
  4866. get {return _optionalInt323 ?? 0}
  4867. set {_optionalInt323 = newValue}
  4868. }
  4869. /// Returns true if `optionalInt323` has been explicitly set.
  4870. var hasOptionalInt323: Bool {return self._optionalInt323 != nil}
  4871. /// Clears the value of `optionalInt323`. Subsequent reads from it will return its default value.
  4872. mutating func clearOptionalInt323() {self._optionalInt323 = nil}
  4873. var optionalInt324: Int32 {
  4874. get {return _optionalInt324 ?? 0}
  4875. set {_optionalInt324 = newValue}
  4876. }
  4877. /// Returns true if `optionalInt324` has been explicitly set.
  4878. var hasOptionalInt324: Bool {return self._optionalInt324 != nil}
  4879. /// Clears the value of `optionalInt324`. Subsequent reads from it will return its default value.
  4880. mutating func clearOptionalInt324() {self._optionalInt324 = nil}
  4881. var optionalInt3263: Int32 {
  4882. get {return _optionalInt3263 ?? 0}
  4883. set {_optionalInt3263 = newValue}
  4884. }
  4885. /// Returns true if `optionalInt3263` has been explicitly set.
  4886. var hasOptionalInt3263: Bool {return self._optionalInt3263 != nil}
  4887. /// Clears the value of `optionalInt3263`. Subsequent reads from it will return its default value.
  4888. mutating func clearOptionalInt3263() {self._optionalInt3263 = nil}
  4889. var optionalInt3264: Int32 {
  4890. get {return _optionalInt3264 ?? 0}
  4891. set {_optionalInt3264 = newValue}
  4892. }
  4893. /// Returns true if `optionalInt3264` has been explicitly set.
  4894. var hasOptionalInt3264: Bool {return self._optionalInt3264 != nil}
  4895. /// Clears the value of `optionalInt3264`. Subsequent reads from it will return its default value.
  4896. mutating func clearOptionalInt3264() {self._optionalInt3264 = nil}
  4897. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  4898. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  4899. set {_optionalAllTypes = newValue}
  4900. }
  4901. /// Returns true if `optionalAllTypes` has been explicitly set.
  4902. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  4903. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  4904. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  4905. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  4906. var unknownFields = SwiftProtobuf.UnknownStorage()
  4907. init() {}
  4908. fileprivate var _optionalInt6430: Int64? = nil
  4909. fileprivate var _optionalInt32300: Int32? = nil
  4910. fileprivate var _optionalInt321: Int32? = nil
  4911. fileprivate var _optionalInt322: Int32? = nil
  4912. fileprivate var _optionalInt323: Int32? = nil
  4913. fileprivate var _optionalInt324: Int32? = nil
  4914. fileprivate var _optionalInt3263: Int32? = nil
  4915. fileprivate var _optionalInt3264: Int32? = nil
  4916. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  4917. }
  4918. struct Proto2Unittest_TestVerifyUint32Simple: Sendable {
  4919. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4920. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4921. // methods supported on all messages.
  4922. var optionalUint321: UInt32 {
  4923. get {return _optionalUint321 ?? 0}
  4924. set {_optionalUint321 = newValue}
  4925. }
  4926. /// Returns true if `optionalUint321` has been explicitly set.
  4927. var hasOptionalUint321: Bool {return self._optionalUint321 != nil}
  4928. /// Clears the value of `optionalUint321`. Subsequent reads from it will return its default value.
  4929. mutating func clearOptionalUint321() {self._optionalUint321 = nil}
  4930. var optionalUint322: UInt32 {
  4931. get {return _optionalUint322 ?? 0}
  4932. set {_optionalUint322 = newValue}
  4933. }
  4934. /// Returns true if `optionalUint322` has been explicitly set.
  4935. var hasOptionalUint322: Bool {return self._optionalUint322 != nil}
  4936. /// Clears the value of `optionalUint322`. Subsequent reads from it will return its default value.
  4937. mutating func clearOptionalUint322() {self._optionalUint322 = nil}
  4938. var optionalUint3263: UInt32 {
  4939. get {return _optionalUint3263 ?? 0}
  4940. set {_optionalUint3263 = newValue}
  4941. }
  4942. /// Returns true if `optionalUint3263` has been explicitly set.
  4943. var hasOptionalUint3263: Bool {return self._optionalUint3263 != nil}
  4944. /// Clears the value of `optionalUint3263`. Subsequent reads from it will return its default value.
  4945. mutating func clearOptionalUint3263() {self._optionalUint3263 = nil}
  4946. var optionalUint3264: UInt32 {
  4947. get {return _optionalUint3264 ?? 0}
  4948. set {_optionalUint3264 = newValue}
  4949. }
  4950. /// Returns true if `optionalUint3264` has been explicitly set.
  4951. var hasOptionalUint3264: Bool {return self._optionalUint3264 != nil}
  4952. /// Clears the value of `optionalUint3264`. Subsequent reads from it will return its default value.
  4953. mutating func clearOptionalUint3264() {self._optionalUint3264 = nil}
  4954. var unknownFields = SwiftProtobuf.UnknownStorage()
  4955. init() {}
  4956. fileprivate var _optionalUint321: UInt32? = nil
  4957. fileprivate var _optionalUint322: UInt32? = nil
  4958. fileprivate var _optionalUint3263: UInt32? = nil
  4959. fileprivate var _optionalUint3264: UInt32? = nil
  4960. }
  4961. struct Proto2Unittest_TestVerifyUint32: Sendable {
  4962. // SwiftProtobuf.Message conformance is added in an extension below. See the
  4963. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  4964. // methods supported on all messages.
  4965. var optionalUint321: UInt32 {
  4966. get {return _optionalUint321 ?? 0}
  4967. set {_optionalUint321 = newValue}
  4968. }
  4969. /// Returns true if `optionalUint321` has been explicitly set.
  4970. var hasOptionalUint321: Bool {return self._optionalUint321 != nil}
  4971. /// Clears the value of `optionalUint321`. Subsequent reads from it will return its default value.
  4972. mutating func clearOptionalUint321() {self._optionalUint321 = nil}
  4973. var optionalUint322: UInt32 {
  4974. get {return _optionalUint322 ?? 0}
  4975. set {_optionalUint322 = newValue}
  4976. }
  4977. /// Returns true if `optionalUint322` has been explicitly set.
  4978. var hasOptionalUint322: Bool {return self._optionalUint322 != nil}
  4979. /// Clears the value of `optionalUint322`. Subsequent reads from it will return its default value.
  4980. mutating func clearOptionalUint322() {self._optionalUint322 = nil}
  4981. var optionalUint3263: UInt32 {
  4982. get {return _optionalUint3263 ?? 0}
  4983. set {_optionalUint3263 = newValue}
  4984. }
  4985. /// Returns true if `optionalUint3263` has been explicitly set.
  4986. var hasOptionalUint3263: Bool {return self._optionalUint3263 != nil}
  4987. /// Clears the value of `optionalUint3263`. Subsequent reads from it will return its default value.
  4988. mutating func clearOptionalUint3263() {self._optionalUint3263 = nil}
  4989. var optionalUint3264: UInt32 {
  4990. get {return _optionalUint3264 ?? 0}
  4991. set {_optionalUint3264 = newValue}
  4992. }
  4993. /// Returns true if `optionalUint3264` has been explicitly set.
  4994. var hasOptionalUint3264: Bool {return self._optionalUint3264 != nil}
  4995. /// Clears the value of `optionalUint3264`. Subsequent reads from it will return its default value.
  4996. mutating func clearOptionalUint3264() {self._optionalUint3264 = nil}
  4997. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  4998. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  4999. set {_optionalAllTypes = newValue}
  5000. }
  5001. /// Returns true if `optionalAllTypes` has been explicitly set.
  5002. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  5003. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  5004. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  5005. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  5006. var unknownFields = SwiftProtobuf.UnknownStorage()
  5007. init() {}
  5008. fileprivate var _optionalUint321: UInt32? = nil
  5009. fileprivate var _optionalUint322: UInt32? = nil
  5010. fileprivate var _optionalUint3263: UInt32? = nil
  5011. fileprivate var _optionalUint3264: UInt32? = nil
  5012. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  5013. }
  5014. struct Proto2Unittest_TestVerifyOneUint32: Sendable {
  5015. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5016. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5017. // methods supported on all messages.
  5018. var optionalUint321: UInt32 {
  5019. get {return _optionalUint321 ?? 0}
  5020. set {_optionalUint321 = newValue}
  5021. }
  5022. /// Returns true if `optionalUint321` has been explicitly set.
  5023. var hasOptionalUint321: Bool {return self._optionalUint321 != nil}
  5024. /// Clears the value of `optionalUint321`. Subsequent reads from it will return its default value.
  5025. mutating func clearOptionalUint321() {self._optionalUint321 = nil}
  5026. var optionalInt322: Int32 {
  5027. get {return _optionalInt322 ?? 0}
  5028. set {_optionalInt322 = newValue}
  5029. }
  5030. /// Returns true if `optionalInt322` has been explicitly set.
  5031. var hasOptionalInt322: Bool {return self._optionalInt322 != nil}
  5032. /// Clears the value of `optionalInt322`. Subsequent reads from it will return its default value.
  5033. mutating func clearOptionalInt322() {self._optionalInt322 = nil}
  5034. var optionalInt3263: Int32 {
  5035. get {return _optionalInt3263 ?? 0}
  5036. set {_optionalInt3263 = newValue}
  5037. }
  5038. /// Returns true if `optionalInt3263` has been explicitly set.
  5039. var hasOptionalInt3263: Bool {return self._optionalInt3263 != nil}
  5040. /// Clears the value of `optionalInt3263`. Subsequent reads from it will return its default value.
  5041. mutating func clearOptionalInt3263() {self._optionalInt3263 = nil}
  5042. var optionalInt3264: Int32 {
  5043. get {return _optionalInt3264 ?? 0}
  5044. set {_optionalInt3264 = newValue}
  5045. }
  5046. /// Returns true if `optionalInt3264` has been explicitly set.
  5047. var hasOptionalInt3264: Bool {return self._optionalInt3264 != nil}
  5048. /// Clears the value of `optionalInt3264`. Subsequent reads from it will return its default value.
  5049. mutating func clearOptionalInt3264() {self._optionalInt3264 = nil}
  5050. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  5051. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  5052. set {_optionalAllTypes = newValue}
  5053. }
  5054. /// Returns true if `optionalAllTypes` has been explicitly set.
  5055. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  5056. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  5057. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  5058. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  5059. var unknownFields = SwiftProtobuf.UnknownStorage()
  5060. init() {}
  5061. fileprivate var _optionalUint321: UInt32? = nil
  5062. fileprivate var _optionalInt322: Int32? = nil
  5063. fileprivate var _optionalInt3263: Int32? = nil
  5064. fileprivate var _optionalInt3264: Int32? = nil
  5065. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  5066. }
  5067. struct Proto2Unittest_TestVerifyOneInt32BigFieldNumber: Sendable {
  5068. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5069. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5070. // methods supported on all messages.
  5071. var optionalInt3265: Int32 {
  5072. get {return _optionalInt3265 ?? 0}
  5073. set {_optionalInt3265 = newValue}
  5074. }
  5075. /// Returns true if `optionalInt3265` has been explicitly set.
  5076. var hasOptionalInt3265: Bool {return self._optionalInt3265 != nil}
  5077. /// Clears the value of `optionalInt3265`. Subsequent reads from it will return its default value.
  5078. mutating func clearOptionalInt3265() {self._optionalInt3265 = nil}
  5079. var optionalInt641: Int64 {
  5080. get {return _optionalInt641 ?? 0}
  5081. set {_optionalInt641 = newValue}
  5082. }
  5083. /// Returns true if `optionalInt641` has been explicitly set.
  5084. var hasOptionalInt641: Bool {return self._optionalInt641 != nil}
  5085. /// Clears the value of `optionalInt641`. Subsequent reads from it will return its default value.
  5086. mutating func clearOptionalInt641() {self._optionalInt641 = nil}
  5087. var optionalInt642: Int64 {
  5088. get {return _optionalInt642 ?? 0}
  5089. set {_optionalInt642 = newValue}
  5090. }
  5091. /// Returns true if `optionalInt642` has been explicitly set.
  5092. var hasOptionalInt642: Bool {return self._optionalInt642 != nil}
  5093. /// Clears the value of `optionalInt642`. Subsequent reads from it will return its default value.
  5094. mutating func clearOptionalInt642() {self._optionalInt642 = nil}
  5095. var optionalInt6463: Int64 {
  5096. get {return _optionalInt6463 ?? 0}
  5097. set {_optionalInt6463 = newValue}
  5098. }
  5099. /// Returns true if `optionalInt6463` has been explicitly set.
  5100. var hasOptionalInt6463: Bool {return self._optionalInt6463 != nil}
  5101. /// Clears the value of `optionalInt6463`. Subsequent reads from it will return its default value.
  5102. mutating func clearOptionalInt6463() {self._optionalInt6463 = nil}
  5103. var optionalInt6464: Int64 {
  5104. get {return _optionalInt6464 ?? 0}
  5105. set {_optionalInt6464 = newValue}
  5106. }
  5107. /// Returns true if `optionalInt6464` has been explicitly set.
  5108. var hasOptionalInt6464: Bool {return self._optionalInt6464 != nil}
  5109. /// Clears the value of `optionalInt6464`. Subsequent reads from it will return its default value.
  5110. mutating func clearOptionalInt6464() {self._optionalInt6464 = nil}
  5111. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  5112. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  5113. set {_optionalAllTypes = newValue}
  5114. }
  5115. /// Returns true if `optionalAllTypes` has been explicitly set.
  5116. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  5117. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  5118. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  5119. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  5120. var unknownFields = SwiftProtobuf.UnknownStorage()
  5121. init() {}
  5122. fileprivate var _optionalInt3265: Int32? = nil
  5123. fileprivate var _optionalInt641: Int64? = nil
  5124. fileprivate var _optionalInt642: Int64? = nil
  5125. fileprivate var _optionalInt6463: Int64? = nil
  5126. fileprivate var _optionalInt6464: Int64? = nil
  5127. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  5128. }
  5129. struct Proto2Unittest_TestVerifyInt32BigFieldNumber: Sendable {
  5130. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5131. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5132. // methods supported on all messages.
  5133. var optionalInt321000: Int32 {
  5134. get {return _optionalInt321000 ?? 0}
  5135. set {_optionalInt321000 = newValue}
  5136. }
  5137. /// Returns true if `optionalInt321000` has been explicitly set.
  5138. var hasOptionalInt321000: Bool {return self._optionalInt321000 != nil}
  5139. /// Clears the value of `optionalInt321000`. Subsequent reads from it will return its default value.
  5140. mutating func clearOptionalInt321000() {self._optionalInt321000 = nil}
  5141. var optionalInt3265: Int32 {
  5142. get {return _optionalInt3265 ?? 0}
  5143. set {_optionalInt3265 = newValue}
  5144. }
  5145. /// Returns true if `optionalInt3265` has been explicitly set.
  5146. var hasOptionalInt3265: Bool {return self._optionalInt3265 != nil}
  5147. /// Clears the value of `optionalInt3265`. Subsequent reads from it will return its default value.
  5148. mutating func clearOptionalInt3265() {self._optionalInt3265 = nil}
  5149. var optionalInt321: Int32 {
  5150. get {return _optionalInt321 ?? 0}
  5151. set {_optionalInt321 = newValue}
  5152. }
  5153. /// Returns true if `optionalInt321` has been explicitly set.
  5154. var hasOptionalInt321: Bool {return self._optionalInt321 != nil}
  5155. /// Clears the value of `optionalInt321`. Subsequent reads from it will return its default value.
  5156. mutating func clearOptionalInt321() {self._optionalInt321 = nil}
  5157. var optionalInt322: Int32 {
  5158. get {return _optionalInt322 ?? 0}
  5159. set {_optionalInt322 = newValue}
  5160. }
  5161. /// Returns true if `optionalInt322` has been explicitly set.
  5162. var hasOptionalInt322: Bool {return self._optionalInt322 != nil}
  5163. /// Clears the value of `optionalInt322`. Subsequent reads from it will return its default value.
  5164. mutating func clearOptionalInt322() {self._optionalInt322 = nil}
  5165. var optionalInt3263: Int32 {
  5166. get {return _optionalInt3263 ?? 0}
  5167. set {_optionalInt3263 = newValue}
  5168. }
  5169. /// Returns true if `optionalInt3263` has been explicitly set.
  5170. var hasOptionalInt3263: Bool {return self._optionalInt3263 != nil}
  5171. /// Clears the value of `optionalInt3263`. Subsequent reads from it will return its default value.
  5172. mutating func clearOptionalInt3263() {self._optionalInt3263 = nil}
  5173. var optionalInt3264: Int32 {
  5174. get {return _optionalInt3264 ?? 0}
  5175. set {_optionalInt3264 = newValue}
  5176. }
  5177. /// Returns true if `optionalInt3264` has been explicitly set.
  5178. var hasOptionalInt3264: Bool {return self._optionalInt3264 != nil}
  5179. /// Clears the value of `optionalInt3264`. Subsequent reads from it will return its default value.
  5180. mutating func clearOptionalInt3264() {self._optionalInt3264 = nil}
  5181. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  5182. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  5183. set {_optionalAllTypes = newValue}
  5184. }
  5185. /// Returns true if `optionalAllTypes` has been explicitly set.
  5186. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  5187. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  5188. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  5189. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  5190. var unknownFields = SwiftProtobuf.UnknownStorage()
  5191. init() {}
  5192. fileprivate var _optionalInt321000: Int32? = nil
  5193. fileprivate var _optionalInt3265: Int32? = nil
  5194. fileprivate var _optionalInt321: Int32? = nil
  5195. fileprivate var _optionalInt322: Int32? = nil
  5196. fileprivate var _optionalInt3263: Int32? = nil
  5197. fileprivate var _optionalInt3264: Int32? = nil
  5198. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  5199. }
  5200. struct Proto2Unittest_TestVerifyUint32BigFieldNumber: Sendable {
  5201. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5202. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5203. // methods supported on all messages.
  5204. var optionalUint321000: UInt32 {
  5205. get {return _optionalUint321000 ?? 0}
  5206. set {_optionalUint321000 = newValue}
  5207. }
  5208. /// Returns true if `optionalUint321000` has been explicitly set.
  5209. var hasOptionalUint321000: Bool {return self._optionalUint321000 != nil}
  5210. /// Clears the value of `optionalUint321000`. Subsequent reads from it will return its default value.
  5211. mutating func clearOptionalUint321000() {self._optionalUint321000 = nil}
  5212. var optionalUint3265: UInt32 {
  5213. get {return _optionalUint3265 ?? 0}
  5214. set {_optionalUint3265 = newValue}
  5215. }
  5216. /// Returns true if `optionalUint3265` has been explicitly set.
  5217. var hasOptionalUint3265: Bool {return self._optionalUint3265 != nil}
  5218. /// Clears the value of `optionalUint3265`. Subsequent reads from it will return its default value.
  5219. mutating func clearOptionalUint3265() {self._optionalUint3265 = nil}
  5220. var optionalUint321: UInt32 {
  5221. get {return _optionalUint321 ?? 0}
  5222. set {_optionalUint321 = newValue}
  5223. }
  5224. /// Returns true if `optionalUint321` has been explicitly set.
  5225. var hasOptionalUint321: Bool {return self._optionalUint321 != nil}
  5226. /// Clears the value of `optionalUint321`. Subsequent reads from it will return its default value.
  5227. mutating func clearOptionalUint321() {self._optionalUint321 = nil}
  5228. var optionalUint322: UInt32 {
  5229. get {return _optionalUint322 ?? 0}
  5230. set {_optionalUint322 = newValue}
  5231. }
  5232. /// Returns true if `optionalUint322` has been explicitly set.
  5233. var hasOptionalUint322: Bool {return self._optionalUint322 != nil}
  5234. /// Clears the value of `optionalUint322`. Subsequent reads from it will return its default value.
  5235. mutating func clearOptionalUint322() {self._optionalUint322 = nil}
  5236. var optionalUint3263: UInt32 {
  5237. get {return _optionalUint3263 ?? 0}
  5238. set {_optionalUint3263 = newValue}
  5239. }
  5240. /// Returns true if `optionalUint3263` has been explicitly set.
  5241. var hasOptionalUint3263: Bool {return self._optionalUint3263 != nil}
  5242. /// Clears the value of `optionalUint3263`. Subsequent reads from it will return its default value.
  5243. mutating func clearOptionalUint3263() {self._optionalUint3263 = nil}
  5244. var optionalUint3264: UInt32 {
  5245. get {return _optionalUint3264 ?? 0}
  5246. set {_optionalUint3264 = newValue}
  5247. }
  5248. /// Returns true if `optionalUint3264` has been explicitly set.
  5249. var hasOptionalUint3264: Bool {return self._optionalUint3264 != nil}
  5250. /// Clears the value of `optionalUint3264`. Subsequent reads from it will return its default value.
  5251. mutating func clearOptionalUint3264() {self._optionalUint3264 = nil}
  5252. var optionalAllTypes: Proto2Unittest_TestAllTypes {
  5253. get {return _optionalAllTypes ?? Proto2Unittest_TestAllTypes()}
  5254. set {_optionalAllTypes = newValue}
  5255. }
  5256. /// Returns true if `optionalAllTypes` has been explicitly set.
  5257. var hasOptionalAllTypes: Bool {return self._optionalAllTypes != nil}
  5258. /// Clears the value of `optionalAllTypes`. Subsequent reads from it will return its default value.
  5259. mutating func clearOptionalAllTypes() {self._optionalAllTypes = nil}
  5260. var repeatedAllTypes: [Proto2Unittest_TestAllTypes] = []
  5261. var unknownFields = SwiftProtobuf.UnknownStorage()
  5262. init() {}
  5263. fileprivate var _optionalUint321000: UInt32? = nil
  5264. fileprivate var _optionalUint3265: UInt32? = nil
  5265. fileprivate var _optionalUint321: UInt32? = nil
  5266. fileprivate var _optionalUint322: UInt32? = nil
  5267. fileprivate var _optionalUint3263: UInt32? = nil
  5268. fileprivate var _optionalUint3264: UInt32? = nil
  5269. fileprivate var _optionalAllTypes: Proto2Unittest_TestAllTypes? = nil
  5270. }
  5271. struct Proto2Unittest_TestVerifyBigFieldNumberUint32: Sendable {
  5272. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5273. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5274. // methods supported on all messages.
  5275. var optionalNested: Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested {
  5276. get {return _optionalNested ?? Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested()}
  5277. set {_optionalNested = newValue}
  5278. }
  5279. /// Returns true if `optionalNested` has been explicitly set.
  5280. var hasOptionalNested: Bool {return self._optionalNested != nil}
  5281. /// Clears the value of `optionalNested`. Subsequent reads from it will return its default value.
  5282. mutating func clearOptionalNested() {self._optionalNested = nil}
  5283. var unknownFields = SwiftProtobuf.UnknownStorage()
  5284. struct Nested: @unchecked Sendable {
  5285. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5286. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5287. // methods supported on all messages.
  5288. var optionalUint325000: UInt32 {
  5289. get {return _storage._optionalUint325000 ?? 0}
  5290. set {_uniqueStorage()._optionalUint325000 = newValue}
  5291. }
  5292. /// Returns true if `optionalUint325000` has been explicitly set.
  5293. var hasOptionalUint325000: Bool {return _storage._optionalUint325000 != nil}
  5294. /// Clears the value of `optionalUint325000`. Subsequent reads from it will return its default value.
  5295. mutating func clearOptionalUint325000() {_uniqueStorage()._optionalUint325000 = nil}
  5296. var optionalUint321000: UInt32 {
  5297. get {return _storage._optionalUint321000 ?? 0}
  5298. set {_uniqueStorage()._optionalUint321000 = newValue}
  5299. }
  5300. /// Returns true if `optionalUint321000` has been explicitly set.
  5301. var hasOptionalUint321000: Bool {return _storage._optionalUint321000 != nil}
  5302. /// Clears the value of `optionalUint321000`. Subsequent reads from it will return its default value.
  5303. mutating func clearOptionalUint321000() {_uniqueStorage()._optionalUint321000 = nil}
  5304. var optionalUint3266: UInt32 {
  5305. get {return _storage._optionalUint3266 ?? 0}
  5306. set {_uniqueStorage()._optionalUint3266 = newValue}
  5307. }
  5308. /// Returns true if `optionalUint3266` has been explicitly set.
  5309. var hasOptionalUint3266: Bool {return _storage._optionalUint3266 != nil}
  5310. /// Clears the value of `optionalUint3266`. Subsequent reads from it will return its default value.
  5311. mutating func clearOptionalUint3266() {_uniqueStorage()._optionalUint3266 = nil}
  5312. var optionalUint3265: UInt32 {
  5313. get {return _storage._optionalUint3265 ?? 0}
  5314. set {_uniqueStorage()._optionalUint3265 = newValue}
  5315. }
  5316. /// Returns true if `optionalUint3265` has been explicitly set.
  5317. var hasOptionalUint3265: Bool {return _storage._optionalUint3265 != nil}
  5318. /// Clears the value of `optionalUint3265`. Subsequent reads from it will return its default value.
  5319. mutating func clearOptionalUint3265() {_uniqueStorage()._optionalUint3265 = nil}
  5320. var optionalUint321: UInt32 {
  5321. get {return _storage._optionalUint321 ?? 0}
  5322. set {_uniqueStorage()._optionalUint321 = newValue}
  5323. }
  5324. /// Returns true if `optionalUint321` has been explicitly set.
  5325. var hasOptionalUint321: Bool {return _storage._optionalUint321 != nil}
  5326. /// Clears the value of `optionalUint321`. Subsequent reads from it will return its default value.
  5327. mutating func clearOptionalUint321() {_uniqueStorage()._optionalUint321 = nil}
  5328. var optionalUint322: UInt32 {
  5329. get {return _storage._optionalUint322 ?? 0}
  5330. set {_uniqueStorage()._optionalUint322 = newValue}
  5331. }
  5332. /// Returns true if `optionalUint322` has been explicitly set.
  5333. var hasOptionalUint322: Bool {return _storage._optionalUint322 != nil}
  5334. /// Clears the value of `optionalUint322`. Subsequent reads from it will return its default value.
  5335. mutating func clearOptionalUint322() {_uniqueStorage()._optionalUint322 = nil}
  5336. var optionalUint3263: UInt32 {
  5337. get {return _storage._optionalUint3263 ?? 0}
  5338. set {_uniqueStorage()._optionalUint3263 = newValue}
  5339. }
  5340. /// Returns true if `optionalUint3263` has been explicitly set.
  5341. var hasOptionalUint3263: Bool {return _storage._optionalUint3263 != nil}
  5342. /// Clears the value of `optionalUint3263`. Subsequent reads from it will return its default value.
  5343. mutating func clearOptionalUint3263() {_uniqueStorage()._optionalUint3263 = nil}
  5344. var optionalUint3264: UInt32 {
  5345. get {return _storage._optionalUint3264 ?? 0}
  5346. set {_uniqueStorage()._optionalUint3264 = newValue}
  5347. }
  5348. /// Returns true if `optionalUint3264` has been explicitly set.
  5349. var hasOptionalUint3264: Bool {return _storage._optionalUint3264 != nil}
  5350. /// Clears the value of `optionalUint3264`. Subsequent reads from it will return its default value.
  5351. mutating func clearOptionalUint3264() {_uniqueStorage()._optionalUint3264 = nil}
  5352. var optionalNested: Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested {
  5353. get {return _storage._optionalNested ?? Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested()}
  5354. set {_uniqueStorage()._optionalNested = newValue}
  5355. }
  5356. /// Returns true if `optionalNested` has been explicitly set.
  5357. var hasOptionalNested: Bool {return _storage._optionalNested != nil}
  5358. /// Clears the value of `optionalNested`. Subsequent reads from it will return its default value.
  5359. mutating func clearOptionalNested() {_uniqueStorage()._optionalNested = nil}
  5360. var repeatedNested: [Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested] {
  5361. get {return _storage._repeatedNested}
  5362. set {_uniqueStorage()._repeatedNested = newValue}
  5363. }
  5364. var unknownFields = SwiftProtobuf.UnknownStorage()
  5365. init() {}
  5366. fileprivate var _storage = _StorageClass.defaultInstance
  5367. }
  5368. init() {}
  5369. fileprivate var _optionalNested: Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested? = nil
  5370. }
  5371. /// This message contains different kind of enums to exercise the different
  5372. /// parsers in table-driven.
  5373. struct Proto2Unittest_EnumParseTester: SwiftProtobuf.ExtensibleMessage, @unchecked Sendable {
  5374. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5375. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5376. // methods supported on all messages.
  5377. var optionalSeqSmall0Lowfield: Proto2Unittest_EnumParseTester.SeqSmall0 {
  5378. get {return _storage._optionalSeqSmall0Lowfield ?? .default}
  5379. set {_uniqueStorage()._optionalSeqSmall0Lowfield = newValue}
  5380. }
  5381. /// Returns true if `optionalSeqSmall0Lowfield` has been explicitly set.
  5382. var hasOptionalSeqSmall0Lowfield: Bool {return _storage._optionalSeqSmall0Lowfield != nil}
  5383. /// Clears the value of `optionalSeqSmall0Lowfield`. Subsequent reads from it will return its default value.
  5384. mutating func clearOptionalSeqSmall0Lowfield() {_uniqueStorage()._optionalSeqSmall0Lowfield = nil}
  5385. var optionalSeqSmall0Midfield: Proto2Unittest_EnumParseTester.SeqSmall0 {
  5386. get {return _storage._optionalSeqSmall0Midfield ?? .default}
  5387. set {_uniqueStorage()._optionalSeqSmall0Midfield = newValue}
  5388. }
  5389. /// Returns true if `optionalSeqSmall0Midfield` has been explicitly set.
  5390. var hasOptionalSeqSmall0Midfield: Bool {return _storage._optionalSeqSmall0Midfield != nil}
  5391. /// Clears the value of `optionalSeqSmall0Midfield`. Subsequent reads from it will return its default value.
  5392. mutating func clearOptionalSeqSmall0Midfield() {_uniqueStorage()._optionalSeqSmall0Midfield = nil}
  5393. var optionalSeqSmall0Hifield: Proto2Unittest_EnumParseTester.SeqSmall0 {
  5394. get {return _storage._optionalSeqSmall0Hifield ?? .default}
  5395. set {_uniqueStorage()._optionalSeqSmall0Hifield = newValue}
  5396. }
  5397. /// Returns true if `optionalSeqSmall0Hifield` has been explicitly set.
  5398. var hasOptionalSeqSmall0Hifield: Bool {return _storage._optionalSeqSmall0Hifield != nil}
  5399. /// Clears the value of `optionalSeqSmall0Hifield`. Subsequent reads from it will return its default value.
  5400. mutating func clearOptionalSeqSmall0Hifield() {_uniqueStorage()._optionalSeqSmall0Hifield = nil}
  5401. var repeatedSeqSmall0Lowfield: [Proto2Unittest_EnumParseTester.SeqSmall0] {
  5402. get {return _storage._repeatedSeqSmall0Lowfield}
  5403. set {_uniqueStorage()._repeatedSeqSmall0Lowfield = newValue}
  5404. }
  5405. var repeatedSeqSmall0Midfield: [Proto2Unittest_EnumParseTester.SeqSmall0] {
  5406. get {return _storage._repeatedSeqSmall0Midfield}
  5407. set {_uniqueStorage()._repeatedSeqSmall0Midfield = newValue}
  5408. }
  5409. var repeatedSeqSmall0Hifield: [Proto2Unittest_EnumParseTester.SeqSmall0] {
  5410. get {return _storage._repeatedSeqSmall0Hifield}
  5411. set {_uniqueStorage()._repeatedSeqSmall0Hifield = newValue}
  5412. }
  5413. var packedSeqSmall0Lowfield: [Proto2Unittest_EnumParseTester.SeqSmall0] {
  5414. get {return _storage._packedSeqSmall0Lowfield}
  5415. set {_uniqueStorage()._packedSeqSmall0Lowfield = newValue}
  5416. }
  5417. var packedSeqSmall0Midfield: [Proto2Unittest_EnumParseTester.SeqSmall0] {
  5418. get {return _storage._packedSeqSmall0Midfield}
  5419. set {_uniqueStorage()._packedSeqSmall0Midfield = newValue}
  5420. }
  5421. var packedSeqSmall0Hifield: [Proto2Unittest_EnumParseTester.SeqSmall0] {
  5422. get {return _storage._packedSeqSmall0Hifield}
  5423. set {_uniqueStorage()._packedSeqSmall0Hifield = newValue}
  5424. }
  5425. var optionalSeqSmall1Lowfield: Proto2Unittest_EnumParseTester.SeqSmall1 {
  5426. get {return _storage._optionalSeqSmall1Lowfield ?? .default}
  5427. set {_uniqueStorage()._optionalSeqSmall1Lowfield = newValue}
  5428. }
  5429. /// Returns true if `optionalSeqSmall1Lowfield` has been explicitly set.
  5430. var hasOptionalSeqSmall1Lowfield: Bool {return _storage._optionalSeqSmall1Lowfield != nil}
  5431. /// Clears the value of `optionalSeqSmall1Lowfield`. Subsequent reads from it will return its default value.
  5432. mutating func clearOptionalSeqSmall1Lowfield() {_uniqueStorage()._optionalSeqSmall1Lowfield = nil}
  5433. var optionalSeqSmall1Midfield: Proto2Unittest_EnumParseTester.SeqSmall1 {
  5434. get {return _storage._optionalSeqSmall1Midfield ?? .default}
  5435. set {_uniqueStorage()._optionalSeqSmall1Midfield = newValue}
  5436. }
  5437. /// Returns true if `optionalSeqSmall1Midfield` has been explicitly set.
  5438. var hasOptionalSeqSmall1Midfield: Bool {return _storage._optionalSeqSmall1Midfield != nil}
  5439. /// Clears the value of `optionalSeqSmall1Midfield`. Subsequent reads from it will return its default value.
  5440. mutating func clearOptionalSeqSmall1Midfield() {_uniqueStorage()._optionalSeqSmall1Midfield = nil}
  5441. var optionalSeqSmall1Hifield: Proto2Unittest_EnumParseTester.SeqSmall1 {
  5442. get {return _storage._optionalSeqSmall1Hifield ?? .default}
  5443. set {_uniqueStorage()._optionalSeqSmall1Hifield = newValue}
  5444. }
  5445. /// Returns true if `optionalSeqSmall1Hifield` has been explicitly set.
  5446. var hasOptionalSeqSmall1Hifield: Bool {return _storage._optionalSeqSmall1Hifield != nil}
  5447. /// Clears the value of `optionalSeqSmall1Hifield`. Subsequent reads from it will return its default value.
  5448. mutating func clearOptionalSeqSmall1Hifield() {_uniqueStorage()._optionalSeqSmall1Hifield = nil}
  5449. var repeatedSeqSmall1Lowfield: [Proto2Unittest_EnumParseTester.SeqSmall1] {
  5450. get {return _storage._repeatedSeqSmall1Lowfield}
  5451. set {_uniqueStorage()._repeatedSeqSmall1Lowfield = newValue}
  5452. }
  5453. var repeatedSeqSmall1Midfield: [Proto2Unittest_EnumParseTester.SeqSmall1] {
  5454. get {return _storage._repeatedSeqSmall1Midfield}
  5455. set {_uniqueStorage()._repeatedSeqSmall1Midfield = newValue}
  5456. }
  5457. var repeatedSeqSmall1Hifield: [Proto2Unittest_EnumParseTester.SeqSmall1] {
  5458. get {return _storage._repeatedSeqSmall1Hifield}
  5459. set {_uniqueStorage()._repeatedSeqSmall1Hifield = newValue}
  5460. }
  5461. var packedSeqSmall1Lowfield: [Proto2Unittest_EnumParseTester.SeqSmall1] {
  5462. get {return _storage._packedSeqSmall1Lowfield}
  5463. set {_uniqueStorage()._packedSeqSmall1Lowfield = newValue}
  5464. }
  5465. var packedSeqSmall1Midfield: [Proto2Unittest_EnumParseTester.SeqSmall1] {
  5466. get {return _storage._packedSeqSmall1Midfield}
  5467. set {_uniqueStorage()._packedSeqSmall1Midfield = newValue}
  5468. }
  5469. var packedSeqSmall1Hifield: [Proto2Unittest_EnumParseTester.SeqSmall1] {
  5470. get {return _storage._packedSeqSmall1Hifield}
  5471. set {_uniqueStorage()._packedSeqSmall1Hifield = newValue}
  5472. }
  5473. var optionalSeqLargeLowfield: Proto2Unittest_EnumParseTester.SeqLarge {
  5474. get {return _storage._optionalSeqLargeLowfield ?? .default}
  5475. set {_uniqueStorage()._optionalSeqLargeLowfield = newValue}
  5476. }
  5477. /// Returns true if `optionalSeqLargeLowfield` has been explicitly set.
  5478. var hasOptionalSeqLargeLowfield: Bool {return _storage._optionalSeqLargeLowfield != nil}
  5479. /// Clears the value of `optionalSeqLargeLowfield`. Subsequent reads from it will return its default value.
  5480. mutating func clearOptionalSeqLargeLowfield() {_uniqueStorage()._optionalSeqLargeLowfield = nil}
  5481. var optionalSeqLargeMidfield: Proto2Unittest_EnumParseTester.SeqLarge {
  5482. get {return _storage._optionalSeqLargeMidfield ?? .default}
  5483. set {_uniqueStorage()._optionalSeqLargeMidfield = newValue}
  5484. }
  5485. /// Returns true if `optionalSeqLargeMidfield` has been explicitly set.
  5486. var hasOptionalSeqLargeMidfield: Bool {return _storage._optionalSeqLargeMidfield != nil}
  5487. /// Clears the value of `optionalSeqLargeMidfield`. Subsequent reads from it will return its default value.
  5488. mutating func clearOptionalSeqLargeMidfield() {_uniqueStorage()._optionalSeqLargeMidfield = nil}
  5489. var optionalSeqLargeHifield: Proto2Unittest_EnumParseTester.SeqLarge {
  5490. get {return _storage._optionalSeqLargeHifield ?? .default}
  5491. set {_uniqueStorage()._optionalSeqLargeHifield = newValue}
  5492. }
  5493. /// Returns true if `optionalSeqLargeHifield` has been explicitly set.
  5494. var hasOptionalSeqLargeHifield: Bool {return _storage._optionalSeqLargeHifield != nil}
  5495. /// Clears the value of `optionalSeqLargeHifield`. Subsequent reads from it will return its default value.
  5496. mutating func clearOptionalSeqLargeHifield() {_uniqueStorage()._optionalSeqLargeHifield = nil}
  5497. var repeatedSeqLargeLowfield: [Proto2Unittest_EnumParseTester.SeqLarge] {
  5498. get {return _storage._repeatedSeqLargeLowfield}
  5499. set {_uniqueStorage()._repeatedSeqLargeLowfield = newValue}
  5500. }
  5501. var repeatedSeqLargeMidfield: [Proto2Unittest_EnumParseTester.SeqLarge] {
  5502. get {return _storage._repeatedSeqLargeMidfield}
  5503. set {_uniqueStorage()._repeatedSeqLargeMidfield = newValue}
  5504. }
  5505. var repeatedSeqLargeHifield: [Proto2Unittest_EnumParseTester.SeqLarge] {
  5506. get {return _storage._repeatedSeqLargeHifield}
  5507. set {_uniqueStorage()._repeatedSeqLargeHifield = newValue}
  5508. }
  5509. var packedSeqLargeLowfield: [Proto2Unittest_EnumParseTester.SeqLarge] {
  5510. get {return _storage._packedSeqLargeLowfield}
  5511. set {_uniqueStorage()._packedSeqLargeLowfield = newValue}
  5512. }
  5513. var packedSeqLargeMidfield: [Proto2Unittest_EnumParseTester.SeqLarge] {
  5514. get {return _storage._packedSeqLargeMidfield}
  5515. set {_uniqueStorage()._packedSeqLargeMidfield = newValue}
  5516. }
  5517. var packedSeqLargeHifield: [Proto2Unittest_EnumParseTester.SeqLarge] {
  5518. get {return _storage._packedSeqLargeHifield}
  5519. set {_uniqueStorage()._packedSeqLargeHifield = newValue}
  5520. }
  5521. var optionalArbitraryLowfield: Proto2Unittest_EnumParseTester.Arbitrary {
  5522. get {return _storage._optionalArbitraryLowfield ?? .default}
  5523. set {_uniqueStorage()._optionalArbitraryLowfield = newValue}
  5524. }
  5525. /// Returns true if `optionalArbitraryLowfield` has been explicitly set.
  5526. var hasOptionalArbitraryLowfield: Bool {return _storage._optionalArbitraryLowfield != nil}
  5527. /// Clears the value of `optionalArbitraryLowfield`. Subsequent reads from it will return its default value.
  5528. mutating func clearOptionalArbitraryLowfield() {_uniqueStorage()._optionalArbitraryLowfield = nil}
  5529. var optionalArbitraryMidfield: Proto2Unittest_EnumParseTester.Arbitrary {
  5530. get {return _storage._optionalArbitraryMidfield ?? .default}
  5531. set {_uniqueStorage()._optionalArbitraryMidfield = newValue}
  5532. }
  5533. /// Returns true if `optionalArbitraryMidfield` has been explicitly set.
  5534. var hasOptionalArbitraryMidfield: Bool {return _storage._optionalArbitraryMidfield != nil}
  5535. /// Clears the value of `optionalArbitraryMidfield`. Subsequent reads from it will return its default value.
  5536. mutating func clearOptionalArbitraryMidfield() {_uniqueStorage()._optionalArbitraryMidfield = nil}
  5537. var optionalArbitraryHifield: Proto2Unittest_EnumParseTester.Arbitrary {
  5538. get {return _storage._optionalArbitraryHifield ?? .default}
  5539. set {_uniqueStorage()._optionalArbitraryHifield = newValue}
  5540. }
  5541. /// Returns true if `optionalArbitraryHifield` has been explicitly set.
  5542. var hasOptionalArbitraryHifield: Bool {return _storage._optionalArbitraryHifield != nil}
  5543. /// Clears the value of `optionalArbitraryHifield`. Subsequent reads from it will return its default value.
  5544. mutating func clearOptionalArbitraryHifield() {_uniqueStorage()._optionalArbitraryHifield = nil}
  5545. var repeatedArbitraryLowfield: [Proto2Unittest_EnumParseTester.Arbitrary] {
  5546. get {return _storage._repeatedArbitraryLowfield}
  5547. set {_uniqueStorage()._repeatedArbitraryLowfield = newValue}
  5548. }
  5549. var repeatedArbitraryMidfield: [Proto2Unittest_EnumParseTester.Arbitrary] {
  5550. get {return _storage._repeatedArbitraryMidfield}
  5551. set {_uniqueStorage()._repeatedArbitraryMidfield = newValue}
  5552. }
  5553. var repeatedArbitraryHifield: [Proto2Unittest_EnumParseTester.Arbitrary] {
  5554. get {return _storage._repeatedArbitraryHifield}
  5555. set {_uniqueStorage()._repeatedArbitraryHifield = newValue}
  5556. }
  5557. var packedArbitraryLowfield: [Proto2Unittest_EnumParseTester.Arbitrary] {
  5558. get {return _storage._packedArbitraryLowfield}
  5559. set {_uniqueStorage()._packedArbitraryLowfield = newValue}
  5560. }
  5561. var packedArbitraryMidfield: [Proto2Unittest_EnumParseTester.Arbitrary] {
  5562. get {return _storage._packedArbitraryMidfield}
  5563. set {_uniqueStorage()._packedArbitraryMidfield = newValue}
  5564. }
  5565. var packedArbitraryHifield: [Proto2Unittest_EnumParseTester.Arbitrary] {
  5566. get {return _storage._packedArbitraryHifield}
  5567. set {_uniqueStorage()._packedArbitraryHifield = newValue}
  5568. }
  5569. /// An arbitrary field we can append to to break the runs of repeated fields.
  5570. var otherField: Int32 {
  5571. get {return _storage._otherField ?? 0}
  5572. set {_uniqueStorage()._otherField = newValue}
  5573. }
  5574. /// Returns true if `otherField` has been explicitly set.
  5575. var hasOtherField: Bool {return _storage._otherField != nil}
  5576. /// Clears the value of `otherField`. Subsequent reads from it will return its default value.
  5577. mutating func clearOtherField() {_uniqueStorage()._otherField = nil}
  5578. var unknownFields = SwiftProtobuf.UnknownStorage()
  5579. enum SeqSmall0: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  5580. case `default` = 0
  5581. case seqSmall01 = 1
  5582. case seqSmall02 = 2
  5583. init() {
  5584. self = .default
  5585. }
  5586. }
  5587. enum SeqSmall1: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  5588. case `default` = 1
  5589. case seqSmall12 = 2
  5590. case seqSmall13 = 3
  5591. init() {
  5592. self = .default
  5593. }
  5594. }
  5595. enum SeqLarge: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  5596. case `default` = -1
  5597. case seqLarge0 = 0
  5598. case seqLarge1 = 1
  5599. case seqLarge2 = 2
  5600. case seqLarge3 = 3
  5601. case seqLarge4 = 4
  5602. case seqLarge5 = 5
  5603. case seqLarge6 = 6
  5604. case seqLarge7 = 7
  5605. case seqLarge8 = 8
  5606. case seqLarge9 = 9
  5607. case seqLarge10 = 10
  5608. case seqLarge11 = 11
  5609. case seqLarge12 = 12
  5610. case seqLarge13 = 13
  5611. case seqLarge14 = 14
  5612. case seqLarge15 = 15
  5613. case seqLarge16 = 16
  5614. case seqLarge17 = 17
  5615. case seqLarge18 = 18
  5616. case seqLarge19 = 19
  5617. case seqLarge20 = 20
  5618. case seqLarge21 = 21
  5619. case seqLarge22 = 22
  5620. case seqLarge23 = 23
  5621. case seqLarge24 = 24
  5622. case seqLarge25 = 25
  5623. case seqLarge26 = 26
  5624. case seqLarge27 = 27
  5625. case seqLarge28 = 28
  5626. case seqLarge29 = 29
  5627. case seqLarge30 = 30
  5628. case seqLarge31 = 31
  5629. case seqLarge32 = 32
  5630. case seqLarge33 = 33
  5631. init() {
  5632. self = .default
  5633. }
  5634. }
  5635. enum Arbitrary: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  5636. case `default` = -123123
  5637. case arbitrary1 = -123
  5638. case arbitrary2 = 213
  5639. case arbitrary3 = 213213
  5640. case min = -2147483648
  5641. case max = 2147483647
  5642. init() {
  5643. self = .default
  5644. }
  5645. }
  5646. init() {}
  5647. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  5648. fileprivate var _storage = _StorageClass.defaultInstance
  5649. }
  5650. /// This message contains different kind of bool fields to exercise the different
  5651. /// parsers in table-drived.
  5652. struct Proto2Unittest_BoolParseTester: SwiftProtobuf.ExtensibleMessage, Sendable {
  5653. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5654. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5655. // methods supported on all messages.
  5656. var optionalBoolLowfield: Bool {
  5657. get {return _optionalBoolLowfield ?? false}
  5658. set {_optionalBoolLowfield = newValue}
  5659. }
  5660. /// Returns true if `optionalBoolLowfield` has been explicitly set.
  5661. var hasOptionalBoolLowfield: Bool {return self._optionalBoolLowfield != nil}
  5662. /// Clears the value of `optionalBoolLowfield`. Subsequent reads from it will return its default value.
  5663. mutating func clearOptionalBoolLowfield() {self._optionalBoolLowfield = nil}
  5664. var optionalBoolMidfield: Bool {
  5665. get {return _optionalBoolMidfield ?? false}
  5666. set {_optionalBoolMidfield = newValue}
  5667. }
  5668. /// Returns true if `optionalBoolMidfield` has been explicitly set.
  5669. var hasOptionalBoolMidfield: Bool {return self._optionalBoolMidfield != nil}
  5670. /// Clears the value of `optionalBoolMidfield`. Subsequent reads from it will return its default value.
  5671. mutating func clearOptionalBoolMidfield() {self._optionalBoolMidfield = nil}
  5672. var optionalBoolHifield: Bool {
  5673. get {return _optionalBoolHifield ?? false}
  5674. set {_optionalBoolHifield = newValue}
  5675. }
  5676. /// Returns true if `optionalBoolHifield` has been explicitly set.
  5677. var hasOptionalBoolHifield: Bool {return self._optionalBoolHifield != nil}
  5678. /// Clears the value of `optionalBoolHifield`. Subsequent reads from it will return its default value.
  5679. mutating func clearOptionalBoolHifield() {self._optionalBoolHifield = nil}
  5680. var repeatedBoolLowfield: [Bool] = []
  5681. var repeatedBoolMidfield: [Bool] = []
  5682. var repeatedBoolHifield: [Bool] = []
  5683. var packedBoolLowfield: [Bool] = []
  5684. var packedBoolMidfield: [Bool] = []
  5685. var packedBoolHifield: [Bool] = []
  5686. /// An arbitrary field we can append to to break the runs of repeated fields.
  5687. var otherField: Int32 {
  5688. get {return _otherField ?? 0}
  5689. set {_otherField = newValue}
  5690. }
  5691. /// Returns true if `otherField` has been explicitly set.
  5692. var hasOtherField: Bool {return self._otherField != nil}
  5693. /// Clears the value of `otherField`. Subsequent reads from it will return its default value.
  5694. mutating func clearOtherField() {self._otherField = nil}
  5695. var unknownFields = SwiftProtobuf.UnknownStorage()
  5696. init() {}
  5697. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  5698. fileprivate var _optionalBoolLowfield: Bool? = nil
  5699. fileprivate var _optionalBoolMidfield: Bool? = nil
  5700. fileprivate var _optionalBoolHifield: Bool? = nil
  5701. fileprivate var _otherField: Int32? = nil
  5702. }
  5703. struct Proto2Unittest_Int32ParseTester: SwiftProtobuf.ExtensibleMessage, Sendable {
  5704. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5705. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5706. // methods supported on all messages.
  5707. var optionalInt32Lowfield: Int32 {
  5708. get {return _optionalInt32Lowfield ?? 0}
  5709. set {_optionalInt32Lowfield = newValue}
  5710. }
  5711. /// Returns true if `optionalInt32Lowfield` has been explicitly set.
  5712. var hasOptionalInt32Lowfield: Bool {return self._optionalInt32Lowfield != nil}
  5713. /// Clears the value of `optionalInt32Lowfield`. Subsequent reads from it will return its default value.
  5714. mutating func clearOptionalInt32Lowfield() {self._optionalInt32Lowfield = nil}
  5715. var optionalInt32Midfield: Int32 {
  5716. get {return _optionalInt32Midfield ?? 0}
  5717. set {_optionalInt32Midfield = newValue}
  5718. }
  5719. /// Returns true if `optionalInt32Midfield` has been explicitly set.
  5720. var hasOptionalInt32Midfield: Bool {return self._optionalInt32Midfield != nil}
  5721. /// Clears the value of `optionalInt32Midfield`. Subsequent reads from it will return its default value.
  5722. mutating func clearOptionalInt32Midfield() {self._optionalInt32Midfield = nil}
  5723. var optionalInt32Hifield: Int32 {
  5724. get {return _optionalInt32Hifield ?? 0}
  5725. set {_optionalInt32Hifield = newValue}
  5726. }
  5727. /// Returns true if `optionalInt32Hifield` has been explicitly set.
  5728. var hasOptionalInt32Hifield: Bool {return self._optionalInt32Hifield != nil}
  5729. /// Clears the value of `optionalInt32Hifield`. Subsequent reads from it will return its default value.
  5730. mutating func clearOptionalInt32Hifield() {self._optionalInt32Hifield = nil}
  5731. var repeatedInt32Lowfield: [Int32] = []
  5732. var repeatedInt32Midfield: [Int32] = []
  5733. var repeatedInt32Hifield: [Int32] = []
  5734. var packedInt32Lowfield: [Int32] = []
  5735. var packedInt32Midfield: [Int32] = []
  5736. var packedInt32Hifield: [Int32] = []
  5737. /// An arbitrary field we can append to to break the runs of repeated fields.
  5738. var otherField: Int32 {
  5739. get {return _otherField ?? 0}
  5740. set {_otherField = newValue}
  5741. }
  5742. /// Returns true if `otherField` has been explicitly set.
  5743. var hasOtherField: Bool {return self._otherField != nil}
  5744. /// Clears the value of `otherField`. Subsequent reads from it will return its default value.
  5745. mutating func clearOtherField() {self._otherField = nil}
  5746. var unknownFields = SwiftProtobuf.UnknownStorage()
  5747. init() {}
  5748. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  5749. fileprivate var _optionalInt32Lowfield: Int32? = nil
  5750. fileprivate var _optionalInt32Midfield: Int32? = nil
  5751. fileprivate var _optionalInt32Hifield: Int32? = nil
  5752. fileprivate var _otherField: Int32? = nil
  5753. }
  5754. struct Proto2Unittest_Int64ParseTester: SwiftProtobuf.ExtensibleMessage, Sendable {
  5755. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5756. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5757. // methods supported on all messages.
  5758. var optionalInt64Lowfield: Int64 {
  5759. get {return _optionalInt64Lowfield ?? 0}
  5760. set {_optionalInt64Lowfield = newValue}
  5761. }
  5762. /// Returns true if `optionalInt64Lowfield` has been explicitly set.
  5763. var hasOptionalInt64Lowfield: Bool {return self._optionalInt64Lowfield != nil}
  5764. /// Clears the value of `optionalInt64Lowfield`. Subsequent reads from it will return its default value.
  5765. mutating func clearOptionalInt64Lowfield() {self._optionalInt64Lowfield = nil}
  5766. var optionalInt64Midfield: Int64 {
  5767. get {return _optionalInt64Midfield ?? 0}
  5768. set {_optionalInt64Midfield = newValue}
  5769. }
  5770. /// Returns true if `optionalInt64Midfield` has been explicitly set.
  5771. var hasOptionalInt64Midfield: Bool {return self._optionalInt64Midfield != nil}
  5772. /// Clears the value of `optionalInt64Midfield`. Subsequent reads from it will return its default value.
  5773. mutating func clearOptionalInt64Midfield() {self._optionalInt64Midfield = nil}
  5774. var optionalInt64Hifield: Int64 {
  5775. get {return _optionalInt64Hifield ?? 0}
  5776. set {_optionalInt64Hifield = newValue}
  5777. }
  5778. /// Returns true if `optionalInt64Hifield` has been explicitly set.
  5779. var hasOptionalInt64Hifield: Bool {return self._optionalInt64Hifield != nil}
  5780. /// Clears the value of `optionalInt64Hifield`. Subsequent reads from it will return its default value.
  5781. mutating func clearOptionalInt64Hifield() {self._optionalInt64Hifield = nil}
  5782. var repeatedInt64Lowfield: [Int64] = []
  5783. var repeatedInt64Midfield: [Int64] = []
  5784. var repeatedInt64Hifield: [Int64] = []
  5785. var packedInt64Lowfield: [Int64] = []
  5786. var packedInt64Midfield: [Int64] = []
  5787. var packedInt64Hifield: [Int64] = []
  5788. /// An arbitrary field we can append to to break the runs of repeated fields.
  5789. var otherField: Int32 {
  5790. get {return _otherField ?? 0}
  5791. set {_otherField = newValue}
  5792. }
  5793. /// Returns true if `otherField` has been explicitly set.
  5794. var hasOtherField: Bool {return self._otherField != nil}
  5795. /// Clears the value of `otherField`. Subsequent reads from it will return its default value.
  5796. mutating func clearOtherField() {self._otherField = nil}
  5797. var unknownFields = SwiftProtobuf.UnknownStorage()
  5798. init() {}
  5799. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  5800. fileprivate var _optionalInt64Lowfield: Int64? = nil
  5801. fileprivate var _optionalInt64Midfield: Int64? = nil
  5802. fileprivate var _optionalInt64Hifield: Int64? = nil
  5803. fileprivate var _otherField: Int32? = nil
  5804. }
  5805. struct Proto2Unittest_InlinedStringIdxRegressionProto: @unchecked Sendable {
  5806. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5807. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5808. // methods supported on all messages.
  5809. /// We mix data to make sure aux ids and inlined string idx do not match.
  5810. /// aux_idx == inlined_string_idx == 1
  5811. var str1: String {
  5812. get {return _storage._str1 ?? String()}
  5813. set {_uniqueStorage()._str1 = newValue}
  5814. }
  5815. /// Returns true if `str1` has been explicitly set.
  5816. var hasStr1: Bool {return _storage._str1 != nil}
  5817. /// Clears the value of `str1`. Subsequent reads from it will return its default value.
  5818. mutating func clearStr1() {_uniqueStorage()._str1 = nil}
  5819. /// aux_idx == 2
  5820. var sub: Proto2Unittest_InlinedStringIdxRegressionProto {
  5821. get {return _storage._sub ?? Proto2Unittest_InlinedStringIdxRegressionProto()}
  5822. set {_uniqueStorage()._sub = newValue}
  5823. }
  5824. /// Returns true if `sub` has been explicitly set.
  5825. var hasSub: Bool {return _storage._sub != nil}
  5826. /// Clears the value of `sub`. Subsequent reads from it will return its default value.
  5827. mutating func clearSub() {_uniqueStorage()._sub = nil}
  5828. /// aux_idx == 3, inlined_string_idx == 2
  5829. var str2: String {
  5830. get {return _storage._str2 ?? String()}
  5831. set {_uniqueStorage()._str2 = newValue}
  5832. }
  5833. /// Returns true if `str2` has been explicitly set.
  5834. var hasStr2: Bool {return _storage._str2 != nil}
  5835. /// Clears the value of `str2`. Subsequent reads from it will return its default value.
  5836. mutating func clearStr2() {_uniqueStorage()._str2 = nil}
  5837. /// aux_idx == 4, inlined_string_idx == 3
  5838. var str3: Data {
  5839. get {return _storage._str3 ?? Data()}
  5840. set {_uniqueStorage()._str3 = newValue}
  5841. }
  5842. /// Returns true if `str3` has been explicitly set.
  5843. var hasStr3: Bool {return _storage._str3 != nil}
  5844. /// Clears the value of `str3`. Subsequent reads from it will return its default value.
  5845. mutating func clearStr3() {_uniqueStorage()._str3 = nil}
  5846. var unknownFields = SwiftProtobuf.UnknownStorage()
  5847. init() {}
  5848. fileprivate var _storage = _StorageClass.defaultInstance
  5849. }
  5850. struct Proto2Unittest_StringParseTester: SwiftProtobuf.ExtensibleMessage, Sendable {
  5851. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5852. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5853. // methods supported on all messages.
  5854. var optionalStringLowfield: String {
  5855. get {return _optionalStringLowfield ?? String()}
  5856. set {_optionalStringLowfield = newValue}
  5857. }
  5858. /// Returns true if `optionalStringLowfield` has been explicitly set.
  5859. var hasOptionalStringLowfield: Bool {return self._optionalStringLowfield != nil}
  5860. /// Clears the value of `optionalStringLowfield`. Subsequent reads from it will return its default value.
  5861. mutating func clearOptionalStringLowfield() {self._optionalStringLowfield = nil}
  5862. var optionalStringMidfield: String {
  5863. get {return _optionalStringMidfield ?? String()}
  5864. set {_optionalStringMidfield = newValue}
  5865. }
  5866. /// Returns true if `optionalStringMidfield` has been explicitly set.
  5867. var hasOptionalStringMidfield: Bool {return self._optionalStringMidfield != nil}
  5868. /// Clears the value of `optionalStringMidfield`. Subsequent reads from it will return its default value.
  5869. mutating func clearOptionalStringMidfield() {self._optionalStringMidfield = nil}
  5870. var optionalStringHifield: String {
  5871. get {return _optionalStringHifield ?? String()}
  5872. set {_optionalStringHifield = newValue}
  5873. }
  5874. /// Returns true if `optionalStringHifield` has been explicitly set.
  5875. var hasOptionalStringHifield: Bool {return self._optionalStringHifield != nil}
  5876. /// Clears the value of `optionalStringHifield`. Subsequent reads from it will return its default value.
  5877. mutating func clearOptionalStringHifield() {self._optionalStringHifield = nil}
  5878. var repeatedStringLowfield: [String] = []
  5879. var repeatedStringMidfield: [String] = []
  5880. var repeatedStringHifield: [String] = []
  5881. var unknownFields = SwiftProtobuf.UnknownStorage()
  5882. init() {}
  5883. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  5884. fileprivate var _optionalStringLowfield: String? = nil
  5885. fileprivate var _optionalStringMidfield: String? = nil
  5886. fileprivate var _optionalStringHifield: String? = nil
  5887. }
  5888. struct Proto2Unittest_BadFieldNames: Sendable {
  5889. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5890. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5891. // methods supported on all messages.
  5892. var optionalInt32: Int32 {
  5893. get {return _optionalInt32 ?? 0}
  5894. set {_optionalInt32 = newValue}
  5895. }
  5896. /// Returns true if `optionalInt32` has been explicitly set.
  5897. var hasOptionalInt32: Bool {return self._optionalInt32 != nil}
  5898. /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  5899. mutating func clearOptionalInt32() {self._optionalInt32 = nil}
  5900. var `for`: Int32 {
  5901. get {return _for ?? 0}
  5902. set {_for = newValue}
  5903. }
  5904. /// Returns true if ``for`` has been explicitly set.
  5905. var hasFor: Bool {return self._for != nil}
  5906. /// Clears the value of ``for``. Subsequent reads from it will return its default value.
  5907. mutating func clearFor() {self._for = nil}
  5908. var unknownFields = SwiftProtobuf.UnknownStorage()
  5909. init() {}
  5910. fileprivate var _optionalInt32: Int32? = nil
  5911. fileprivate var _for: Int32? = nil
  5912. }
  5913. struct Proto2Unittest_TestNestedMessageRedaction: Sendable {
  5914. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5915. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5916. // methods supported on all messages.
  5917. var optionalUnredactedNestedString: String {
  5918. get {return _optionalUnredactedNestedString ?? String()}
  5919. set {_optionalUnredactedNestedString = newValue}
  5920. }
  5921. /// Returns true if `optionalUnredactedNestedString` has been explicitly set.
  5922. var hasOptionalUnredactedNestedString: Bool {return self._optionalUnredactedNestedString != nil}
  5923. /// Clears the value of `optionalUnredactedNestedString`. Subsequent reads from it will return its default value.
  5924. mutating func clearOptionalUnredactedNestedString() {self._optionalUnredactedNestedString = nil}
  5925. var optionalRedactedNestedString: String {
  5926. get {return _optionalRedactedNestedString ?? String()}
  5927. set {_optionalRedactedNestedString = newValue}
  5928. }
  5929. /// Returns true if `optionalRedactedNestedString` has been explicitly set.
  5930. var hasOptionalRedactedNestedString: Bool {return self._optionalRedactedNestedString != nil}
  5931. /// Clears the value of `optionalRedactedNestedString`. Subsequent reads from it will return its default value.
  5932. mutating func clearOptionalRedactedNestedString() {self._optionalRedactedNestedString = nil}
  5933. var unknownFields = SwiftProtobuf.UnknownStorage()
  5934. init() {}
  5935. fileprivate var _optionalUnredactedNestedString: String? = nil
  5936. fileprivate var _optionalRedactedNestedString: String? = nil
  5937. }
  5938. struct Proto2Unittest_RedactedFields: SwiftProtobuf.ExtensibleMessage, Sendable {
  5939. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5940. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  5941. // methods supported on all messages.
  5942. var optionalRedactedString: String {
  5943. get {return _optionalRedactedString ?? String()}
  5944. set {_optionalRedactedString = newValue}
  5945. }
  5946. /// Returns true if `optionalRedactedString` has been explicitly set.
  5947. var hasOptionalRedactedString: Bool {return self._optionalRedactedString != nil}
  5948. /// Clears the value of `optionalRedactedString`. Subsequent reads from it will return its default value.
  5949. mutating func clearOptionalRedactedString() {self._optionalRedactedString = nil}
  5950. var optionalUnredactedString: String {
  5951. get {return _optionalUnredactedString ?? String()}
  5952. set {_optionalUnredactedString = newValue}
  5953. }
  5954. /// Returns true if `optionalUnredactedString` has been explicitly set.
  5955. var hasOptionalUnredactedString: Bool {return self._optionalUnredactedString != nil}
  5956. /// Clears the value of `optionalUnredactedString`. Subsequent reads from it will return its default value.
  5957. mutating func clearOptionalUnredactedString() {self._optionalUnredactedString = nil}
  5958. var repeatedRedactedString: [String] = []
  5959. var repeatedUnredactedString: [String] = []
  5960. var optionalRedactedMessage: Proto2Unittest_TestNestedMessageRedaction {
  5961. get {return _optionalRedactedMessage ?? Proto2Unittest_TestNestedMessageRedaction()}
  5962. set {_optionalRedactedMessage = newValue}
  5963. }
  5964. /// Returns true if `optionalRedactedMessage` has been explicitly set.
  5965. var hasOptionalRedactedMessage: Bool {return self._optionalRedactedMessage != nil}
  5966. /// Clears the value of `optionalRedactedMessage`. Subsequent reads from it will return its default value.
  5967. mutating func clearOptionalRedactedMessage() {self._optionalRedactedMessage = nil}
  5968. var optionalUnredactedMessage: Proto2Unittest_TestNestedMessageRedaction {
  5969. get {return _optionalUnredactedMessage ?? Proto2Unittest_TestNestedMessageRedaction()}
  5970. set {_optionalUnredactedMessage = newValue}
  5971. }
  5972. /// Returns true if `optionalUnredactedMessage` has been explicitly set.
  5973. var hasOptionalUnredactedMessage: Bool {return self._optionalUnredactedMessage != nil}
  5974. /// Clears the value of `optionalUnredactedMessage`. Subsequent reads from it will return its default value.
  5975. mutating func clearOptionalUnredactedMessage() {self._optionalUnredactedMessage = nil}
  5976. var repeatedRedactedMessage: [Proto2Unittest_TestNestedMessageRedaction] = []
  5977. var repeatedUnredactedMessage: [Proto2Unittest_TestNestedMessageRedaction] = []
  5978. var mapRedactedString: Dictionary<String,String> = [:]
  5979. var mapUnredactedString: Dictionary<String,String> = [:]
  5980. var optionalRedactedFalseString: String {
  5981. get {return _optionalRedactedFalseString ?? String()}
  5982. set {_optionalRedactedFalseString = newValue}
  5983. }
  5984. /// Returns true if `optionalRedactedFalseString` has been explicitly set.
  5985. var hasOptionalRedactedFalseString: Bool {return self._optionalRedactedFalseString != nil}
  5986. /// Clears the value of `optionalRedactedFalseString`. Subsequent reads from it will return its default value.
  5987. mutating func clearOptionalRedactedFalseString() {self._optionalRedactedFalseString = nil}
  5988. var unknownFields = SwiftProtobuf.UnknownStorage()
  5989. init() {}
  5990. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  5991. fileprivate var _optionalRedactedString: String? = nil
  5992. fileprivate var _optionalUnredactedString: String? = nil
  5993. fileprivate var _optionalRedactedMessage: Proto2Unittest_TestNestedMessageRedaction? = nil
  5994. fileprivate var _optionalUnredactedMessage: Proto2Unittest_TestNestedMessageRedaction? = nil
  5995. fileprivate var _optionalRedactedFalseString: String? = nil
  5996. }
  5997. struct Proto2Unittest_TestString: Sendable {
  5998. // SwiftProtobuf.Message conformance is added in an extension below. See the
  5999. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6000. // methods supported on all messages.
  6001. var optionalString: String {
  6002. get {return _optionalString ?? String()}
  6003. set {_optionalString = newValue}
  6004. }
  6005. /// Returns true if `optionalString` has been explicitly set.
  6006. var hasOptionalString: Bool {return self._optionalString != nil}
  6007. /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  6008. mutating func clearOptionalString() {self._optionalString = nil}
  6009. var unknownFields = SwiftProtobuf.UnknownStorage()
  6010. init() {}
  6011. fileprivate var _optionalString: String? = nil
  6012. }
  6013. struct Proto2Unittest_TestCord: @unchecked Sendable {
  6014. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6015. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6016. // methods supported on all messages.
  6017. var optionalBytesCord: Data {
  6018. get {return _optionalBytesCord ?? Data()}
  6019. set {_optionalBytesCord = newValue}
  6020. }
  6021. /// Returns true if `optionalBytesCord` has been explicitly set.
  6022. var hasOptionalBytesCord: Bool {return self._optionalBytesCord != nil}
  6023. /// Clears the value of `optionalBytesCord`. Subsequent reads from it will return its default value.
  6024. mutating func clearOptionalBytesCord() {self._optionalBytesCord = nil}
  6025. var optionalBytesCordDefault: Data {
  6026. get {return _optionalBytesCordDefault ?? Data([104, 101, 108, 108, 111])}
  6027. set {_optionalBytesCordDefault = newValue}
  6028. }
  6029. /// Returns true if `optionalBytesCordDefault` has been explicitly set.
  6030. var hasOptionalBytesCordDefault: Bool {return self._optionalBytesCordDefault != nil}
  6031. /// Clears the value of `optionalBytesCordDefault`. Subsequent reads from it will return its default value.
  6032. mutating func clearOptionalBytesCordDefault() {self._optionalBytesCordDefault = nil}
  6033. var unknownFields = SwiftProtobuf.UnknownStorage()
  6034. init() {}
  6035. fileprivate var _optionalBytesCord: Data? = nil
  6036. fileprivate var _optionalBytesCordDefault: Data? = nil
  6037. }
  6038. struct Proto2Unittest_TestPackedEnumSmallRange: Sendable {
  6039. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6040. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6041. // methods supported on all messages.
  6042. var vals: [Proto2Unittest_TestPackedEnumSmallRange.NestedEnum] = []
  6043. var unknownFields = SwiftProtobuf.UnknownStorage()
  6044. enum NestedEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  6045. case unspecified = 0
  6046. case foo = 1
  6047. case bar = 2
  6048. case baz = 3
  6049. init() {
  6050. self = .unspecified
  6051. }
  6052. }
  6053. init() {}
  6054. }
  6055. struct Proto2Unittest_EnumsForBenchmark: Sendable {
  6056. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6057. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6058. // methods supported on all messages.
  6059. var unknownFields = SwiftProtobuf.UnknownStorage()
  6060. enum Flat: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  6061. case a0 = 0
  6062. case a1 = 1
  6063. case a2 = 2
  6064. case a3 = 3
  6065. case a4 = 4
  6066. case a5 = 5
  6067. case a6 = 6
  6068. case a7 = 7
  6069. case a8 = 8
  6070. case a9 = 9
  6071. case a10 = 10
  6072. case a11 = 11
  6073. case a12 = 12
  6074. case a13 = 13
  6075. case a14 = 14
  6076. case a15 = 15
  6077. init() {
  6078. self = .a0
  6079. }
  6080. }
  6081. /// Has a few holes, bitmap can be used.
  6082. enum AlmostFlat: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  6083. case b0 = 0
  6084. case b1 = 1
  6085. case b2 = 2
  6086. case b3 = 3
  6087. case b5 = 5
  6088. case b6 = 6
  6089. case b7 = 7
  6090. case b8 = 8
  6091. case b9 = 9
  6092. case b11 = 11
  6093. case b12 = 12
  6094. case b13 = 13
  6095. case b14 = 14
  6096. case b15 = 15
  6097. case b17 = 17
  6098. case b19 = 19
  6099. init() {
  6100. self = .b0
  6101. }
  6102. }
  6103. enum Sparse: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  6104. case c536 = 536
  6105. case c8387 = 8387
  6106. case c9673 = 9673
  6107. case c10285 = 10285
  6108. case c13318 = 13318
  6109. case c15963 = 15963
  6110. case c16439 = 16439
  6111. case c18197 = 18197
  6112. case c19430 = 19430
  6113. case c20361 = 20361
  6114. case c20706 = 20706
  6115. case c21050 = 21050
  6116. case c21906 = 21906
  6117. case c27265 = 27265
  6118. case c30109 = 30109
  6119. case c31670 = 31670
  6120. init() {
  6121. self = .c536
  6122. }
  6123. }
  6124. init() {}
  6125. }
  6126. struct Proto2Unittest_TestMessageWithManyRepeatedPtrFields: @unchecked Sendable {
  6127. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6128. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6129. // methods supported on all messages.
  6130. var repeatedString1: [String] {
  6131. get {return _storage._repeatedString1}
  6132. set {_uniqueStorage()._repeatedString1 = newValue}
  6133. }
  6134. var repeatedString2: [String] {
  6135. get {return _storage._repeatedString2}
  6136. set {_uniqueStorage()._repeatedString2 = newValue}
  6137. }
  6138. var repeatedString3: [String] {
  6139. get {return _storage._repeatedString3}
  6140. set {_uniqueStorage()._repeatedString3 = newValue}
  6141. }
  6142. var repeatedString4: [String] {
  6143. get {return _storage._repeatedString4}
  6144. set {_uniqueStorage()._repeatedString4 = newValue}
  6145. }
  6146. var repeatedString5: [String] {
  6147. get {return _storage._repeatedString5}
  6148. set {_uniqueStorage()._repeatedString5 = newValue}
  6149. }
  6150. var repeatedString6: [String] {
  6151. get {return _storage._repeatedString6}
  6152. set {_uniqueStorage()._repeatedString6 = newValue}
  6153. }
  6154. var repeatedString7: [String] {
  6155. get {return _storage._repeatedString7}
  6156. set {_uniqueStorage()._repeatedString7 = newValue}
  6157. }
  6158. var repeatedString8: [String] {
  6159. get {return _storage._repeatedString8}
  6160. set {_uniqueStorage()._repeatedString8 = newValue}
  6161. }
  6162. var repeatedString9: [String] {
  6163. get {return _storage._repeatedString9}
  6164. set {_uniqueStorage()._repeatedString9 = newValue}
  6165. }
  6166. var repeatedString10: [String] {
  6167. get {return _storage._repeatedString10}
  6168. set {_uniqueStorage()._repeatedString10 = newValue}
  6169. }
  6170. var repeatedString11: [String] {
  6171. get {return _storage._repeatedString11}
  6172. set {_uniqueStorage()._repeatedString11 = newValue}
  6173. }
  6174. var repeatedString12: [String] {
  6175. get {return _storage._repeatedString12}
  6176. set {_uniqueStorage()._repeatedString12 = newValue}
  6177. }
  6178. var repeatedString13: [String] {
  6179. get {return _storage._repeatedString13}
  6180. set {_uniqueStorage()._repeatedString13 = newValue}
  6181. }
  6182. var repeatedString14: [String] {
  6183. get {return _storage._repeatedString14}
  6184. set {_uniqueStorage()._repeatedString14 = newValue}
  6185. }
  6186. var repeatedString15: [String] {
  6187. get {return _storage._repeatedString15}
  6188. set {_uniqueStorage()._repeatedString15 = newValue}
  6189. }
  6190. var repeatedString16: [String] {
  6191. get {return _storage._repeatedString16}
  6192. set {_uniqueStorage()._repeatedString16 = newValue}
  6193. }
  6194. var repeatedString17: [String] {
  6195. get {return _storage._repeatedString17}
  6196. set {_uniqueStorage()._repeatedString17 = newValue}
  6197. }
  6198. var repeatedString18: [String] {
  6199. get {return _storage._repeatedString18}
  6200. set {_uniqueStorage()._repeatedString18 = newValue}
  6201. }
  6202. var repeatedString19: [String] {
  6203. get {return _storage._repeatedString19}
  6204. set {_uniqueStorage()._repeatedString19 = newValue}
  6205. }
  6206. var repeatedString20: [String] {
  6207. get {return _storage._repeatedString20}
  6208. set {_uniqueStorage()._repeatedString20 = newValue}
  6209. }
  6210. var repeatedString21: [String] {
  6211. get {return _storage._repeatedString21}
  6212. set {_uniqueStorage()._repeatedString21 = newValue}
  6213. }
  6214. var repeatedString22: [String] {
  6215. get {return _storage._repeatedString22}
  6216. set {_uniqueStorage()._repeatedString22 = newValue}
  6217. }
  6218. var repeatedString23: [String] {
  6219. get {return _storage._repeatedString23}
  6220. set {_uniqueStorage()._repeatedString23 = newValue}
  6221. }
  6222. var repeatedString24: [String] {
  6223. get {return _storage._repeatedString24}
  6224. set {_uniqueStorage()._repeatedString24 = newValue}
  6225. }
  6226. var repeatedString25: [String] {
  6227. get {return _storage._repeatedString25}
  6228. set {_uniqueStorage()._repeatedString25 = newValue}
  6229. }
  6230. var repeatedString26: [String] {
  6231. get {return _storage._repeatedString26}
  6232. set {_uniqueStorage()._repeatedString26 = newValue}
  6233. }
  6234. var repeatedString27: [String] {
  6235. get {return _storage._repeatedString27}
  6236. set {_uniqueStorage()._repeatedString27 = newValue}
  6237. }
  6238. var repeatedString28: [String] {
  6239. get {return _storage._repeatedString28}
  6240. set {_uniqueStorage()._repeatedString28 = newValue}
  6241. }
  6242. var repeatedString29: [String] {
  6243. get {return _storage._repeatedString29}
  6244. set {_uniqueStorage()._repeatedString29 = newValue}
  6245. }
  6246. var repeatedString30: [String] {
  6247. get {return _storage._repeatedString30}
  6248. set {_uniqueStorage()._repeatedString30 = newValue}
  6249. }
  6250. var repeatedString31: [String] {
  6251. get {return _storage._repeatedString31}
  6252. set {_uniqueStorage()._repeatedString31 = newValue}
  6253. }
  6254. var repeatedString32: [String] {
  6255. get {return _storage._repeatedString32}
  6256. set {_uniqueStorage()._repeatedString32 = newValue}
  6257. }
  6258. var unknownFields = SwiftProtobuf.UnknownStorage()
  6259. init() {}
  6260. fileprivate var _storage = _StorageClass.defaultInstance
  6261. }
  6262. struct Proto2Unittest_MessageCreatorZeroInit: @unchecked Sendable {
  6263. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6264. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6265. // methods supported on all messages.
  6266. var i: Int32 {
  6267. get {return _storage._i ?? 0}
  6268. set {_uniqueStorage()._i = newValue}
  6269. }
  6270. /// Returns true if `i` has been explicitly set.
  6271. var hasI: Bool {return _storage._i != nil}
  6272. /// Clears the value of `i`. Subsequent reads from it will return its default value.
  6273. mutating func clearI() {_uniqueStorage()._i = nil}
  6274. var d: Double {
  6275. get {return _storage._d ?? 0}
  6276. set {_uniqueStorage()._d = newValue}
  6277. }
  6278. /// Returns true if `d` has been explicitly set.
  6279. var hasD: Bool {return _storage._d != nil}
  6280. /// Clears the value of `d`. Subsequent reads from it will return its default value.
  6281. mutating func clearD() {_uniqueStorage()._d = nil}
  6282. var m: Proto2Unittest_MessageCreatorZeroInit {
  6283. get {return _storage._m ?? Proto2Unittest_MessageCreatorZeroInit()}
  6284. set {_uniqueStorage()._m = newValue}
  6285. }
  6286. /// Returns true if `m` has been explicitly set.
  6287. var hasM: Bool {return _storage._m != nil}
  6288. /// Clears the value of `m`. Subsequent reads from it will return its default value.
  6289. mutating func clearM() {_uniqueStorage()._m = nil}
  6290. var one: OneOf_One? {
  6291. get {return _storage._one}
  6292. set {_uniqueStorage()._one = newValue}
  6293. }
  6294. var os: String {
  6295. get {
  6296. if case .os(let v)? = _storage._one {return v}
  6297. return String()
  6298. }
  6299. set {_uniqueStorage()._one = .os(newValue)}
  6300. }
  6301. var oc: String {
  6302. get {
  6303. if case .oc(let v)? = _storage._one {return v}
  6304. return String()
  6305. }
  6306. set {_uniqueStorage()._one = .oc(newValue)}
  6307. }
  6308. var of: UInt64 {
  6309. get {
  6310. if case .of(let v)? = _storage._one {return v}
  6311. return 0
  6312. }
  6313. set {_uniqueStorage()._one = .of(newValue)}
  6314. }
  6315. var ol: Proto2Unittest_MessageCreatorZeroInit {
  6316. get {
  6317. if case .ol(let v)? = _storage._one {return v}
  6318. return Proto2Unittest_MessageCreatorZeroInit()
  6319. }
  6320. set {_uniqueStorage()._one = .ol(newValue)}
  6321. }
  6322. var unknownFields = SwiftProtobuf.UnknownStorage()
  6323. enum OneOf_One: Equatable, Sendable {
  6324. case os(String)
  6325. case oc(String)
  6326. case of(UInt64)
  6327. case ol(Proto2Unittest_MessageCreatorZeroInit)
  6328. }
  6329. init() {}
  6330. fileprivate var _storage = _StorageClass.defaultInstance
  6331. }
  6332. struct Proto2Unittest_MessageCreatorMemcpy: @unchecked Sendable {
  6333. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6334. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6335. // methods supported on all messages.
  6336. var s: String {
  6337. get {return _storage._s ?? String()}
  6338. set {_uniqueStorage()._s = newValue}
  6339. }
  6340. /// Returns true if `s` has been explicitly set.
  6341. var hasS: Bool {return _storage._s != nil}
  6342. /// Clears the value of `s`. Subsequent reads from it will return its default value.
  6343. mutating func clearS() {_uniqueStorage()._s = nil}
  6344. var i: [Int32] {
  6345. get {return _storage._i}
  6346. set {_uniqueStorage()._i = newValue}
  6347. }
  6348. var m: Proto2Unittest_MessageCreatorMemcpy {
  6349. get {return _storage._m ?? Proto2Unittest_MessageCreatorMemcpy()}
  6350. set {_uniqueStorage()._m = newValue}
  6351. }
  6352. /// Returns true if `m` has been explicitly set.
  6353. var hasM: Bool {return _storage._m != nil}
  6354. /// Clears the value of `m`. Subsequent reads from it will return its default value.
  6355. mutating func clearM() {_uniqueStorage()._m = nil}
  6356. var m2: Dictionary<Int32,Int32> {
  6357. get {return _storage._m2}
  6358. set {_uniqueStorage()._m2 = newValue}
  6359. }
  6360. var unknownFields = SwiftProtobuf.UnknownStorage()
  6361. init() {}
  6362. fileprivate var _storage = _StorageClass.defaultInstance
  6363. }
  6364. struct Proto2Unittest_MessageCreatorFunc: Sendable {
  6365. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6366. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6367. // methods supported on all messages.
  6368. /// This one is ArenaDtorNeeds::kRequired so we must run the constructor.
  6369. var c: String {
  6370. get {return _c ?? String()}
  6371. set {_c = newValue}
  6372. }
  6373. /// Returns true if `c` has been explicitly set.
  6374. var hasC: Bool {return self._c != nil}
  6375. /// Clears the value of `c`. Subsequent reads from it will return its default value.
  6376. mutating func clearC() {self._c = nil}
  6377. var unknownFields = SwiftProtobuf.UnknownStorage()
  6378. init() {}
  6379. fileprivate var _c: String? = nil
  6380. }
  6381. struct Proto2Unittest_FastParseTableCompression: Sendable {
  6382. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6383. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6384. // methods supported on all messages.
  6385. var importantField1: Int32 {
  6386. get {return _importantField1 ?? 0}
  6387. set {_importantField1 = newValue}
  6388. }
  6389. /// Returns true if `importantField1` has been explicitly set.
  6390. var hasImportantField1: Bool {return self._importantField1 != nil}
  6391. /// Clears the value of `importantField1`. Subsequent reads from it will return its default value.
  6392. mutating func clearImportantField1() {self._importantField1 = nil}
  6393. var importantField2: Int32 {
  6394. get {return _importantField2 ?? 0}
  6395. set {_importantField2 = newValue}
  6396. }
  6397. /// Returns true if `importantField2` has been explicitly set.
  6398. var hasImportantField2: Bool {return self._importantField2 != nil}
  6399. /// Clears the value of `importantField2`. Subsequent reads from it will return its default value.
  6400. mutating func clearImportantField2() {self._importantField2 = nil}
  6401. var unimportantField3: Int32 {
  6402. get {return _unimportantField3 ?? 0}
  6403. set {_unimportantField3 = newValue}
  6404. }
  6405. /// Returns true if `unimportantField3` has been explicitly set.
  6406. var hasUnimportantField3: Bool {return self._unimportantField3 != nil}
  6407. /// Clears the value of `unimportantField3`. Subsequent reads from it will return its default value.
  6408. mutating func clearUnimportantField3() {self._unimportantField3 = nil}
  6409. var unimportantField4: Int32 {
  6410. get {return _unimportantField4 ?? 0}
  6411. set {_unimportantField4 = newValue}
  6412. }
  6413. /// Returns true if `unimportantField4` has been explicitly set.
  6414. var hasUnimportantField4: Bool {return self._unimportantField4 != nil}
  6415. /// Clears the value of `unimportantField4`. Subsequent reads from it will return its default value.
  6416. mutating func clearUnimportantField4() {self._unimportantField4 = nil}
  6417. var unimportantField5: Int32 {
  6418. get {return _unimportantField5 ?? 0}
  6419. set {_unimportantField5 = newValue}
  6420. }
  6421. /// Returns true if `unimportantField5` has been explicitly set.
  6422. var hasUnimportantField5: Bool {return self._unimportantField5 != nil}
  6423. /// Clears the value of `unimportantField5`. Subsequent reads from it will return its default value.
  6424. mutating func clearUnimportantField5() {self._unimportantField5 = nil}
  6425. var unimportantField9: Int32 {
  6426. get {return _unimportantField9 ?? 0}
  6427. set {_unimportantField9 = newValue}
  6428. }
  6429. /// Returns true if `unimportantField9` has been explicitly set.
  6430. var hasUnimportantField9: Bool {return self._unimportantField9 != nil}
  6431. /// Clears the value of `unimportantField9`. Subsequent reads from it will return its default value.
  6432. mutating func clearUnimportantField9() {self._unimportantField9 = nil}
  6433. var importantField11: Int32 {
  6434. get {return _importantField11 ?? 0}
  6435. set {_importantField11 = newValue}
  6436. }
  6437. /// Returns true if `importantField11` has been explicitly set.
  6438. var hasImportantField11: Bool {return self._importantField11 != nil}
  6439. /// Clears the value of `importantField11`. Subsequent reads from it will return its default value.
  6440. mutating func clearImportantField11() {self._importantField11 = nil}
  6441. var unimportantField12: Int32 {
  6442. get {return _unimportantField12 ?? 0}
  6443. set {_unimportantField12 = newValue}
  6444. }
  6445. /// Returns true if `unimportantField12` has been explicitly set.
  6446. var hasUnimportantField12: Bool {return self._unimportantField12 != nil}
  6447. /// Clears the value of `unimportantField12`. Subsequent reads from it will return its default value.
  6448. mutating func clearUnimportantField12() {self._unimportantField12 = nil}
  6449. var importantField14: Int32 {
  6450. get {return _importantField14 ?? 0}
  6451. set {_importantField14 = newValue}
  6452. }
  6453. /// Returns true if `importantField14` has been explicitly set.
  6454. var hasImportantField14: Bool {return self._importantField14 != nil}
  6455. /// Clears the value of `importantField14`. Subsequent reads from it will return its default value.
  6456. mutating func clearImportantField14() {self._importantField14 = nil}
  6457. var unimportantField15: Int32 {
  6458. get {return _unimportantField15 ?? 0}
  6459. set {_unimportantField15 = newValue}
  6460. }
  6461. /// Returns true if `unimportantField15` has been explicitly set.
  6462. var hasUnimportantField15: Bool {return self._unimportantField15 != nil}
  6463. /// Clears the value of `unimportantField15`. Subsequent reads from it will return its default value.
  6464. mutating func clearUnimportantField15() {self._unimportantField15 = nil}
  6465. var unknownFields = SwiftProtobuf.UnknownStorage()
  6466. init() {}
  6467. fileprivate var _importantField1: Int32? = nil
  6468. fileprivate var _importantField2: Int32? = nil
  6469. fileprivate var _unimportantField3: Int32? = nil
  6470. fileprivate var _unimportantField4: Int32? = nil
  6471. fileprivate var _unimportantField5: Int32? = nil
  6472. fileprivate var _unimportantField9: Int32? = nil
  6473. fileprivate var _importantField11: Int32? = nil
  6474. fileprivate var _unimportantField12: Int32? = nil
  6475. fileprivate var _importantField14: Int32? = nil
  6476. fileprivate var _unimportantField15: Int32? = nil
  6477. }
  6478. struct Proto2Unittest_TestMessageForMove_Small: Sendable {
  6479. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6480. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6481. // methods supported on all messages.
  6482. var a: Int32 {
  6483. get {return _a ?? 0}
  6484. set {_a = newValue}
  6485. }
  6486. /// Returns true if `a` has been explicitly set.
  6487. var hasA: Bool {return self._a != nil}
  6488. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  6489. mutating func clearA() {self._a = nil}
  6490. var b: Int32 {
  6491. get {return _b ?? 0}
  6492. set {_b = newValue}
  6493. }
  6494. /// Returns true if `b` has been explicitly set.
  6495. var hasB: Bool {return self._b != nil}
  6496. /// Clears the value of `b`. Subsequent reads from it will return its default value.
  6497. mutating func clearB() {self._b = nil}
  6498. var unknownFields = SwiftProtobuf.UnknownStorage()
  6499. init() {}
  6500. fileprivate var _a: Int32? = nil
  6501. fileprivate var _b: Int32? = nil
  6502. }
  6503. struct Proto2Unittest_TestMessageForMove_Large: @unchecked Sendable {
  6504. // SwiftProtobuf.Message conformance is added in an extension below. See the
  6505. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  6506. // methods supported on all messages.
  6507. var a1: Int32 {
  6508. get {return _storage._a1 ?? 0}
  6509. set {_uniqueStorage()._a1 = newValue}
  6510. }
  6511. /// Returns true if `a1` has been explicitly set.
  6512. var hasA1: Bool {return _storage._a1 != nil}
  6513. /// Clears the value of `a1`. Subsequent reads from it will return its default value.
  6514. mutating func clearA1() {_uniqueStorage()._a1 = nil}
  6515. var a2: Int32 {
  6516. get {return _storage._a2 ?? 0}
  6517. set {_uniqueStorage()._a2 = newValue}
  6518. }
  6519. /// Returns true if `a2` has been explicitly set.
  6520. var hasA2: Bool {return _storage._a2 != nil}
  6521. /// Clears the value of `a2`. Subsequent reads from it will return its default value.
  6522. mutating func clearA2() {_uniqueStorage()._a2 = nil}
  6523. var a3: Int32 {
  6524. get {return _storage._a3 ?? 0}
  6525. set {_uniqueStorage()._a3 = newValue}
  6526. }
  6527. /// Returns true if `a3` has been explicitly set.
  6528. var hasA3: Bool {return _storage._a3 != nil}
  6529. /// Clears the value of `a3`. Subsequent reads from it will return its default value.
  6530. mutating func clearA3() {_uniqueStorage()._a3 = nil}
  6531. var a4: Int32 {
  6532. get {return _storage._a4 ?? 0}
  6533. set {_uniqueStorage()._a4 = newValue}
  6534. }
  6535. /// Returns true if `a4` has been explicitly set.
  6536. var hasA4: Bool {return _storage._a4 != nil}
  6537. /// Clears the value of `a4`. Subsequent reads from it will return its default value.
  6538. mutating func clearA4() {_uniqueStorage()._a4 = nil}
  6539. var a5: Int32 {
  6540. get {return _storage._a5 ?? 0}
  6541. set {_uniqueStorage()._a5 = newValue}
  6542. }
  6543. /// Returns true if `a5` has been explicitly set.
  6544. var hasA5: Bool {return _storage._a5 != nil}
  6545. /// Clears the value of `a5`. Subsequent reads from it will return its default value.
  6546. mutating func clearA5() {_uniqueStorage()._a5 = nil}
  6547. var a6: Int32 {
  6548. get {return _storage._a6 ?? 0}
  6549. set {_uniqueStorage()._a6 = newValue}
  6550. }
  6551. /// Returns true if `a6` has been explicitly set.
  6552. var hasA6: Bool {return _storage._a6 != nil}
  6553. /// Clears the value of `a6`. Subsequent reads from it will return its default value.
  6554. mutating func clearA6() {_uniqueStorage()._a6 = nil}
  6555. var a7: Int32 {
  6556. get {return _storage._a7 ?? 0}
  6557. set {_uniqueStorage()._a7 = newValue}
  6558. }
  6559. /// Returns true if `a7` has been explicitly set.
  6560. var hasA7: Bool {return _storage._a7 != nil}
  6561. /// Clears the value of `a7`. Subsequent reads from it will return its default value.
  6562. mutating func clearA7() {_uniqueStorage()._a7 = nil}
  6563. var a8: Int32 {
  6564. get {return _storage._a8 ?? 0}
  6565. set {_uniqueStorage()._a8 = newValue}
  6566. }
  6567. /// Returns true if `a8` has been explicitly set.
  6568. var hasA8: Bool {return _storage._a8 != nil}
  6569. /// Clears the value of `a8`. Subsequent reads from it will return its default value.
  6570. mutating func clearA8() {_uniqueStorage()._a8 = nil}
  6571. var a9: Int32 {
  6572. get {return _storage._a9 ?? 0}
  6573. set {_uniqueStorage()._a9 = newValue}
  6574. }
  6575. /// Returns true if `a9` has been explicitly set.
  6576. var hasA9: Bool {return _storage._a9 != nil}
  6577. /// Clears the value of `a9`. Subsequent reads from it will return its default value.
  6578. mutating func clearA9() {_uniqueStorage()._a9 = nil}
  6579. var a11: [Int32] {
  6580. get {return _storage._a11}
  6581. set {_uniqueStorage()._a11 = newValue}
  6582. }
  6583. var a12: [Int32] {
  6584. get {return _storage._a12}
  6585. set {_uniqueStorage()._a12 = newValue}
  6586. }
  6587. var a13: [Int32] {
  6588. get {return _storage._a13}
  6589. set {_uniqueStorage()._a13 = newValue}
  6590. }
  6591. var a14: [Int32] {
  6592. get {return _storage._a14}
  6593. set {_uniqueStorage()._a14 = newValue}
  6594. }
  6595. var a15: [Int32] {
  6596. get {return _storage._a15}
  6597. set {_uniqueStorage()._a15 = newValue}
  6598. }
  6599. var a16: [Int32] {
  6600. get {return _storage._a16}
  6601. set {_uniqueStorage()._a16 = newValue}
  6602. }
  6603. var a17: [Int32] {
  6604. get {return _storage._a17}
  6605. set {_uniqueStorage()._a17 = newValue}
  6606. }
  6607. var a18: [Int32] {
  6608. get {return _storage._a18}
  6609. set {_uniqueStorage()._a18 = newValue}
  6610. }
  6611. var a19: [Int32] {
  6612. get {return _storage._a19}
  6613. set {_uniqueStorage()._a19 = newValue}
  6614. }
  6615. var s101: String {
  6616. get {return _storage._s101 ?? String()}
  6617. set {_uniqueStorage()._s101 = newValue}
  6618. }
  6619. /// Returns true if `s101` has been explicitly set.
  6620. var hasS101: Bool {return _storage._s101 != nil}
  6621. /// Clears the value of `s101`. Subsequent reads from it will return its default value.
  6622. mutating func clearS101() {_uniqueStorage()._s101 = nil}
  6623. var s102: String {
  6624. get {return _storage._s102 ?? String()}
  6625. set {_uniqueStorage()._s102 = newValue}
  6626. }
  6627. /// Returns true if `s102` has been explicitly set.
  6628. var hasS102: Bool {return _storage._s102 != nil}
  6629. /// Clears the value of `s102`. Subsequent reads from it will return its default value.
  6630. mutating func clearS102() {_uniqueStorage()._s102 = nil}
  6631. var s103: String {
  6632. get {return _storage._s103 ?? String()}
  6633. set {_uniqueStorage()._s103 = newValue}
  6634. }
  6635. /// Returns true if `s103` has been explicitly set.
  6636. var hasS103: Bool {return _storage._s103 != nil}
  6637. /// Clears the value of `s103`. Subsequent reads from it will return its default value.
  6638. mutating func clearS103() {_uniqueStorage()._s103 = nil}
  6639. var s104: String {
  6640. get {return _storage._s104 ?? String()}
  6641. set {_uniqueStorage()._s104 = newValue}
  6642. }
  6643. /// Returns true if `s104` has been explicitly set.
  6644. var hasS104: Bool {return _storage._s104 != nil}
  6645. /// Clears the value of `s104`. Subsequent reads from it will return its default value.
  6646. mutating func clearS104() {_uniqueStorage()._s104 = nil}
  6647. var s105: String {
  6648. get {return _storage._s105 ?? String()}
  6649. set {_uniqueStorage()._s105 = newValue}
  6650. }
  6651. /// Returns true if `s105` has been explicitly set.
  6652. var hasS105: Bool {return _storage._s105 != nil}
  6653. /// Clears the value of `s105`. Subsequent reads from it will return its default value.
  6654. mutating func clearS105() {_uniqueStorage()._s105 = nil}
  6655. var s106: String {
  6656. get {return _storage._s106 ?? String()}
  6657. set {_uniqueStorage()._s106 = newValue}
  6658. }
  6659. /// Returns true if `s106` has been explicitly set.
  6660. var hasS106: Bool {return _storage._s106 != nil}
  6661. /// Clears the value of `s106`. Subsequent reads from it will return its default value.
  6662. mutating func clearS106() {_uniqueStorage()._s106 = nil}
  6663. var s107: String {
  6664. get {return _storage._s107 ?? String()}
  6665. set {_uniqueStorage()._s107 = newValue}
  6666. }
  6667. /// Returns true if `s107` has been explicitly set.
  6668. var hasS107: Bool {return _storage._s107 != nil}
  6669. /// Clears the value of `s107`. Subsequent reads from it will return its default value.
  6670. mutating func clearS107() {_uniqueStorage()._s107 = nil}
  6671. var s108: String {
  6672. get {return _storage._s108 ?? String()}
  6673. set {_uniqueStorage()._s108 = newValue}
  6674. }
  6675. /// Returns true if `s108` has been explicitly set.
  6676. var hasS108: Bool {return _storage._s108 != nil}
  6677. /// Clears the value of `s108`. Subsequent reads from it will return its default value.
  6678. mutating func clearS108() {_uniqueStorage()._s108 = nil}
  6679. var s109: String {
  6680. get {return _storage._s109 ?? String()}
  6681. set {_uniqueStorage()._s109 = newValue}
  6682. }
  6683. /// Returns true if `s109` has been explicitly set.
  6684. var hasS109: Bool {return _storage._s109 != nil}
  6685. /// Clears the value of `s109`. Subsequent reads from it will return its default value.
  6686. mutating func clearS109() {_uniqueStorage()._s109 = nil}
  6687. var s111: [String] {
  6688. get {return _storage._s111}
  6689. set {_uniqueStorage()._s111 = newValue}
  6690. }
  6691. var s112: [String] {
  6692. get {return _storage._s112}
  6693. set {_uniqueStorage()._s112 = newValue}
  6694. }
  6695. var s113: [String] {
  6696. get {return _storage._s113}
  6697. set {_uniqueStorage()._s113 = newValue}
  6698. }
  6699. var s114: [String] {
  6700. get {return _storage._s114}
  6701. set {_uniqueStorage()._s114 = newValue}
  6702. }
  6703. var s115: [String] {
  6704. get {return _storage._s115}
  6705. set {_uniqueStorage()._s115 = newValue}
  6706. }
  6707. var s116: [String] {
  6708. get {return _storage._s116}
  6709. set {_uniqueStorage()._s116 = newValue}
  6710. }
  6711. var s117: [String] {
  6712. get {return _storage._s117}
  6713. set {_uniqueStorage()._s117 = newValue}
  6714. }
  6715. var s118: [String] {
  6716. get {return _storage._s118}
  6717. set {_uniqueStorage()._s118 = newValue}
  6718. }
  6719. var s119: [String] {
  6720. get {return _storage._s119}
  6721. set {_uniqueStorage()._s119 = newValue}
  6722. }
  6723. var unknownFields = SwiftProtobuf.UnknownStorage()
  6724. init() {}
  6725. fileprivate var _storage = _StorageClass.defaultInstance
  6726. }
  6727. // MARK: - Extension support defined in unittest.proto.
  6728. // MARK: - Extension Properties
  6729. // Swift Extensions on the extended Messages to add easy access to the declared
  6730. // extension fields. The names are based on the extension field name from the proto
  6731. // declaration. To avoid naming collisions, the names are prefixed with the name of
  6732. // the scope where the extend directive occurs.
  6733. extension Proto2Unittest_BoolParseTester {
  6734. var Proto2Unittest_BoolParseTester_optionalBoolExt: Bool {
  6735. get {return getExtensionValue(ext: Proto2Unittest_BoolParseTester.Extensions.optional_bool_ext) ?? false}
  6736. set {setExtensionValue(ext: Proto2Unittest_BoolParseTester.Extensions.optional_bool_ext, value: newValue)}
  6737. }
  6738. /// Returns true if extension `Proto2Unittest_BoolParseTester.Extensions.optional_bool_ext`
  6739. /// has been explicitly set.
  6740. var hasProto2Unittest_BoolParseTester_optionalBoolExt: Bool {
  6741. return hasExtensionValue(ext: Proto2Unittest_BoolParseTester.Extensions.optional_bool_ext)
  6742. }
  6743. /// Clears the value of extension `Proto2Unittest_BoolParseTester.Extensions.optional_bool_ext`.
  6744. /// Subsequent reads from it will return its default value.
  6745. mutating func clearProto2Unittest_BoolParseTester_optionalBoolExt() {
  6746. clearExtensionValue(ext: Proto2Unittest_BoolParseTester.Extensions.optional_bool_ext)
  6747. }
  6748. var Proto2Unittest_BoolParseTester_repeatedBoolExt: [Bool] {
  6749. get {return getExtensionValue(ext: Proto2Unittest_BoolParseTester.Extensions.repeated_bool_ext) ?? []}
  6750. set {setExtensionValue(ext: Proto2Unittest_BoolParseTester.Extensions.repeated_bool_ext, value: newValue)}
  6751. }
  6752. var Proto2Unittest_BoolParseTester_packedBoolExt: [Bool] {
  6753. get {return getExtensionValue(ext: Proto2Unittest_BoolParseTester.Extensions.packed_bool_ext) ?? []}
  6754. set {setExtensionValue(ext: Proto2Unittest_BoolParseTester.Extensions.packed_bool_ext, value: newValue)}
  6755. }
  6756. }
  6757. extension Proto2Unittest_EnumParseTester {
  6758. var Proto2Unittest_EnumParseTester_optionalArbitraryExt: Proto2Unittest_EnumParseTester.Arbitrary {
  6759. get {return getExtensionValue(ext: Proto2Unittest_EnumParseTester.Extensions.optional_arbitrary_ext) ?? .default}
  6760. set {setExtensionValue(ext: Proto2Unittest_EnumParseTester.Extensions.optional_arbitrary_ext, value: newValue)}
  6761. }
  6762. /// Returns true if extension `Proto2Unittest_EnumParseTester.Extensions.optional_arbitrary_ext`
  6763. /// has been explicitly set.
  6764. var hasProto2Unittest_EnumParseTester_optionalArbitraryExt: Bool {
  6765. return hasExtensionValue(ext: Proto2Unittest_EnumParseTester.Extensions.optional_arbitrary_ext)
  6766. }
  6767. /// Clears the value of extension `Proto2Unittest_EnumParseTester.Extensions.optional_arbitrary_ext`.
  6768. /// Subsequent reads from it will return its default value.
  6769. mutating func clearProto2Unittest_EnumParseTester_optionalArbitraryExt() {
  6770. clearExtensionValue(ext: Proto2Unittest_EnumParseTester.Extensions.optional_arbitrary_ext)
  6771. }
  6772. var Proto2Unittest_EnumParseTester_repeatedArbitraryExt: [Proto2Unittest_EnumParseTester.Arbitrary] {
  6773. get {return getExtensionValue(ext: Proto2Unittest_EnumParseTester.Extensions.repeated_arbitrary_ext) ?? []}
  6774. set {setExtensionValue(ext: Proto2Unittest_EnumParseTester.Extensions.repeated_arbitrary_ext, value: newValue)}
  6775. }
  6776. var Proto2Unittest_EnumParseTester_packedArbitraryExt: [Proto2Unittest_EnumParseTester.Arbitrary] {
  6777. get {return getExtensionValue(ext: Proto2Unittest_EnumParseTester.Extensions.packed_arbitrary_ext) ?? []}
  6778. set {setExtensionValue(ext: Proto2Unittest_EnumParseTester.Extensions.packed_arbitrary_ext, value: newValue)}
  6779. }
  6780. }
  6781. extension Proto2Unittest_Int32ParseTester {
  6782. var Proto2Unittest_Int32ParseTester_optionalInt32Ext: Int32 {
  6783. get {return getExtensionValue(ext: Proto2Unittest_Int32ParseTester.Extensions.optional_int32_ext) ?? 0}
  6784. set {setExtensionValue(ext: Proto2Unittest_Int32ParseTester.Extensions.optional_int32_ext, value: newValue)}
  6785. }
  6786. /// Returns true if extension `Proto2Unittest_Int32ParseTester.Extensions.optional_int32_ext`
  6787. /// has been explicitly set.
  6788. var hasProto2Unittest_Int32ParseTester_optionalInt32Ext: Bool {
  6789. return hasExtensionValue(ext: Proto2Unittest_Int32ParseTester.Extensions.optional_int32_ext)
  6790. }
  6791. /// Clears the value of extension `Proto2Unittest_Int32ParseTester.Extensions.optional_int32_ext`.
  6792. /// Subsequent reads from it will return its default value.
  6793. mutating func clearProto2Unittest_Int32ParseTester_optionalInt32Ext() {
  6794. clearExtensionValue(ext: Proto2Unittest_Int32ParseTester.Extensions.optional_int32_ext)
  6795. }
  6796. var Proto2Unittest_Int32ParseTester_repeatedInt32Ext: [Int32] {
  6797. get {return getExtensionValue(ext: Proto2Unittest_Int32ParseTester.Extensions.repeated_int32_ext) ?? []}
  6798. set {setExtensionValue(ext: Proto2Unittest_Int32ParseTester.Extensions.repeated_int32_ext, value: newValue)}
  6799. }
  6800. var Proto2Unittest_Int32ParseTester_packedInt32Ext: [Int32] {
  6801. get {return getExtensionValue(ext: Proto2Unittest_Int32ParseTester.Extensions.packed_int32_ext) ?? []}
  6802. set {setExtensionValue(ext: Proto2Unittest_Int32ParseTester.Extensions.packed_int32_ext, value: newValue)}
  6803. }
  6804. }
  6805. extension Proto2Unittest_Int64ParseTester {
  6806. var Proto2Unittest_Int64ParseTester_optionalInt64Ext: Int64 {
  6807. get {return getExtensionValue(ext: Proto2Unittest_Int64ParseTester.Extensions.optional_int64_ext) ?? 0}
  6808. set {setExtensionValue(ext: Proto2Unittest_Int64ParseTester.Extensions.optional_int64_ext, value: newValue)}
  6809. }
  6810. /// Returns true if extension `Proto2Unittest_Int64ParseTester.Extensions.optional_int64_ext`
  6811. /// has been explicitly set.
  6812. var hasProto2Unittest_Int64ParseTester_optionalInt64Ext: Bool {
  6813. return hasExtensionValue(ext: Proto2Unittest_Int64ParseTester.Extensions.optional_int64_ext)
  6814. }
  6815. /// Clears the value of extension `Proto2Unittest_Int64ParseTester.Extensions.optional_int64_ext`.
  6816. /// Subsequent reads from it will return its default value.
  6817. mutating func clearProto2Unittest_Int64ParseTester_optionalInt64Ext() {
  6818. clearExtensionValue(ext: Proto2Unittest_Int64ParseTester.Extensions.optional_int64_ext)
  6819. }
  6820. var Proto2Unittest_Int64ParseTester_repeatedInt64Ext: [Int64] {
  6821. get {return getExtensionValue(ext: Proto2Unittest_Int64ParseTester.Extensions.repeated_int64_ext) ?? []}
  6822. set {setExtensionValue(ext: Proto2Unittest_Int64ParseTester.Extensions.repeated_int64_ext, value: newValue)}
  6823. }
  6824. var Proto2Unittest_Int64ParseTester_packedInt64Ext: [Int64] {
  6825. get {return getExtensionValue(ext: Proto2Unittest_Int64ParseTester.Extensions.packed_int64_ext) ?? []}
  6826. set {setExtensionValue(ext: Proto2Unittest_Int64ParseTester.Extensions.packed_int64_ext, value: newValue)}
  6827. }
  6828. }
  6829. extension Proto2Unittest_RedactedFields {
  6830. var Proto2Unittest_redactedExtension: String {
  6831. get {return getExtensionValue(ext: Proto2Unittest_Extensions_redacted_extension) ?? String()}
  6832. set {setExtensionValue(ext: Proto2Unittest_Extensions_redacted_extension, value: newValue)}
  6833. }
  6834. /// Returns true if extension `Proto2Unittest_Extensions_redacted_extension`
  6835. /// has been explicitly set.
  6836. var hasProto2Unittest_redactedExtension: Bool {
  6837. return hasExtensionValue(ext: Proto2Unittest_Extensions_redacted_extension)
  6838. }
  6839. /// Clears the value of extension `Proto2Unittest_Extensions_redacted_extension`.
  6840. /// Subsequent reads from it will return its default value.
  6841. mutating func clearProto2Unittest_redactedExtension() {
  6842. clearExtensionValue(ext: Proto2Unittest_Extensions_redacted_extension)
  6843. }
  6844. }
  6845. extension Proto2Unittest_StringParseTester {
  6846. var Proto2Unittest_StringParseTester_optionalStringExt: String {
  6847. get {return getExtensionValue(ext: Proto2Unittest_StringParseTester.Extensions.optional_string_ext) ?? String()}
  6848. set {setExtensionValue(ext: Proto2Unittest_StringParseTester.Extensions.optional_string_ext, value: newValue)}
  6849. }
  6850. /// Returns true if extension `Proto2Unittest_StringParseTester.Extensions.optional_string_ext`
  6851. /// has been explicitly set.
  6852. var hasProto2Unittest_StringParseTester_optionalStringExt: Bool {
  6853. return hasExtensionValue(ext: Proto2Unittest_StringParseTester.Extensions.optional_string_ext)
  6854. }
  6855. /// Clears the value of extension `Proto2Unittest_StringParseTester.Extensions.optional_string_ext`.
  6856. /// Subsequent reads from it will return its default value.
  6857. mutating func clearProto2Unittest_StringParseTester_optionalStringExt() {
  6858. clearExtensionValue(ext: Proto2Unittest_StringParseTester.Extensions.optional_string_ext)
  6859. }
  6860. var Proto2Unittest_StringParseTester_repeatedStringExt: [String] {
  6861. get {return getExtensionValue(ext: Proto2Unittest_StringParseTester.Extensions.repeated_string_ext) ?? []}
  6862. set {setExtensionValue(ext: Proto2Unittest_StringParseTester.Extensions.repeated_string_ext, value: newValue)}
  6863. }
  6864. }
  6865. extension Proto2Unittest_TestAllExtensions {
  6866. /// Singular
  6867. var Proto2Unittest_optionalInt32Extension: Int32 {
  6868. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_int32_extension) ?? 0}
  6869. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_int32_extension, value: newValue)}
  6870. }
  6871. /// Returns true if extension `Proto2Unittest_Extensions_optional_int32_extension`
  6872. /// has been explicitly set.
  6873. var hasProto2Unittest_optionalInt32Extension: Bool {
  6874. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_int32_extension)
  6875. }
  6876. /// Clears the value of extension `Proto2Unittest_Extensions_optional_int32_extension`.
  6877. /// Subsequent reads from it will return its default value.
  6878. mutating func clearProto2Unittest_optionalInt32Extension() {
  6879. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_int32_extension)
  6880. }
  6881. var Proto2Unittest_optionalInt64Extension: Int64 {
  6882. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_int64_extension) ?? 0}
  6883. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_int64_extension, value: newValue)}
  6884. }
  6885. /// Returns true if extension `Proto2Unittest_Extensions_optional_int64_extension`
  6886. /// has been explicitly set.
  6887. var hasProto2Unittest_optionalInt64Extension: Bool {
  6888. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_int64_extension)
  6889. }
  6890. /// Clears the value of extension `Proto2Unittest_Extensions_optional_int64_extension`.
  6891. /// Subsequent reads from it will return its default value.
  6892. mutating func clearProto2Unittest_optionalInt64Extension() {
  6893. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_int64_extension)
  6894. }
  6895. var Proto2Unittest_optionalUint32Extension: UInt32 {
  6896. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_uint32_extension) ?? 0}
  6897. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_uint32_extension, value: newValue)}
  6898. }
  6899. /// Returns true if extension `Proto2Unittest_Extensions_optional_uint32_extension`
  6900. /// has been explicitly set.
  6901. var hasProto2Unittest_optionalUint32Extension: Bool {
  6902. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_uint32_extension)
  6903. }
  6904. /// Clears the value of extension `Proto2Unittest_Extensions_optional_uint32_extension`.
  6905. /// Subsequent reads from it will return its default value.
  6906. mutating func clearProto2Unittest_optionalUint32Extension() {
  6907. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_uint32_extension)
  6908. }
  6909. var Proto2Unittest_optionalUint64Extension: UInt64 {
  6910. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_uint64_extension) ?? 0}
  6911. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_uint64_extension, value: newValue)}
  6912. }
  6913. /// Returns true if extension `Proto2Unittest_Extensions_optional_uint64_extension`
  6914. /// has been explicitly set.
  6915. var hasProto2Unittest_optionalUint64Extension: Bool {
  6916. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_uint64_extension)
  6917. }
  6918. /// Clears the value of extension `Proto2Unittest_Extensions_optional_uint64_extension`.
  6919. /// Subsequent reads from it will return its default value.
  6920. mutating func clearProto2Unittest_optionalUint64Extension() {
  6921. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_uint64_extension)
  6922. }
  6923. var Proto2Unittest_optionalSint32Extension: Int32 {
  6924. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_sint32_extension) ?? 0}
  6925. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_sint32_extension, value: newValue)}
  6926. }
  6927. /// Returns true if extension `Proto2Unittest_Extensions_optional_sint32_extension`
  6928. /// has been explicitly set.
  6929. var hasProto2Unittest_optionalSint32Extension: Bool {
  6930. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_sint32_extension)
  6931. }
  6932. /// Clears the value of extension `Proto2Unittest_Extensions_optional_sint32_extension`.
  6933. /// Subsequent reads from it will return its default value.
  6934. mutating func clearProto2Unittest_optionalSint32Extension() {
  6935. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_sint32_extension)
  6936. }
  6937. var Proto2Unittest_optionalSint64Extension: Int64 {
  6938. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_sint64_extension) ?? 0}
  6939. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_sint64_extension, value: newValue)}
  6940. }
  6941. /// Returns true if extension `Proto2Unittest_Extensions_optional_sint64_extension`
  6942. /// has been explicitly set.
  6943. var hasProto2Unittest_optionalSint64Extension: Bool {
  6944. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_sint64_extension)
  6945. }
  6946. /// Clears the value of extension `Proto2Unittest_Extensions_optional_sint64_extension`.
  6947. /// Subsequent reads from it will return its default value.
  6948. mutating func clearProto2Unittest_optionalSint64Extension() {
  6949. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_sint64_extension)
  6950. }
  6951. var Proto2Unittest_optionalFixed32Extension: UInt32 {
  6952. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_fixed32_extension) ?? 0}
  6953. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_fixed32_extension, value: newValue)}
  6954. }
  6955. /// Returns true if extension `Proto2Unittest_Extensions_optional_fixed32_extension`
  6956. /// has been explicitly set.
  6957. var hasProto2Unittest_optionalFixed32Extension: Bool {
  6958. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_fixed32_extension)
  6959. }
  6960. /// Clears the value of extension `Proto2Unittest_Extensions_optional_fixed32_extension`.
  6961. /// Subsequent reads from it will return its default value.
  6962. mutating func clearProto2Unittest_optionalFixed32Extension() {
  6963. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_fixed32_extension)
  6964. }
  6965. var Proto2Unittest_optionalFixed64Extension: UInt64 {
  6966. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_fixed64_extension) ?? 0}
  6967. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_fixed64_extension, value: newValue)}
  6968. }
  6969. /// Returns true if extension `Proto2Unittest_Extensions_optional_fixed64_extension`
  6970. /// has been explicitly set.
  6971. var hasProto2Unittest_optionalFixed64Extension: Bool {
  6972. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_fixed64_extension)
  6973. }
  6974. /// Clears the value of extension `Proto2Unittest_Extensions_optional_fixed64_extension`.
  6975. /// Subsequent reads from it will return its default value.
  6976. mutating func clearProto2Unittest_optionalFixed64Extension() {
  6977. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_fixed64_extension)
  6978. }
  6979. var Proto2Unittest_optionalSfixed32Extension: Int32 {
  6980. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_sfixed32_extension) ?? 0}
  6981. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_sfixed32_extension, value: newValue)}
  6982. }
  6983. /// Returns true if extension `Proto2Unittest_Extensions_optional_sfixed32_extension`
  6984. /// has been explicitly set.
  6985. var hasProto2Unittest_optionalSfixed32Extension: Bool {
  6986. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_sfixed32_extension)
  6987. }
  6988. /// Clears the value of extension `Proto2Unittest_Extensions_optional_sfixed32_extension`.
  6989. /// Subsequent reads from it will return its default value.
  6990. mutating func clearProto2Unittest_optionalSfixed32Extension() {
  6991. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_sfixed32_extension)
  6992. }
  6993. var Proto2Unittest_optionalSfixed64Extension: Int64 {
  6994. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_sfixed64_extension) ?? 0}
  6995. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_sfixed64_extension, value: newValue)}
  6996. }
  6997. /// Returns true if extension `Proto2Unittest_Extensions_optional_sfixed64_extension`
  6998. /// has been explicitly set.
  6999. var hasProto2Unittest_optionalSfixed64Extension: Bool {
  7000. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_sfixed64_extension)
  7001. }
  7002. /// Clears the value of extension `Proto2Unittest_Extensions_optional_sfixed64_extension`.
  7003. /// Subsequent reads from it will return its default value.
  7004. mutating func clearProto2Unittest_optionalSfixed64Extension() {
  7005. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_sfixed64_extension)
  7006. }
  7007. var Proto2Unittest_optionalFloatExtension: Float {
  7008. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_float_extension) ?? 0}
  7009. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_float_extension, value: newValue)}
  7010. }
  7011. /// Returns true if extension `Proto2Unittest_Extensions_optional_float_extension`
  7012. /// has been explicitly set.
  7013. var hasProto2Unittest_optionalFloatExtension: Bool {
  7014. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_float_extension)
  7015. }
  7016. /// Clears the value of extension `Proto2Unittest_Extensions_optional_float_extension`.
  7017. /// Subsequent reads from it will return its default value.
  7018. mutating func clearProto2Unittest_optionalFloatExtension() {
  7019. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_float_extension)
  7020. }
  7021. var Proto2Unittest_optionalDoubleExtension: Double {
  7022. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_double_extension) ?? 0}
  7023. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_double_extension, value: newValue)}
  7024. }
  7025. /// Returns true if extension `Proto2Unittest_Extensions_optional_double_extension`
  7026. /// has been explicitly set.
  7027. var hasProto2Unittest_optionalDoubleExtension: Bool {
  7028. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_double_extension)
  7029. }
  7030. /// Clears the value of extension `Proto2Unittest_Extensions_optional_double_extension`.
  7031. /// Subsequent reads from it will return its default value.
  7032. mutating func clearProto2Unittest_optionalDoubleExtension() {
  7033. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_double_extension)
  7034. }
  7035. var Proto2Unittest_optionalBoolExtension: Bool {
  7036. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_bool_extension) ?? false}
  7037. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_bool_extension, value: newValue)}
  7038. }
  7039. /// Returns true if extension `Proto2Unittest_Extensions_optional_bool_extension`
  7040. /// has been explicitly set.
  7041. var hasProto2Unittest_optionalBoolExtension: Bool {
  7042. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_bool_extension)
  7043. }
  7044. /// Clears the value of extension `Proto2Unittest_Extensions_optional_bool_extension`.
  7045. /// Subsequent reads from it will return its default value.
  7046. mutating func clearProto2Unittest_optionalBoolExtension() {
  7047. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_bool_extension)
  7048. }
  7049. var Proto2Unittest_optionalStringExtension: String {
  7050. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_string_extension) ?? String()}
  7051. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_string_extension, value: newValue)}
  7052. }
  7053. /// Returns true if extension `Proto2Unittest_Extensions_optional_string_extension`
  7054. /// has been explicitly set.
  7055. var hasProto2Unittest_optionalStringExtension: Bool {
  7056. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_string_extension)
  7057. }
  7058. /// Clears the value of extension `Proto2Unittest_Extensions_optional_string_extension`.
  7059. /// Subsequent reads from it will return its default value.
  7060. mutating func clearProto2Unittest_optionalStringExtension() {
  7061. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_string_extension)
  7062. }
  7063. var Proto2Unittest_optionalBytesExtension: Data {
  7064. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_bytes_extension) ?? Data()}
  7065. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_bytes_extension, value: newValue)}
  7066. }
  7067. /// Returns true if extension `Proto2Unittest_Extensions_optional_bytes_extension`
  7068. /// has been explicitly set.
  7069. var hasProto2Unittest_optionalBytesExtension: Bool {
  7070. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_bytes_extension)
  7071. }
  7072. /// Clears the value of extension `Proto2Unittest_Extensions_optional_bytes_extension`.
  7073. /// Subsequent reads from it will return its default value.
  7074. mutating func clearProto2Unittest_optionalBytesExtension() {
  7075. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_bytes_extension)
  7076. }
  7077. var Proto2Unittest_optionalGroupExtension: Proto2Unittest_OptionalGroup_extension {
  7078. get {return getExtensionValue(ext: Proto2Unittest_Extensions_OptionalGroup_extension) ?? Proto2Unittest_OptionalGroup_extension()}
  7079. set {setExtensionValue(ext: Proto2Unittest_Extensions_OptionalGroup_extension, value: newValue)}
  7080. }
  7081. /// Returns true if extension `Proto2Unittest_Extensions_OptionalGroup_extension`
  7082. /// has been explicitly set.
  7083. var hasProto2Unittest_optionalGroupExtension: Bool {
  7084. return hasExtensionValue(ext: Proto2Unittest_Extensions_OptionalGroup_extension)
  7085. }
  7086. /// Clears the value of extension `Proto2Unittest_Extensions_OptionalGroup_extension`.
  7087. /// Subsequent reads from it will return its default value.
  7088. mutating func clearProto2Unittest_optionalGroupExtension() {
  7089. clearExtensionValue(ext: Proto2Unittest_Extensions_OptionalGroup_extension)
  7090. }
  7091. var Proto2Unittest_optionalNestedMessageExtension: Proto2Unittest_TestAllTypes.NestedMessage {
  7092. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_nested_message_extension) ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  7093. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_nested_message_extension, value: newValue)}
  7094. }
  7095. /// Returns true if extension `Proto2Unittest_Extensions_optional_nested_message_extension`
  7096. /// has been explicitly set.
  7097. var hasProto2Unittest_optionalNestedMessageExtension: Bool {
  7098. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_nested_message_extension)
  7099. }
  7100. /// Clears the value of extension `Proto2Unittest_Extensions_optional_nested_message_extension`.
  7101. /// Subsequent reads from it will return its default value.
  7102. mutating func clearProto2Unittest_optionalNestedMessageExtension() {
  7103. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_nested_message_extension)
  7104. }
  7105. var Proto2Unittest_optionalForeignMessageExtension: Proto2Unittest_ForeignMessage {
  7106. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_foreign_message_extension) ?? Proto2Unittest_ForeignMessage()}
  7107. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_foreign_message_extension, value: newValue)}
  7108. }
  7109. /// Returns true if extension `Proto2Unittest_Extensions_optional_foreign_message_extension`
  7110. /// has been explicitly set.
  7111. var hasProto2Unittest_optionalForeignMessageExtension: Bool {
  7112. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_foreign_message_extension)
  7113. }
  7114. /// Clears the value of extension `Proto2Unittest_Extensions_optional_foreign_message_extension`.
  7115. /// Subsequent reads from it will return its default value.
  7116. mutating func clearProto2Unittest_optionalForeignMessageExtension() {
  7117. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_foreign_message_extension)
  7118. }
  7119. var Proto2Unittest_optionalImportMessageExtension: Proto2UnittestImport_ImportMessage {
  7120. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_import_message_extension) ?? Proto2UnittestImport_ImportMessage()}
  7121. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_import_message_extension, value: newValue)}
  7122. }
  7123. /// Returns true if extension `Proto2Unittest_Extensions_optional_import_message_extension`
  7124. /// has been explicitly set.
  7125. var hasProto2Unittest_optionalImportMessageExtension: Bool {
  7126. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_import_message_extension)
  7127. }
  7128. /// Clears the value of extension `Proto2Unittest_Extensions_optional_import_message_extension`.
  7129. /// Subsequent reads from it will return its default value.
  7130. mutating func clearProto2Unittest_optionalImportMessageExtension() {
  7131. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_import_message_extension)
  7132. }
  7133. var Proto2Unittest_optionalNestedEnumExtension: Proto2Unittest_TestAllTypes.NestedEnum {
  7134. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_nested_enum_extension) ?? .foo}
  7135. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_nested_enum_extension, value: newValue)}
  7136. }
  7137. /// Returns true if extension `Proto2Unittest_Extensions_optional_nested_enum_extension`
  7138. /// has been explicitly set.
  7139. var hasProto2Unittest_optionalNestedEnumExtension: Bool {
  7140. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_nested_enum_extension)
  7141. }
  7142. /// Clears the value of extension `Proto2Unittest_Extensions_optional_nested_enum_extension`.
  7143. /// Subsequent reads from it will return its default value.
  7144. mutating func clearProto2Unittest_optionalNestedEnumExtension() {
  7145. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_nested_enum_extension)
  7146. }
  7147. var Proto2Unittest_optionalForeignEnumExtension: Proto2Unittest_ForeignEnum {
  7148. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_foreign_enum_extension) ?? .foreignFoo}
  7149. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_foreign_enum_extension, value: newValue)}
  7150. }
  7151. /// Returns true if extension `Proto2Unittest_Extensions_optional_foreign_enum_extension`
  7152. /// has been explicitly set.
  7153. var hasProto2Unittest_optionalForeignEnumExtension: Bool {
  7154. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_foreign_enum_extension)
  7155. }
  7156. /// Clears the value of extension `Proto2Unittest_Extensions_optional_foreign_enum_extension`.
  7157. /// Subsequent reads from it will return its default value.
  7158. mutating func clearProto2Unittest_optionalForeignEnumExtension() {
  7159. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_foreign_enum_extension)
  7160. }
  7161. var Proto2Unittest_optionalImportEnumExtension: Proto2UnittestImport_ImportEnum {
  7162. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_import_enum_extension) ?? .importFoo}
  7163. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_import_enum_extension, value: newValue)}
  7164. }
  7165. /// Returns true if extension `Proto2Unittest_Extensions_optional_import_enum_extension`
  7166. /// has been explicitly set.
  7167. var hasProto2Unittest_optionalImportEnumExtension: Bool {
  7168. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_import_enum_extension)
  7169. }
  7170. /// Clears the value of extension `Proto2Unittest_Extensions_optional_import_enum_extension`.
  7171. /// Subsequent reads from it will return its default value.
  7172. mutating func clearProto2Unittest_optionalImportEnumExtension() {
  7173. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_import_enum_extension)
  7174. }
  7175. var Proto2Unittest_optionalStringPieceExtension: String {
  7176. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_string_piece_extension) ?? String()}
  7177. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_string_piece_extension, value: newValue)}
  7178. }
  7179. /// Returns true if extension `Proto2Unittest_Extensions_optional_string_piece_extension`
  7180. /// has been explicitly set.
  7181. var hasProto2Unittest_optionalStringPieceExtension: Bool {
  7182. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_string_piece_extension)
  7183. }
  7184. /// Clears the value of extension `Proto2Unittest_Extensions_optional_string_piece_extension`.
  7185. /// Subsequent reads from it will return its default value.
  7186. mutating func clearProto2Unittest_optionalStringPieceExtension() {
  7187. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_string_piece_extension)
  7188. }
  7189. /// TODO: ctype=CORD is not supported for extension. Add
  7190. /// ctype=CORD option back after it is supported.
  7191. var Proto2Unittest_optionalCordExtension: String {
  7192. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_cord_extension) ?? String()}
  7193. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_cord_extension, value: newValue)}
  7194. }
  7195. /// Returns true if extension `Proto2Unittest_Extensions_optional_cord_extension`
  7196. /// has been explicitly set.
  7197. var hasProto2Unittest_optionalCordExtension: Bool {
  7198. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_cord_extension)
  7199. }
  7200. /// Clears the value of extension `Proto2Unittest_Extensions_optional_cord_extension`.
  7201. /// Subsequent reads from it will return its default value.
  7202. mutating func clearProto2Unittest_optionalCordExtension() {
  7203. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_cord_extension)
  7204. }
  7205. var Proto2Unittest_optionalBytesCordExtension: Data {
  7206. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_bytes_cord_extension) ?? Data()}
  7207. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_bytes_cord_extension, value: newValue)}
  7208. }
  7209. /// Returns true if extension `Proto2Unittest_Extensions_optional_bytes_cord_extension`
  7210. /// has been explicitly set.
  7211. var hasProto2Unittest_optionalBytesCordExtension: Bool {
  7212. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_bytes_cord_extension)
  7213. }
  7214. /// Clears the value of extension `Proto2Unittest_Extensions_optional_bytes_cord_extension`.
  7215. /// Subsequent reads from it will return its default value.
  7216. mutating func clearProto2Unittest_optionalBytesCordExtension() {
  7217. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_bytes_cord_extension)
  7218. }
  7219. var Proto2Unittest_optionalPublicImportMessageExtension: Proto2UnittestImport_PublicImportMessage {
  7220. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_public_import_message_extension) ?? Proto2UnittestImport_PublicImportMessage()}
  7221. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_public_import_message_extension, value: newValue)}
  7222. }
  7223. /// Returns true if extension `Proto2Unittest_Extensions_optional_public_import_message_extension`
  7224. /// has been explicitly set.
  7225. var hasProto2Unittest_optionalPublicImportMessageExtension: Bool {
  7226. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_public_import_message_extension)
  7227. }
  7228. /// Clears the value of extension `Proto2Unittest_Extensions_optional_public_import_message_extension`.
  7229. /// Subsequent reads from it will return its default value.
  7230. mutating func clearProto2Unittest_optionalPublicImportMessageExtension() {
  7231. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_public_import_message_extension)
  7232. }
  7233. var Proto2Unittest_optionalLazyMessageExtension: Proto2Unittest_TestAllTypes.NestedMessage {
  7234. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_lazy_message_extension) ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  7235. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_lazy_message_extension, value: newValue)}
  7236. }
  7237. /// Returns true if extension `Proto2Unittest_Extensions_optional_lazy_message_extension`
  7238. /// has been explicitly set.
  7239. var hasProto2Unittest_optionalLazyMessageExtension: Bool {
  7240. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_lazy_message_extension)
  7241. }
  7242. /// Clears the value of extension `Proto2Unittest_Extensions_optional_lazy_message_extension`.
  7243. /// Subsequent reads from it will return its default value.
  7244. mutating func clearProto2Unittest_optionalLazyMessageExtension() {
  7245. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_lazy_message_extension)
  7246. }
  7247. var Proto2Unittest_optionalUnverifiedLazyMessageExtension: Proto2Unittest_TestAllTypes.NestedMessage {
  7248. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_unverified_lazy_message_extension) ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  7249. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_unverified_lazy_message_extension, value: newValue)}
  7250. }
  7251. /// Returns true if extension `Proto2Unittest_Extensions_optional_unverified_lazy_message_extension`
  7252. /// has been explicitly set.
  7253. var hasProto2Unittest_optionalUnverifiedLazyMessageExtension: Bool {
  7254. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_unverified_lazy_message_extension)
  7255. }
  7256. /// Clears the value of extension `Proto2Unittest_Extensions_optional_unverified_lazy_message_extension`.
  7257. /// Subsequent reads from it will return its default value.
  7258. mutating func clearProto2Unittest_optionalUnverifiedLazyMessageExtension() {
  7259. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_unverified_lazy_message_extension)
  7260. }
  7261. /// Repeated
  7262. var Proto2Unittest_repeatedInt32Extension: [Int32] {
  7263. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_int32_extension) ?? []}
  7264. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_int32_extension, value: newValue)}
  7265. }
  7266. var Proto2Unittest_repeatedInt64Extension: [Int64] {
  7267. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_int64_extension) ?? []}
  7268. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_int64_extension, value: newValue)}
  7269. }
  7270. var Proto2Unittest_repeatedUint32Extension: [UInt32] {
  7271. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_uint32_extension) ?? []}
  7272. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_uint32_extension, value: newValue)}
  7273. }
  7274. var Proto2Unittest_repeatedUint64Extension: [UInt64] {
  7275. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_uint64_extension) ?? []}
  7276. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_uint64_extension, value: newValue)}
  7277. }
  7278. var Proto2Unittest_repeatedSint32Extension: [Int32] {
  7279. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_sint32_extension) ?? []}
  7280. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_sint32_extension, value: newValue)}
  7281. }
  7282. var Proto2Unittest_repeatedSint64Extension: [Int64] {
  7283. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_sint64_extension) ?? []}
  7284. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_sint64_extension, value: newValue)}
  7285. }
  7286. var Proto2Unittest_repeatedFixed32Extension: [UInt32] {
  7287. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_fixed32_extension) ?? []}
  7288. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_fixed32_extension, value: newValue)}
  7289. }
  7290. var Proto2Unittest_repeatedFixed64Extension: [UInt64] {
  7291. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_fixed64_extension) ?? []}
  7292. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_fixed64_extension, value: newValue)}
  7293. }
  7294. var Proto2Unittest_repeatedSfixed32Extension: [Int32] {
  7295. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_sfixed32_extension) ?? []}
  7296. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_sfixed32_extension, value: newValue)}
  7297. }
  7298. var Proto2Unittest_repeatedSfixed64Extension: [Int64] {
  7299. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_sfixed64_extension) ?? []}
  7300. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_sfixed64_extension, value: newValue)}
  7301. }
  7302. var Proto2Unittest_repeatedFloatExtension: [Float] {
  7303. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_float_extension) ?? []}
  7304. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_float_extension, value: newValue)}
  7305. }
  7306. var Proto2Unittest_repeatedDoubleExtension: [Double] {
  7307. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_double_extension) ?? []}
  7308. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_double_extension, value: newValue)}
  7309. }
  7310. var Proto2Unittest_repeatedBoolExtension: [Bool] {
  7311. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_bool_extension) ?? []}
  7312. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_bool_extension, value: newValue)}
  7313. }
  7314. var Proto2Unittest_repeatedStringExtension: [String] {
  7315. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_string_extension) ?? []}
  7316. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_string_extension, value: newValue)}
  7317. }
  7318. var Proto2Unittest_repeatedBytesExtension: [Data] {
  7319. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_bytes_extension) ?? []}
  7320. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_bytes_extension, value: newValue)}
  7321. }
  7322. var Proto2Unittest_repeatedGroupExtension: [Proto2Unittest_RepeatedGroup_extension] {
  7323. get {return getExtensionValue(ext: Proto2Unittest_Extensions_RepeatedGroup_extension) ?? []}
  7324. set {setExtensionValue(ext: Proto2Unittest_Extensions_RepeatedGroup_extension, value: newValue)}
  7325. }
  7326. var Proto2Unittest_repeatedNestedMessageExtension: [Proto2Unittest_TestAllTypes.NestedMessage] {
  7327. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_nested_message_extension) ?? []}
  7328. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_nested_message_extension, value: newValue)}
  7329. }
  7330. var Proto2Unittest_repeatedForeignMessageExtension: [Proto2Unittest_ForeignMessage] {
  7331. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_foreign_message_extension) ?? []}
  7332. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_foreign_message_extension, value: newValue)}
  7333. }
  7334. var Proto2Unittest_repeatedImportMessageExtension: [Proto2UnittestImport_ImportMessage] {
  7335. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_import_message_extension) ?? []}
  7336. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_import_message_extension, value: newValue)}
  7337. }
  7338. var Proto2Unittest_repeatedNestedEnumExtension: [Proto2Unittest_TestAllTypes.NestedEnum] {
  7339. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_nested_enum_extension) ?? []}
  7340. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_nested_enum_extension, value: newValue)}
  7341. }
  7342. var Proto2Unittest_repeatedForeignEnumExtension: [Proto2Unittest_ForeignEnum] {
  7343. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_foreign_enum_extension) ?? []}
  7344. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_foreign_enum_extension, value: newValue)}
  7345. }
  7346. var Proto2Unittest_repeatedImportEnumExtension: [Proto2UnittestImport_ImportEnum] {
  7347. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_import_enum_extension) ?? []}
  7348. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_import_enum_extension, value: newValue)}
  7349. }
  7350. var Proto2Unittest_repeatedStringPieceExtension: [String] {
  7351. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_string_piece_extension) ?? []}
  7352. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_string_piece_extension, value: newValue)}
  7353. }
  7354. /// TODO: ctype=CORD is not supported for extension. Add
  7355. /// ctype=CORD option back after it is supported.
  7356. var Proto2Unittest_repeatedCordExtension: [String] {
  7357. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_cord_extension) ?? []}
  7358. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_cord_extension, value: newValue)}
  7359. }
  7360. var Proto2Unittest_repeatedLazyMessageExtension: [Proto2Unittest_TestAllTypes.NestedMessage] {
  7361. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_lazy_message_extension) ?? []}
  7362. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_lazy_message_extension, value: newValue)}
  7363. }
  7364. /// Singular with defaults
  7365. var Proto2Unittest_defaultInt32Extension: Int32 {
  7366. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_int32_extension) ?? 41}
  7367. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_int32_extension, value: newValue)}
  7368. }
  7369. /// Returns true if extension `Proto2Unittest_Extensions_default_int32_extension`
  7370. /// has been explicitly set.
  7371. var hasProto2Unittest_defaultInt32Extension: Bool {
  7372. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_int32_extension)
  7373. }
  7374. /// Clears the value of extension `Proto2Unittest_Extensions_default_int32_extension`.
  7375. /// Subsequent reads from it will return its default value.
  7376. mutating func clearProto2Unittest_defaultInt32Extension() {
  7377. clearExtensionValue(ext: Proto2Unittest_Extensions_default_int32_extension)
  7378. }
  7379. var Proto2Unittest_defaultInt64Extension: Int64 {
  7380. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_int64_extension) ?? 42}
  7381. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_int64_extension, value: newValue)}
  7382. }
  7383. /// Returns true if extension `Proto2Unittest_Extensions_default_int64_extension`
  7384. /// has been explicitly set.
  7385. var hasProto2Unittest_defaultInt64Extension: Bool {
  7386. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_int64_extension)
  7387. }
  7388. /// Clears the value of extension `Proto2Unittest_Extensions_default_int64_extension`.
  7389. /// Subsequent reads from it will return its default value.
  7390. mutating func clearProto2Unittest_defaultInt64Extension() {
  7391. clearExtensionValue(ext: Proto2Unittest_Extensions_default_int64_extension)
  7392. }
  7393. var Proto2Unittest_defaultUint32Extension: UInt32 {
  7394. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_uint32_extension) ?? 43}
  7395. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_uint32_extension, value: newValue)}
  7396. }
  7397. /// Returns true if extension `Proto2Unittest_Extensions_default_uint32_extension`
  7398. /// has been explicitly set.
  7399. var hasProto2Unittest_defaultUint32Extension: Bool {
  7400. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_uint32_extension)
  7401. }
  7402. /// Clears the value of extension `Proto2Unittest_Extensions_default_uint32_extension`.
  7403. /// Subsequent reads from it will return its default value.
  7404. mutating func clearProto2Unittest_defaultUint32Extension() {
  7405. clearExtensionValue(ext: Proto2Unittest_Extensions_default_uint32_extension)
  7406. }
  7407. var Proto2Unittest_defaultUint64Extension: UInt64 {
  7408. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_uint64_extension) ?? 44}
  7409. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_uint64_extension, value: newValue)}
  7410. }
  7411. /// Returns true if extension `Proto2Unittest_Extensions_default_uint64_extension`
  7412. /// has been explicitly set.
  7413. var hasProto2Unittest_defaultUint64Extension: Bool {
  7414. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_uint64_extension)
  7415. }
  7416. /// Clears the value of extension `Proto2Unittest_Extensions_default_uint64_extension`.
  7417. /// Subsequent reads from it will return its default value.
  7418. mutating func clearProto2Unittest_defaultUint64Extension() {
  7419. clearExtensionValue(ext: Proto2Unittest_Extensions_default_uint64_extension)
  7420. }
  7421. var Proto2Unittest_defaultSint32Extension: Int32 {
  7422. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_sint32_extension) ?? -45}
  7423. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_sint32_extension, value: newValue)}
  7424. }
  7425. /// Returns true if extension `Proto2Unittest_Extensions_default_sint32_extension`
  7426. /// has been explicitly set.
  7427. var hasProto2Unittest_defaultSint32Extension: Bool {
  7428. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_sint32_extension)
  7429. }
  7430. /// Clears the value of extension `Proto2Unittest_Extensions_default_sint32_extension`.
  7431. /// Subsequent reads from it will return its default value.
  7432. mutating func clearProto2Unittest_defaultSint32Extension() {
  7433. clearExtensionValue(ext: Proto2Unittest_Extensions_default_sint32_extension)
  7434. }
  7435. var Proto2Unittest_defaultSint64Extension: Int64 {
  7436. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_sint64_extension) ?? 46}
  7437. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_sint64_extension, value: newValue)}
  7438. }
  7439. /// Returns true if extension `Proto2Unittest_Extensions_default_sint64_extension`
  7440. /// has been explicitly set.
  7441. var hasProto2Unittest_defaultSint64Extension: Bool {
  7442. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_sint64_extension)
  7443. }
  7444. /// Clears the value of extension `Proto2Unittest_Extensions_default_sint64_extension`.
  7445. /// Subsequent reads from it will return its default value.
  7446. mutating func clearProto2Unittest_defaultSint64Extension() {
  7447. clearExtensionValue(ext: Proto2Unittest_Extensions_default_sint64_extension)
  7448. }
  7449. var Proto2Unittest_defaultFixed32Extension: UInt32 {
  7450. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_fixed32_extension) ?? 47}
  7451. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_fixed32_extension, value: newValue)}
  7452. }
  7453. /// Returns true if extension `Proto2Unittest_Extensions_default_fixed32_extension`
  7454. /// has been explicitly set.
  7455. var hasProto2Unittest_defaultFixed32Extension: Bool {
  7456. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_fixed32_extension)
  7457. }
  7458. /// Clears the value of extension `Proto2Unittest_Extensions_default_fixed32_extension`.
  7459. /// Subsequent reads from it will return its default value.
  7460. mutating func clearProto2Unittest_defaultFixed32Extension() {
  7461. clearExtensionValue(ext: Proto2Unittest_Extensions_default_fixed32_extension)
  7462. }
  7463. var Proto2Unittest_defaultFixed64Extension: UInt64 {
  7464. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_fixed64_extension) ?? 48}
  7465. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_fixed64_extension, value: newValue)}
  7466. }
  7467. /// Returns true if extension `Proto2Unittest_Extensions_default_fixed64_extension`
  7468. /// has been explicitly set.
  7469. var hasProto2Unittest_defaultFixed64Extension: Bool {
  7470. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_fixed64_extension)
  7471. }
  7472. /// Clears the value of extension `Proto2Unittest_Extensions_default_fixed64_extension`.
  7473. /// Subsequent reads from it will return its default value.
  7474. mutating func clearProto2Unittest_defaultFixed64Extension() {
  7475. clearExtensionValue(ext: Proto2Unittest_Extensions_default_fixed64_extension)
  7476. }
  7477. var Proto2Unittest_defaultSfixed32Extension: Int32 {
  7478. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_sfixed32_extension) ?? 49}
  7479. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_sfixed32_extension, value: newValue)}
  7480. }
  7481. /// Returns true if extension `Proto2Unittest_Extensions_default_sfixed32_extension`
  7482. /// has been explicitly set.
  7483. var hasProto2Unittest_defaultSfixed32Extension: Bool {
  7484. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_sfixed32_extension)
  7485. }
  7486. /// Clears the value of extension `Proto2Unittest_Extensions_default_sfixed32_extension`.
  7487. /// Subsequent reads from it will return its default value.
  7488. mutating func clearProto2Unittest_defaultSfixed32Extension() {
  7489. clearExtensionValue(ext: Proto2Unittest_Extensions_default_sfixed32_extension)
  7490. }
  7491. var Proto2Unittest_defaultSfixed64Extension: Int64 {
  7492. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_sfixed64_extension) ?? -50}
  7493. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_sfixed64_extension, value: newValue)}
  7494. }
  7495. /// Returns true if extension `Proto2Unittest_Extensions_default_sfixed64_extension`
  7496. /// has been explicitly set.
  7497. var hasProto2Unittest_defaultSfixed64Extension: Bool {
  7498. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_sfixed64_extension)
  7499. }
  7500. /// Clears the value of extension `Proto2Unittest_Extensions_default_sfixed64_extension`.
  7501. /// Subsequent reads from it will return its default value.
  7502. mutating func clearProto2Unittest_defaultSfixed64Extension() {
  7503. clearExtensionValue(ext: Proto2Unittest_Extensions_default_sfixed64_extension)
  7504. }
  7505. var Proto2Unittest_defaultFloatExtension: Float {
  7506. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_float_extension) ?? 51.5}
  7507. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_float_extension, value: newValue)}
  7508. }
  7509. /// Returns true if extension `Proto2Unittest_Extensions_default_float_extension`
  7510. /// has been explicitly set.
  7511. var hasProto2Unittest_defaultFloatExtension: Bool {
  7512. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_float_extension)
  7513. }
  7514. /// Clears the value of extension `Proto2Unittest_Extensions_default_float_extension`.
  7515. /// Subsequent reads from it will return its default value.
  7516. mutating func clearProto2Unittest_defaultFloatExtension() {
  7517. clearExtensionValue(ext: Proto2Unittest_Extensions_default_float_extension)
  7518. }
  7519. var Proto2Unittest_defaultDoubleExtension: Double {
  7520. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_double_extension) ?? 52000}
  7521. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_double_extension, value: newValue)}
  7522. }
  7523. /// Returns true if extension `Proto2Unittest_Extensions_default_double_extension`
  7524. /// has been explicitly set.
  7525. var hasProto2Unittest_defaultDoubleExtension: Bool {
  7526. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_double_extension)
  7527. }
  7528. /// Clears the value of extension `Proto2Unittest_Extensions_default_double_extension`.
  7529. /// Subsequent reads from it will return its default value.
  7530. mutating func clearProto2Unittest_defaultDoubleExtension() {
  7531. clearExtensionValue(ext: Proto2Unittest_Extensions_default_double_extension)
  7532. }
  7533. var Proto2Unittest_defaultBoolExtension: Bool {
  7534. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_bool_extension) ?? true}
  7535. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_bool_extension, value: newValue)}
  7536. }
  7537. /// Returns true if extension `Proto2Unittest_Extensions_default_bool_extension`
  7538. /// has been explicitly set.
  7539. var hasProto2Unittest_defaultBoolExtension: Bool {
  7540. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_bool_extension)
  7541. }
  7542. /// Clears the value of extension `Proto2Unittest_Extensions_default_bool_extension`.
  7543. /// Subsequent reads from it will return its default value.
  7544. mutating func clearProto2Unittest_defaultBoolExtension() {
  7545. clearExtensionValue(ext: Proto2Unittest_Extensions_default_bool_extension)
  7546. }
  7547. var Proto2Unittest_defaultStringExtension: String {
  7548. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_string_extension) ?? "hello"}
  7549. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_string_extension, value: newValue)}
  7550. }
  7551. /// Returns true if extension `Proto2Unittest_Extensions_default_string_extension`
  7552. /// has been explicitly set.
  7553. var hasProto2Unittest_defaultStringExtension: Bool {
  7554. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_string_extension)
  7555. }
  7556. /// Clears the value of extension `Proto2Unittest_Extensions_default_string_extension`.
  7557. /// Subsequent reads from it will return its default value.
  7558. mutating func clearProto2Unittest_defaultStringExtension() {
  7559. clearExtensionValue(ext: Proto2Unittest_Extensions_default_string_extension)
  7560. }
  7561. var Proto2Unittest_defaultBytesExtension: Data {
  7562. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_bytes_extension) ?? Data([119, 111, 114, 108, 100])}
  7563. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_bytes_extension, value: newValue)}
  7564. }
  7565. /// Returns true if extension `Proto2Unittest_Extensions_default_bytes_extension`
  7566. /// has been explicitly set.
  7567. var hasProto2Unittest_defaultBytesExtension: Bool {
  7568. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_bytes_extension)
  7569. }
  7570. /// Clears the value of extension `Proto2Unittest_Extensions_default_bytes_extension`.
  7571. /// Subsequent reads from it will return its default value.
  7572. mutating func clearProto2Unittest_defaultBytesExtension() {
  7573. clearExtensionValue(ext: Proto2Unittest_Extensions_default_bytes_extension)
  7574. }
  7575. var Proto2Unittest_defaultNestedEnumExtension: Proto2Unittest_TestAllTypes.NestedEnum {
  7576. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_nested_enum_extension) ?? .bar}
  7577. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_nested_enum_extension, value: newValue)}
  7578. }
  7579. /// Returns true if extension `Proto2Unittest_Extensions_default_nested_enum_extension`
  7580. /// has been explicitly set.
  7581. var hasProto2Unittest_defaultNestedEnumExtension: Bool {
  7582. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_nested_enum_extension)
  7583. }
  7584. /// Clears the value of extension `Proto2Unittest_Extensions_default_nested_enum_extension`.
  7585. /// Subsequent reads from it will return its default value.
  7586. mutating func clearProto2Unittest_defaultNestedEnumExtension() {
  7587. clearExtensionValue(ext: Proto2Unittest_Extensions_default_nested_enum_extension)
  7588. }
  7589. var Proto2Unittest_defaultForeignEnumExtension: Proto2Unittest_ForeignEnum {
  7590. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_foreign_enum_extension) ?? .foreignBar}
  7591. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_foreign_enum_extension, value: newValue)}
  7592. }
  7593. /// Returns true if extension `Proto2Unittest_Extensions_default_foreign_enum_extension`
  7594. /// has been explicitly set.
  7595. var hasProto2Unittest_defaultForeignEnumExtension: Bool {
  7596. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_foreign_enum_extension)
  7597. }
  7598. /// Clears the value of extension `Proto2Unittest_Extensions_default_foreign_enum_extension`.
  7599. /// Subsequent reads from it will return its default value.
  7600. mutating func clearProto2Unittest_defaultForeignEnumExtension() {
  7601. clearExtensionValue(ext: Proto2Unittest_Extensions_default_foreign_enum_extension)
  7602. }
  7603. var Proto2Unittest_defaultImportEnumExtension: Proto2UnittestImport_ImportEnum {
  7604. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_import_enum_extension) ?? .importBar}
  7605. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_import_enum_extension, value: newValue)}
  7606. }
  7607. /// Returns true if extension `Proto2Unittest_Extensions_default_import_enum_extension`
  7608. /// has been explicitly set.
  7609. var hasProto2Unittest_defaultImportEnumExtension: Bool {
  7610. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_import_enum_extension)
  7611. }
  7612. /// Clears the value of extension `Proto2Unittest_Extensions_default_import_enum_extension`.
  7613. /// Subsequent reads from it will return its default value.
  7614. mutating func clearProto2Unittest_defaultImportEnumExtension() {
  7615. clearExtensionValue(ext: Proto2Unittest_Extensions_default_import_enum_extension)
  7616. }
  7617. var Proto2Unittest_defaultStringPieceExtension: String {
  7618. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_string_piece_extension) ?? "abc"}
  7619. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_string_piece_extension, value: newValue)}
  7620. }
  7621. /// Returns true if extension `Proto2Unittest_Extensions_default_string_piece_extension`
  7622. /// has been explicitly set.
  7623. var hasProto2Unittest_defaultStringPieceExtension: Bool {
  7624. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_string_piece_extension)
  7625. }
  7626. /// Clears the value of extension `Proto2Unittest_Extensions_default_string_piece_extension`.
  7627. /// Subsequent reads from it will return its default value.
  7628. mutating func clearProto2Unittest_defaultStringPieceExtension() {
  7629. clearExtensionValue(ext: Proto2Unittest_Extensions_default_string_piece_extension)
  7630. }
  7631. /// TODO: ctype=CORD is not supported for extension. Add
  7632. /// ctype=CORD option back after it is supported.
  7633. var Proto2Unittest_defaultCordExtension: String {
  7634. get {return getExtensionValue(ext: Proto2Unittest_Extensions_default_cord_extension) ?? "123"}
  7635. set {setExtensionValue(ext: Proto2Unittest_Extensions_default_cord_extension, value: newValue)}
  7636. }
  7637. /// Returns true if extension `Proto2Unittest_Extensions_default_cord_extension`
  7638. /// has been explicitly set.
  7639. var hasProto2Unittest_defaultCordExtension: Bool {
  7640. return hasExtensionValue(ext: Proto2Unittest_Extensions_default_cord_extension)
  7641. }
  7642. /// Clears the value of extension `Proto2Unittest_Extensions_default_cord_extension`.
  7643. /// Subsequent reads from it will return its default value.
  7644. mutating func clearProto2Unittest_defaultCordExtension() {
  7645. clearExtensionValue(ext: Proto2Unittest_Extensions_default_cord_extension)
  7646. }
  7647. /// For oneof test
  7648. var Proto2Unittest_oneofUint32Extension: UInt32 {
  7649. get {return getExtensionValue(ext: Proto2Unittest_Extensions_oneof_uint32_extension) ?? 0}
  7650. set {setExtensionValue(ext: Proto2Unittest_Extensions_oneof_uint32_extension, value: newValue)}
  7651. }
  7652. /// Returns true if extension `Proto2Unittest_Extensions_oneof_uint32_extension`
  7653. /// has been explicitly set.
  7654. var hasProto2Unittest_oneofUint32Extension: Bool {
  7655. return hasExtensionValue(ext: Proto2Unittest_Extensions_oneof_uint32_extension)
  7656. }
  7657. /// Clears the value of extension `Proto2Unittest_Extensions_oneof_uint32_extension`.
  7658. /// Subsequent reads from it will return its default value.
  7659. mutating func clearProto2Unittest_oneofUint32Extension() {
  7660. clearExtensionValue(ext: Proto2Unittest_Extensions_oneof_uint32_extension)
  7661. }
  7662. var Proto2Unittest_oneofNestedMessageExtension: Proto2Unittest_TestAllTypes.NestedMessage {
  7663. get {return getExtensionValue(ext: Proto2Unittest_Extensions_oneof_nested_message_extension) ?? Proto2Unittest_TestAllTypes.NestedMessage()}
  7664. set {setExtensionValue(ext: Proto2Unittest_Extensions_oneof_nested_message_extension, value: newValue)}
  7665. }
  7666. /// Returns true if extension `Proto2Unittest_Extensions_oneof_nested_message_extension`
  7667. /// has been explicitly set.
  7668. var hasProto2Unittest_oneofNestedMessageExtension: Bool {
  7669. return hasExtensionValue(ext: Proto2Unittest_Extensions_oneof_nested_message_extension)
  7670. }
  7671. /// Clears the value of extension `Proto2Unittest_Extensions_oneof_nested_message_extension`.
  7672. /// Subsequent reads from it will return its default value.
  7673. mutating func clearProto2Unittest_oneofNestedMessageExtension() {
  7674. clearExtensionValue(ext: Proto2Unittest_Extensions_oneof_nested_message_extension)
  7675. }
  7676. var Proto2Unittest_oneofStringExtension: String {
  7677. get {return getExtensionValue(ext: Proto2Unittest_Extensions_oneof_string_extension) ?? String()}
  7678. set {setExtensionValue(ext: Proto2Unittest_Extensions_oneof_string_extension, value: newValue)}
  7679. }
  7680. /// Returns true if extension `Proto2Unittest_Extensions_oneof_string_extension`
  7681. /// has been explicitly set.
  7682. var hasProto2Unittest_oneofStringExtension: Bool {
  7683. return hasExtensionValue(ext: Proto2Unittest_Extensions_oneof_string_extension)
  7684. }
  7685. /// Clears the value of extension `Proto2Unittest_Extensions_oneof_string_extension`.
  7686. /// Subsequent reads from it will return its default value.
  7687. mutating func clearProto2Unittest_oneofStringExtension() {
  7688. clearExtensionValue(ext: Proto2Unittest_Extensions_oneof_string_extension)
  7689. }
  7690. var Proto2Unittest_oneofBytesExtension: Data {
  7691. get {return getExtensionValue(ext: Proto2Unittest_Extensions_oneof_bytes_extension) ?? Data()}
  7692. set {setExtensionValue(ext: Proto2Unittest_Extensions_oneof_bytes_extension, value: newValue)}
  7693. }
  7694. /// Returns true if extension `Proto2Unittest_Extensions_oneof_bytes_extension`
  7695. /// has been explicitly set.
  7696. var hasProto2Unittest_oneofBytesExtension: Bool {
  7697. return hasExtensionValue(ext: Proto2Unittest_Extensions_oneof_bytes_extension)
  7698. }
  7699. /// Clears the value of extension `Proto2Unittest_Extensions_oneof_bytes_extension`.
  7700. /// Subsequent reads from it will return its default value.
  7701. mutating func clearProto2Unittest_oneofBytesExtension() {
  7702. clearExtensionValue(ext: Proto2Unittest_Extensions_oneof_bytes_extension)
  7703. }
  7704. var Proto2Unittest_optionalUtf8StringExtension: String {
  7705. get {return getExtensionValue(ext: Proto2Unittest_Extensions_optional_utf8_string_extension) ?? String()}
  7706. set {setExtensionValue(ext: Proto2Unittest_Extensions_optional_utf8_string_extension, value: newValue)}
  7707. }
  7708. /// Returns true if extension `Proto2Unittest_Extensions_optional_utf8_string_extension`
  7709. /// has been explicitly set.
  7710. var hasProto2Unittest_optionalUtf8StringExtension: Bool {
  7711. return hasExtensionValue(ext: Proto2Unittest_Extensions_optional_utf8_string_extension)
  7712. }
  7713. /// Clears the value of extension `Proto2Unittest_Extensions_optional_utf8_string_extension`.
  7714. /// Subsequent reads from it will return its default value.
  7715. mutating func clearProto2Unittest_optionalUtf8StringExtension() {
  7716. clearExtensionValue(ext: Proto2Unittest_Extensions_optional_utf8_string_extension)
  7717. }
  7718. var Proto2Unittest_repeatedUtf8StringExtension: [String] {
  7719. get {return getExtensionValue(ext: Proto2Unittest_Extensions_repeated_utf8_string_extension) ?? []}
  7720. set {setExtensionValue(ext: Proto2Unittest_Extensions_repeated_utf8_string_extension, value: newValue)}
  7721. }
  7722. /// Singular message containing required fields; used to test initialization.
  7723. var Proto2Unittest_requiredMessageExtension: Proto2Unittest_TestRequired {
  7724. get {return getExtensionValue(ext: Proto2Unittest_Extensions_required_message_extension) ?? Proto2Unittest_TestRequired()}
  7725. set {setExtensionValue(ext: Proto2Unittest_Extensions_required_message_extension, value: newValue)}
  7726. }
  7727. /// Returns true if extension `Proto2Unittest_Extensions_required_message_extension`
  7728. /// has been explicitly set.
  7729. var hasProto2Unittest_requiredMessageExtension: Bool {
  7730. return hasExtensionValue(ext: Proto2Unittest_Extensions_required_message_extension)
  7731. }
  7732. /// Clears the value of extension `Proto2Unittest_Extensions_required_message_extension`.
  7733. /// Subsequent reads from it will return its default value.
  7734. mutating func clearProto2Unittest_requiredMessageExtension() {
  7735. clearExtensionValue(ext: Proto2Unittest_Extensions_required_message_extension)
  7736. }
  7737. /// Check for bug where string extensions declared in tested scope did not
  7738. /// compile.
  7739. var Proto2Unittest_TestNestedExtension_test: String {
  7740. get {return getExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.test) ?? "test"}
  7741. set {setExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.test, value: newValue)}
  7742. }
  7743. /// Returns true if extension `Proto2Unittest_TestNestedExtension.Extensions.test`
  7744. /// has been explicitly set.
  7745. var hasProto2Unittest_TestNestedExtension_test: Bool {
  7746. return hasExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.test)
  7747. }
  7748. /// Clears the value of extension `Proto2Unittest_TestNestedExtension.Extensions.test`.
  7749. /// Subsequent reads from it will return its default value.
  7750. mutating func clearProto2Unittest_TestNestedExtension_test() {
  7751. clearExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.test)
  7752. }
  7753. /// Used to test if generated extension name is correct when there are
  7754. /// underscores.
  7755. var Proto2Unittest_TestNestedExtension_nestedStringExtension: String {
  7756. get {return getExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.nested_string_extension) ?? String()}
  7757. set {setExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.nested_string_extension, value: newValue)}
  7758. }
  7759. /// Returns true if extension `Proto2Unittest_TestNestedExtension.Extensions.nested_string_extension`
  7760. /// has been explicitly set.
  7761. var hasProto2Unittest_TestNestedExtension_nestedStringExtension: Bool {
  7762. return hasExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.nested_string_extension)
  7763. }
  7764. /// Clears the value of extension `Proto2Unittest_TestNestedExtension.Extensions.nested_string_extension`.
  7765. /// Subsequent reads from it will return its default value.
  7766. mutating func clearProto2Unittest_TestNestedExtension_nestedStringExtension() {
  7767. clearExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.nested_string_extension)
  7768. }
  7769. var Proto2Unittest_TestRequired_single: Proto2Unittest_TestRequired {
  7770. get {return getExtensionValue(ext: Proto2Unittest_TestRequired.Extensions.single) ?? Proto2Unittest_TestRequired()}
  7771. set {setExtensionValue(ext: Proto2Unittest_TestRequired.Extensions.single, value: newValue)}
  7772. }
  7773. /// Returns true if extension `Proto2Unittest_TestRequired.Extensions.single`
  7774. /// has been explicitly set.
  7775. var hasProto2Unittest_TestRequired_single: Bool {
  7776. return hasExtensionValue(ext: Proto2Unittest_TestRequired.Extensions.single)
  7777. }
  7778. /// Clears the value of extension `Proto2Unittest_TestRequired.Extensions.single`.
  7779. /// Subsequent reads from it will return its default value.
  7780. mutating func clearProto2Unittest_TestRequired_single() {
  7781. clearExtensionValue(ext: Proto2Unittest_TestRequired.Extensions.single)
  7782. }
  7783. var Proto2Unittest_TestRequired_multi: [Proto2Unittest_TestRequired] {
  7784. get {return getExtensionValue(ext: Proto2Unittest_TestRequired.Extensions.multi) ?? []}
  7785. set {setExtensionValue(ext: Proto2Unittest_TestRequired.Extensions.multi, value: newValue)}
  7786. }
  7787. }
  7788. extension Proto2Unittest_TestExtensionInsideTable {
  7789. var Proto2Unittest_testExtensionInsideTableExtension: Int32 {
  7790. get {return getExtensionValue(ext: Proto2Unittest_Extensions_test_extension_inside_table_extension) ?? 0}
  7791. set {setExtensionValue(ext: Proto2Unittest_Extensions_test_extension_inside_table_extension, value: newValue)}
  7792. }
  7793. /// Returns true if extension `Proto2Unittest_Extensions_test_extension_inside_table_extension`
  7794. /// has been explicitly set.
  7795. var hasProto2Unittest_testExtensionInsideTableExtension: Bool {
  7796. return hasExtensionValue(ext: Proto2Unittest_Extensions_test_extension_inside_table_extension)
  7797. }
  7798. /// Clears the value of extension `Proto2Unittest_Extensions_test_extension_inside_table_extension`.
  7799. /// Subsequent reads from it will return its default value.
  7800. mutating func clearProto2Unittest_testExtensionInsideTableExtension() {
  7801. clearExtensionValue(ext: Proto2Unittest_Extensions_test_extension_inside_table_extension)
  7802. }
  7803. }
  7804. extension Proto2Unittest_TestExtensionRangeSerialize {
  7805. var Proto2Unittest_TestExtensionRangeSerialize_barOne: Int32 {
  7806. get {return getExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_one) ?? 0}
  7807. set {setExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_one, value: newValue)}
  7808. }
  7809. /// Returns true if extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_one`
  7810. /// has been explicitly set.
  7811. var hasProto2Unittest_TestExtensionRangeSerialize_barOne: Bool {
  7812. return hasExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_one)
  7813. }
  7814. /// Clears the value of extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_one`.
  7815. /// Subsequent reads from it will return its default value.
  7816. mutating func clearProto2Unittest_TestExtensionRangeSerialize_barOne() {
  7817. clearExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_one)
  7818. }
  7819. var Proto2Unittest_TestExtensionRangeSerialize_barTwo: Int32 {
  7820. get {return getExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_two) ?? 0}
  7821. set {setExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_two, value: newValue)}
  7822. }
  7823. /// Returns true if extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_two`
  7824. /// has been explicitly set.
  7825. var hasProto2Unittest_TestExtensionRangeSerialize_barTwo: Bool {
  7826. return hasExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_two)
  7827. }
  7828. /// Clears the value of extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_two`.
  7829. /// Subsequent reads from it will return its default value.
  7830. mutating func clearProto2Unittest_TestExtensionRangeSerialize_barTwo() {
  7831. clearExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_two)
  7832. }
  7833. var Proto2Unittest_TestExtensionRangeSerialize_barThree: Int32 {
  7834. get {return getExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_three) ?? 0}
  7835. set {setExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_three, value: newValue)}
  7836. }
  7837. /// Returns true if extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_three`
  7838. /// has been explicitly set.
  7839. var hasProto2Unittest_TestExtensionRangeSerialize_barThree: Bool {
  7840. return hasExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_three)
  7841. }
  7842. /// Clears the value of extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_three`.
  7843. /// Subsequent reads from it will return its default value.
  7844. mutating func clearProto2Unittest_TestExtensionRangeSerialize_barThree() {
  7845. clearExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_three)
  7846. }
  7847. var Proto2Unittest_TestExtensionRangeSerialize_barFour: Int32 {
  7848. get {return getExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_four) ?? 0}
  7849. set {setExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_four, value: newValue)}
  7850. }
  7851. /// Returns true if extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_four`
  7852. /// has been explicitly set.
  7853. var hasProto2Unittest_TestExtensionRangeSerialize_barFour: Bool {
  7854. return hasExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_four)
  7855. }
  7856. /// Clears the value of extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_four`.
  7857. /// Subsequent reads from it will return its default value.
  7858. mutating func clearProto2Unittest_TestExtensionRangeSerialize_barFour() {
  7859. clearExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_four)
  7860. }
  7861. var Proto2Unittest_TestExtensionRangeSerialize_barFive: Int32 {
  7862. get {return getExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_five) ?? 0}
  7863. set {setExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_five, value: newValue)}
  7864. }
  7865. /// Returns true if extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_five`
  7866. /// has been explicitly set.
  7867. var hasProto2Unittest_TestExtensionRangeSerialize_barFive: Bool {
  7868. return hasExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_five)
  7869. }
  7870. /// Clears the value of extension `Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_five`.
  7871. /// Subsequent reads from it will return its default value.
  7872. mutating func clearProto2Unittest_TestExtensionRangeSerialize_barFive() {
  7873. clearExtensionValue(ext: Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_five)
  7874. }
  7875. }
  7876. extension Proto2Unittest_TestFieldOrderings {
  7877. var Proto2Unittest_myExtensionString: String {
  7878. get {return getExtensionValue(ext: Proto2Unittest_Extensions_my_extension_string) ?? String()}
  7879. set {setExtensionValue(ext: Proto2Unittest_Extensions_my_extension_string, value: newValue)}
  7880. }
  7881. /// Returns true if extension `Proto2Unittest_Extensions_my_extension_string`
  7882. /// has been explicitly set.
  7883. var hasProto2Unittest_myExtensionString: Bool {
  7884. return hasExtensionValue(ext: Proto2Unittest_Extensions_my_extension_string)
  7885. }
  7886. /// Clears the value of extension `Proto2Unittest_Extensions_my_extension_string`.
  7887. /// Subsequent reads from it will return its default value.
  7888. mutating func clearProto2Unittest_myExtensionString() {
  7889. clearExtensionValue(ext: Proto2Unittest_Extensions_my_extension_string)
  7890. }
  7891. var Proto2Unittest_myExtensionInt: Int32 {
  7892. get {return getExtensionValue(ext: Proto2Unittest_Extensions_my_extension_int) ?? 0}
  7893. set {setExtensionValue(ext: Proto2Unittest_Extensions_my_extension_int, value: newValue)}
  7894. }
  7895. /// Returns true if extension `Proto2Unittest_Extensions_my_extension_int`
  7896. /// has been explicitly set.
  7897. var hasProto2Unittest_myExtensionInt: Bool {
  7898. return hasExtensionValue(ext: Proto2Unittest_Extensions_my_extension_int)
  7899. }
  7900. /// Clears the value of extension `Proto2Unittest_Extensions_my_extension_int`.
  7901. /// Subsequent reads from it will return its default value.
  7902. mutating func clearProto2Unittest_myExtensionInt() {
  7903. clearExtensionValue(ext: Proto2Unittest_Extensions_my_extension_int)
  7904. }
  7905. var Proto2Unittest_TestExtensionOrderings1_testExtOrderings1: Proto2Unittest_TestExtensionOrderings1 {
  7906. get {return getExtensionValue(ext: Proto2Unittest_TestExtensionOrderings1.Extensions.test_ext_orderings1) ?? Proto2Unittest_TestExtensionOrderings1()}
  7907. set {setExtensionValue(ext: Proto2Unittest_TestExtensionOrderings1.Extensions.test_ext_orderings1, value: newValue)}
  7908. }
  7909. /// Returns true if extension `Proto2Unittest_TestExtensionOrderings1.Extensions.test_ext_orderings1`
  7910. /// has been explicitly set.
  7911. var hasProto2Unittest_TestExtensionOrderings1_testExtOrderings1: Bool {
  7912. return hasExtensionValue(ext: Proto2Unittest_TestExtensionOrderings1.Extensions.test_ext_orderings1)
  7913. }
  7914. /// Clears the value of extension `Proto2Unittest_TestExtensionOrderings1.Extensions.test_ext_orderings1`.
  7915. /// Subsequent reads from it will return its default value.
  7916. mutating func clearProto2Unittest_TestExtensionOrderings1_testExtOrderings1() {
  7917. clearExtensionValue(ext: Proto2Unittest_TestExtensionOrderings1.Extensions.test_ext_orderings1)
  7918. }
  7919. var Proto2Unittest_TestExtensionOrderings2_testExtOrderings2: Proto2Unittest_TestExtensionOrderings2 {
  7920. get {return getExtensionValue(ext: Proto2Unittest_TestExtensionOrderings2.Extensions.test_ext_orderings2) ?? Proto2Unittest_TestExtensionOrderings2()}
  7921. set {setExtensionValue(ext: Proto2Unittest_TestExtensionOrderings2.Extensions.test_ext_orderings2, value: newValue)}
  7922. }
  7923. /// Returns true if extension `Proto2Unittest_TestExtensionOrderings2.Extensions.test_ext_orderings2`
  7924. /// has been explicitly set.
  7925. var hasProto2Unittest_TestExtensionOrderings2_testExtOrderings2: Bool {
  7926. return hasExtensionValue(ext: Proto2Unittest_TestExtensionOrderings2.Extensions.test_ext_orderings2)
  7927. }
  7928. /// Clears the value of extension `Proto2Unittest_TestExtensionOrderings2.Extensions.test_ext_orderings2`.
  7929. /// Subsequent reads from it will return its default value.
  7930. mutating func clearProto2Unittest_TestExtensionOrderings2_testExtOrderings2() {
  7931. clearExtensionValue(ext: Proto2Unittest_TestExtensionOrderings2.Extensions.test_ext_orderings2)
  7932. }
  7933. var Proto2Unittest_TestExtensionOrderings2_TestExtensionOrderings3_testExtOrderings3: Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3 {
  7934. get {return getExtensionValue(ext: Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3.Extensions.test_ext_orderings3) ?? Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3()}
  7935. set {setExtensionValue(ext: Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3.Extensions.test_ext_orderings3, value: newValue)}
  7936. }
  7937. /// Returns true if extension `Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3.Extensions.test_ext_orderings3`
  7938. /// has been explicitly set.
  7939. var hasProto2Unittest_TestExtensionOrderings2_TestExtensionOrderings3_testExtOrderings3: Bool {
  7940. return hasExtensionValue(ext: Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3.Extensions.test_ext_orderings3)
  7941. }
  7942. /// Clears the value of extension `Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3.Extensions.test_ext_orderings3`.
  7943. /// Subsequent reads from it will return its default value.
  7944. mutating func clearProto2Unittest_TestExtensionOrderings2_TestExtensionOrderings3_testExtOrderings3() {
  7945. clearExtensionValue(ext: Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3.Extensions.test_ext_orderings3)
  7946. }
  7947. }
  7948. extension Proto2Unittest_TestGroupExtension {
  7949. var Proto2Unittest_TestNestedExtension_optionalGroupExtension: Proto2Unittest_TestNestedExtension.OptionalGroup_extension {
  7950. get {return getExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.OptionalGroup_extension) ?? Proto2Unittest_TestNestedExtension.OptionalGroup_extension()}
  7951. set {setExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.OptionalGroup_extension, value: newValue)}
  7952. }
  7953. /// Returns true if extension `Proto2Unittest_TestNestedExtension.Extensions.OptionalGroup_extension`
  7954. /// has been explicitly set.
  7955. var hasProto2Unittest_TestNestedExtension_optionalGroupExtension: Bool {
  7956. return hasExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.OptionalGroup_extension)
  7957. }
  7958. /// Clears the value of extension `Proto2Unittest_TestNestedExtension.Extensions.OptionalGroup_extension`.
  7959. /// Subsequent reads from it will return its default value.
  7960. mutating func clearProto2Unittest_TestNestedExtension_optionalGroupExtension() {
  7961. clearExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.OptionalGroup_extension)
  7962. }
  7963. var Proto2Unittest_TestNestedExtension_optionalForeignEnumExtension: Proto2Unittest_ForeignEnum {
  7964. get {return getExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.optional_foreign_enum_extension) ?? .foreignFoo}
  7965. set {setExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.optional_foreign_enum_extension, value: newValue)}
  7966. }
  7967. /// Returns true if extension `Proto2Unittest_TestNestedExtension.Extensions.optional_foreign_enum_extension`
  7968. /// has been explicitly set.
  7969. var hasProto2Unittest_TestNestedExtension_optionalForeignEnumExtension: Bool {
  7970. return hasExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.optional_foreign_enum_extension)
  7971. }
  7972. /// Clears the value of extension `Proto2Unittest_TestNestedExtension.Extensions.optional_foreign_enum_extension`.
  7973. /// Subsequent reads from it will return its default value.
  7974. mutating func clearProto2Unittest_TestNestedExtension_optionalForeignEnumExtension() {
  7975. clearExtensionValue(ext: Proto2Unittest_TestNestedExtension.Extensions.optional_foreign_enum_extension)
  7976. }
  7977. }
  7978. extension Proto2Unittest_TestHugeFieldNumbers {
  7979. var Proto2Unittest_testAllTypes: Proto2Unittest_TestAllTypes {
  7980. get {return getExtensionValue(ext: Proto2Unittest_Extensions_test_all_types) ?? Proto2Unittest_TestAllTypes()}
  7981. set {setExtensionValue(ext: Proto2Unittest_Extensions_test_all_types, value: newValue)}
  7982. }
  7983. /// Returns true if extension `Proto2Unittest_Extensions_test_all_types`
  7984. /// has been explicitly set.
  7985. var hasProto2Unittest_testAllTypes: Bool {
  7986. return hasExtensionValue(ext: Proto2Unittest_Extensions_test_all_types)
  7987. }
  7988. /// Clears the value of extension `Proto2Unittest_Extensions_test_all_types`.
  7989. /// Subsequent reads from it will return its default value.
  7990. mutating func clearProto2Unittest_testAllTypes() {
  7991. clearExtensionValue(ext: Proto2Unittest_Extensions_test_all_types)
  7992. }
  7993. }
  7994. extension Proto2Unittest_TestMixedFieldsAndExtensions {
  7995. var Proto2Unittest_TestMixedFieldsAndExtensions_c: Int32 {
  7996. get {return getExtensionValue(ext: Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.c) ?? 0}
  7997. set {setExtensionValue(ext: Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.c, value: newValue)}
  7998. }
  7999. /// Returns true if extension `Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.c`
  8000. /// has been explicitly set.
  8001. var hasProto2Unittest_TestMixedFieldsAndExtensions_c: Bool {
  8002. return hasExtensionValue(ext: Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.c)
  8003. }
  8004. /// Clears the value of extension `Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.c`.
  8005. /// Subsequent reads from it will return its default value.
  8006. mutating func clearProto2Unittest_TestMixedFieldsAndExtensions_c() {
  8007. clearExtensionValue(ext: Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.c)
  8008. }
  8009. var Proto2Unittest_TestMixedFieldsAndExtensions_d: [UInt32] {
  8010. get {return getExtensionValue(ext: Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.d) ?? []}
  8011. set {setExtensionValue(ext: Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.d, value: newValue)}
  8012. }
  8013. }
  8014. extension Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup {
  8015. var Proto2Unittest_inner: Proto2Unittest_TestNestedGroupExtensionInnerExtension {
  8016. get {return getExtensionValue(ext: Proto2Unittest_Extensions_inner) ?? Proto2Unittest_TestNestedGroupExtensionInnerExtension()}
  8017. set {setExtensionValue(ext: Proto2Unittest_Extensions_inner, value: newValue)}
  8018. }
  8019. /// Returns true if extension `Proto2Unittest_Extensions_inner`
  8020. /// has been explicitly set.
  8021. var hasProto2Unittest_inner: Bool {
  8022. return hasExtensionValue(ext: Proto2Unittest_Extensions_inner)
  8023. }
  8024. /// Clears the value of extension `Proto2Unittest_Extensions_inner`.
  8025. /// Subsequent reads from it will return its default value.
  8026. mutating func clearProto2Unittest_inner() {
  8027. clearExtensionValue(ext: Proto2Unittest_Extensions_inner)
  8028. }
  8029. }
  8030. extension Proto2Unittest_TestPackedExtensions {
  8031. var Proto2Unittest_packedInt32Extension: [Int32] {
  8032. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_int32_extension) ?? []}
  8033. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_int32_extension, value: newValue)}
  8034. }
  8035. var Proto2Unittest_packedInt64Extension: [Int64] {
  8036. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_int64_extension) ?? []}
  8037. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_int64_extension, value: newValue)}
  8038. }
  8039. var Proto2Unittest_packedUint32Extension: [UInt32] {
  8040. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_uint32_extension) ?? []}
  8041. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_uint32_extension, value: newValue)}
  8042. }
  8043. var Proto2Unittest_packedUint64Extension: [UInt64] {
  8044. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_uint64_extension) ?? []}
  8045. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_uint64_extension, value: newValue)}
  8046. }
  8047. var Proto2Unittest_packedSint32Extension: [Int32] {
  8048. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_sint32_extension) ?? []}
  8049. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_sint32_extension, value: newValue)}
  8050. }
  8051. var Proto2Unittest_packedSint64Extension: [Int64] {
  8052. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_sint64_extension) ?? []}
  8053. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_sint64_extension, value: newValue)}
  8054. }
  8055. var Proto2Unittest_packedFixed32Extension: [UInt32] {
  8056. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_fixed32_extension) ?? []}
  8057. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_fixed32_extension, value: newValue)}
  8058. }
  8059. var Proto2Unittest_packedFixed64Extension: [UInt64] {
  8060. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_fixed64_extension) ?? []}
  8061. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_fixed64_extension, value: newValue)}
  8062. }
  8063. var Proto2Unittest_packedSfixed32Extension: [Int32] {
  8064. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_sfixed32_extension) ?? []}
  8065. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_sfixed32_extension, value: newValue)}
  8066. }
  8067. var Proto2Unittest_packedSfixed64Extension: [Int64] {
  8068. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_sfixed64_extension) ?? []}
  8069. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_sfixed64_extension, value: newValue)}
  8070. }
  8071. var Proto2Unittest_packedFloatExtension: [Float] {
  8072. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_float_extension) ?? []}
  8073. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_float_extension, value: newValue)}
  8074. }
  8075. var Proto2Unittest_packedDoubleExtension: [Double] {
  8076. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_double_extension) ?? []}
  8077. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_double_extension, value: newValue)}
  8078. }
  8079. var Proto2Unittest_packedBoolExtension: [Bool] {
  8080. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_bool_extension) ?? []}
  8081. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_bool_extension, value: newValue)}
  8082. }
  8083. var Proto2Unittest_packedEnumExtension: [Proto2Unittest_ForeignEnum] {
  8084. get {return getExtensionValue(ext: Proto2Unittest_Extensions_packed_enum_extension) ?? []}
  8085. set {setExtensionValue(ext: Proto2Unittest_Extensions_packed_enum_extension, value: newValue)}
  8086. }
  8087. }
  8088. extension Proto2Unittest_TestParsingMerge {
  8089. var Proto2Unittest_TestParsingMerge_optionalExt: Proto2Unittest_TestAllTypes {
  8090. get {return getExtensionValue(ext: Proto2Unittest_TestParsingMerge.Extensions.optional_ext) ?? Proto2Unittest_TestAllTypes()}
  8091. set {setExtensionValue(ext: Proto2Unittest_TestParsingMerge.Extensions.optional_ext, value: newValue)}
  8092. }
  8093. /// Returns true if extension `Proto2Unittest_TestParsingMerge.Extensions.optional_ext`
  8094. /// has been explicitly set.
  8095. var hasProto2Unittest_TestParsingMerge_optionalExt: Bool {
  8096. return hasExtensionValue(ext: Proto2Unittest_TestParsingMerge.Extensions.optional_ext)
  8097. }
  8098. /// Clears the value of extension `Proto2Unittest_TestParsingMerge.Extensions.optional_ext`.
  8099. /// Subsequent reads from it will return its default value.
  8100. mutating func clearProto2Unittest_TestParsingMerge_optionalExt() {
  8101. clearExtensionValue(ext: Proto2Unittest_TestParsingMerge.Extensions.optional_ext)
  8102. }
  8103. var Proto2Unittest_TestParsingMerge_repeatedExt: [Proto2Unittest_TestAllTypes] {
  8104. get {return getExtensionValue(ext: Proto2Unittest_TestParsingMerge.Extensions.repeated_ext) ?? []}
  8105. set {setExtensionValue(ext: Proto2Unittest_TestParsingMerge.Extensions.repeated_ext, value: newValue)}
  8106. }
  8107. }
  8108. extension Proto2Unittest_TestUnpackedExtensions {
  8109. var Proto2Unittest_unpackedInt32Extension: [Int32] {
  8110. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_int32_extension) ?? []}
  8111. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_int32_extension, value: newValue)}
  8112. }
  8113. var Proto2Unittest_unpackedInt64Extension: [Int64] {
  8114. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_int64_extension) ?? []}
  8115. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_int64_extension, value: newValue)}
  8116. }
  8117. var Proto2Unittest_unpackedUint32Extension: [UInt32] {
  8118. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_uint32_extension) ?? []}
  8119. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_uint32_extension, value: newValue)}
  8120. }
  8121. var Proto2Unittest_unpackedUint64Extension: [UInt64] {
  8122. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_uint64_extension) ?? []}
  8123. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_uint64_extension, value: newValue)}
  8124. }
  8125. var Proto2Unittest_unpackedSint32Extension: [Int32] {
  8126. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_sint32_extension) ?? []}
  8127. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_sint32_extension, value: newValue)}
  8128. }
  8129. var Proto2Unittest_unpackedSint64Extension: [Int64] {
  8130. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_sint64_extension) ?? []}
  8131. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_sint64_extension, value: newValue)}
  8132. }
  8133. var Proto2Unittest_unpackedFixed32Extension: [UInt32] {
  8134. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_fixed32_extension) ?? []}
  8135. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_fixed32_extension, value: newValue)}
  8136. }
  8137. var Proto2Unittest_unpackedFixed64Extension: [UInt64] {
  8138. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_fixed64_extension) ?? []}
  8139. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_fixed64_extension, value: newValue)}
  8140. }
  8141. var Proto2Unittest_unpackedSfixed32Extension: [Int32] {
  8142. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_sfixed32_extension) ?? []}
  8143. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_sfixed32_extension, value: newValue)}
  8144. }
  8145. var Proto2Unittest_unpackedSfixed64Extension: [Int64] {
  8146. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_sfixed64_extension) ?? []}
  8147. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_sfixed64_extension, value: newValue)}
  8148. }
  8149. var Proto2Unittest_unpackedFloatExtension: [Float] {
  8150. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_float_extension) ?? []}
  8151. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_float_extension, value: newValue)}
  8152. }
  8153. var Proto2Unittest_unpackedDoubleExtension: [Double] {
  8154. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_double_extension) ?? []}
  8155. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_double_extension, value: newValue)}
  8156. }
  8157. var Proto2Unittest_unpackedBoolExtension: [Bool] {
  8158. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_bool_extension) ?? []}
  8159. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_bool_extension, value: newValue)}
  8160. }
  8161. var Proto2Unittest_unpackedEnumExtension: [Proto2Unittest_ForeignEnum] {
  8162. get {return getExtensionValue(ext: Proto2Unittest_Extensions_unpacked_enum_extension) ?? []}
  8163. set {setExtensionValue(ext: Proto2Unittest_Extensions_unpacked_enum_extension, value: newValue)}
  8164. }
  8165. }
  8166. // MARK: - File's ExtensionMap: Proto2Unittest_Unittest_Extensions
  8167. /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
  8168. /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
  8169. /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
  8170. /// a larger `SwiftProtobuf.SimpleExtensionMap`.
  8171. let Proto2Unittest_Unittest_Extensions: SwiftProtobuf.SimpleExtensionMap = [
  8172. Proto2Unittest_Extensions_optional_int32_extension,
  8173. Proto2Unittest_Extensions_optional_int64_extension,
  8174. Proto2Unittest_Extensions_optional_uint32_extension,
  8175. Proto2Unittest_Extensions_optional_uint64_extension,
  8176. Proto2Unittest_Extensions_optional_sint32_extension,
  8177. Proto2Unittest_Extensions_optional_sint64_extension,
  8178. Proto2Unittest_Extensions_optional_fixed32_extension,
  8179. Proto2Unittest_Extensions_optional_fixed64_extension,
  8180. Proto2Unittest_Extensions_optional_sfixed32_extension,
  8181. Proto2Unittest_Extensions_optional_sfixed64_extension,
  8182. Proto2Unittest_Extensions_optional_float_extension,
  8183. Proto2Unittest_Extensions_optional_double_extension,
  8184. Proto2Unittest_Extensions_optional_bool_extension,
  8185. Proto2Unittest_Extensions_optional_string_extension,
  8186. Proto2Unittest_Extensions_optional_bytes_extension,
  8187. Proto2Unittest_Extensions_OptionalGroup_extension,
  8188. Proto2Unittest_Extensions_optional_nested_message_extension,
  8189. Proto2Unittest_Extensions_optional_foreign_message_extension,
  8190. Proto2Unittest_Extensions_optional_import_message_extension,
  8191. Proto2Unittest_Extensions_optional_nested_enum_extension,
  8192. Proto2Unittest_Extensions_optional_foreign_enum_extension,
  8193. Proto2Unittest_Extensions_optional_import_enum_extension,
  8194. Proto2Unittest_Extensions_optional_string_piece_extension,
  8195. Proto2Unittest_Extensions_optional_cord_extension,
  8196. Proto2Unittest_Extensions_optional_bytes_cord_extension,
  8197. Proto2Unittest_Extensions_optional_public_import_message_extension,
  8198. Proto2Unittest_Extensions_optional_lazy_message_extension,
  8199. Proto2Unittest_Extensions_optional_unverified_lazy_message_extension,
  8200. Proto2Unittest_Extensions_repeated_int32_extension,
  8201. Proto2Unittest_Extensions_repeated_int64_extension,
  8202. Proto2Unittest_Extensions_repeated_uint32_extension,
  8203. Proto2Unittest_Extensions_repeated_uint64_extension,
  8204. Proto2Unittest_Extensions_repeated_sint32_extension,
  8205. Proto2Unittest_Extensions_repeated_sint64_extension,
  8206. Proto2Unittest_Extensions_repeated_fixed32_extension,
  8207. Proto2Unittest_Extensions_repeated_fixed64_extension,
  8208. Proto2Unittest_Extensions_repeated_sfixed32_extension,
  8209. Proto2Unittest_Extensions_repeated_sfixed64_extension,
  8210. Proto2Unittest_Extensions_repeated_float_extension,
  8211. Proto2Unittest_Extensions_repeated_double_extension,
  8212. Proto2Unittest_Extensions_repeated_bool_extension,
  8213. Proto2Unittest_Extensions_repeated_string_extension,
  8214. Proto2Unittest_Extensions_repeated_bytes_extension,
  8215. Proto2Unittest_Extensions_RepeatedGroup_extension,
  8216. Proto2Unittest_Extensions_repeated_nested_message_extension,
  8217. Proto2Unittest_Extensions_repeated_foreign_message_extension,
  8218. Proto2Unittest_Extensions_repeated_import_message_extension,
  8219. Proto2Unittest_Extensions_repeated_nested_enum_extension,
  8220. Proto2Unittest_Extensions_repeated_foreign_enum_extension,
  8221. Proto2Unittest_Extensions_repeated_import_enum_extension,
  8222. Proto2Unittest_Extensions_repeated_string_piece_extension,
  8223. Proto2Unittest_Extensions_repeated_cord_extension,
  8224. Proto2Unittest_Extensions_repeated_lazy_message_extension,
  8225. Proto2Unittest_Extensions_default_int32_extension,
  8226. Proto2Unittest_Extensions_default_int64_extension,
  8227. Proto2Unittest_Extensions_default_uint32_extension,
  8228. Proto2Unittest_Extensions_default_uint64_extension,
  8229. Proto2Unittest_Extensions_default_sint32_extension,
  8230. Proto2Unittest_Extensions_default_sint64_extension,
  8231. Proto2Unittest_Extensions_default_fixed32_extension,
  8232. Proto2Unittest_Extensions_default_fixed64_extension,
  8233. Proto2Unittest_Extensions_default_sfixed32_extension,
  8234. Proto2Unittest_Extensions_default_sfixed64_extension,
  8235. Proto2Unittest_Extensions_default_float_extension,
  8236. Proto2Unittest_Extensions_default_double_extension,
  8237. Proto2Unittest_Extensions_default_bool_extension,
  8238. Proto2Unittest_Extensions_default_string_extension,
  8239. Proto2Unittest_Extensions_default_bytes_extension,
  8240. Proto2Unittest_Extensions_default_nested_enum_extension,
  8241. Proto2Unittest_Extensions_default_foreign_enum_extension,
  8242. Proto2Unittest_Extensions_default_import_enum_extension,
  8243. Proto2Unittest_Extensions_default_string_piece_extension,
  8244. Proto2Unittest_Extensions_default_cord_extension,
  8245. Proto2Unittest_Extensions_oneof_uint32_extension,
  8246. Proto2Unittest_Extensions_oneof_nested_message_extension,
  8247. Proto2Unittest_Extensions_oneof_string_extension,
  8248. Proto2Unittest_Extensions_oneof_bytes_extension,
  8249. Proto2Unittest_Extensions_optional_utf8_string_extension,
  8250. Proto2Unittest_Extensions_repeated_utf8_string_extension,
  8251. Proto2Unittest_Extensions_required_message_extension,
  8252. Proto2Unittest_Extensions_my_extension_string,
  8253. Proto2Unittest_Extensions_my_extension_int,
  8254. Proto2Unittest_Extensions_packed_int32_extension,
  8255. Proto2Unittest_Extensions_packed_int64_extension,
  8256. Proto2Unittest_Extensions_packed_uint32_extension,
  8257. Proto2Unittest_Extensions_packed_uint64_extension,
  8258. Proto2Unittest_Extensions_packed_sint32_extension,
  8259. Proto2Unittest_Extensions_packed_sint64_extension,
  8260. Proto2Unittest_Extensions_packed_fixed32_extension,
  8261. Proto2Unittest_Extensions_packed_fixed64_extension,
  8262. Proto2Unittest_Extensions_packed_sfixed32_extension,
  8263. Proto2Unittest_Extensions_packed_sfixed64_extension,
  8264. Proto2Unittest_Extensions_packed_float_extension,
  8265. Proto2Unittest_Extensions_packed_double_extension,
  8266. Proto2Unittest_Extensions_packed_bool_extension,
  8267. Proto2Unittest_Extensions_packed_enum_extension,
  8268. Proto2Unittest_Extensions_unpacked_int32_extension,
  8269. Proto2Unittest_Extensions_unpacked_int64_extension,
  8270. Proto2Unittest_Extensions_unpacked_uint32_extension,
  8271. Proto2Unittest_Extensions_unpacked_uint64_extension,
  8272. Proto2Unittest_Extensions_unpacked_sint32_extension,
  8273. Proto2Unittest_Extensions_unpacked_sint64_extension,
  8274. Proto2Unittest_Extensions_unpacked_fixed32_extension,
  8275. Proto2Unittest_Extensions_unpacked_fixed64_extension,
  8276. Proto2Unittest_Extensions_unpacked_sfixed32_extension,
  8277. Proto2Unittest_Extensions_unpacked_sfixed64_extension,
  8278. Proto2Unittest_Extensions_unpacked_float_extension,
  8279. Proto2Unittest_Extensions_unpacked_double_extension,
  8280. Proto2Unittest_Extensions_unpacked_bool_extension,
  8281. Proto2Unittest_Extensions_unpacked_enum_extension,
  8282. Proto2Unittest_Extensions_test_all_types,
  8283. Proto2Unittest_Extensions_test_extension_inside_table_extension,
  8284. Proto2Unittest_Extensions_inner,
  8285. Proto2Unittest_Extensions_redacted_extension,
  8286. Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.c,
  8287. Proto2Unittest_TestMixedFieldsAndExtensions.Extensions.d,
  8288. Proto2Unittest_TestNestedExtension.Extensions.test,
  8289. Proto2Unittest_TestNestedExtension.Extensions.nested_string_extension,
  8290. Proto2Unittest_TestNestedExtension.Extensions.OptionalGroup_extension,
  8291. Proto2Unittest_TestNestedExtension.Extensions.optional_foreign_enum_extension,
  8292. Proto2Unittest_TestRequired.Extensions.single,
  8293. Proto2Unittest_TestRequired.Extensions.multi,
  8294. Proto2Unittest_TestExtensionOrderings1.Extensions.test_ext_orderings1,
  8295. Proto2Unittest_TestExtensionOrderings2.Extensions.test_ext_orderings2,
  8296. Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3.Extensions.test_ext_orderings3,
  8297. Proto2Unittest_TestParsingMerge.Extensions.optional_ext,
  8298. Proto2Unittest_TestParsingMerge.Extensions.repeated_ext,
  8299. Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_one,
  8300. Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_two,
  8301. Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_three,
  8302. Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_four,
  8303. Proto2Unittest_TestExtensionRangeSerialize.Extensions.bar_five,
  8304. Proto2Unittest_EnumParseTester.Extensions.optional_arbitrary_ext,
  8305. Proto2Unittest_EnumParseTester.Extensions.repeated_arbitrary_ext,
  8306. Proto2Unittest_EnumParseTester.Extensions.packed_arbitrary_ext,
  8307. Proto2Unittest_BoolParseTester.Extensions.optional_bool_ext,
  8308. Proto2Unittest_BoolParseTester.Extensions.repeated_bool_ext,
  8309. Proto2Unittest_BoolParseTester.Extensions.packed_bool_ext,
  8310. Proto2Unittest_Int32ParseTester.Extensions.optional_int32_ext,
  8311. Proto2Unittest_Int32ParseTester.Extensions.repeated_int32_ext,
  8312. Proto2Unittest_Int32ParseTester.Extensions.packed_int32_ext,
  8313. Proto2Unittest_Int64ParseTester.Extensions.optional_int64_ext,
  8314. Proto2Unittest_Int64ParseTester.Extensions.repeated_int64_ext,
  8315. Proto2Unittest_Int64ParseTester.Extensions.packed_int64_ext,
  8316. Proto2Unittest_StringParseTester.Extensions.optional_string_ext,
  8317. Proto2Unittest_StringParseTester.Extensions.repeated_string_ext
  8318. ]
  8319. // Extension Objects - The only reason these might be needed is when manually
  8320. // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
  8321. // accessors for the extension fields on the messages directly.
  8322. /// Singular
  8323. let Proto2Unittest_Extensions_optional_int32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestAllExtensions>(
  8324. _protobuf_fieldNumber: 1,
  8325. fieldName: "proto2_unittest.optional_int32_extension"
  8326. )
  8327. let Proto2Unittest_Extensions_optional_int64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt64>, Proto2Unittest_TestAllExtensions>(
  8328. _protobuf_fieldNumber: 2,
  8329. fieldName: "proto2_unittest.optional_int64_extension"
  8330. )
  8331. let Proto2Unittest_Extensions_optional_uint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufUInt32>, Proto2Unittest_TestAllExtensions>(
  8332. _protobuf_fieldNumber: 3,
  8333. fieldName: "proto2_unittest.optional_uint32_extension"
  8334. )
  8335. let Proto2Unittest_Extensions_optional_uint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufUInt64>, Proto2Unittest_TestAllExtensions>(
  8336. _protobuf_fieldNumber: 4,
  8337. fieldName: "proto2_unittest.optional_uint64_extension"
  8338. )
  8339. let Proto2Unittest_Extensions_optional_sint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufSInt32>, Proto2Unittest_TestAllExtensions>(
  8340. _protobuf_fieldNumber: 5,
  8341. fieldName: "proto2_unittest.optional_sint32_extension"
  8342. )
  8343. let Proto2Unittest_Extensions_optional_sint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufSInt64>, Proto2Unittest_TestAllExtensions>(
  8344. _protobuf_fieldNumber: 6,
  8345. fieldName: "proto2_unittest.optional_sint64_extension"
  8346. )
  8347. let Proto2Unittest_Extensions_optional_fixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufFixed32>, Proto2Unittest_TestAllExtensions>(
  8348. _protobuf_fieldNumber: 7,
  8349. fieldName: "proto2_unittest.optional_fixed32_extension"
  8350. )
  8351. let Proto2Unittest_Extensions_optional_fixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufFixed64>, Proto2Unittest_TestAllExtensions>(
  8352. _protobuf_fieldNumber: 8,
  8353. fieldName: "proto2_unittest.optional_fixed64_extension"
  8354. )
  8355. let Proto2Unittest_Extensions_optional_sfixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufSFixed32>, Proto2Unittest_TestAllExtensions>(
  8356. _protobuf_fieldNumber: 9,
  8357. fieldName: "proto2_unittest.optional_sfixed32_extension"
  8358. )
  8359. let Proto2Unittest_Extensions_optional_sfixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufSFixed64>, Proto2Unittest_TestAllExtensions>(
  8360. _protobuf_fieldNumber: 10,
  8361. fieldName: "proto2_unittest.optional_sfixed64_extension"
  8362. )
  8363. let Proto2Unittest_Extensions_optional_float_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufFloat>, Proto2Unittest_TestAllExtensions>(
  8364. _protobuf_fieldNumber: 11,
  8365. fieldName: "proto2_unittest.optional_float_extension"
  8366. )
  8367. let Proto2Unittest_Extensions_optional_double_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufDouble>, Proto2Unittest_TestAllExtensions>(
  8368. _protobuf_fieldNumber: 12,
  8369. fieldName: "proto2_unittest.optional_double_extension"
  8370. )
  8371. let Proto2Unittest_Extensions_optional_bool_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufBool>, Proto2Unittest_TestAllExtensions>(
  8372. _protobuf_fieldNumber: 13,
  8373. fieldName: "proto2_unittest.optional_bool_extension"
  8374. )
  8375. let Proto2Unittest_Extensions_optional_string_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8376. _protobuf_fieldNumber: 14,
  8377. fieldName: "proto2_unittest.optional_string_extension"
  8378. )
  8379. let Proto2Unittest_Extensions_optional_bytes_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufBytes>, Proto2Unittest_TestAllExtensions>(
  8380. _protobuf_fieldNumber: 15,
  8381. fieldName: "proto2_unittest.optional_bytes_extension"
  8382. )
  8383. let Proto2Unittest_Extensions_OptionalGroup_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalGroupExtensionField<Proto2Unittest_OptionalGroup_extension>, Proto2Unittest_TestAllExtensions>(
  8384. _protobuf_fieldNumber: 16,
  8385. fieldName: "proto2_unittest.optionalgroup_extension"
  8386. )
  8387. let Proto2Unittest_Extensions_optional_nested_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestAllTypes.NestedMessage>, Proto2Unittest_TestAllExtensions>(
  8388. _protobuf_fieldNumber: 18,
  8389. fieldName: "proto2_unittest.optional_nested_message_extension"
  8390. )
  8391. let Proto2Unittest_Extensions_optional_foreign_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_ForeignMessage>, Proto2Unittest_TestAllExtensions>(
  8392. _protobuf_fieldNumber: 19,
  8393. fieldName: "proto2_unittest.optional_foreign_message_extension"
  8394. )
  8395. let Proto2Unittest_Extensions_optional_import_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2UnittestImport_ImportMessage>, Proto2Unittest_TestAllExtensions>(
  8396. _protobuf_fieldNumber: 20,
  8397. fieldName: "proto2_unittest.optional_import_message_extension"
  8398. )
  8399. let Proto2Unittest_Extensions_optional_nested_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalEnumExtensionField<Proto2Unittest_TestAllTypes.NestedEnum>, Proto2Unittest_TestAllExtensions>(
  8400. _protobuf_fieldNumber: 21,
  8401. fieldName: "proto2_unittest.optional_nested_enum_extension"
  8402. )
  8403. let Proto2Unittest_Extensions_optional_foreign_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalEnumExtensionField<Proto2Unittest_ForeignEnum>, Proto2Unittest_TestAllExtensions>(
  8404. _protobuf_fieldNumber: 22,
  8405. fieldName: "proto2_unittest.optional_foreign_enum_extension"
  8406. )
  8407. let Proto2Unittest_Extensions_optional_import_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalEnumExtensionField<Proto2UnittestImport_ImportEnum>, Proto2Unittest_TestAllExtensions>(
  8408. _protobuf_fieldNumber: 23,
  8409. fieldName: "proto2_unittest.optional_import_enum_extension"
  8410. )
  8411. let Proto2Unittest_Extensions_optional_string_piece_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8412. _protobuf_fieldNumber: 24,
  8413. fieldName: "proto2_unittest.optional_string_piece_extension"
  8414. )
  8415. /// TODO: ctype=CORD is not supported for extension. Add
  8416. /// ctype=CORD option back after it is supported.
  8417. let Proto2Unittest_Extensions_optional_cord_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8418. _protobuf_fieldNumber: 25,
  8419. fieldName: "proto2_unittest.optional_cord_extension"
  8420. )
  8421. let Proto2Unittest_Extensions_optional_bytes_cord_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufBytes>, Proto2Unittest_TestAllExtensions>(
  8422. _protobuf_fieldNumber: 86,
  8423. fieldName: "proto2_unittest.optional_bytes_cord_extension"
  8424. )
  8425. let Proto2Unittest_Extensions_optional_public_import_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2UnittestImport_PublicImportMessage>, Proto2Unittest_TestAllExtensions>(
  8426. _protobuf_fieldNumber: 26,
  8427. fieldName: "proto2_unittest.optional_public_import_message_extension"
  8428. )
  8429. let Proto2Unittest_Extensions_optional_lazy_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestAllTypes.NestedMessage>, Proto2Unittest_TestAllExtensions>(
  8430. _protobuf_fieldNumber: 27,
  8431. fieldName: "proto2_unittest.optional_lazy_message_extension"
  8432. )
  8433. let Proto2Unittest_Extensions_optional_unverified_lazy_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestAllTypes.NestedMessage>, Proto2Unittest_TestAllExtensions>(
  8434. _protobuf_fieldNumber: 28,
  8435. fieldName: "proto2_unittest.optional_unverified_lazy_message_extension"
  8436. )
  8437. /// Repeated
  8438. let Proto2Unittest_Extensions_repeated_int32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestAllExtensions>(
  8439. _protobuf_fieldNumber: 31,
  8440. fieldName: "proto2_unittest.repeated_int32_extension"
  8441. )
  8442. let Proto2Unittest_Extensions_repeated_int64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufInt64>, Proto2Unittest_TestAllExtensions>(
  8443. _protobuf_fieldNumber: 32,
  8444. fieldName: "proto2_unittest.repeated_int64_extension"
  8445. )
  8446. let Proto2Unittest_Extensions_repeated_uint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufUInt32>, Proto2Unittest_TestAllExtensions>(
  8447. _protobuf_fieldNumber: 33,
  8448. fieldName: "proto2_unittest.repeated_uint32_extension"
  8449. )
  8450. let Proto2Unittest_Extensions_repeated_uint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufUInt64>, Proto2Unittest_TestAllExtensions>(
  8451. _protobuf_fieldNumber: 34,
  8452. fieldName: "proto2_unittest.repeated_uint64_extension"
  8453. )
  8454. let Proto2Unittest_Extensions_repeated_sint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufSInt32>, Proto2Unittest_TestAllExtensions>(
  8455. _protobuf_fieldNumber: 35,
  8456. fieldName: "proto2_unittest.repeated_sint32_extension"
  8457. )
  8458. let Proto2Unittest_Extensions_repeated_sint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufSInt64>, Proto2Unittest_TestAllExtensions>(
  8459. _protobuf_fieldNumber: 36,
  8460. fieldName: "proto2_unittest.repeated_sint64_extension"
  8461. )
  8462. let Proto2Unittest_Extensions_repeated_fixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufFixed32>, Proto2Unittest_TestAllExtensions>(
  8463. _protobuf_fieldNumber: 37,
  8464. fieldName: "proto2_unittest.repeated_fixed32_extension"
  8465. )
  8466. let Proto2Unittest_Extensions_repeated_fixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufFixed64>, Proto2Unittest_TestAllExtensions>(
  8467. _protobuf_fieldNumber: 38,
  8468. fieldName: "proto2_unittest.repeated_fixed64_extension"
  8469. )
  8470. let Proto2Unittest_Extensions_repeated_sfixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufSFixed32>, Proto2Unittest_TestAllExtensions>(
  8471. _protobuf_fieldNumber: 39,
  8472. fieldName: "proto2_unittest.repeated_sfixed32_extension"
  8473. )
  8474. let Proto2Unittest_Extensions_repeated_sfixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufSFixed64>, Proto2Unittest_TestAllExtensions>(
  8475. _protobuf_fieldNumber: 40,
  8476. fieldName: "proto2_unittest.repeated_sfixed64_extension"
  8477. )
  8478. let Proto2Unittest_Extensions_repeated_float_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufFloat>, Proto2Unittest_TestAllExtensions>(
  8479. _protobuf_fieldNumber: 41,
  8480. fieldName: "proto2_unittest.repeated_float_extension"
  8481. )
  8482. let Proto2Unittest_Extensions_repeated_double_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufDouble>, Proto2Unittest_TestAllExtensions>(
  8483. _protobuf_fieldNumber: 42,
  8484. fieldName: "proto2_unittest.repeated_double_extension"
  8485. )
  8486. let Proto2Unittest_Extensions_repeated_bool_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufBool>, Proto2Unittest_TestAllExtensions>(
  8487. _protobuf_fieldNumber: 43,
  8488. fieldName: "proto2_unittest.repeated_bool_extension"
  8489. )
  8490. let Proto2Unittest_Extensions_repeated_string_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8491. _protobuf_fieldNumber: 44,
  8492. fieldName: "proto2_unittest.repeated_string_extension"
  8493. )
  8494. let Proto2Unittest_Extensions_repeated_bytes_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufBytes>, Proto2Unittest_TestAllExtensions>(
  8495. _protobuf_fieldNumber: 45,
  8496. fieldName: "proto2_unittest.repeated_bytes_extension"
  8497. )
  8498. let Proto2Unittest_Extensions_RepeatedGroup_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedGroupExtensionField<Proto2Unittest_RepeatedGroup_extension>, Proto2Unittest_TestAllExtensions>(
  8499. _protobuf_fieldNumber: 46,
  8500. fieldName: "proto2_unittest.repeatedgroup_extension"
  8501. )
  8502. let Proto2Unittest_Extensions_repeated_nested_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedMessageExtensionField<Proto2Unittest_TestAllTypes.NestedMessage>, Proto2Unittest_TestAllExtensions>(
  8503. _protobuf_fieldNumber: 48,
  8504. fieldName: "proto2_unittest.repeated_nested_message_extension"
  8505. )
  8506. let Proto2Unittest_Extensions_repeated_foreign_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedMessageExtensionField<Proto2Unittest_ForeignMessage>, Proto2Unittest_TestAllExtensions>(
  8507. _protobuf_fieldNumber: 49,
  8508. fieldName: "proto2_unittest.repeated_foreign_message_extension"
  8509. )
  8510. let Proto2Unittest_Extensions_repeated_import_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedMessageExtensionField<Proto2UnittestImport_ImportMessage>, Proto2Unittest_TestAllExtensions>(
  8511. _protobuf_fieldNumber: 50,
  8512. fieldName: "proto2_unittest.repeated_import_message_extension"
  8513. )
  8514. let Proto2Unittest_Extensions_repeated_nested_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedEnumExtensionField<Proto2Unittest_TestAllTypes.NestedEnum>, Proto2Unittest_TestAllExtensions>(
  8515. _protobuf_fieldNumber: 51,
  8516. fieldName: "proto2_unittest.repeated_nested_enum_extension"
  8517. )
  8518. let Proto2Unittest_Extensions_repeated_foreign_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedEnumExtensionField<Proto2Unittest_ForeignEnum>, Proto2Unittest_TestAllExtensions>(
  8519. _protobuf_fieldNumber: 52,
  8520. fieldName: "proto2_unittest.repeated_foreign_enum_extension"
  8521. )
  8522. let Proto2Unittest_Extensions_repeated_import_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedEnumExtensionField<Proto2UnittestImport_ImportEnum>, Proto2Unittest_TestAllExtensions>(
  8523. _protobuf_fieldNumber: 53,
  8524. fieldName: "proto2_unittest.repeated_import_enum_extension"
  8525. )
  8526. let Proto2Unittest_Extensions_repeated_string_piece_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8527. _protobuf_fieldNumber: 54,
  8528. fieldName: "proto2_unittest.repeated_string_piece_extension"
  8529. )
  8530. /// TODO: ctype=CORD is not supported for extension. Add
  8531. /// ctype=CORD option back after it is supported.
  8532. let Proto2Unittest_Extensions_repeated_cord_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8533. _protobuf_fieldNumber: 55,
  8534. fieldName: "proto2_unittest.repeated_cord_extension"
  8535. )
  8536. let Proto2Unittest_Extensions_repeated_lazy_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedMessageExtensionField<Proto2Unittest_TestAllTypes.NestedMessage>, Proto2Unittest_TestAllExtensions>(
  8537. _protobuf_fieldNumber: 57,
  8538. fieldName: "proto2_unittest.repeated_lazy_message_extension"
  8539. )
  8540. /// Singular with defaults
  8541. let Proto2Unittest_Extensions_default_int32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestAllExtensions>(
  8542. _protobuf_fieldNumber: 61,
  8543. fieldName: "proto2_unittest.default_int32_extension"
  8544. )
  8545. let Proto2Unittest_Extensions_default_int64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt64>, Proto2Unittest_TestAllExtensions>(
  8546. _protobuf_fieldNumber: 62,
  8547. fieldName: "proto2_unittest.default_int64_extension"
  8548. )
  8549. let Proto2Unittest_Extensions_default_uint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufUInt32>, Proto2Unittest_TestAllExtensions>(
  8550. _protobuf_fieldNumber: 63,
  8551. fieldName: "proto2_unittest.default_uint32_extension"
  8552. )
  8553. let Proto2Unittest_Extensions_default_uint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufUInt64>, Proto2Unittest_TestAllExtensions>(
  8554. _protobuf_fieldNumber: 64,
  8555. fieldName: "proto2_unittest.default_uint64_extension"
  8556. )
  8557. let Proto2Unittest_Extensions_default_sint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufSInt32>, Proto2Unittest_TestAllExtensions>(
  8558. _protobuf_fieldNumber: 65,
  8559. fieldName: "proto2_unittest.default_sint32_extension"
  8560. )
  8561. let Proto2Unittest_Extensions_default_sint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufSInt64>, Proto2Unittest_TestAllExtensions>(
  8562. _protobuf_fieldNumber: 66,
  8563. fieldName: "proto2_unittest.default_sint64_extension"
  8564. )
  8565. let Proto2Unittest_Extensions_default_fixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufFixed32>, Proto2Unittest_TestAllExtensions>(
  8566. _protobuf_fieldNumber: 67,
  8567. fieldName: "proto2_unittest.default_fixed32_extension"
  8568. )
  8569. let Proto2Unittest_Extensions_default_fixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufFixed64>, Proto2Unittest_TestAllExtensions>(
  8570. _protobuf_fieldNumber: 68,
  8571. fieldName: "proto2_unittest.default_fixed64_extension"
  8572. )
  8573. let Proto2Unittest_Extensions_default_sfixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufSFixed32>, Proto2Unittest_TestAllExtensions>(
  8574. _protobuf_fieldNumber: 69,
  8575. fieldName: "proto2_unittest.default_sfixed32_extension"
  8576. )
  8577. let Proto2Unittest_Extensions_default_sfixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufSFixed64>, Proto2Unittest_TestAllExtensions>(
  8578. _protobuf_fieldNumber: 70,
  8579. fieldName: "proto2_unittest.default_sfixed64_extension"
  8580. )
  8581. let Proto2Unittest_Extensions_default_float_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufFloat>, Proto2Unittest_TestAllExtensions>(
  8582. _protobuf_fieldNumber: 71,
  8583. fieldName: "proto2_unittest.default_float_extension"
  8584. )
  8585. let Proto2Unittest_Extensions_default_double_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufDouble>, Proto2Unittest_TestAllExtensions>(
  8586. _protobuf_fieldNumber: 72,
  8587. fieldName: "proto2_unittest.default_double_extension"
  8588. )
  8589. let Proto2Unittest_Extensions_default_bool_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufBool>, Proto2Unittest_TestAllExtensions>(
  8590. _protobuf_fieldNumber: 73,
  8591. fieldName: "proto2_unittest.default_bool_extension"
  8592. )
  8593. let Proto2Unittest_Extensions_default_string_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8594. _protobuf_fieldNumber: 74,
  8595. fieldName: "proto2_unittest.default_string_extension"
  8596. )
  8597. let Proto2Unittest_Extensions_default_bytes_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufBytes>, Proto2Unittest_TestAllExtensions>(
  8598. _protobuf_fieldNumber: 75,
  8599. fieldName: "proto2_unittest.default_bytes_extension"
  8600. )
  8601. let Proto2Unittest_Extensions_default_nested_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalEnumExtensionField<Proto2Unittest_TestAllTypes.NestedEnum>, Proto2Unittest_TestAllExtensions>(
  8602. _protobuf_fieldNumber: 81,
  8603. fieldName: "proto2_unittest.default_nested_enum_extension"
  8604. )
  8605. let Proto2Unittest_Extensions_default_foreign_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalEnumExtensionField<Proto2Unittest_ForeignEnum>, Proto2Unittest_TestAllExtensions>(
  8606. _protobuf_fieldNumber: 82,
  8607. fieldName: "proto2_unittest.default_foreign_enum_extension"
  8608. )
  8609. let Proto2Unittest_Extensions_default_import_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalEnumExtensionField<Proto2UnittestImport_ImportEnum>, Proto2Unittest_TestAllExtensions>(
  8610. _protobuf_fieldNumber: 83,
  8611. fieldName: "proto2_unittest.default_import_enum_extension"
  8612. )
  8613. let Proto2Unittest_Extensions_default_string_piece_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8614. _protobuf_fieldNumber: 84,
  8615. fieldName: "proto2_unittest.default_string_piece_extension"
  8616. )
  8617. /// TODO: ctype=CORD is not supported for extension. Add
  8618. /// ctype=CORD option back after it is supported.
  8619. let Proto2Unittest_Extensions_default_cord_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8620. _protobuf_fieldNumber: 85,
  8621. fieldName: "proto2_unittest.default_cord_extension"
  8622. )
  8623. /// For oneof test
  8624. let Proto2Unittest_Extensions_oneof_uint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufUInt32>, Proto2Unittest_TestAllExtensions>(
  8625. _protobuf_fieldNumber: 111,
  8626. fieldName: "proto2_unittest.oneof_uint32_extension"
  8627. )
  8628. let Proto2Unittest_Extensions_oneof_nested_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestAllTypes.NestedMessage>, Proto2Unittest_TestAllExtensions>(
  8629. _protobuf_fieldNumber: 112,
  8630. fieldName: "proto2_unittest.oneof_nested_message_extension"
  8631. )
  8632. let Proto2Unittest_Extensions_oneof_string_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8633. _protobuf_fieldNumber: 113,
  8634. fieldName: "proto2_unittest.oneof_string_extension"
  8635. )
  8636. let Proto2Unittest_Extensions_oneof_bytes_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufBytes>, Proto2Unittest_TestAllExtensions>(
  8637. _protobuf_fieldNumber: 114,
  8638. fieldName: "proto2_unittest.oneof_bytes_extension"
  8639. )
  8640. let Proto2Unittest_Extensions_optional_utf8_string_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8641. _protobuf_fieldNumber: 115,
  8642. fieldName: "proto2_unittest.optional_utf8_string_extension"
  8643. )
  8644. let Proto2Unittest_Extensions_repeated_utf8_string_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8645. _protobuf_fieldNumber: 116,
  8646. fieldName: "proto2_unittest.repeated_utf8_string_extension"
  8647. )
  8648. /// Singular message containing required fields; used to test initialization.
  8649. let Proto2Unittest_Extensions_required_message_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestRequired>, Proto2Unittest_TestAllExtensions>(
  8650. _protobuf_fieldNumber: 117,
  8651. fieldName: "proto2_unittest.required_message_extension"
  8652. )
  8653. let Proto2Unittest_Extensions_my_extension_string = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestFieldOrderings>(
  8654. _protobuf_fieldNumber: 50,
  8655. fieldName: "proto2_unittest.my_extension_string"
  8656. )
  8657. let Proto2Unittest_Extensions_my_extension_int = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestFieldOrderings>(
  8658. _protobuf_fieldNumber: 5,
  8659. fieldName: "proto2_unittest.my_extension_int"
  8660. )
  8661. let Proto2Unittest_Extensions_packed_int32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestPackedExtensions>(
  8662. _protobuf_fieldNumber: 90,
  8663. fieldName: "proto2_unittest.packed_int32_extension"
  8664. )
  8665. let Proto2Unittest_Extensions_packed_int64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufInt64>, Proto2Unittest_TestPackedExtensions>(
  8666. _protobuf_fieldNumber: 91,
  8667. fieldName: "proto2_unittest.packed_int64_extension"
  8668. )
  8669. let Proto2Unittest_Extensions_packed_uint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufUInt32>, Proto2Unittest_TestPackedExtensions>(
  8670. _protobuf_fieldNumber: 92,
  8671. fieldName: "proto2_unittest.packed_uint32_extension"
  8672. )
  8673. let Proto2Unittest_Extensions_packed_uint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufUInt64>, Proto2Unittest_TestPackedExtensions>(
  8674. _protobuf_fieldNumber: 93,
  8675. fieldName: "proto2_unittest.packed_uint64_extension"
  8676. )
  8677. let Proto2Unittest_Extensions_packed_sint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufSInt32>, Proto2Unittest_TestPackedExtensions>(
  8678. _protobuf_fieldNumber: 94,
  8679. fieldName: "proto2_unittest.packed_sint32_extension"
  8680. )
  8681. let Proto2Unittest_Extensions_packed_sint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufSInt64>, Proto2Unittest_TestPackedExtensions>(
  8682. _protobuf_fieldNumber: 95,
  8683. fieldName: "proto2_unittest.packed_sint64_extension"
  8684. )
  8685. let Proto2Unittest_Extensions_packed_fixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufFixed32>, Proto2Unittest_TestPackedExtensions>(
  8686. _protobuf_fieldNumber: 96,
  8687. fieldName: "proto2_unittest.packed_fixed32_extension"
  8688. )
  8689. let Proto2Unittest_Extensions_packed_fixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufFixed64>, Proto2Unittest_TestPackedExtensions>(
  8690. _protobuf_fieldNumber: 97,
  8691. fieldName: "proto2_unittest.packed_fixed64_extension"
  8692. )
  8693. let Proto2Unittest_Extensions_packed_sfixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufSFixed32>, Proto2Unittest_TestPackedExtensions>(
  8694. _protobuf_fieldNumber: 98,
  8695. fieldName: "proto2_unittest.packed_sfixed32_extension"
  8696. )
  8697. let Proto2Unittest_Extensions_packed_sfixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufSFixed64>, Proto2Unittest_TestPackedExtensions>(
  8698. _protobuf_fieldNumber: 99,
  8699. fieldName: "proto2_unittest.packed_sfixed64_extension"
  8700. )
  8701. let Proto2Unittest_Extensions_packed_float_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufFloat>, Proto2Unittest_TestPackedExtensions>(
  8702. _protobuf_fieldNumber: 100,
  8703. fieldName: "proto2_unittest.packed_float_extension"
  8704. )
  8705. let Proto2Unittest_Extensions_packed_double_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufDouble>, Proto2Unittest_TestPackedExtensions>(
  8706. _protobuf_fieldNumber: 101,
  8707. fieldName: "proto2_unittest.packed_double_extension"
  8708. )
  8709. let Proto2Unittest_Extensions_packed_bool_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufBool>, Proto2Unittest_TestPackedExtensions>(
  8710. _protobuf_fieldNumber: 102,
  8711. fieldName: "proto2_unittest.packed_bool_extension"
  8712. )
  8713. let Proto2Unittest_Extensions_packed_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedEnumExtensionField<Proto2Unittest_ForeignEnum>, Proto2Unittest_TestPackedExtensions>(
  8714. _protobuf_fieldNumber: 103,
  8715. fieldName: "proto2_unittest.packed_enum_extension"
  8716. )
  8717. let Proto2Unittest_Extensions_unpacked_int32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestUnpackedExtensions>(
  8718. _protobuf_fieldNumber: 90,
  8719. fieldName: "proto2_unittest.unpacked_int32_extension"
  8720. )
  8721. let Proto2Unittest_Extensions_unpacked_int64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufInt64>, Proto2Unittest_TestUnpackedExtensions>(
  8722. _protobuf_fieldNumber: 91,
  8723. fieldName: "proto2_unittest.unpacked_int64_extension"
  8724. )
  8725. let Proto2Unittest_Extensions_unpacked_uint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufUInt32>, Proto2Unittest_TestUnpackedExtensions>(
  8726. _protobuf_fieldNumber: 92,
  8727. fieldName: "proto2_unittest.unpacked_uint32_extension"
  8728. )
  8729. let Proto2Unittest_Extensions_unpacked_uint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufUInt64>, Proto2Unittest_TestUnpackedExtensions>(
  8730. _protobuf_fieldNumber: 93,
  8731. fieldName: "proto2_unittest.unpacked_uint64_extension"
  8732. )
  8733. let Proto2Unittest_Extensions_unpacked_sint32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufSInt32>, Proto2Unittest_TestUnpackedExtensions>(
  8734. _protobuf_fieldNumber: 94,
  8735. fieldName: "proto2_unittest.unpacked_sint32_extension"
  8736. )
  8737. let Proto2Unittest_Extensions_unpacked_sint64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufSInt64>, Proto2Unittest_TestUnpackedExtensions>(
  8738. _protobuf_fieldNumber: 95,
  8739. fieldName: "proto2_unittest.unpacked_sint64_extension"
  8740. )
  8741. let Proto2Unittest_Extensions_unpacked_fixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufFixed32>, Proto2Unittest_TestUnpackedExtensions>(
  8742. _protobuf_fieldNumber: 96,
  8743. fieldName: "proto2_unittest.unpacked_fixed32_extension"
  8744. )
  8745. let Proto2Unittest_Extensions_unpacked_fixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufFixed64>, Proto2Unittest_TestUnpackedExtensions>(
  8746. _protobuf_fieldNumber: 97,
  8747. fieldName: "proto2_unittest.unpacked_fixed64_extension"
  8748. )
  8749. let Proto2Unittest_Extensions_unpacked_sfixed32_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufSFixed32>, Proto2Unittest_TestUnpackedExtensions>(
  8750. _protobuf_fieldNumber: 98,
  8751. fieldName: "proto2_unittest.unpacked_sfixed32_extension"
  8752. )
  8753. let Proto2Unittest_Extensions_unpacked_sfixed64_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufSFixed64>, Proto2Unittest_TestUnpackedExtensions>(
  8754. _protobuf_fieldNumber: 99,
  8755. fieldName: "proto2_unittest.unpacked_sfixed64_extension"
  8756. )
  8757. let Proto2Unittest_Extensions_unpacked_float_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufFloat>, Proto2Unittest_TestUnpackedExtensions>(
  8758. _protobuf_fieldNumber: 100,
  8759. fieldName: "proto2_unittest.unpacked_float_extension"
  8760. )
  8761. let Proto2Unittest_Extensions_unpacked_double_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufDouble>, Proto2Unittest_TestUnpackedExtensions>(
  8762. _protobuf_fieldNumber: 101,
  8763. fieldName: "proto2_unittest.unpacked_double_extension"
  8764. )
  8765. let Proto2Unittest_Extensions_unpacked_bool_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufBool>, Proto2Unittest_TestUnpackedExtensions>(
  8766. _protobuf_fieldNumber: 102,
  8767. fieldName: "proto2_unittest.unpacked_bool_extension"
  8768. )
  8769. let Proto2Unittest_Extensions_unpacked_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedEnumExtensionField<Proto2Unittest_ForeignEnum>, Proto2Unittest_TestUnpackedExtensions>(
  8770. _protobuf_fieldNumber: 103,
  8771. fieldName: "proto2_unittest.unpacked_enum_extension"
  8772. )
  8773. let Proto2Unittest_Extensions_test_all_types = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestAllTypes>, Proto2Unittest_TestHugeFieldNumbers>(
  8774. _protobuf_fieldNumber: 536860000,
  8775. fieldName: "proto2_unittest.test_all_types"
  8776. )
  8777. let Proto2Unittest_Extensions_test_extension_inside_table_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestExtensionInsideTable>(
  8778. _protobuf_fieldNumber: 5,
  8779. fieldName: "proto2_unittest.test_extension_inside_table_extension"
  8780. )
  8781. let Proto2Unittest_Extensions_inner = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestNestedGroupExtensionInnerExtension>, Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup>(
  8782. _protobuf_fieldNumber: 3,
  8783. fieldName: "proto2_unittest.inner"
  8784. )
  8785. let Proto2Unittest_Extensions_redacted_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_RedactedFields>(
  8786. _protobuf_fieldNumber: 20,
  8787. fieldName: "proto2_unittest.redacted_extension"
  8788. )
  8789. extension Proto2Unittest_TestMixedFieldsAndExtensions {
  8790. enum Extensions {
  8791. static let c = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestMixedFieldsAndExtensions>(
  8792. _protobuf_fieldNumber: 2,
  8793. fieldName: "proto2_unittest.TestMixedFieldsAndExtensions.c"
  8794. )
  8795. static let d = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufFixed32>, Proto2Unittest_TestMixedFieldsAndExtensions>(
  8796. _protobuf_fieldNumber: 4,
  8797. fieldName: "proto2_unittest.TestMixedFieldsAndExtensions.d"
  8798. )
  8799. }
  8800. }
  8801. extension Proto2Unittest_TestNestedExtension {
  8802. enum Extensions {
  8803. /// Check for bug where string extensions declared in tested scope did not
  8804. /// compile.
  8805. static let test = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8806. _protobuf_fieldNumber: 1002,
  8807. fieldName: "proto2_unittest.TestNestedExtension.test"
  8808. )
  8809. /// Used to test if generated extension name is correct when there are
  8810. /// underscores.
  8811. static let nested_string_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_TestAllExtensions>(
  8812. _protobuf_fieldNumber: 1003,
  8813. fieldName: "proto2_unittest.TestNestedExtension.nested_string_extension"
  8814. )
  8815. static let OptionalGroup_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalGroupExtensionField<Proto2Unittest_TestNestedExtension.OptionalGroup_extension>, Proto2Unittest_TestGroupExtension>(
  8816. _protobuf_fieldNumber: 16,
  8817. fieldName: "proto2_unittest.TestNestedExtension.optionalgroup_extension"
  8818. )
  8819. static let optional_foreign_enum_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalEnumExtensionField<Proto2Unittest_ForeignEnum>, Proto2Unittest_TestGroupExtension>(
  8820. _protobuf_fieldNumber: 22,
  8821. fieldName: "proto2_unittest.TestNestedExtension.optional_foreign_enum_extension"
  8822. )
  8823. }
  8824. }
  8825. extension Proto2Unittest_TestRequired {
  8826. enum Extensions {
  8827. static let single = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestRequired>, Proto2Unittest_TestAllExtensions>(
  8828. _protobuf_fieldNumber: 1000,
  8829. fieldName: "proto2_unittest.TestRequired.single"
  8830. )
  8831. static let multi = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedMessageExtensionField<Proto2Unittest_TestRequired>, Proto2Unittest_TestAllExtensions>(
  8832. _protobuf_fieldNumber: 1001,
  8833. fieldName: "proto2_unittest.TestRequired.multi"
  8834. )
  8835. }
  8836. }
  8837. extension Proto2Unittest_TestExtensionOrderings1 {
  8838. enum Extensions {
  8839. static let test_ext_orderings1 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestExtensionOrderings1>, Proto2Unittest_TestFieldOrderings>(
  8840. _protobuf_fieldNumber: 13,
  8841. fieldName: "proto2_unittest.TestExtensionOrderings1.test_ext_orderings1"
  8842. )
  8843. }
  8844. }
  8845. extension Proto2Unittest_TestExtensionOrderings2 {
  8846. enum Extensions {
  8847. static let test_ext_orderings2 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestExtensionOrderings2>, Proto2Unittest_TestFieldOrderings>(
  8848. _protobuf_fieldNumber: 12,
  8849. fieldName: "proto2_unittest.TestExtensionOrderings2.test_ext_orderings2"
  8850. )
  8851. }
  8852. }
  8853. extension Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3 {
  8854. enum Extensions {
  8855. static let test_ext_orderings3 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3>, Proto2Unittest_TestFieldOrderings>(
  8856. _protobuf_fieldNumber: 14,
  8857. fieldName: "proto2_unittest.TestExtensionOrderings2.TestExtensionOrderings3.test_ext_orderings3"
  8858. )
  8859. }
  8860. }
  8861. extension Proto2Unittest_TestParsingMerge {
  8862. enum Extensions {
  8863. static let optional_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Proto2Unittest_TestAllTypes>, Proto2Unittest_TestParsingMerge>(
  8864. _protobuf_fieldNumber: 1000,
  8865. fieldName: "proto2_unittest.TestParsingMerge.optional_ext"
  8866. )
  8867. static let repeated_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedMessageExtensionField<Proto2Unittest_TestAllTypes>, Proto2Unittest_TestParsingMerge>(
  8868. _protobuf_fieldNumber: 1001,
  8869. fieldName: "proto2_unittest.TestParsingMerge.repeated_ext"
  8870. )
  8871. }
  8872. }
  8873. extension Proto2Unittest_TestExtensionRangeSerialize {
  8874. enum Extensions {
  8875. static let bar_one = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestExtensionRangeSerialize>(
  8876. _protobuf_fieldNumber: 2,
  8877. fieldName: "proto2_unittest.TestExtensionRangeSerialize.bar_one"
  8878. )
  8879. static let bar_two = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestExtensionRangeSerialize>(
  8880. _protobuf_fieldNumber: 4,
  8881. fieldName: "proto2_unittest.TestExtensionRangeSerialize.bar_two"
  8882. )
  8883. static let bar_three = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestExtensionRangeSerialize>(
  8884. _protobuf_fieldNumber: 10,
  8885. fieldName: "proto2_unittest.TestExtensionRangeSerialize.bar_three"
  8886. )
  8887. static let bar_four = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestExtensionRangeSerialize>(
  8888. _protobuf_fieldNumber: 15,
  8889. fieldName: "proto2_unittest.TestExtensionRangeSerialize.bar_four"
  8890. )
  8891. static let bar_five = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_TestExtensionRangeSerialize>(
  8892. _protobuf_fieldNumber: 19,
  8893. fieldName: "proto2_unittest.TestExtensionRangeSerialize.bar_five"
  8894. )
  8895. }
  8896. }
  8897. extension Proto2Unittest_EnumParseTester {
  8898. enum Extensions {
  8899. static let optional_arbitrary_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalEnumExtensionField<Proto2Unittest_EnumParseTester.Arbitrary>, Proto2Unittest_EnumParseTester>(
  8900. _protobuf_fieldNumber: 2000000,
  8901. fieldName: "proto2_unittest.EnumParseTester.optional_arbitrary_ext"
  8902. )
  8903. static let repeated_arbitrary_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedEnumExtensionField<Proto2Unittest_EnumParseTester.Arbitrary>, Proto2Unittest_EnumParseTester>(
  8904. _protobuf_fieldNumber: 2000001,
  8905. fieldName: "proto2_unittest.EnumParseTester.repeated_arbitrary_ext"
  8906. )
  8907. static let packed_arbitrary_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedEnumExtensionField<Proto2Unittest_EnumParseTester.Arbitrary>, Proto2Unittest_EnumParseTester>(
  8908. _protobuf_fieldNumber: 2000002,
  8909. fieldName: "proto2_unittest.EnumParseTester.packed_arbitrary_ext"
  8910. )
  8911. }
  8912. }
  8913. extension Proto2Unittest_BoolParseTester {
  8914. enum Extensions {
  8915. static let optional_bool_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufBool>, Proto2Unittest_BoolParseTester>(
  8916. _protobuf_fieldNumber: 2000000,
  8917. fieldName: "proto2_unittest.BoolParseTester.optional_bool_ext"
  8918. )
  8919. static let repeated_bool_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufBool>, Proto2Unittest_BoolParseTester>(
  8920. _protobuf_fieldNumber: 2000001,
  8921. fieldName: "proto2_unittest.BoolParseTester.repeated_bool_ext"
  8922. )
  8923. static let packed_bool_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufBool>, Proto2Unittest_BoolParseTester>(
  8924. _protobuf_fieldNumber: 2000002,
  8925. fieldName: "proto2_unittest.BoolParseTester.packed_bool_ext"
  8926. )
  8927. }
  8928. }
  8929. extension Proto2Unittest_Int32ParseTester {
  8930. enum Extensions {
  8931. static let optional_int32_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_Int32ParseTester>(
  8932. _protobuf_fieldNumber: 2000000,
  8933. fieldName: "proto2_unittest.Int32ParseTester.optional_int32_ext"
  8934. )
  8935. static let repeated_int32_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_Int32ParseTester>(
  8936. _protobuf_fieldNumber: 2000001,
  8937. fieldName: "proto2_unittest.Int32ParseTester.repeated_int32_ext"
  8938. )
  8939. static let packed_int32_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufInt32>, Proto2Unittest_Int32ParseTester>(
  8940. _protobuf_fieldNumber: 2000002,
  8941. fieldName: "proto2_unittest.Int32ParseTester.packed_int32_ext"
  8942. )
  8943. }
  8944. }
  8945. extension Proto2Unittest_Int64ParseTester {
  8946. enum Extensions {
  8947. static let optional_int64_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt64>, Proto2Unittest_Int64ParseTester>(
  8948. _protobuf_fieldNumber: 2000000,
  8949. fieldName: "proto2_unittest.Int64ParseTester.optional_int64_ext"
  8950. )
  8951. static let repeated_int64_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufInt64>, Proto2Unittest_Int64ParseTester>(
  8952. _protobuf_fieldNumber: 2000001,
  8953. fieldName: "proto2_unittest.Int64ParseTester.repeated_int64_ext"
  8954. )
  8955. static let packed_int64_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.PackedExtensionField<SwiftProtobuf.ProtobufInt64>, Proto2Unittest_Int64ParseTester>(
  8956. _protobuf_fieldNumber: 2000002,
  8957. fieldName: "proto2_unittest.Int64ParseTester.packed_int64_ext"
  8958. )
  8959. }
  8960. }
  8961. extension Proto2Unittest_StringParseTester {
  8962. enum Extensions {
  8963. static let optional_string_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_StringParseTester>(
  8964. _protobuf_fieldNumber: 2000000,
  8965. fieldName: "proto2_unittest.StringParseTester.optional_string_ext"
  8966. )
  8967. static let repeated_string_ext = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedExtensionField<SwiftProtobuf.ProtobufString>, Proto2Unittest_StringParseTester>(
  8968. _protobuf_fieldNumber: 2000001,
  8969. fieldName: "proto2_unittest.StringParseTester.repeated_string_ext"
  8970. )
  8971. }
  8972. }
  8973. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  8974. fileprivate let _protobuf_package = "proto2_unittest"
  8975. extension Proto2Unittest_ForeignEnum: SwiftProtobuf._ProtoNameProviding {
  8976. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  8977. 4: .same(proto: "FOREIGN_FOO"),
  8978. 5: .same(proto: "FOREIGN_BAR"),
  8979. 6: .same(proto: "FOREIGN_BAZ"),
  8980. 32: .same(proto: "FOREIGN_BAX"),
  8981. 123456: .same(proto: "FOREIGN_LARGE"),
  8982. ]
  8983. }
  8984. extension Proto2Unittest_TestReservedEnumFields: SwiftProtobuf._ProtoNameProviding {
  8985. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  8986. 0: .same(proto: "UNKNOWN"),
  8987. ]
  8988. }
  8989. extension Proto2Unittest_ForeignOpenEnum: SwiftProtobuf._ProtoNameProviding {
  8990. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  8991. 0: .same(proto: "FOREIGN_OPEN_UNKNOWN"),
  8992. 4: .same(proto: "FOREIGN_OPEN_FOO"),
  8993. 5: .same(proto: "FOREIGN_OPEN_BAR"),
  8994. 6: .same(proto: "FOREIGN_OPEN_BAZ"),
  8995. 32: .same(proto: "FOREIGN_OPEN_BAX"),
  8996. ]
  8997. }
  8998. extension Proto2Unittest_TestEnumWithDupValue: SwiftProtobuf._ProtoNameProviding {
  8999. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9000. 1: .aliased(proto: "FOO1", aliases: ["FOO2"]),
  9001. 2: .aliased(proto: "BAR1", aliases: ["BAR2"]),
  9002. 3: .same(proto: "BAZ"),
  9003. ]
  9004. }
  9005. extension Proto2Unittest_TestSparseEnum: SwiftProtobuf._ProtoNameProviding {
  9006. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9007. -53452: .same(proto: "SPARSE_E"),
  9008. -15: .same(proto: "SPARSE_D"),
  9009. 0: .same(proto: "SPARSE_F"),
  9010. 2: .same(proto: "SPARSE_G"),
  9011. 123: .same(proto: "SPARSE_A"),
  9012. 62374: .same(proto: "SPARSE_B"),
  9013. 12589234: .same(proto: "SPARSE_C"),
  9014. ]
  9015. }
  9016. extension Proto2Unittest_VeryLargeEnum: SwiftProtobuf._ProtoNameProviding {
  9017. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9018. 0: .same(proto: "ENUM_LABEL_DEFAULT"),
  9019. 1: .same(proto: "ENUM_LABEL_1"),
  9020. 2: .same(proto: "ENUM_LABEL_2"),
  9021. 3: .same(proto: "ENUM_LABEL_3"),
  9022. 4: .same(proto: "ENUM_LABEL_4"),
  9023. 5: .same(proto: "ENUM_LABEL_5"),
  9024. 6: .same(proto: "ENUM_LABEL_6"),
  9025. 7: .same(proto: "ENUM_LABEL_7"),
  9026. 8: .same(proto: "ENUM_LABEL_8"),
  9027. 9: .same(proto: "ENUM_LABEL_9"),
  9028. 10: .same(proto: "ENUM_LABEL_10"),
  9029. 11: .same(proto: "ENUM_LABEL_11"),
  9030. 12: .same(proto: "ENUM_LABEL_12"),
  9031. 13: .same(proto: "ENUM_LABEL_13"),
  9032. 14: .same(proto: "ENUM_LABEL_14"),
  9033. 15: .same(proto: "ENUM_LABEL_15"),
  9034. 16: .same(proto: "ENUM_LABEL_16"),
  9035. 17: .same(proto: "ENUM_LABEL_17"),
  9036. 18: .same(proto: "ENUM_LABEL_18"),
  9037. 19: .same(proto: "ENUM_LABEL_19"),
  9038. 20: .same(proto: "ENUM_LABEL_20"),
  9039. 21: .same(proto: "ENUM_LABEL_21"),
  9040. 22: .same(proto: "ENUM_LABEL_22"),
  9041. 23: .same(proto: "ENUM_LABEL_23"),
  9042. 24: .same(proto: "ENUM_LABEL_24"),
  9043. 25: .same(proto: "ENUM_LABEL_25"),
  9044. 26: .same(proto: "ENUM_LABEL_26"),
  9045. 27: .same(proto: "ENUM_LABEL_27"),
  9046. 28: .same(proto: "ENUM_LABEL_28"),
  9047. 29: .same(proto: "ENUM_LABEL_29"),
  9048. 30: .same(proto: "ENUM_LABEL_30"),
  9049. 31: .same(proto: "ENUM_LABEL_31"),
  9050. 32: .same(proto: "ENUM_LABEL_32"),
  9051. 33: .same(proto: "ENUM_LABEL_33"),
  9052. 34: .same(proto: "ENUM_LABEL_34"),
  9053. 35: .same(proto: "ENUM_LABEL_35"),
  9054. 36: .same(proto: "ENUM_LABEL_36"),
  9055. 37: .same(proto: "ENUM_LABEL_37"),
  9056. 38: .same(proto: "ENUM_LABEL_38"),
  9057. 39: .same(proto: "ENUM_LABEL_39"),
  9058. 40: .same(proto: "ENUM_LABEL_40"),
  9059. 41: .same(proto: "ENUM_LABEL_41"),
  9060. 42: .same(proto: "ENUM_LABEL_42"),
  9061. 43: .same(proto: "ENUM_LABEL_43"),
  9062. 44: .same(proto: "ENUM_LABEL_44"),
  9063. 45: .same(proto: "ENUM_LABEL_45"),
  9064. 46: .same(proto: "ENUM_LABEL_46"),
  9065. 47: .same(proto: "ENUM_LABEL_47"),
  9066. 48: .same(proto: "ENUM_LABEL_48"),
  9067. 49: .same(proto: "ENUM_LABEL_49"),
  9068. 50: .same(proto: "ENUM_LABEL_50"),
  9069. 51: .same(proto: "ENUM_LABEL_51"),
  9070. 52: .same(proto: "ENUM_LABEL_52"),
  9071. 53: .same(proto: "ENUM_LABEL_53"),
  9072. 54: .same(proto: "ENUM_LABEL_54"),
  9073. 55: .same(proto: "ENUM_LABEL_55"),
  9074. 56: .same(proto: "ENUM_LABEL_56"),
  9075. 57: .same(proto: "ENUM_LABEL_57"),
  9076. 58: .same(proto: "ENUM_LABEL_58"),
  9077. 59: .same(proto: "ENUM_LABEL_59"),
  9078. 60: .same(proto: "ENUM_LABEL_60"),
  9079. 61: .same(proto: "ENUM_LABEL_61"),
  9080. 62: .same(proto: "ENUM_LABEL_62"),
  9081. 63: .same(proto: "ENUM_LABEL_63"),
  9082. 64: .same(proto: "ENUM_LABEL_64"),
  9083. 65: .same(proto: "ENUM_LABEL_65"),
  9084. 66: .same(proto: "ENUM_LABEL_66"),
  9085. 67: .same(proto: "ENUM_LABEL_67"),
  9086. 68: .same(proto: "ENUM_LABEL_68"),
  9087. 69: .same(proto: "ENUM_LABEL_69"),
  9088. 70: .same(proto: "ENUM_LABEL_70"),
  9089. 71: .same(proto: "ENUM_LABEL_71"),
  9090. 72: .same(proto: "ENUM_LABEL_72"),
  9091. 73: .same(proto: "ENUM_LABEL_73"),
  9092. 74: .same(proto: "ENUM_LABEL_74"),
  9093. 75: .same(proto: "ENUM_LABEL_75"),
  9094. 76: .same(proto: "ENUM_LABEL_76"),
  9095. 77: .same(proto: "ENUM_LABEL_77"),
  9096. 78: .same(proto: "ENUM_LABEL_78"),
  9097. 79: .same(proto: "ENUM_LABEL_79"),
  9098. 80: .same(proto: "ENUM_LABEL_80"),
  9099. 81: .same(proto: "ENUM_LABEL_81"),
  9100. 82: .same(proto: "ENUM_LABEL_82"),
  9101. 83: .same(proto: "ENUM_LABEL_83"),
  9102. 84: .same(proto: "ENUM_LABEL_84"),
  9103. 85: .same(proto: "ENUM_LABEL_85"),
  9104. 86: .same(proto: "ENUM_LABEL_86"),
  9105. 87: .same(proto: "ENUM_LABEL_87"),
  9106. 88: .same(proto: "ENUM_LABEL_88"),
  9107. 89: .same(proto: "ENUM_LABEL_89"),
  9108. 90: .same(proto: "ENUM_LABEL_90"),
  9109. 91: .same(proto: "ENUM_LABEL_91"),
  9110. 92: .same(proto: "ENUM_LABEL_92"),
  9111. 93: .same(proto: "ENUM_LABEL_93"),
  9112. 94: .same(proto: "ENUM_LABEL_94"),
  9113. 95: .same(proto: "ENUM_LABEL_95"),
  9114. 96: .same(proto: "ENUM_LABEL_96"),
  9115. 97: .same(proto: "ENUM_LABEL_97"),
  9116. 98: .same(proto: "ENUM_LABEL_98"),
  9117. 99: .same(proto: "ENUM_LABEL_99"),
  9118. 100: .same(proto: "ENUM_LABEL_100"),
  9119. ]
  9120. }
  9121. extension Proto2Unittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  9122. static let protoMessageName: String = _protobuf_package + ".TestAllTypes"
  9123. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9124. 1: .standard(proto: "optional_int32"),
  9125. 2: .standard(proto: "optional_int64"),
  9126. 3: .standard(proto: "optional_uint32"),
  9127. 4: .standard(proto: "optional_uint64"),
  9128. 5: .standard(proto: "optional_sint32"),
  9129. 6: .standard(proto: "optional_sint64"),
  9130. 7: .standard(proto: "optional_fixed32"),
  9131. 8: .standard(proto: "optional_fixed64"),
  9132. 9: .standard(proto: "optional_sfixed32"),
  9133. 10: .standard(proto: "optional_sfixed64"),
  9134. 11: .standard(proto: "optional_float"),
  9135. 12: .standard(proto: "optional_double"),
  9136. 13: .standard(proto: "optional_bool"),
  9137. 14: .standard(proto: "optional_string"),
  9138. 15: .standard(proto: "optional_bytes"),
  9139. 16: .same(proto: "optionalgroup"),
  9140. 16: .unique(proto: "OptionalGroup", json: "optionalgroup"),
  9141. 18: .standard(proto: "optional_nested_message"),
  9142. 19: .standard(proto: "optional_foreign_message"),
  9143. 20: .standard(proto: "optional_import_message"),
  9144. 21: .standard(proto: "optional_nested_enum"),
  9145. 22: .standard(proto: "optional_foreign_enum"),
  9146. 23: .standard(proto: "optional_import_enum"),
  9147. 24: .standard(proto: "optional_string_piece"),
  9148. 25: .standard(proto: "optional_cord"),
  9149. 86: .standard(proto: "optional_bytes_cord"),
  9150. 26: .standard(proto: "optional_public_import_message"),
  9151. 27: .standard(proto: "optional_lazy_message"),
  9152. 28: .standard(proto: "optional_unverified_lazy_message"),
  9153. 31: .standard(proto: "repeated_int32"),
  9154. 32: .standard(proto: "repeated_int64"),
  9155. 33: .standard(proto: "repeated_uint32"),
  9156. 34: .standard(proto: "repeated_uint64"),
  9157. 35: .standard(proto: "repeated_sint32"),
  9158. 36: .standard(proto: "repeated_sint64"),
  9159. 37: .standard(proto: "repeated_fixed32"),
  9160. 38: .standard(proto: "repeated_fixed64"),
  9161. 39: .standard(proto: "repeated_sfixed32"),
  9162. 40: .standard(proto: "repeated_sfixed64"),
  9163. 41: .standard(proto: "repeated_float"),
  9164. 42: .standard(proto: "repeated_double"),
  9165. 43: .standard(proto: "repeated_bool"),
  9166. 44: .standard(proto: "repeated_string"),
  9167. 45: .standard(proto: "repeated_bytes"),
  9168. 46: .same(proto: "repeatedgroup"),
  9169. 46: .unique(proto: "RepeatedGroup", json: "repeatedgroup"),
  9170. 48: .standard(proto: "repeated_nested_message"),
  9171. 49: .standard(proto: "repeated_foreign_message"),
  9172. 50: .standard(proto: "repeated_import_message"),
  9173. 51: .standard(proto: "repeated_nested_enum"),
  9174. 52: .standard(proto: "repeated_foreign_enum"),
  9175. 53: .standard(proto: "repeated_import_enum"),
  9176. 54: .standard(proto: "repeated_string_piece"),
  9177. 55: .standard(proto: "repeated_cord"),
  9178. 57: .standard(proto: "repeated_lazy_message"),
  9179. 61: .standard(proto: "default_int32"),
  9180. 62: .standard(proto: "default_int64"),
  9181. 63: .standard(proto: "default_uint32"),
  9182. 64: .standard(proto: "default_uint64"),
  9183. 65: .standard(proto: "default_sint32"),
  9184. 66: .standard(proto: "default_sint64"),
  9185. 67: .standard(proto: "default_fixed32"),
  9186. 68: .standard(proto: "default_fixed64"),
  9187. 69: .standard(proto: "default_sfixed32"),
  9188. 70: .standard(proto: "default_sfixed64"),
  9189. 71: .standard(proto: "default_float"),
  9190. 72: .standard(proto: "default_double"),
  9191. 73: .standard(proto: "default_bool"),
  9192. 74: .standard(proto: "default_string"),
  9193. 75: .standard(proto: "default_bytes"),
  9194. 81: .standard(proto: "default_nested_enum"),
  9195. 82: .standard(proto: "default_foreign_enum"),
  9196. 83: .standard(proto: "default_import_enum"),
  9197. 84: .standard(proto: "default_string_piece"),
  9198. 85: .standard(proto: "default_cord"),
  9199. 111: .standard(proto: "oneof_uint32"),
  9200. 112: .standard(proto: "oneof_nested_message"),
  9201. 113: .standard(proto: "oneof_string"),
  9202. 114: .standard(proto: "oneof_bytes"),
  9203. 115: .standard(proto: "oneof_cord"),
  9204. 116: .standard(proto: "oneof_string_piece"),
  9205. 117: .standard(proto: "oneof_lazy_nested_message"),
  9206. ]
  9207. fileprivate class _StorageClass {
  9208. var _optionalInt32: Int32? = nil
  9209. var _optionalInt64: Int64? = nil
  9210. var _optionalUint32: UInt32? = nil
  9211. var _optionalUint64: UInt64? = nil
  9212. var _optionalSint32: Int32? = nil
  9213. var _optionalSint64: Int64? = nil
  9214. var _optionalFixed32: UInt32? = nil
  9215. var _optionalFixed64: UInt64? = nil
  9216. var _optionalSfixed32: Int32? = nil
  9217. var _optionalSfixed64: Int64? = nil
  9218. var _optionalFloat: Float? = nil
  9219. var _optionalDouble: Double? = nil
  9220. var _optionalBool: Bool? = nil
  9221. var _optionalString: String? = nil
  9222. var _optionalBytes: Data? = nil
  9223. var _optionalGroup: Proto2Unittest_TestAllTypes.OptionalGroup? = nil
  9224. var _optionalNestedMessage: Proto2Unittest_TestAllTypes.NestedMessage? = nil
  9225. var _optionalForeignMessage: Proto2Unittest_ForeignMessage? = nil
  9226. var _optionalImportMessage: Proto2UnittestImport_ImportMessage? = nil
  9227. var _optionalNestedEnum: Proto2Unittest_TestAllTypes.NestedEnum? = nil
  9228. var _optionalForeignEnum: Proto2Unittest_ForeignEnum? = nil
  9229. var _optionalImportEnum: Proto2UnittestImport_ImportEnum? = nil
  9230. var _optionalStringPiece: String? = nil
  9231. var _optionalCord: String? = nil
  9232. var _optionalBytesCord: Data? = nil
  9233. var _optionalPublicImportMessage: Proto2UnittestImport_PublicImportMessage? = nil
  9234. var _optionalLazyMessage: Proto2Unittest_TestAllTypes.NestedMessage? = nil
  9235. var _optionalUnverifiedLazyMessage: Proto2Unittest_TestAllTypes.NestedMessage? = nil
  9236. var _repeatedInt32: [Int32] = []
  9237. var _repeatedInt64: [Int64] = []
  9238. var _repeatedUint32: [UInt32] = []
  9239. var _repeatedUint64: [UInt64] = []
  9240. var _repeatedSint32: [Int32] = []
  9241. var _repeatedSint64: [Int64] = []
  9242. var _repeatedFixed32: [UInt32] = []
  9243. var _repeatedFixed64: [UInt64] = []
  9244. var _repeatedSfixed32: [Int32] = []
  9245. var _repeatedSfixed64: [Int64] = []
  9246. var _repeatedFloat: [Float] = []
  9247. var _repeatedDouble: [Double] = []
  9248. var _repeatedBool: [Bool] = []
  9249. var _repeatedString: [String] = []
  9250. var _repeatedBytes: [Data] = []
  9251. var _repeatedGroup: [Proto2Unittest_TestAllTypes.RepeatedGroup] = []
  9252. var _repeatedNestedMessage: [Proto2Unittest_TestAllTypes.NestedMessage] = []
  9253. var _repeatedForeignMessage: [Proto2Unittest_ForeignMessage] = []
  9254. var _repeatedImportMessage: [Proto2UnittestImport_ImportMessage] = []
  9255. var _repeatedNestedEnum: [Proto2Unittest_TestAllTypes.NestedEnum] = []
  9256. var _repeatedForeignEnum: [Proto2Unittest_ForeignEnum] = []
  9257. var _repeatedImportEnum: [Proto2UnittestImport_ImportEnum] = []
  9258. var _repeatedStringPiece: [String] = []
  9259. var _repeatedCord: [String] = []
  9260. var _repeatedLazyMessage: [Proto2Unittest_TestAllTypes.NestedMessage] = []
  9261. var _defaultInt32: Int32? = nil
  9262. var _defaultInt64: Int64? = nil
  9263. var _defaultUint32: UInt32? = nil
  9264. var _defaultUint64: UInt64? = nil
  9265. var _defaultSint32: Int32? = nil
  9266. var _defaultSint64: Int64? = nil
  9267. var _defaultFixed32: UInt32? = nil
  9268. var _defaultFixed64: UInt64? = nil
  9269. var _defaultSfixed32: Int32? = nil
  9270. var _defaultSfixed64: Int64? = nil
  9271. var _defaultFloat: Float? = nil
  9272. var _defaultDouble: Double? = nil
  9273. var _defaultBool: Bool? = nil
  9274. var _defaultString: String? = nil
  9275. var _defaultBytes: Data? = nil
  9276. var _defaultNestedEnum: Proto2Unittest_TestAllTypes.NestedEnum? = nil
  9277. var _defaultForeignEnum: Proto2Unittest_ForeignEnum? = nil
  9278. var _defaultImportEnum: Proto2UnittestImport_ImportEnum? = nil
  9279. var _defaultStringPiece: String? = nil
  9280. var _defaultCord: String? = nil
  9281. var _oneofField: Proto2Unittest_TestAllTypes.OneOf_OneofField?
  9282. // This property is used as the initial default value for new instances of the type.
  9283. // The type itself is protecting the reference to its storage via CoW semantics.
  9284. // This will force a copy to be made of this reference when the first mutation occurs;
  9285. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  9286. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  9287. private init() {}
  9288. init(copying source: _StorageClass) {
  9289. _optionalInt32 = source._optionalInt32
  9290. _optionalInt64 = source._optionalInt64
  9291. _optionalUint32 = source._optionalUint32
  9292. _optionalUint64 = source._optionalUint64
  9293. _optionalSint32 = source._optionalSint32
  9294. _optionalSint64 = source._optionalSint64
  9295. _optionalFixed32 = source._optionalFixed32
  9296. _optionalFixed64 = source._optionalFixed64
  9297. _optionalSfixed32 = source._optionalSfixed32
  9298. _optionalSfixed64 = source._optionalSfixed64
  9299. _optionalFloat = source._optionalFloat
  9300. _optionalDouble = source._optionalDouble
  9301. _optionalBool = source._optionalBool
  9302. _optionalString = source._optionalString
  9303. _optionalBytes = source._optionalBytes
  9304. _optionalGroup = source._optionalGroup
  9305. _optionalNestedMessage = source._optionalNestedMessage
  9306. _optionalForeignMessage = source._optionalForeignMessage
  9307. _optionalImportMessage = source._optionalImportMessage
  9308. _optionalNestedEnum = source._optionalNestedEnum
  9309. _optionalForeignEnum = source._optionalForeignEnum
  9310. _optionalImportEnum = source._optionalImportEnum
  9311. _optionalStringPiece = source._optionalStringPiece
  9312. _optionalCord = source._optionalCord
  9313. _optionalBytesCord = source._optionalBytesCord
  9314. _optionalPublicImportMessage = source._optionalPublicImportMessage
  9315. _optionalLazyMessage = source._optionalLazyMessage
  9316. _optionalUnverifiedLazyMessage = source._optionalUnverifiedLazyMessage
  9317. _repeatedInt32 = source._repeatedInt32
  9318. _repeatedInt64 = source._repeatedInt64
  9319. _repeatedUint32 = source._repeatedUint32
  9320. _repeatedUint64 = source._repeatedUint64
  9321. _repeatedSint32 = source._repeatedSint32
  9322. _repeatedSint64 = source._repeatedSint64
  9323. _repeatedFixed32 = source._repeatedFixed32
  9324. _repeatedFixed64 = source._repeatedFixed64
  9325. _repeatedSfixed32 = source._repeatedSfixed32
  9326. _repeatedSfixed64 = source._repeatedSfixed64
  9327. _repeatedFloat = source._repeatedFloat
  9328. _repeatedDouble = source._repeatedDouble
  9329. _repeatedBool = source._repeatedBool
  9330. _repeatedString = source._repeatedString
  9331. _repeatedBytes = source._repeatedBytes
  9332. _repeatedGroup = source._repeatedGroup
  9333. _repeatedNestedMessage = source._repeatedNestedMessage
  9334. _repeatedForeignMessage = source._repeatedForeignMessage
  9335. _repeatedImportMessage = source._repeatedImportMessage
  9336. _repeatedNestedEnum = source._repeatedNestedEnum
  9337. _repeatedForeignEnum = source._repeatedForeignEnum
  9338. _repeatedImportEnum = source._repeatedImportEnum
  9339. _repeatedStringPiece = source._repeatedStringPiece
  9340. _repeatedCord = source._repeatedCord
  9341. _repeatedLazyMessage = source._repeatedLazyMessage
  9342. _defaultInt32 = source._defaultInt32
  9343. _defaultInt64 = source._defaultInt64
  9344. _defaultUint32 = source._defaultUint32
  9345. _defaultUint64 = source._defaultUint64
  9346. _defaultSint32 = source._defaultSint32
  9347. _defaultSint64 = source._defaultSint64
  9348. _defaultFixed32 = source._defaultFixed32
  9349. _defaultFixed64 = source._defaultFixed64
  9350. _defaultSfixed32 = source._defaultSfixed32
  9351. _defaultSfixed64 = source._defaultSfixed64
  9352. _defaultFloat = source._defaultFloat
  9353. _defaultDouble = source._defaultDouble
  9354. _defaultBool = source._defaultBool
  9355. _defaultString = source._defaultString
  9356. _defaultBytes = source._defaultBytes
  9357. _defaultNestedEnum = source._defaultNestedEnum
  9358. _defaultForeignEnum = source._defaultForeignEnum
  9359. _defaultImportEnum = source._defaultImportEnum
  9360. _defaultStringPiece = source._defaultStringPiece
  9361. _defaultCord = source._defaultCord
  9362. _oneofField = source._oneofField
  9363. }
  9364. }
  9365. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  9366. if !isKnownUniquelyReferenced(&_storage) {
  9367. _storage = _StorageClass(copying: _storage)
  9368. }
  9369. return _storage
  9370. }
  9371. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  9372. _ = _uniqueStorage()
  9373. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  9374. while let fieldNumber = try decoder.nextFieldNumber() {
  9375. // The use of inline closures is to circumvent an issue where the compiler
  9376. // allocates stack space for every case branch when no optimizations are
  9377. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  9378. switch fieldNumber {
  9379. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) }()
  9380. case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) }()
  9381. case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) }()
  9382. case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) }()
  9383. case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) }()
  9384. case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) }()
  9385. case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) }()
  9386. case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) }()
  9387. case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) }()
  9388. case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) }()
  9389. case 11: try { try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) }()
  9390. case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) }()
  9391. case 13: try { try decoder.decodeSingularBoolField(value: &_storage._optionalBool) }()
  9392. case 14: try { try decoder.decodeSingularStringField(value: &_storage._optionalString) }()
  9393. case 15: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) }()
  9394. case 16: try { try decoder.decodeSingularGroupField(value: &_storage._optionalGroup) }()
  9395. case 18: try { try decoder.decodeSingularMessageField(value: &_storage._optionalNestedMessage) }()
  9396. case 19: try { try decoder.decodeSingularMessageField(value: &_storage._optionalForeignMessage) }()
  9397. case 20: try { try decoder.decodeSingularMessageField(value: &_storage._optionalImportMessage) }()
  9398. case 21: try { try decoder.decodeSingularEnumField(value: &_storage._optionalNestedEnum) }()
  9399. case 22: try { try decoder.decodeSingularEnumField(value: &_storage._optionalForeignEnum) }()
  9400. case 23: try { try decoder.decodeSingularEnumField(value: &_storage._optionalImportEnum) }()
  9401. case 24: try { try decoder.decodeSingularStringField(value: &_storage._optionalStringPiece) }()
  9402. case 25: try { try decoder.decodeSingularStringField(value: &_storage._optionalCord) }()
  9403. case 26: try { try decoder.decodeSingularMessageField(value: &_storage._optionalPublicImportMessage) }()
  9404. case 27: try { try decoder.decodeSingularMessageField(value: &_storage._optionalLazyMessage) }()
  9405. case 28: try { try decoder.decodeSingularMessageField(value: &_storage._optionalUnverifiedLazyMessage) }()
  9406. case 31: try { try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) }()
  9407. case 32: try { try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) }()
  9408. case 33: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) }()
  9409. case 34: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) }()
  9410. case 35: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) }()
  9411. case 36: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) }()
  9412. case 37: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) }()
  9413. case 38: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) }()
  9414. case 39: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) }()
  9415. case 40: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) }()
  9416. case 41: try { try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) }()
  9417. case 42: try { try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) }()
  9418. case 43: try { try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) }()
  9419. case 44: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) }()
  9420. case 45: try { try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) }()
  9421. case 46: try { try decoder.decodeRepeatedGroupField(value: &_storage._repeatedGroup) }()
  9422. case 48: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNestedMessage) }()
  9423. case 49: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedForeignMessage) }()
  9424. case 50: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedImportMessage) }()
  9425. case 51: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedNestedEnum) }()
  9426. case 52: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedForeignEnum) }()
  9427. case 53: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedImportEnum) }()
  9428. case 54: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece) }()
  9429. case 55: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord) }()
  9430. case 57: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedLazyMessage) }()
  9431. case 61: try { try decoder.decodeSingularInt32Field(value: &_storage._defaultInt32) }()
  9432. case 62: try { try decoder.decodeSingularInt64Field(value: &_storage._defaultInt64) }()
  9433. case 63: try { try decoder.decodeSingularUInt32Field(value: &_storage._defaultUint32) }()
  9434. case 64: try { try decoder.decodeSingularUInt64Field(value: &_storage._defaultUint64) }()
  9435. case 65: try { try decoder.decodeSingularSInt32Field(value: &_storage._defaultSint32) }()
  9436. case 66: try { try decoder.decodeSingularSInt64Field(value: &_storage._defaultSint64) }()
  9437. case 67: try { try decoder.decodeSingularFixed32Field(value: &_storage._defaultFixed32) }()
  9438. case 68: try { try decoder.decodeSingularFixed64Field(value: &_storage._defaultFixed64) }()
  9439. case 69: try { try decoder.decodeSingularSFixed32Field(value: &_storage._defaultSfixed32) }()
  9440. case 70: try { try decoder.decodeSingularSFixed64Field(value: &_storage._defaultSfixed64) }()
  9441. case 71: try { try decoder.decodeSingularFloatField(value: &_storage._defaultFloat) }()
  9442. case 72: try { try decoder.decodeSingularDoubleField(value: &_storage._defaultDouble) }()
  9443. case 73: try { try decoder.decodeSingularBoolField(value: &_storage._defaultBool) }()
  9444. case 74: try { try decoder.decodeSingularStringField(value: &_storage._defaultString) }()
  9445. case 75: try { try decoder.decodeSingularBytesField(value: &_storage._defaultBytes) }()
  9446. case 81: try { try decoder.decodeSingularEnumField(value: &_storage._defaultNestedEnum) }()
  9447. case 82: try { try decoder.decodeSingularEnumField(value: &_storage._defaultForeignEnum) }()
  9448. case 83: try { try decoder.decodeSingularEnumField(value: &_storage._defaultImportEnum) }()
  9449. case 84: try { try decoder.decodeSingularStringField(value: &_storage._defaultStringPiece) }()
  9450. case 85: try { try decoder.decodeSingularStringField(value: &_storage._defaultCord) }()
  9451. case 86: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytesCord) }()
  9452. case 111: try {
  9453. var v: UInt32?
  9454. try decoder.decodeSingularUInt32Field(value: &v)
  9455. if let v = v {
  9456. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  9457. _storage._oneofField = .oneofUint32(v)
  9458. }
  9459. }()
  9460. case 112: try {
  9461. var v: Proto2Unittest_TestAllTypes.NestedMessage?
  9462. var hadOneofValue = false
  9463. if let current = _storage._oneofField {
  9464. hadOneofValue = true
  9465. if case .oneofNestedMessage(let m) = current {v = m}
  9466. }
  9467. try decoder.decodeSingularMessageField(value: &v)
  9468. if let v = v {
  9469. if hadOneofValue {try decoder.handleConflictingOneOf()}
  9470. _storage._oneofField = .oneofNestedMessage(v)
  9471. }
  9472. }()
  9473. case 113: try {
  9474. var v: String?
  9475. try decoder.decodeSingularStringField(value: &v)
  9476. if let v = v {
  9477. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  9478. _storage._oneofField = .oneofString(v)
  9479. }
  9480. }()
  9481. case 114: try {
  9482. var v: Data?
  9483. try decoder.decodeSingularBytesField(value: &v)
  9484. if let v = v {
  9485. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  9486. _storage._oneofField = .oneofBytes(v)
  9487. }
  9488. }()
  9489. case 115: try {
  9490. var v: String?
  9491. try decoder.decodeSingularStringField(value: &v)
  9492. if let v = v {
  9493. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  9494. _storage._oneofField = .oneofCord(v)
  9495. }
  9496. }()
  9497. case 116: try {
  9498. var v: String?
  9499. try decoder.decodeSingularStringField(value: &v)
  9500. if let v = v {
  9501. if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
  9502. _storage._oneofField = .oneofStringPiece(v)
  9503. }
  9504. }()
  9505. case 117: try {
  9506. var v: Proto2Unittest_TestAllTypes.NestedMessage?
  9507. var hadOneofValue = false
  9508. if let current = _storage._oneofField {
  9509. hadOneofValue = true
  9510. if case .oneofLazyNestedMessage(let m) = current {v = m}
  9511. }
  9512. try decoder.decodeSingularMessageField(value: &v)
  9513. if let v = v {
  9514. if hadOneofValue {try decoder.handleConflictingOneOf()}
  9515. _storage._oneofField = .oneofLazyNestedMessage(v)
  9516. }
  9517. }()
  9518. default: break
  9519. }
  9520. }
  9521. }
  9522. }
  9523. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  9524. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  9525. // The use of inline closures is to circumvent an issue where the compiler
  9526. // allocates stack space for every if/case branch local when no optimizations
  9527. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  9528. // https://github.com/apple/swift-protobuf/issues/1182
  9529. try { if let v = _storage._optionalInt32 {
  9530. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  9531. } }()
  9532. try { if let v = _storage._optionalInt64 {
  9533. try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
  9534. } }()
  9535. try { if let v = _storage._optionalUint32 {
  9536. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
  9537. } }()
  9538. try { if let v = _storage._optionalUint64 {
  9539. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
  9540. } }()
  9541. try { if let v = _storage._optionalSint32 {
  9542. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5)
  9543. } }()
  9544. try { if let v = _storage._optionalSint64 {
  9545. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6)
  9546. } }()
  9547. try { if let v = _storage._optionalFixed32 {
  9548. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7)
  9549. } }()
  9550. try { if let v = _storage._optionalFixed64 {
  9551. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8)
  9552. } }()
  9553. try { if let v = _storage._optionalSfixed32 {
  9554. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9)
  9555. } }()
  9556. try { if let v = _storage._optionalSfixed64 {
  9557. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10)
  9558. } }()
  9559. try { if let v = _storage._optionalFloat {
  9560. try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
  9561. } }()
  9562. try { if let v = _storage._optionalDouble {
  9563. try visitor.visitSingularDoubleField(value: v, fieldNumber: 12)
  9564. } }()
  9565. try { if let v = _storage._optionalBool {
  9566. try visitor.visitSingularBoolField(value: v, fieldNumber: 13)
  9567. } }()
  9568. try { if let v = _storage._optionalString {
  9569. try visitor.visitSingularStringField(value: v, fieldNumber: 14)
  9570. } }()
  9571. try { if let v = _storage._optionalBytes {
  9572. try visitor.visitSingularBytesField(value: v, fieldNumber: 15)
  9573. } }()
  9574. try { if let v = _storage._optionalGroup {
  9575. try visitor.visitSingularGroupField(value: v, fieldNumber: 16)
  9576. } }()
  9577. try { if let v = _storage._optionalNestedMessage {
  9578. try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
  9579. } }()
  9580. try { if let v = _storage._optionalForeignMessage {
  9581. try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
  9582. } }()
  9583. try { if let v = _storage._optionalImportMessage {
  9584. try visitor.visitSingularMessageField(value: v, fieldNumber: 20)
  9585. } }()
  9586. try { if let v = _storage._optionalNestedEnum {
  9587. try visitor.visitSingularEnumField(value: v, fieldNumber: 21)
  9588. } }()
  9589. try { if let v = _storage._optionalForeignEnum {
  9590. try visitor.visitSingularEnumField(value: v, fieldNumber: 22)
  9591. } }()
  9592. try { if let v = _storage._optionalImportEnum {
  9593. try visitor.visitSingularEnumField(value: v, fieldNumber: 23)
  9594. } }()
  9595. try { if let v = _storage._optionalStringPiece {
  9596. try visitor.visitSingularStringField(value: v, fieldNumber: 24)
  9597. } }()
  9598. try { if let v = _storage._optionalCord {
  9599. try visitor.visitSingularStringField(value: v, fieldNumber: 25)
  9600. } }()
  9601. try { if let v = _storage._optionalPublicImportMessage {
  9602. try visitor.visitSingularMessageField(value: v, fieldNumber: 26)
  9603. } }()
  9604. try { if let v = _storage._optionalLazyMessage {
  9605. try visitor.visitSingularMessageField(value: v, fieldNumber: 27)
  9606. } }()
  9607. try { if let v = _storage._optionalUnverifiedLazyMessage {
  9608. try visitor.visitSingularMessageField(value: v, fieldNumber: 28)
  9609. } }()
  9610. if !_storage._repeatedInt32.isEmpty {
  9611. try visitor.visitRepeatedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31)
  9612. }
  9613. if !_storage._repeatedInt64.isEmpty {
  9614. try visitor.visitRepeatedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32)
  9615. }
  9616. if !_storage._repeatedUint32.isEmpty {
  9617. try visitor.visitRepeatedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33)
  9618. }
  9619. if !_storage._repeatedUint64.isEmpty {
  9620. try visitor.visitRepeatedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34)
  9621. }
  9622. if !_storage._repeatedSint32.isEmpty {
  9623. try visitor.visitRepeatedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35)
  9624. }
  9625. if !_storage._repeatedSint64.isEmpty {
  9626. try visitor.visitRepeatedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36)
  9627. }
  9628. if !_storage._repeatedFixed32.isEmpty {
  9629. try visitor.visitRepeatedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37)
  9630. }
  9631. if !_storage._repeatedFixed64.isEmpty {
  9632. try visitor.visitRepeatedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38)
  9633. }
  9634. if !_storage._repeatedSfixed32.isEmpty {
  9635. try visitor.visitRepeatedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39)
  9636. }
  9637. if !_storage._repeatedSfixed64.isEmpty {
  9638. try visitor.visitRepeatedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40)
  9639. }
  9640. if !_storage._repeatedFloat.isEmpty {
  9641. try visitor.visitRepeatedFloatField(value: _storage._repeatedFloat, fieldNumber: 41)
  9642. }
  9643. if !_storage._repeatedDouble.isEmpty {
  9644. try visitor.visitRepeatedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42)
  9645. }
  9646. if !_storage._repeatedBool.isEmpty {
  9647. try visitor.visitRepeatedBoolField(value: _storage._repeatedBool, fieldNumber: 43)
  9648. }
  9649. if !_storage._repeatedString.isEmpty {
  9650. try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44)
  9651. }
  9652. if !_storage._repeatedBytes.isEmpty {
  9653. try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45)
  9654. }
  9655. if !_storage._repeatedGroup.isEmpty {
  9656. try visitor.visitRepeatedGroupField(value: _storage._repeatedGroup, fieldNumber: 46)
  9657. }
  9658. if !_storage._repeatedNestedMessage.isEmpty {
  9659. try visitor.visitRepeatedMessageField(value: _storage._repeatedNestedMessage, fieldNumber: 48)
  9660. }
  9661. if !_storage._repeatedForeignMessage.isEmpty {
  9662. try visitor.visitRepeatedMessageField(value: _storage._repeatedForeignMessage, fieldNumber: 49)
  9663. }
  9664. if !_storage._repeatedImportMessage.isEmpty {
  9665. try visitor.visitRepeatedMessageField(value: _storage._repeatedImportMessage, fieldNumber: 50)
  9666. }
  9667. if !_storage._repeatedNestedEnum.isEmpty {
  9668. try visitor.visitRepeatedEnumField(value: _storage._repeatedNestedEnum, fieldNumber: 51)
  9669. }
  9670. if !_storage._repeatedForeignEnum.isEmpty {
  9671. try visitor.visitRepeatedEnumField(value: _storage._repeatedForeignEnum, fieldNumber: 52)
  9672. }
  9673. if !_storage._repeatedImportEnum.isEmpty {
  9674. try visitor.visitRepeatedEnumField(value: _storage._repeatedImportEnum, fieldNumber: 53)
  9675. }
  9676. if !_storage._repeatedStringPiece.isEmpty {
  9677. try visitor.visitRepeatedStringField(value: _storage._repeatedStringPiece, fieldNumber: 54)
  9678. }
  9679. if !_storage._repeatedCord.isEmpty {
  9680. try visitor.visitRepeatedStringField(value: _storage._repeatedCord, fieldNumber: 55)
  9681. }
  9682. if !_storage._repeatedLazyMessage.isEmpty {
  9683. try visitor.visitRepeatedMessageField(value: _storage._repeatedLazyMessage, fieldNumber: 57)
  9684. }
  9685. try { if let v = _storage._defaultInt32 {
  9686. try visitor.visitSingularInt32Field(value: v, fieldNumber: 61)
  9687. } }()
  9688. try { if let v = _storage._defaultInt64 {
  9689. try visitor.visitSingularInt64Field(value: v, fieldNumber: 62)
  9690. } }()
  9691. try { if let v = _storage._defaultUint32 {
  9692. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 63)
  9693. } }()
  9694. try { if let v = _storage._defaultUint64 {
  9695. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 64)
  9696. } }()
  9697. try { if let v = _storage._defaultSint32 {
  9698. try visitor.visitSingularSInt32Field(value: v, fieldNumber: 65)
  9699. } }()
  9700. try { if let v = _storage._defaultSint64 {
  9701. try visitor.visitSingularSInt64Field(value: v, fieldNumber: 66)
  9702. } }()
  9703. try { if let v = _storage._defaultFixed32 {
  9704. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 67)
  9705. } }()
  9706. try { if let v = _storage._defaultFixed64 {
  9707. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 68)
  9708. } }()
  9709. try { if let v = _storage._defaultSfixed32 {
  9710. try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 69)
  9711. } }()
  9712. try { if let v = _storage._defaultSfixed64 {
  9713. try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 70)
  9714. } }()
  9715. try { if let v = _storage._defaultFloat {
  9716. try visitor.visitSingularFloatField(value: v, fieldNumber: 71)
  9717. } }()
  9718. try { if let v = _storage._defaultDouble {
  9719. try visitor.visitSingularDoubleField(value: v, fieldNumber: 72)
  9720. } }()
  9721. try { if let v = _storage._defaultBool {
  9722. try visitor.visitSingularBoolField(value: v, fieldNumber: 73)
  9723. } }()
  9724. try { if let v = _storage._defaultString {
  9725. try visitor.visitSingularStringField(value: v, fieldNumber: 74)
  9726. } }()
  9727. try { if let v = _storage._defaultBytes {
  9728. try visitor.visitSingularBytesField(value: v, fieldNumber: 75)
  9729. } }()
  9730. try { if let v = _storage._defaultNestedEnum {
  9731. try visitor.visitSingularEnumField(value: v, fieldNumber: 81)
  9732. } }()
  9733. try { if let v = _storage._defaultForeignEnum {
  9734. try visitor.visitSingularEnumField(value: v, fieldNumber: 82)
  9735. } }()
  9736. try { if let v = _storage._defaultImportEnum {
  9737. try visitor.visitSingularEnumField(value: v, fieldNumber: 83)
  9738. } }()
  9739. try { if let v = _storage._defaultStringPiece {
  9740. try visitor.visitSingularStringField(value: v, fieldNumber: 84)
  9741. } }()
  9742. try { if let v = _storage._defaultCord {
  9743. try visitor.visitSingularStringField(value: v, fieldNumber: 85)
  9744. } }()
  9745. try { if let v = _storage._optionalBytesCord {
  9746. try visitor.visitSingularBytesField(value: v, fieldNumber: 86)
  9747. } }()
  9748. switch _storage._oneofField {
  9749. case .oneofUint32?: try {
  9750. guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() }
  9751. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 111)
  9752. }()
  9753. case .oneofNestedMessage?: try {
  9754. guard case .oneofNestedMessage(let v)? = _storage._oneofField else { preconditionFailure() }
  9755. try visitor.visitSingularMessageField(value: v, fieldNumber: 112)
  9756. }()
  9757. case .oneofString?: try {
  9758. guard case .oneofString(let v)? = _storage._oneofField else { preconditionFailure() }
  9759. try visitor.visitSingularStringField(value: v, fieldNumber: 113)
  9760. }()
  9761. case .oneofBytes?: try {
  9762. guard case .oneofBytes(let v)? = _storage._oneofField else { preconditionFailure() }
  9763. try visitor.visitSingularBytesField(value: v, fieldNumber: 114)
  9764. }()
  9765. case .oneofCord?: try {
  9766. guard case .oneofCord(let v)? = _storage._oneofField else { preconditionFailure() }
  9767. try visitor.visitSingularStringField(value: v, fieldNumber: 115)
  9768. }()
  9769. case .oneofStringPiece?: try {
  9770. guard case .oneofStringPiece(let v)? = _storage._oneofField else { preconditionFailure() }
  9771. try visitor.visitSingularStringField(value: v, fieldNumber: 116)
  9772. }()
  9773. case .oneofLazyNestedMessage?: try {
  9774. guard case .oneofLazyNestedMessage(let v)? = _storage._oneofField else { preconditionFailure() }
  9775. try visitor.visitSingularMessageField(value: v, fieldNumber: 117)
  9776. }()
  9777. case nil: break
  9778. }
  9779. }
  9780. try unknownFields.traverse(visitor: &visitor)
  9781. }
  9782. static func ==(lhs: Proto2Unittest_TestAllTypes, rhs: Proto2Unittest_TestAllTypes) -> Bool {
  9783. if lhs._storage !== rhs._storage {
  9784. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  9785. let _storage = _args.0
  9786. let rhs_storage = _args.1
  9787. if _storage._optionalInt32 != rhs_storage._optionalInt32 {return false}
  9788. if _storage._optionalInt64 != rhs_storage._optionalInt64 {return false}
  9789. if _storage._optionalUint32 != rhs_storage._optionalUint32 {return false}
  9790. if _storage._optionalUint64 != rhs_storage._optionalUint64 {return false}
  9791. if _storage._optionalSint32 != rhs_storage._optionalSint32 {return false}
  9792. if _storage._optionalSint64 != rhs_storage._optionalSint64 {return false}
  9793. if _storage._optionalFixed32 != rhs_storage._optionalFixed32 {return false}
  9794. if _storage._optionalFixed64 != rhs_storage._optionalFixed64 {return false}
  9795. if _storage._optionalSfixed32 != rhs_storage._optionalSfixed32 {return false}
  9796. if _storage._optionalSfixed64 != rhs_storage._optionalSfixed64 {return false}
  9797. if _storage._optionalFloat != rhs_storage._optionalFloat {return false}
  9798. if _storage._optionalDouble != rhs_storage._optionalDouble {return false}
  9799. if _storage._optionalBool != rhs_storage._optionalBool {return false}
  9800. if _storage._optionalString != rhs_storage._optionalString {return false}
  9801. if _storage._optionalBytes != rhs_storage._optionalBytes {return false}
  9802. if _storage._optionalGroup != rhs_storage._optionalGroup {return false}
  9803. if _storage._optionalNestedMessage != rhs_storage._optionalNestedMessage {return false}
  9804. if _storage._optionalForeignMessage != rhs_storage._optionalForeignMessage {return false}
  9805. if _storage._optionalImportMessage != rhs_storage._optionalImportMessage {return false}
  9806. if _storage._optionalNestedEnum != rhs_storage._optionalNestedEnum {return false}
  9807. if _storage._optionalForeignEnum != rhs_storage._optionalForeignEnum {return false}
  9808. if _storage._optionalImportEnum != rhs_storage._optionalImportEnum {return false}
  9809. if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false}
  9810. if _storage._optionalCord != rhs_storage._optionalCord {return false}
  9811. if _storage._optionalBytesCord != rhs_storage._optionalBytesCord {return false}
  9812. if _storage._optionalPublicImportMessage != rhs_storage._optionalPublicImportMessage {return false}
  9813. if _storage._optionalLazyMessage != rhs_storage._optionalLazyMessage {return false}
  9814. if _storage._optionalUnverifiedLazyMessage != rhs_storage._optionalUnverifiedLazyMessage {return false}
  9815. if _storage._repeatedInt32 != rhs_storage._repeatedInt32 {return false}
  9816. if _storage._repeatedInt64 != rhs_storage._repeatedInt64 {return false}
  9817. if _storage._repeatedUint32 != rhs_storage._repeatedUint32 {return false}
  9818. if _storage._repeatedUint64 != rhs_storage._repeatedUint64 {return false}
  9819. if _storage._repeatedSint32 != rhs_storage._repeatedSint32 {return false}
  9820. if _storage._repeatedSint64 != rhs_storage._repeatedSint64 {return false}
  9821. if _storage._repeatedFixed32 != rhs_storage._repeatedFixed32 {return false}
  9822. if _storage._repeatedFixed64 != rhs_storage._repeatedFixed64 {return false}
  9823. if _storage._repeatedSfixed32 != rhs_storage._repeatedSfixed32 {return false}
  9824. if _storage._repeatedSfixed64 != rhs_storage._repeatedSfixed64 {return false}
  9825. if _storage._repeatedFloat != rhs_storage._repeatedFloat {return false}
  9826. if _storage._repeatedDouble != rhs_storage._repeatedDouble {return false}
  9827. if _storage._repeatedBool != rhs_storage._repeatedBool {return false}
  9828. if _storage._repeatedString != rhs_storage._repeatedString {return false}
  9829. if _storage._repeatedBytes != rhs_storage._repeatedBytes {return false}
  9830. if _storage._repeatedGroup != rhs_storage._repeatedGroup {return false}
  9831. if _storage._repeatedNestedMessage != rhs_storage._repeatedNestedMessage {return false}
  9832. if _storage._repeatedForeignMessage != rhs_storage._repeatedForeignMessage {return false}
  9833. if _storage._repeatedImportMessage != rhs_storage._repeatedImportMessage {return false}
  9834. if _storage._repeatedNestedEnum != rhs_storage._repeatedNestedEnum {return false}
  9835. if _storage._repeatedForeignEnum != rhs_storage._repeatedForeignEnum {return false}
  9836. if _storage._repeatedImportEnum != rhs_storage._repeatedImportEnum {return false}
  9837. if _storage._repeatedStringPiece != rhs_storage._repeatedStringPiece {return false}
  9838. if _storage._repeatedCord != rhs_storage._repeatedCord {return false}
  9839. if _storage._repeatedLazyMessage != rhs_storage._repeatedLazyMessage {return false}
  9840. if _storage._defaultInt32 != rhs_storage._defaultInt32 {return false}
  9841. if _storage._defaultInt64 != rhs_storage._defaultInt64 {return false}
  9842. if _storage._defaultUint32 != rhs_storage._defaultUint32 {return false}
  9843. if _storage._defaultUint64 != rhs_storage._defaultUint64 {return false}
  9844. if _storage._defaultSint32 != rhs_storage._defaultSint32 {return false}
  9845. if _storage._defaultSint64 != rhs_storage._defaultSint64 {return false}
  9846. if _storage._defaultFixed32 != rhs_storage._defaultFixed32 {return false}
  9847. if _storage._defaultFixed64 != rhs_storage._defaultFixed64 {return false}
  9848. if _storage._defaultSfixed32 != rhs_storage._defaultSfixed32 {return false}
  9849. if _storage._defaultSfixed64 != rhs_storage._defaultSfixed64 {return false}
  9850. if _storage._defaultFloat != rhs_storage._defaultFloat {return false}
  9851. if _storage._defaultDouble != rhs_storage._defaultDouble {return false}
  9852. if _storage._defaultBool != rhs_storage._defaultBool {return false}
  9853. if _storage._defaultString != rhs_storage._defaultString {return false}
  9854. if _storage._defaultBytes != rhs_storage._defaultBytes {return false}
  9855. if _storage._defaultNestedEnum != rhs_storage._defaultNestedEnum {return false}
  9856. if _storage._defaultForeignEnum != rhs_storage._defaultForeignEnum {return false}
  9857. if _storage._defaultImportEnum != rhs_storage._defaultImportEnum {return false}
  9858. if _storage._defaultStringPiece != rhs_storage._defaultStringPiece {return false}
  9859. if _storage._defaultCord != rhs_storage._defaultCord {return false}
  9860. if _storage._oneofField != rhs_storage._oneofField {return false}
  9861. return true
  9862. }
  9863. if !storagesAreEqual {return false}
  9864. }
  9865. if lhs.unknownFields != rhs.unknownFields {return false}
  9866. return true
  9867. }
  9868. }
  9869. extension Proto2Unittest_TestAllTypes.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  9870. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9871. -1: .same(proto: "NEG"),
  9872. 1: .same(proto: "FOO"),
  9873. 2: .same(proto: "BAR"),
  9874. 3: .same(proto: "BAZ"),
  9875. ]
  9876. }
  9877. extension Proto2Unittest_TestAllTypes.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  9878. static let protoMessageName: String = Proto2Unittest_TestAllTypes.protoMessageName + ".NestedMessage"
  9879. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9880. 1: .same(proto: "bb"),
  9881. ]
  9882. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  9883. while let fieldNumber = try decoder.nextFieldNumber() {
  9884. // The use of inline closures is to circumvent an issue where the compiler
  9885. // allocates stack space for every case branch when no optimizations are
  9886. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  9887. switch fieldNumber {
  9888. case 1: try { try decoder.decodeSingularInt32Field(value: &self._bb) }()
  9889. default: break
  9890. }
  9891. }
  9892. }
  9893. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  9894. // The use of inline closures is to circumvent an issue where the compiler
  9895. // allocates stack space for every if/case branch local when no optimizations
  9896. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  9897. // https://github.com/apple/swift-protobuf/issues/1182
  9898. try { if let v = self._bb {
  9899. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  9900. } }()
  9901. try unknownFields.traverse(visitor: &visitor)
  9902. }
  9903. static func ==(lhs: Proto2Unittest_TestAllTypes.NestedMessage, rhs: Proto2Unittest_TestAllTypes.NestedMessage) -> Bool {
  9904. if lhs._bb != rhs._bb {return false}
  9905. if lhs.unknownFields != rhs.unknownFields {return false}
  9906. return true
  9907. }
  9908. }
  9909. extension Proto2Unittest_TestAllTypes.OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  9910. static let protoMessageName: String = Proto2Unittest_TestAllTypes.protoMessageName + ".OptionalGroup"
  9911. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9912. 17: .same(proto: "a"),
  9913. ]
  9914. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  9915. while let fieldNumber = try decoder.nextFieldNumber() {
  9916. // The use of inline closures is to circumvent an issue where the compiler
  9917. // allocates stack space for every case branch when no optimizations are
  9918. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  9919. switch fieldNumber {
  9920. case 17: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  9921. default: break
  9922. }
  9923. }
  9924. }
  9925. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  9926. // The use of inline closures is to circumvent an issue where the compiler
  9927. // allocates stack space for every if/case branch local when no optimizations
  9928. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  9929. // https://github.com/apple/swift-protobuf/issues/1182
  9930. try { if let v = self._a {
  9931. try visitor.visitSingularInt32Field(value: v, fieldNumber: 17)
  9932. } }()
  9933. try unknownFields.traverse(visitor: &visitor)
  9934. }
  9935. static func ==(lhs: Proto2Unittest_TestAllTypes.OptionalGroup, rhs: Proto2Unittest_TestAllTypes.OptionalGroup) -> Bool {
  9936. if lhs._a != rhs._a {return false}
  9937. if lhs.unknownFields != rhs.unknownFields {return false}
  9938. return true
  9939. }
  9940. }
  9941. extension Proto2Unittest_TestAllTypes.RepeatedGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  9942. static let protoMessageName: String = Proto2Unittest_TestAllTypes.protoMessageName + ".RepeatedGroup"
  9943. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9944. 47: .same(proto: "a"),
  9945. ]
  9946. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  9947. while let fieldNumber = try decoder.nextFieldNumber() {
  9948. // The use of inline closures is to circumvent an issue where the compiler
  9949. // allocates stack space for every case branch when no optimizations are
  9950. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  9951. switch fieldNumber {
  9952. case 47: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  9953. default: break
  9954. }
  9955. }
  9956. }
  9957. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  9958. // The use of inline closures is to circumvent an issue where the compiler
  9959. // allocates stack space for every if/case branch local when no optimizations
  9960. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  9961. // https://github.com/apple/swift-protobuf/issues/1182
  9962. try { if let v = self._a {
  9963. try visitor.visitSingularInt32Field(value: v, fieldNumber: 47)
  9964. } }()
  9965. try unknownFields.traverse(visitor: &visitor)
  9966. }
  9967. static func ==(lhs: Proto2Unittest_TestAllTypes.RepeatedGroup, rhs: Proto2Unittest_TestAllTypes.RepeatedGroup) -> Bool {
  9968. if lhs._a != rhs._a {return false}
  9969. if lhs.unknownFields != rhs.unknownFields {return false}
  9970. return true
  9971. }
  9972. }
  9973. extension Proto2Unittest_NestedTestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  9974. static let protoMessageName: String = _protobuf_package + ".NestedTestAllTypes"
  9975. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  9976. 1: .same(proto: "child"),
  9977. 2: .same(proto: "payload"),
  9978. 3: .standard(proto: "repeated_child"),
  9979. 4: .standard(proto: "lazy_child"),
  9980. 5: .standard(proto: "eager_child"),
  9981. ]
  9982. fileprivate class _StorageClass {
  9983. var _child: Proto2Unittest_NestedTestAllTypes? = nil
  9984. var _payload: Proto2Unittest_TestAllTypes? = nil
  9985. var _repeatedChild: [Proto2Unittest_NestedTestAllTypes] = []
  9986. var _lazyChild: Proto2Unittest_NestedTestAllTypes? = nil
  9987. var _eagerChild: Proto2Unittest_TestAllTypes? = nil
  9988. // This property is used as the initial default value for new instances of the type.
  9989. // The type itself is protecting the reference to its storage via CoW semantics.
  9990. // This will force a copy to be made of this reference when the first mutation occurs;
  9991. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  9992. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  9993. private init() {}
  9994. init(copying source: _StorageClass) {
  9995. _child = source._child
  9996. _payload = source._payload
  9997. _repeatedChild = source._repeatedChild
  9998. _lazyChild = source._lazyChild
  9999. _eagerChild = source._eagerChild
  10000. }
  10001. }
  10002. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  10003. if !isKnownUniquelyReferenced(&_storage) {
  10004. _storage = _StorageClass(copying: _storage)
  10005. }
  10006. return _storage
  10007. }
  10008. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10009. _ = _uniqueStorage()
  10010. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  10011. while let fieldNumber = try decoder.nextFieldNumber() {
  10012. // The use of inline closures is to circumvent an issue where the compiler
  10013. // allocates stack space for every case branch when no optimizations are
  10014. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10015. switch fieldNumber {
  10016. case 1: try { try decoder.decodeSingularMessageField(value: &_storage._child) }()
  10017. case 2: try { try decoder.decodeSingularMessageField(value: &_storage._payload) }()
  10018. case 3: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedChild) }()
  10019. case 4: try { try decoder.decodeSingularMessageField(value: &_storage._lazyChild) }()
  10020. case 5: try { try decoder.decodeSingularMessageField(value: &_storage._eagerChild) }()
  10021. default: break
  10022. }
  10023. }
  10024. }
  10025. }
  10026. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10027. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  10028. // The use of inline closures is to circumvent an issue where the compiler
  10029. // allocates stack space for every if/case branch local when no optimizations
  10030. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10031. // https://github.com/apple/swift-protobuf/issues/1182
  10032. try { if let v = _storage._child {
  10033. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  10034. } }()
  10035. try { if let v = _storage._payload {
  10036. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  10037. } }()
  10038. if !_storage._repeatedChild.isEmpty {
  10039. try visitor.visitRepeatedMessageField(value: _storage._repeatedChild, fieldNumber: 3)
  10040. }
  10041. try { if let v = _storage._lazyChild {
  10042. try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
  10043. } }()
  10044. try { if let v = _storage._eagerChild {
  10045. try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
  10046. } }()
  10047. }
  10048. try unknownFields.traverse(visitor: &visitor)
  10049. }
  10050. static func ==(lhs: Proto2Unittest_NestedTestAllTypes, rhs: Proto2Unittest_NestedTestAllTypes) -> Bool {
  10051. if lhs._storage !== rhs._storage {
  10052. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  10053. let _storage = _args.0
  10054. let rhs_storage = _args.1
  10055. if _storage._child != rhs_storage._child {return false}
  10056. if _storage._payload != rhs_storage._payload {return false}
  10057. if _storage._repeatedChild != rhs_storage._repeatedChild {return false}
  10058. if _storage._lazyChild != rhs_storage._lazyChild {return false}
  10059. if _storage._eagerChild != rhs_storage._eagerChild {return false}
  10060. return true
  10061. }
  10062. if !storagesAreEqual {return false}
  10063. }
  10064. if lhs.unknownFields != rhs.unknownFields {return false}
  10065. return true
  10066. }
  10067. }
  10068. extension Proto2Unittest_TestDeprecatedFields: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10069. static let protoMessageName: String = _protobuf_package + ".TestDeprecatedFields"
  10070. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10071. 1: .standard(proto: "deprecated_int32"),
  10072. 4: .standard(proto: "deprecated_repeated_string"),
  10073. 3: .standard(proto: "deprecated_message"),
  10074. 2: .standard(proto: "deprecated_int32_in_oneof"),
  10075. 5: .same(proto: "nested"),
  10076. ]
  10077. fileprivate class _StorageClass {
  10078. var _deprecatedInt32: Int32? = nil
  10079. var _deprecatedRepeatedString: [String] = []
  10080. var _deprecatedMessage: Proto2Unittest_TestAllTypes.NestedMessage? = nil
  10081. var _oneofFields: Proto2Unittest_TestDeprecatedFields.OneOf_OneofFields?
  10082. var _nested: Proto2Unittest_TestDeprecatedFields? = nil
  10083. // This property is used as the initial default value for new instances of the type.
  10084. // The type itself is protecting the reference to its storage via CoW semantics.
  10085. // This will force a copy to be made of this reference when the first mutation occurs;
  10086. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  10087. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  10088. private init() {}
  10089. init(copying source: _StorageClass) {
  10090. _deprecatedInt32 = source._deprecatedInt32
  10091. _deprecatedRepeatedString = source._deprecatedRepeatedString
  10092. _deprecatedMessage = source._deprecatedMessage
  10093. _oneofFields = source._oneofFields
  10094. _nested = source._nested
  10095. }
  10096. }
  10097. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  10098. if !isKnownUniquelyReferenced(&_storage) {
  10099. _storage = _StorageClass(copying: _storage)
  10100. }
  10101. return _storage
  10102. }
  10103. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10104. _ = _uniqueStorage()
  10105. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  10106. while let fieldNumber = try decoder.nextFieldNumber() {
  10107. // The use of inline closures is to circumvent an issue where the compiler
  10108. // allocates stack space for every case branch when no optimizations are
  10109. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10110. switch fieldNumber {
  10111. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._deprecatedInt32) }()
  10112. case 2: try {
  10113. var v: Int32?
  10114. try decoder.decodeSingularInt32Field(value: &v)
  10115. if let v = v {
  10116. if _storage._oneofFields != nil {try decoder.handleConflictingOneOf()}
  10117. _storage._oneofFields = .deprecatedInt32InOneof(v)
  10118. }
  10119. }()
  10120. case 3: try { try decoder.decodeSingularMessageField(value: &_storage._deprecatedMessage) }()
  10121. case 4: try { try decoder.decodeRepeatedStringField(value: &_storage._deprecatedRepeatedString) }()
  10122. case 5: try { try decoder.decodeSingularMessageField(value: &_storage._nested) }()
  10123. default: break
  10124. }
  10125. }
  10126. }
  10127. }
  10128. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10129. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  10130. // The use of inline closures is to circumvent an issue where the compiler
  10131. // allocates stack space for every if/case branch local when no optimizations
  10132. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10133. // https://github.com/apple/swift-protobuf/issues/1182
  10134. try { if let v = _storage._deprecatedInt32 {
  10135. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  10136. } }()
  10137. try { if case .deprecatedInt32InOneof(let v)? = _storage._oneofFields {
  10138. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  10139. } }()
  10140. try { if let v = _storage._deprecatedMessage {
  10141. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  10142. } }()
  10143. if !_storage._deprecatedRepeatedString.isEmpty {
  10144. try visitor.visitRepeatedStringField(value: _storage._deprecatedRepeatedString, fieldNumber: 4)
  10145. }
  10146. try { if let v = _storage._nested {
  10147. try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
  10148. } }()
  10149. }
  10150. try unknownFields.traverse(visitor: &visitor)
  10151. }
  10152. static func ==(lhs: Proto2Unittest_TestDeprecatedFields, rhs: Proto2Unittest_TestDeprecatedFields) -> Bool {
  10153. if lhs._storage !== rhs._storage {
  10154. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  10155. let _storage = _args.0
  10156. let rhs_storage = _args.1
  10157. if _storage._deprecatedInt32 != rhs_storage._deprecatedInt32 {return false}
  10158. if _storage._deprecatedRepeatedString != rhs_storage._deprecatedRepeatedString {return false}
  10159. if _storage._deprecatedMessage != rhs_storage._deprecatedMessage {return false}
  10160. if _storage._oneofFields != rhs_storage._oneofFields {return false}
  10161. if _storage._nested != rhs_storage._nested {return false}
  10162. return true
  10163. }
  10164. if !storagesAreEqual {return false}
  10165. }
  10166. if lhs.unknownFields != rhs.unknownFields {return false}
  10167. return true
  10168. }
  10169. }
  10170. extension Proto2Unittest_TestDeprecatedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10171. static let protoMessageName: String = _protobuf_package + ".TestDeprecatedMessage"
  10172. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  10173. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10174. // Load everything into unknown fields
  10175. while try decoder.nextFieldNumber() != nil {}
  10176. }
  10177. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10178. try unknownFields.traverse(visitor: &visitor)
  10179. }
  10180. static func ==(lhs: Proto2Unittest_TestDeprecatedMessage, rhs: Proto2Unittest_TestDeprecatedMessage) -> Bool {
  10181. if lhs.unknownFields != rhs.unknownFields {return false}
  10182. return true
  10183. }
  10184. }
  10185. extension Proto2Unittest_ForeignMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10186. static let protoMessageName: String = _protobuf_package + ".ForeignMessage"
  10187. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10188. 1: .same(proto: "c"),
  10189. 2: .same(proto: "d"),
  10190. ]
  10191. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10192. while let fieldNumber = try decoder.nextFieldNumber() {
  10193. // The use of inline closures is to circumvent an issue where the compiler
  10194. // allocates stack space for every case branch when no optimizations are
  10195. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10196. switch fieldNumber {
  10197. case 1: try { try decoder.decodeSingularInt32Field(value: &self._c) }()
  10198. case 2: try { try decoder.decodeSingularInt32Field(value: &self._d) }()
  10199. default: break
  10200. }
  10201. }
  10202. }
  10203. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10204. // The use of inline closures is to circumvent an issue where the compiler
  10205. // allocates stack space for every if/case branch local when no optimizations
  10206. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10207. // https://github.com/apple/swift-protobuf/issues/1182
  10208. try { if let v = self._c {
  10209. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  10210. } }()
  10211. try { if let v = self._d {
  10212. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  10213. } }()
  10214. try unknownFields.traverse(visitor: &visitor)
  10215. }
  10216. static func ==(lhs: Proto2Unittest_ForeignMessage, rhs: Proto2Unittest_ForeignMessage) -> Bool {
  10217. if lhs._c != rhs._c {return false}
  10218. if lhs._d != rhs._d {return false}
  10219. if lhs.unknownFields != rhs.unknownFields {return false}
  10220. return true
  10221. }
  10222. }
  10223. extension Proto2Unittest_TestReservedFields: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10224. static let protoMessageName: String = _protobuf_package + ".TestReservedFields"
  10225. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  10226. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10227. // Load everything into unknown fields
  10228. while try decoder.nextFieldNumber() != nil {}
  10229. }
  10230. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10231. try unknownFields.traverse(visitor: &visitor)
  10232. }
  10233. static func ==(lhs: Proto2Unittest_TestReservedFields, rhs: Proto2Unittest_TestReservedFields) -> Bool {
  10234. if lhs.unknownFields != rhs.unknownFields {return false}
  10235. return true
  10236. }
  10237. }
  10238. extension Proto2Unittest_TestAllExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10239. static let protoMessageName: String = _protobuf_package + ".TestAllExtensions"
  10240. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  10241. public var isInitialized: Bool {
  10242. if !_protobuf_extensionFieldValues.isInitialized {return false}
  10243. return true
  10244. }
  10245. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10246. while let fieldNumber = try decoder.nextFieldNumber() {
  10247. if (1 <= fieldNumber && fieldNumber < 536870912) {
  10248. try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestAllExtensions.self, fieldNumber: fieldNumber)
  10249. }
  10250. }
  10251. }
  10252. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10253. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1, end: 536870912)
  10254. try unknownFields.traverse(visitor: &visitor)
  10255. }
  10256. static func ==(lhs: Proto2Unittest_TestAllExtensions, rhs: Proto2Unittest_TestAllExtensions) -> Bool {
  10257. if lhs.unknownFields != rhs.unknownFields {return false}
  10258. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  10259. return true
  10260. }
  10261. }
  10262. extension Proto2Unittest_OptionalGroup_extension: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10263. static let protoMessageName: String = _protobuf_package + ".OptionalGroup_extension"
  10264. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10265. 17: .same(proto: "a"),
  10266. ]
  10267. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10268. while let fieldNumber = try decoder.nextFieldNumber() {
  10269. // The use of inline closures is to circumvent an issue where the compiler
  10270. // allocates stack space for every case branch when no optimizations are
  10271. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10272. switch fieldNumber {
  10273. case 17: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10274. default: break
  10275. }
  10276. }
  10277. }
  10278. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10279. // The use of inline closures is to circumvent an issue where the compiler
  10280. // allocates stack space for every if/case branch local when no optimizations
  10281. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10282. // https://github.com/apple/swift-protobuf/issues/1182
  10283. try { if let v = self._a {
  10284. try visitor.visitSingularInt32Field(value: v, fieldNumber: 17)
  10285. } }()
  10286. try unknownFields.traverse(visitor: &visitor)
  10287. }
  10288. static func ==(lhs: Proto2Unittest_OptionalGroup_extension, rhs: Proto2Unittest_OptionalGroup_extension) -> Bool {
  10289. if lhs._a != rhs._a {return false}
  10290. if lhs.unknownFields != rhs.unknownFields {return false}
  10291. return true
  10292. }
  10293. }
  10294. extension Proto2Unittest_RepeatedGroup_extension: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10295. static let protoMessageName: String = _protobuf_package + ".RepeatedGroup_extension"
  10296. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10297. 47: .same(proto: "a"),
  10298. ]
  10299. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10300. while let fieldNumber = try decoder.nextFieldNumber() {
  10301. // The use of inline closures is to circumvent an issue where the compiler
  10302. // allocates stack space for every case branch when no optimizations are
  10303. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10304. switch fieldNumber {
  10305. case 47: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10306. default: break
  10307. }
  10308. }
  10309. }
  10310. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10311. // The use of inline closures is to circumvent an issue where the compiler
  10312. // allocates stack space for every if/case branch local when no optimizations
  10313. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10314. // https://github.com/apple/swift-protobuf/issues/1182
  10315. try { if let v = self._a {
  10316. try visitor.visitSingularInt32Field(value: v, fieldNumber: 47)
  10317. } }()
  10318. try unknownFields.traverse(visitor: &visitor)
  10319. }
  10320. static func ==(lhs: Proto2Unittest_RepeatedGroup_extension, rhs: Proto2Unittest_RepeatedGroup_extension) -> Bool {
  10321. if lhs._a != rhs._a {return false}
  10322. if lhs.unknownFields != rhs.unknownFields {return false}
  10323. return true
  10324. }
  10325. }
  10326. extension Proto2Unittest_TestMixedFieldsAndExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10327. static let protoMessageName: String = _protobuf_package + ".TestMixedFieldsAndExtensions"
  10328. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10329. 1: .same(proto: "a"),
  10330. 3: .same(proto: "b"),
  10331. ]
  10332. public var isInitialized: Bool {
  10333. if !_protobuf_extensionFieldValues.isInitialized {return false}
  10334. return true
  10335. }
  10336. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10337. while let fieldNumber = try decoder.nextFieldNumber() {
  10338. // The use of inline closures is to circumvent an issue where the compiler
  10339. // allocates stack space for every case branch when no optimizations are
  10340. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10341. switch fieldNumber {
  10342. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10343. case 3: try { try decoder.decodeRepeatedFixed32Field(value: &self.b) }()
  10344. case 2, 4:
  10345. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestMixedFieldsAndExtensions.self, fieldNumber: fieldNumber) }()
  10346. default: break
  10347. }
  10348. }
  10349. }
  10350. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10351. // The use of inline closures is to circumvent an issue where the compiler
  10352. // allocates stack space for every if/case branch local when no optimizations
  10353. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10354. // https://github.com/apple/swift-protobuf/issues/1182
  10355. try { if let v = self._a {
  10356. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  10357. } }()
  10358. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2, end: 3)
  10359. if !self.b.isEmpty {
  10360. try visitor.visitRepeatedFixed32Field(value: self.b, fieldNumber: 3)
  10361. }
  10362. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 4, end: 5)
  10363. try unknownFields.traverse(visitor: &visitor)
  10364. }
  10365. static func ==(lhs: Proto2Unittest_TestMixedFieldsAndExtensions, rhs: Proto2Unittest_TestMixedFieldsAndExtensions) -> Bool {
  10366. if lhs._a != rhs._a {return false}
  10367. if lhs.b != rhs.b {return false}
  10368. if lhs.unknownFields != rhs.unknownFields {return false}
  10369. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  10370. return true
  10371. }
  10372. }
  10373. extension Proto2Unittest_TestGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10374. static let protoMessageName: String = _protobuf_package + ".TestGroup"
  10375. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10376. 16: .same(proto: "optionalgroup"),
  10377. 16: .unique(proto: "OptionalGroup", json: "optionalgroup"),
  10378. 22: .standard(proto: "optional_foreign_enum"),
  10379. ]
  10380. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10381. while let fieldNumber = try decoder.nextFieldNumber() {
  10382. // The use of inline closures is to circumvent an issue where the compiler
  10383. // allocates stack space for every case branch when no optimizations are
  10384. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10385. switch fieldNumber {
  10386. case 16: try { try decoder.decodeSingularGroupField(value: &self._optionalGroup) }()
  10387. case 22: try { try decoder.decodeSingularEnumField(value: &self._optionalForeignEnum) }()
  10388. default: break
  10389. }
  10390. }
  10391. }
  10392. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10393. // The use of inline closures is to circumvent an issue where the compiler
  10394. // allocates stack space for every if/case branch local when no optimizations
  10395. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10396. // https://github.com/apple/swift-protobuf/issues/1182
  10397. try { if let v = self._optionalGroup {
  10398. try visitor.visitSingularGroupField(value: v, fieldNumber: 16)
  10399. } }()
  10400. try { if let v = self._optionalForeignEnum {
  10401. try visitor.visitSingularEnumField(value: v, fieldNumber: 22)
  10402. } }()
  10403. try unknownFields.traverse(visitor: &visitor)
  10404. }
  10405. static func ==(lhs: Proto2Unittest_TestGroup, rhs: Proto2Unittest_TestGroup) -> Bool {
  10406. if lhs._optionalGroup != rhs._optionalGroup {return false}
  10407. if lhs._optionalForeignEnum != rhs._optionalForeignEnum {return false}
  10408. if lhs.unknownFields != rhs.unknownFields {return false}
  10409. return true
  10410. }
  10411. }
  10412. extension Proto2Unittest_TestGroup.OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10413. static let protoMessageName: String = Proto2Unittest_TestGroup.protoMessageName + ".OptionalGroup"
  10414. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10415. 17: .same(proto: "a"),
  10416. 89: .same(proto: "zz"),
  10417. ]
  10418. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10419. while let fieldNumber = try decoder.nextFieldNumber() {
  10420. // The use of inline closures is to circumvent an issue where the compiler
  10421. // allocates stack space for every case branch when no optimizations are
  10422. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10423. switch fieldNumber {
  10424. case 17: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10425. case 89: try { try decoder.decodeSingularInt32Field(value: &self._zz) }()
  10426. default: break
  10427. }
  10428. }
  10429. }
  10430. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10431. // The use of inline closures is to circumvent an issue where the compiler
  10432. // allocates stack space for every if/case branch local when no optimizations
  10433. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10434. // https://github.com/apple/swift-protobuf/issues/1182
  10435. try { if let v = self._a {
  10436. try visitor.visitSingularInt32Field(value: v, fieldNumber: 17)
  10437. } }()
  10438. try { if let v = self._zz {
  10439. try visitor.visitSingularInt32Field(value: v, fieldNumber: 89)
  10440. } }()
  10441. try unknownFields.traverse(visitor: &visitor)
  10442. }
  10443. static func ==(lhs: Proto2Unittest_TestGroup.OptionalGroup, rhs: Proto2Unittest_TestGroup.OptionalGroup) -> Bool {
  10444. if lhs._a != rhs._a {return false}
  10445. if lhs._zz != rhs._zz {return false}
  10446. if lhs.unknownFields != rhs.unknownFields {return false}
  10447. return true
  10448. }
  10449. }
  10450. extension Proto2Unittest_TestGroupExtension: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10451. static let protoMessageName: String = _protobuf_package + ".TestGroupExtension"
  10452. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  10453. public var isInitialized: Bool {
  10454. if !_protobuf_extensionFieldValues.isInitialized {return false}
  10455. return true
  10456. }
  10457. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10458. while let fieldNumber = try decoder.nextFieldNumber() {
  10459. if (1 <= fieldNumber && fieldNumber < 536870912) {
  10460. try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestGroupExtension.self, fieldNumber: fieldNumber)
  10461. }
  10462. }
  10463. }
  10464. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10465. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1, end: 536870912)
  10466. try unknownFields.traverse(visitor: &visitor)
  10467. }
  10468. static func ==(lhs: Proto2Unittest_TestGroupExtension, rhs: Proto2Unittest_TestGroupExtension) -> Bool {
  10469. if lhs.unknownFields != rhs.unknownFields {return false}
  10470. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  10471. return true
  10472. }
  10473. }
  10474. extension Proto2Unittest_TestNestedExtension: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10475. static let protoMessageName: String = _protobuf_package + ".TestNestedExtension"
  10476. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  10477. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10478. // Load everything into unknown fields
  10479. while try decoder.nextFieldNumber() != nil {}
  10480. }
  10481. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10482. try unknownFields.traverse(visitor: &visitor)
  10483. }
  10484. static func ==(lhs: Proto2Unittest_TestNestedExtension, rhs: Proto2Unittest_TestNestedExtension) -> Bool {
  10485. if lhs.unknownFields != rhs.unknownFields {return false}
  10486. return true
  10487. }
  10488. }
  10489. extension Proto2Unittest_TestNestedExtension.OptionalGroup_extension: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10490. static let protoMessageName: String = Proto2Unittest_TestNestedExtension.protoMessageName + ".OptionalGroup_extension"
  10491. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10492. 17: .same(proto: "a"),
  10493. ]
  10494. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10495. while let fieldNumber = try decoder.nextFieldNumber() {
  10496. // The use of inline closures is to circumvent an issue where the compiler
  10497. // allocates stack space for every case branch when no optimizations are
  10498. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10499. switch fieldNumber {
  10500. case 17: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10501. default: break
  10502. }
  10503. }
  10504. }
  10505. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10506. // The use of inline closures is to circumvent an issue where the compiler
  10507. // allocates stack space for every if/case branch local when no optimizations
  10508. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10509. // https://github.com/apple/swift-protobuf/issues/1182
  10510. try { if let v = self._a {
  10511. try visitor.visitSingularInt32Field(value: v, fieldNumber: 17)
  10512. } }()
  10513. try unknownFields.traverse(visitor: &visitor)
  10514. }
  10515. static func ==(lhs: Proto2Unittest_TestNestedExtension.OptionalGroup_extension, rhs: Proto2Unittest_TestNestedExtension.OptionalGroup_extension) -> Bool {
  10516. if lhs._a != rhs._a {return false}
  10517. if lhs.unknownFields != rhs.unknownFields {return false}
  10518. return true
  10519. }
  10520. }
  10521. extension Proto2Unittest_TestChildExtension: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10522. static let protoMessageName: String = _protobuf_package + ".TestChildExtension"
  10523. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10524. 1: .same(proto: "a"),
  10525. 2: .same(proto: "b"),
  10526. 3: .standard(proto: "optional_extension"),
  10527. ]
  10528. public var isInitialized: Bool {
  10529. if let v = self._optionalExtension, !v.isInitialized {return false}
  10530. return true
  10531. }
  10532. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10533. while let fieldNumber = try decoder.nextFieldNumber() {
  10534. // The use of inline closures is to circumvent an issue where the compiler
  10535. // allocates stack space for every case branch when no optimizations are
  10536. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10537. switch fieldNumber {
  10538. case 1: try { try decoder.decodeSingularStringField(value: &self._a) }()
  10539. case 2: try { try decoder.decodeSingularStringField(value: &self._b) }()
  10540. case 3: try { try decoder.decodeSingularMessageField(value: &self._optionalExtension) }()
  10541. default: break
  10542. }
  10543. }
  10544. }
  10545. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10546. // The use of inline closures is to circumvent an issue where the compiler
  10547. // allocates stack space for every if/case branch local when no optimizations
  10548. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10549. // https://github.com/apple/swift-protobuf/issues/1182
  10550. try { if let v = self._a {
  10551. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  10552. } }()
  10553. try { if let v = self._b {
  10554. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  10555. } }()
  10556. try { if let v = self._optionalExtension {
  10557. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  10558. } }()
  10559. try unknownFields.traverse(visitor: &visitor)
  10560. }
  10561. static func ==(lhs: Proto2Unittest_TestChildExtension, rhs: Proto2Unittest_TestChildExtension) -> Bool {
  10562. if lhs._a != rhs._a {return false}
  10563. if lhs._b != rhs._b {return false}
  10564. if lhs._optionalExtension != rhs._optionalExtension {return false}
  10565. if lhs.unknownFields != rhs.unknownFields {return false}
  10566. return true
  10567. }
  10568. }
  10569. extension Proto2Unittest_TestChildExtensionData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10570. static let protoMessageName: String = _protobuf_package + ".TestChildExtensionData"
  10571. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10572. 1: .same(proto: "a"),
  10573. 2: .same(proto: "b"),
  10574. 3: .standard(proto: "optional_extension"),
  10575. ]
  10576. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10577. while let fieldNumber = try decoder.nextFieldNumber() {
  10578. // The use of inline closures is to circumvent an issue where the compiler
  10579. // allocates stack space for every case branch when no optimizations are
  10580. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10581. switch fieldNumber {
  10582. case 1: try { try decoder.decodeSingularStringField(value: &self._a) }()
  10583. case 2: try { try decoder.decodeSingularStringField(value: &self._b) }()
  10584. case 3: try { try decoder.decodeSingularMessageField(value: &self._optionalExtension) }()
  10585. default: break
  10586. }
  10587. }
  10588. }
  10589. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10590. // The use of inline closures is to circumvent an issue where the compiler
  10591. // allocates stack space for every if/case branch local when no optimizations
  10592. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10593. // https://github.com/apple/swift-protobuf/issues/1182
  10594. try { if let v = self._a {
  10595. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  10596. } }()
  10597. try { if let v = self._b {
  10598. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  10599. } }()
  10600. try { if let v = self._optionalExtension {
  10601. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  10602. } }()
  10603. try unknownFields.traverse(visitor: &visitor)
  10604. }
  10605. static func ==(lhs: Proto2Unittest_TestChildExtensionData, rhs: Proto2Unittest_TestChildExtensionData) -> Bool {
  10606. if lhs._a != rhs._a {return false}
  10607. if lhs._b != rhs._b {return false}
  10608. if lhs._optionalExtension != rhs._optionalExtension {return false}
  10609. if lhs.unknownFields != rhs.unknownFields {return false}
  10610. return true
  10611. }
  10612. }
  10613. extension Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10614. static let protoMessageName: String = Proto2Unittest_TestChildExtensionData.protoMessageName + ".NestedTestAllExtensionsData"
  10615. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10616. 409707008: .same(proto: "dynamic"),
  10617. ]
  10618. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10619. while let fieldNumber = try decoder.nextFieldNumber() {
  10620. // The use of inline closures is to circumvent an issue where the compiler
  10621. // allocates stack space for every case branch when no optimizations are
  10622. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10623. switch fieldNumber {
  10624. case 409707008: try { try decoder.decodeSingularMessageField(value: &self._dynamic) }()
  10625. default: break
  10626. }
  10627. }
  10628. }
  10629. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10630. // The use of inline closures is to circumvent an issue where the compiler
  10631. // allocates stack space for every if/case branch local when no optimizations
  10632. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10633. // https://github.com/apple/swift-protobuf/issues/1182
  10634. try { if let v = self._dynamic {
  10635. try visitor.visitSingularMessageField(value: v, fieldNumber: 409707008)
  10636. } }()
  10637. try unknownFields.traverse(visitor: &visitor)
  10638. }
  10639. static func ==(lhs: Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData, rhs: Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData) -> Bool {
  10640. if lhs._dynamic != rhs._dynamic {return false}
  10641. if lhs.unknownFields != rhs.unknownFields {return false}
  10642. return true
  10643. }
  10644. }
  10645. extension Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData.NestedDynamicExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10646. static let protoMessageName: String = Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData.protoMessageName + ".NestedDynamicExtensions"
  10647. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10648. 1: .same(proto: "a"),
  10649. 2: .same(proto: "b"),
  10650. ]
  10651. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10652. while let fieldNumber = try decoder.nextFieldNumber() {
  10653. // The use of inline closures is to circumvent an issue where the compiler
  10654. // allocates stack space for every case branch when no optimizations are
  10655. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10656. switch fieldNumber {
  10657. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10658. case 2: try { try decoder.decodeSingularInt32Field(value: &self._b) }()
  10659. default: break
  10660. }
  10661. }
  10662. }
  10663. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10664. // The use of inline closures is to circumvent an issue where the compiler
  10665. // allocates stack space for every if/case branch local when no optimizations
  10666. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10667. // https://github.com/apple/swift-protobuf/issues/1182
  10668. try { if let v = self._a {
  10669. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  10670. } }()
  10671. try { if let v = self._b {
  10672. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  10673. } }()
  10674. try unknownFields.traverse(visitor: &visitor)
  10675. }
  10676. static func ==(lhs: Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData.NestedDynamicExtensions, rhs: Proto2Unittest_TestChildExtensionData.NestedTestAllExtensionsData.NestedDynamicExtensions) -> Bool {
  10677. if lhs._a != rhs._a {return false}
  10678. if lhs._b != rhs._b {return false}
  10679. if lhs.unknownFields != rhs.unknownFields {return false}
  10680. return true
  10681. }
  10682. }
  10683. extension Proto2Unittest_TestNestedChildExtension: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10684. static let protoMessageName: String = _protobuf_package + ".TestNestedChildExtension"
  10685. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10686. 1: .same(proto: "a"),
  10687. 2: .same(proto: "child"),
  10688. ]
  10689. public var isInitialized: Bool {
  10690. if let v = self._child, !v.isInitialized {return false}
  10691. return true
  10692. }
  10693. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10694. while let fieldNumber = try decoder.nextFieldNumber() {
  10695. // The use of inline closures is to circumvent an issue where the compiler
  10696. // allocates stack space for every case branch when no optimizations are
  10697. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10698. switch fieldNumber {
  10699. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10700. case 2: try { try decoder.decodeSingularMessageField(value: &self._child) }()
  10701. default: break
  10702. }
  10703. }
  10704. }
  10705. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10706. // The use of inline closures is to circumvent an issue where the compiler
  10707. // allocates stack space for every if/case branch local when no optimizations
  10708. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10709. // https://github.com/apple/swift-protobuf/issues/1182
  10710. try { if let v = self._a {
  10711. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  10712. } }()
  10713. try { if let v = self._child {
  10714. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  10715. } }()
  10716. try unknownFields.traverse(visitor: &visitor)
  10717. }
  10718. static func ==(lhs: Proto2Unittest_TestNestedChildExtension, rhs: Proto2Unittest_TestNestedChildExtension) -> Bool {
  10719. if lhs._a != rhs._a {return false}
  10720. if lhs._child != rhs._child {return false}
  10721. if lhs.unknownFields != rhs.unknownFields {return false}
  10722. return true
  10723. }
  10724. }
  10725. extension Proto2Unittest_TestNestedChildExtensionData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10726. static let protoMessageName: String = _protobuf_package + ".TestNestedChildExtensionData"
  10727. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10728. 1: .same(proto: "a"),
  10729. 2: .same(proto: "child"),
  10730. ]
  10731. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10732. while let fieldNumber = try decoder.nextFieldNumber() {
  10733. // The use of inline closures is to circumvent an issue where the compiler
  10734. // allocates stack space for every case branch when no optimizations are
  10735. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10736. switch fieldNumber {
  10737. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10738. case 2: try { try decoder.decodeSingularMessageField(value: &self._child) }()
  10739. default: break
  10740. }
  10741. }
  10742. }
  10743. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10744. // The use of inline closures is to circumvent an issue where the compiler
  10745. // allocates stack space for every if/case branch local when no optimizations
  10746. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10747. // https://github.com/apple/swift-protobuf/issues/1182
  10748. try { if let v = self._a {
  10749. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  10750. } }()
  10751. try { if let v = self._child {
  10752. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  10753. } }()
  10754. try unknownFields.traverse(visitor: &visitor)
  10755. }
  10756. static func ==(lhs: Proto2Unittest_TestNestedChildExtensionData, rhs: Proto2Unittest_TestNestedChildExtensionData) -> Bool {
  10757. if lhs._a != rhs._a {return false}
  10758. if lhs._child != rhs._child {return false}
  10759. if lhs.unknownFields != rhs.unknownFields {return false}
  10760. return true
  10761. }
  10762. }
  10763. extension Proto2Unittest_TestRequiredEnum: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10764. static let protoMessageName: String = _protobuf_package + ".TestRequiredEnum"
  10765. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10766. 1: .standard(proto: "required_enum"),
  10767. 2: .same(proto: "a"),
  10768. ]
  10769. public var isInitialized: Bool {
  10770. if self._requiredEnum == nil {return false}
  10771. return true
  10772. }
  10773. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10774. while let fieldNumber = try decoder.nextFieldNumber() {
  10775. // The use of inline closures is to circumvent an issue where the compiler
  10776. // allocates stack space for every case branch when no optimizations are
  10777. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10778. switch fieldNumber {
  10779. case 1: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum) }()
  10780. case 2: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10781. default: break
  10782. }
  10783. }
  10784. }
  10785. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10786. // The use of inline closures is to circumvent an issue where the compiler
  10787. // allocates stack space for every if/case branch local when no optimizations
  10788. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10789. // https://github.com/apple/swift-protobuf/issues/1182
  10790. try { if let v = self._requiredEnum {
  10791. try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
  10792. } }()
  10793. try { if let v = self._a {
  10794. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  10795. } }()
  10796. try unknownFields.traverse(visitor: &visitor)
  10797. }
  10798. static func ==(lhs: Proto2Unittest_TestRequiredEnum, rhs: Proto2Unittest_TestRequiredEnum) -> Bool {
  10799. if lhs._requiredEnum != rhs._requiredEnum {return false}
  10800. if lhs._a != rhs._a {return false}
  10801. if lhs.unknownFields != rhs.unknownFields {return false}
  10802. return true
  10803. }
  10804. }
  10805. extension Proto2Unittest_TestRequiredOpenEnum: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10806. static let protoMessageName: String = _protobuf_package + ".TestRequiredOpenEnum"
  10807. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10808. 1: .standard(proto: "required_enum"),
  10809. 2: .same(proto: "a"),
  10810. ]
  10811. public var isInitialized: Bool {
  10812. if self._requiredEnum == nil {return false}
  10813. return true
  10814. }
  10815. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10816. while let fieldNumber = try decoder.nextFieldNumber() {
  10817. // The use of inline closures is to circumvent an issue where the compiler
  10818. // allocates stack space for every case branch when no optimizations are
  10819. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10820. switch fieldNumber {
  10821. case 1: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum) }()
  10822. case 2: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10823. default: break
  10824. }
  10825. }
  10826. }
  10827. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10828. // The use of inline closures is to circumvent an issue where the compiler
  10829. // allocates stack space for every if/case branch local when no optimizations
  10830. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10831. // https://github.com/apple/swift-protobuf/issues/1182
  10832. try { if let v = self._requiredEnum {
  10833. try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
  10834. } }()
  10835. try { if let v = self._a {
  10836. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  10837. } }()
  10838. try unknownFields.traverse(visitor: &visitor)
  10839. }
  10840. static func ==(lhs: Proto2Unittest_TestRequiredOpenEnum, rhs: Proto2Unittest_TestRequiredOpenEnum) -> Bool {
  10841. if lhs._requiredEnum != rhs._requiredEnum {return false}
  10842. if lhs._a != rhs._a {return false}
  10843. if lhs.unknownFields != rhs.unknownFields {return false}
  10844. return true
  10845. }
  10846. }
  10847. extension Proto2Unittest_TestRequiredEnumNoMask: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10848. static let protoMessageName: String = _protobuf_package + ".TestRequiredEnumNoMask"
  10849. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10850. 1: .standard(proto: "required_enum"),
  10851. 2: .same(proto: "a"),
  10852. ]
  10853. public var isInitialized: Bool {
  10854. if self._requiredEnum == nil {return false}
  10855. return true
  10856. }
  10857. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10858. while let fieldNumber = try decoder.nextFieldNumber() {
  10859. // The use of inline closures is to circumvent an issue where the compiler
  10860. // allocates stack space for every case branch when no optimizations are
  10861. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10862. switch fieldNumber {
  10863. case 1: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum) }()
  10864. case 2: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  10865. default: break
  10866. }
  10867. }
  10868. }
  10869. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10870. // The use of inline closures is to circumvent an issue where the compiler
  10871. // allocates stack space for every if/case branch local when no optimizations
  10872. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10873. // https://github.com/apple/swift-protobuf/issues/1182
  10874. try { if let v = self._requiredEnum {
  10875. try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
  10876. } }()
  10877. try { if let v = self._a {
  10878. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  10879. } }()
  10880. try unknownFields.traverse(visitor: &visitor)
  10881. }
  10882. static func ==(lhs: Proto2Unittest_TestRequiredEnumNoMask, rhs: Proto2Unittest_TestRequiredEnumNoMask) -> Bool {
  10883. if lhs._requiredEnum != rhs._requiredEnum {return false}
  10884. if lhs._a != rhs._a {return false}
  10885. if lhs.unknownFields != rhs.unknownFields {return false}
  10886. return true
  10887. }
  10888. }
  10889. extension Proto2Unittest_TestRequiredEnumNoMask.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  10890. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10891. -1: .same(proto: "BAZ"),
  10892. 0: .same(proto: "UNSPECIFIED"),
  10893. 2: .same(proto: "FOO"),
  10894. 100: .same(proto: "BAR"),
  10895. ]
  10896. }
  10897. extension Proto2Unittest_TestRequiredEnumMulti: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10898. static let protoMessageName: String = _protobuf_package + ".TestRequiredEnumMulti"
  10899. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10900. 4: .standard(proto: "required_enum_4"),
  10901. 3: .standard(proto: "a_3"),
  10902. 2: .standard(proto: "required_enum_2"),
  10903. 1: .standard(proto: "required_enum_1"),
  10904. ]
  10905. public var isInitialized: Bool {
  10906. if self._requiredEnum4 == nil {return false}
  10907. if self._requiredEnum2 == nil {return false}
  10908. if self._requiredEnum1 == nil {return false}
  10909. return true
  10910. }
  10911. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10912. while let fieldNumber = try decoder.nextFieldNumber() {
  10913. // The use of inline closures is to circumvent an issue where the compiler
  10914. // allocates stack space for every case branch when no optimizations are
  10915. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10916. switch fieldNumber {
  10917. case 1: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum1) }()
  10918. case 2: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum2) }()
  10919. case 3: try { try decoder.decodeSingularInt32Field(value: &self._a3) }()
  10920. case 4: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum4) }()
  10921. default: break
  10922. }
  10923. }
  10924. }
  10925. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10926. // The use of inline closures is to circumvent an issue where the compiler
  10927. // allocates stack space for every if/case branch local when no optimizations
  10928. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  10929. // https://github.com/apple/swift-protobuf/issues/1182
  10930. try { if let v = self._requiredEnum1 {
  10931. try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
  10932. } }()
  10933. try { if let v = self._requiredEnum2 {
  10934. try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
  10935. } }()
  10936. try { if let v = self._a3 {
  10937. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  10938. } }()
  10939. try { if let v = self._requiredEnum4 {
  10940. try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
  10941. } }()
  10942. try unknownFields.traverse(visitor: &visitor)
  10943. }
  10944. static func ==(lhs: Proto2Unittest_TestRequiredEnumMulti, rhs: Proto2Unittest_TestRequiredEnumMulti) -> Bool {
  10945. if lhs._requiredEnum4 != rhs._requiredEnum4 {return false}
  10946. if lhs._a3 != rhs._a3 {return false}
  10947. if lhs._requiredEnum2 != rhs._requiredEnum2 {return false}
  10948. if lhs._requiredEnum1 != rhs._requiredEnum1 {return false}
  10949. if lhs.unknownFields != rhs.unknownFields {return false}
  10950. return true
  10951. }
  10952. }
  10953. extension Proto2Unittest_TestRequiredEnumMulti.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  10954. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10955. 0: .same(proto: "UNSPECIFIED"),
  10956. 1: .same(proto: "FOO"),
  10957. 2: .same(proto: "BAR"),
  10958. 100: .same(proto: "BAZ"),
  10959. ]
  10960. }
  10961. extension Proto2Unittest_TestRequiredNoMaskMulti: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  10962. static let protoMessageName: String = _protobuf_package + ".TestRequiredNoMaskMulti"
  10963. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  10964. 80: .standard(proto: "required_fixed32_80"),
  10965. 70: .standard(proto: "required_fixed32_70"),
  10966. 64: .standard(proto: "required_enum_64"),
  10967. 4: .standard(proto: "required_enum_4"),
  10968. 3: .standard(proto: "a_3"),
  10969. 2: .standard(proto: "required_enum_2"),
  10970. 1: .standard(proto: "required_enum_1"),
  10971. ]
  10972. public var isInitialized: Bool {
  10973. if self._requiredFixed3280 == nil {return false}
  10974. if self._requiredFixed3270 == nil {return false}
  10975. if self._requiredEnum64 == nil {return false}
  10976. if self._requiredEnum4 == nil {return false}
  10977. if self._requiredEnum2 == nil {return false}
  10978. if self._requiredEnum1 == nil {return false}
  10979. return true
  10980. }
  10981. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  10982. while let fieldNumber = try decoder.nextFieldNumber() {
  10983. // The use of inline closures is to circumvent an issue where the compiler
  10984. // allocates stack space for every case branch when no optimizations are
  10985. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  10986. switch fieldNumber {
  10987. case 1: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum1) }()
  10988. case 2: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum2) }()
  10989. case 3: try { try decoder.decodeSingularInt32Field(value: &self._a3) }()
  10990. case 4: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum4) }()
  10991. case 64: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum64) }()
  10992. case 70: try { try decoder.decodeSingularFixed32Field(value: &self._requiredFixed3270) }()
  10993. case 80: try { try decoder.decodeSingularFixed32Field(value: &self._requiredFixed3280) }()
  10994. default: break
  10995. }
  10996. }
  10997. }
  10998. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  10999. // The use of inline closures is to circumvent an issue where the compiler
  11000. // allocates stack space for every if/case branch local when no optimizations
  11001. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11002. // https://github.com/apple/swift-protobuf/issues/1182
  11003. try { if let v = self._requiredEnum1 {
  11004. try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
  11005. } }()
  11006. try { if let v = self._requiredEnum2 {
  11007. try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
  11008. } }()
  11009. try { if let v = self._a3 {
  11010. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  11011. } }()
  11012. try { if let v = self._requiredEnum4 {
  11013. try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
  11014. } }()
  11015. try { if let v = self._requiredEnum64 {
  11016. try visitor.visitSingularEnumField(value: v, fieldNumber: 64)
  11017. } }()
  11018. try { if let v = self._requiredFixed3270 {
  11019. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 70)
  11020. } }()
  11021. try { if let v = self._requiredFixed3280 {
  11022. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 80)
  11023. } }()
  11024. try unknownFields.traverse(visitor: &visitor)
  11025. }
  11026. static func ==(lhs: Proto2Unittest_TestRequiredNoMaskMulti, rhs: Proto2Unittest_TestRequiredNoMaskMulti) -> Bool {
  11027. if lhs._requiredFixed3280 != rhs._requiredFixed3280 {return false}
  11028. if lhs._requiredFixed3270 != rhs._requiredFixed3270 {return false}
  11029. if lhs._requiredEnum64 != rhs._requiredEnum64 {return false}
  11030. if lhs._requiredEnum4 != rhs._requiredEnum4 {return false}
  11031. if lhs._a3 != rhs._a3 {return false}
  11032. if lhs._requiredEnum2 != rhs._requiredEnum2 {return false}
  11033. if lhs._requiredEnum1 != rhs._requiredEnum1 {return false}
  11034. if lhs.unknownFields != rhs.unknownFields {return false}
  11035. return true
  11036. }
  11037. }
  11038. extension Proto2Unittest_TestRequiredNoMaskMulti.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  11039. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11040. 0: .same(proto: "UNSPECIFIED"),
  11041. 1: .same(proto: "FOO"),
  11042. 2: .same(proto: "BAR"),
  11043. 100: .same(proto: "BAZ"),
  11044. ]
  11045. }
  11046. extension Proto2Unittest_TestRequired: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11047. static let protoMessageName: String = _protobuf_package + ".TestRequired"
  11048. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11049. 1: .same(proto: "a"),
  11050. 2: .same(proto: "dummy2"),
  11051. 3: .same(proto: "b"),
  11052. 4: .same(proto: "dummy4"),
  11053. 5: .same(proto: "dummy5"),
  11054. 6: .same(proto: "dummy6"),
  11055. 7: .same(proto: "dummy7"),
  11056. 8: .same(proto: "dummy8"),
  11057. 9: .same(proto: "dummy9"),
  11058. 10: .same(proto: "dummy10"),
  11059. 11: .same(proto: "dummy11"),
  11060. 12: .same(proto: "dummy12"),
  11061. 13: .same(proto: "dummy13"),
  11062. 14: .same(proto: "dummy14"),
  11063. 15: .same(proto: "dummy15"),
  11064. 16: .same(proto: "dummy16"),
  11065. 17: .same(proto: "dummy17"),
  11066. 18: .same(proto: "dummy18"),
  11067. 19: .same(proto: "dummy19"),
  11068. 20: .same(proto: "dummy20"),
  11069. 21: .same(proto: "dummy21"),
  11070. 22: .same(proto: "dummy22"),
  11071. 23: .same(proto: "dummy23"),
  11072. 24: .same(proto: "dummy24"),
  11073. 25: .same(proto: "dummy25"),
  11074. 26: .same(proto: "dummy26"),
  11075. 27: .same(proto: "dummy27"),
  11076. 28: .same(proto: "dummy28"),
  11077. 29: .same(proto: "dummy29"),
  11078. 30: .same(proto: "dummy30"),
  11079. 31: .same(proto: "dummy31"),
  11080. 32: .same(proto: "dummy32"),
  11081. 33: .same(proto: "c"),
  11082. 34: .standard(proto: "optional_foreign"),
  11083. ]
  11084. fileprivate class _StorageClass {
  11085. var _a: Int32? = nil
  11086. var _dummy2: Int32? = nil
  11087. var _b: Int32? = nil
  11088. var _dummy4: Int32? = nil
  11089. var _dummy5: Int32? = nil
  11090. var _dummy6: Int32? = nil
  11091. var _dummy7: Int32? = nil
  11092. var _dummy8: Int32? = nil
  11093. var _dummy9: Int32? = nil
  11094. var _dummy10: Int32? = nil
  11095. var _dummy11: Int32? = nil
  11096. var _dummy12: Int32? = nil
  11097. var _dummy13: Int32? = nil
  11098. var _dummy14: Int32? = nil
  11099. var _dummy15: Int32? = nil
  11100. var _dummy16: Int32? = nil
  11101. var _dummy17: Int32? = nil
  11102. var _dummy18: Int32? = nil
  11103. var _dummy19: Int32? = nil
  11104. var _dummy20: Int32? = nil
  11105. var _dummy21: Int32? = nil
  11106. var _dummy22: Int32? = nil
  11107. var _dummy23: Int32? = nil
  11108. var _dummy24: Int32? = nil
  11109. var _dummy25: Int32? = nil
  11110. var _dummy26: Int32? = nil
  11111. var _dummy27: Int32? = nil
  11112. var _dummy28: Int32? = nil
  11113. var _dummy29: Int32? = nil
  11114. var _dummy30: Int32? = nil
  11115. var _dummy31: Int32? = nil
  11116. var _dummy32: Int32? = nil
  11117. var _c: Int32? = nil
  11118. var _optionalForeign: Proto2Unittest_ForeignMessage? = nil
  11119. // This property is used as the initial default value for new instances of the type.
  11120. // The type itself is protecting the reference to its storage via CoW semantics.
  11121. // This will force a copy to be made of this reference when the first mutation occurs;
  11122. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  11123. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  11124. private init() {}
  11125. init(copying source: _StorageClass) {
  11126. _a = source._a
  11127. _dummy2 = source._dummy2
  11128. _b = source._b
  11129. _dummy4 = source._dummy4
  11130. _dummy5 = source._dummy5
  11131. _dummy6 = source._dummy6
  11132. _dummy7 = source._dummy7
  11133. _dummy8 = source._dummy8
  11134. _dummy9 = source._dummy9
  11135. _dummy10 = source._dummy10
  11136. _dummy11 = source._dummy11
  11137. _dummy12 = source._dummy12
  11138. _dummy13 = source._dummy13
  11139. _dummy14 = source._dummy14
  11140. _dummy15 = source._dummy15
  11141. _dummy16 = source._dummy16
  11142. _dummy17 = source._dummy17
  11143. _dummy18 = source._dummy18
  11144. _dummy19 = source._dummy19
  11145. _dummy20 = source._dummy20
  11146. _dummy21 = source._dummy21
  11147. _dummy22 = source._dummy22
  11148. _dummy23 = source._dummy23
  11149. _dummy24 = source._dummy24
  11150. _dummy25 = source._dummy25
  11151. _dummy26 = source._dummy26
  11152. _dummy27 = source._dummy27
  11153. _dummy28 = source._dummy28
  11154. _dummy29 = source._dummy29
  11155. _dummy30 = source._dummy30
  11156. _dummy31 = source._dummy31
  11157. _dummy32 = source._dummy32
  11158. _c = source._c
  11159. _optionalForeign = source._optionalForeign
  11160. }
  11161. }
  11162. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  11163. if !isKnownUniquelyReferenced(&_storage) {
  11164. _storage = _StorageClass(copying: _storage)
  11165. }
  11166. return _storage
  11167. }
  11168. public var isInitialized: Bool {
  11169. return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11170. if _storage._a == nil {return false}
  11171. if _storage._b == nil {return false}
  11172. if _storage._c == nil {return false}
  11173. return true
  11174. }
  11175. }
  11176. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11177. _ = _uniqueStorage()
  11178. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11179. while let fieldNumber = try decoder.nextFieldNumber() {
  11180. // The use of inline closures is to circumvent an issue where the compiler
  11181. // allocates stack space for every case branch when no optimizations are
  11182. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11183. switch fieldNumber {
  11184. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._a) }()
  11185. case 2: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy2) }()
  11186. case 3: try { try decoder.decodeSingularInt32Field(value: &_storage._b) }()
  11187. case 4: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy4) }()
  11188. case 5: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy5) }()
  11189. case 6: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy6) }()
  11190. case 7: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy7) }()
  11191. case 8: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy8) }()
  11192. case 9: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy9) }()
  11193. case 10: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy10) }()
  11194. case 11: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy11) }()
  11195. case 12: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy12) }()
  11196. case 13: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy13) }()
  11197. case 14: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy14) }()
  11198. case 15: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy15) }()
  11199. case 16: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy16) }()
  11200. case 17: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy17) }()
  11201. case 18: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy18) }()
  11202. case 19: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy19) }()
  11203. case 20: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy20) }()
  11204. case 21: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy21) }()
  11205. case 22: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy22) }()
  11206. case 23: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy23) }()
  11207. case 24: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy24) }()
  11208. case 25: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy25) }()
  11209. case 26: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy26) }()
  11210. case 27: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy27) }()
  11211. case 28: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy28) }()
  11212. case 29: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy29) }()
  11213. case 30: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy30) }()
  11214. case 31: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy31) }()
  11215. case 32: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy32) }()
  11216. case 33: try { try decoder.decodeSingularInt32Field(value: &_storage._c) }()
  11217. case 34: try { try decoder.decodeSingularMessageField(value: &_storage._optionalForeign) }()
  11218. default: break
  11219. }
  11220. }
  11221. }
  11222. }
  11223. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11224. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11225. // The use of inline closures is to circumvent an issue where the compiler
  11226. // allocates stack space for every if/case branch local when no optimizations
  11227. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11228. // https://github.com/apple/swift-protobuf/issues/1182
  11229. try { if let v = _storage._a {
  11230. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  11231. } }()
  11232. try { if let v = _storage._dummy2 {
  11233. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  11234. } }()
  11235. try { if let v = _storage._b {
  11236. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  11237. } }()
  11238. try { if let v = _storage._dummy4 {
  11239. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  11240. } }()
  11241. try { if let v = _storage._dummy5 {
  11242. try visitor.visitSingularInt32Field(value: v, fieldNumber: 5)
  11243. } }()
  11244. try { if let v = _storage._dummy6 {
  11245. try visitor.visitSingularInt32Field(value: v, fieldNumber: 6)
  11246. } }()
  11247. try { if let v = _storage._dummy7 {
  11248. try visitor.visitSingularInt32Field(value: v, fieldNumber: 7)
  11249. } }()
  11250. try { if let v = _storage._dummy8 {
  11251. try visitor.visitSingularInt32Field(value: v, fieldNumber: 8)
  11252. } }()
  11253. try { if let v = _storage._dummy9 {
  11254. try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
  11255. } }()
  11256. try { if let v = _storage._dummy10 {
  11257. try visitor.visitSingularInt32Field(value: v, fieldNumber: 10)
  11258. } }()
  11259. try { if let v = _storage._dummy11 {
  11260. try visitor.visitSingularInt32Field(value: v, fieldNumber: 11)
  11261. } }()
  11262. try { if let v = _storage._dummy12 {
  11263. try visitor.visitSingularInt32Field(value: v, fieldNumber: 12)
  11264. } }()
  11265. try { if let v = _storage._dummy13 {
  11266. try visitor.visitSingularInt32Field(value: v, fieldNumber: 13)
  11267. } }()
  11268. try { if let v = _storage._dummy14 {
  11269. try visitor.visitSingularInt32Field(value: v, fieldNumber: 14)
  11270. } }()
  11271. try { if let v = _storage._dummy15 {
  11272. try visitor.visitSingularInt32Field(value: v, fieldNumber: 15)
  11273. } }()
  11274. try { if let v = _storage._dummy16 {
  11275. try visitor.visitSingularInt32Field(value: v, fieldNumber: 16)
  11276. } }()
  11277. try { if let v = _storage._dummy17 {
  11278. try visitor.visitSingularInt32Field(value: v, fieldNumber: 17)
  11279. } }()
  11280. try { if let v = _storage._dummy18 {
  11281. try visitor.visitSingularInt32Field(value: v, fieldNumber: 18)
  11282. } }()
  11283. try { if let v = _storage._dummy19 {
  11284. try visitor.visitSingularInt32Field(value: v, fieldNumber: 19)
  11285. } }()
  11286. try { if let v = _storage._dummy20 {
  11287. try visitor.visitSingularInt32Field(value: v, fieldNumber: 20)
  11288. } }()
  11289. try { if let v = _storage._dummy21 {
  11290. try visitor.visitSingularInt32Field(value: v, fieldNumber: 21)
  11291. } }()
  11292. try { if let v = _storage._dummy22 {
  11293. try visitor.visitSingularInt32Field(value: v, fieldNumber: 22)
  11294. } }()
  11295. try { if let v = _storage._dummy23 {
  11296. try visitor.visitSingularInt32Field(value: v, fieldNumber: 23)
  11297. } }()
  11298. try { if let v = _storage._dummy24 {
  11299. try visitor.visitSingularInt32Field(value: v, fieldNumber: 24)
  11300. } }()
  11301. try { if let v = _storage._dummy25 {
  11302. try visitor.visitSingularInt32Field(value: v, fieldNumber: 25)
  11303. } }()
  11304. try { if let v = _storage._dummy26 {
  11305. try visitor.visitSingularInt32Field(value: v, fieldNumber: 26)
  11306. } }()
  11307. try { if let v = _storage._dummy27 {
  11308. try visitor.visitSingularInt32Field(value: v, fieldNumber: 27)
  11309. } }()
  11310. try { if let v = _storage._dummy28 {
  11311. try visitor.visitSingularInt32Field(value: v, fieldNumber: 28)
  11312. } }()
  11313. try { if let v = _storage._dummy29 {
  11314. try visitor.visitSingularInt32Field(value: v, fieldNumber: 29)
  11315. } }()
  11316. try { if let v = _storage._dummy30 {
  11317. try visitor.visitSingularInt32Field(value: v, fieldNumber: 30)
  11318. } }()
  11319. try { if let v = _storage._dummy31 {
  11320. try visitor.visitSingularInt32Field(value: v, fieldNumber: 31)
  11321. } }()
  11322. try { if let v = _storage._dummy32 {
  11323. try visitor.visitSingularInt32Field(value: v, fieldNumber: 32)
  11324. } }()
  11325. try { if let v = _storage._c {
  11326. try visitor.visitSingularInt32Field(value: v, fieldNumber: 33)
  11327. } }()
  11328. try { if let v = _storage._optionalForeign {
  11329. try visitor.visitSingularMessageField(value: v, fieldNumber: 34)
  11330. } }()
  11331. }
  11332. try unknownFields.traverse(visitor: &visitor)
  11333. }
  11334. static func ==(lhs: Proto2Unittest_TestRequired, rhs: Proto2Unittest_TestRequired) -> Bool {
  11335. if lhs._storage !== rhs._storage {
  11336. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  11337. let _storage = _args.0
  11338. let rhs_storage = _args.1
  11339. if _storage._a != rhs_storage._a {return false}
  11340. if _storage._dummy2 != rhs_storage._dummy2 {return false}
  11341. if _storage._b != rhs_storage._b {return false}
  11342. if _storage._dummy4 != rhs_storage._dummy4 {return false}
  11343. if _storage._dummy5 != rhs_storage._dummy5 {return false}
  11344. if _storage._dummy6 != rhs_storage._dummy6 {return false}
  11345. if _storage._dummy7 != rhs_storage._dummy7 {return false}
  11346. if _storage._dummy8 != rhs_storage._dummy8 {return false}
  11347. if _storage._dummy9 != rhs_storage._dummy9 {return false}
  11348. if _storage._dummy10 != rhs_storage._dummy10 {return false}
  11349. if _storage._dummy11 != rhs_storage._dummy11 {return false}
  11350. if _storage._dummy12 != rhs_storage._dummy12 {return false}
  11351. if _storage._dummy13 != rhs_storage._dummy13 {return false}
  11352. if _storage._dummy14 != rhs_storage._dummy14 {return false}
  11353. if _storage._dummy15 != rhs_storage._dummy15 {return false}
  11354. if _storage._dummy16 != rhs_storage._dummy16 {return false}
  11355. if _storage._dummy17 != rhs_storage._dummy17 {return false}
  11356. if _storage._dummy18 != rhs_storage._dummy18 {return false}
  11357. if _storage._dummy19 != rhs_storage._dummy19 {return false}
  11358. if _storage._dummy20 != rhs_storage._dummy20 {return false}
  11359. if _storage._dummy21 != rhs_storage._dummy21 {return false}
  11360. if _storage._dummy22 != rhs_storage._dummy22 {return false}
  11361. if _storage._dummy23 != rhs_storage._dummy23 {return false}
  11362. if _storage._dummy24 != rhs_storage._dummy24 {return false}
  11363. if _storage._dummy25 != rhs_storage._dummy25 {return false}
  11364. if _storage._dummy26 != rhs_storage._dummy26 {return false}
  11365. if _storage._dummy27 != rhs_storage._dummy27 {return false}
  11366. if _storage._dummy28 != rhs_storage._dummy28 {return false}
  11367. if _storage._dummy29 != rhs_storage._dummy29 {return false}
  11368. if _storage._dummy30 != rhs_storage._dummy30 {return false}
  11369. if _storage._dummy31 != rhs_storage._dummy31 {return false}
  11370. if _storage._dummy32 != rhs_storage._dummy32 {return false}
  11371. if _storage._c != rhs_storage._c {return false}
  11372. if _storage._optionalForeign != rhs_storage._optionalForeign {return false}
  11373. return true
  11374. }
  11375. if !storagesAreEqual {return false}
  11376. }
  11377. if lhs.unknownFields != rhs.unknownFields {return false}
  11378. return true
  11379. }
  11380. }
  11381. extension Proto2Unittest_TestRequiredForeign: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11382. static let protoMessageName: String = _protobuf_package + ".TestRequiredForeign"
  11383. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11384. 1: .standard(proto: "optional_message"),
  11385. 2: .standard(proto: "repeated_message"),
  11386. 3: .same(proto: "dummy"),
  11387. 4: .standard(proto: "optional_lazy_message"),
  11388. ]
  11389. public var isInitialized: Bool {
  11390. if let v = self._optionalMessage, !v.isInitialized {return false}
  11391. if !SwiftProtobuf.Internal.areAllInitialized(self.repeatedMessage) {return false}
  11392. return true
  11393. }
  11394. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11395. while let fieldNumber = try decoder.nextFieldNumber() {
  11396. // The use of inline closures is to circumvent an issue where the compiler
  11397. // allocates stack space for every case branch when no optimizations are
  11398. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11399. switch fieldNumber {
  11400. case 1: try { try decoder.decodeSingularMessageField(value: &self._optionalMessage) }()
  11401. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedMessage) }()
  11402. case 3: try { try decoder.decodeSingularInt32Field(value: &self._dummy) }()
  11403. case 4: try { try decoder.decodeSingularMessageField(value: &self._optionalLazyMessage) }()
  11404. default: break
  11405. }
  11406. }
  11407. }
  11408. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11409. // The use of inline closures is to circumvent an issue where the compiler
  11410. // allocates stack space for every if/case branch local when no optimizations
  11411. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11412. // https://github.com/apple/swift-protobuf/issues/1182
  11413. try { if let v = self._optionalMessage {
  11414. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  11415. } }()
  11416. if !self.repeatedMessage.isEmpty {
  11417. try visitor.visitRepeatedMessageField(value: self.repeatedMessage, fieldNumber: 2)
  11418. }
  11419. try { if let v = self._dummy {
  11420. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  11421. } }()
  11422. try { if let v = self._optionalLazyMessage {
  11423. try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
  11424. } }()
  11425. try unknownFields.traverse(visitor: &visitor)
  11426. }
  11427. static func ==(lhs: Proto2Unittest_TestRequiredForeign, rhs: Proto2Unittest_TestRequiredForeign) -> Bool {
  11428. if lhs._optionalMessage != rhs._optionalMessage {return false}
  11429. if lhs.repeatedMessage != rhs.repeatedMessage {return false}
  11430. if lhs._dummy != rhs._dummy {return false}
  11431. if lhs._optionalLazyMessage != rhs._optionalLazyMessage {return false}
  11432. if lhs.unknownFields != rhs.unknownFields {return false}
  11433. return true
  11434. }
  11435. }
  11436. extension Proto2Unittest_TestRequiredMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11437. static let protoMessageName: String = _protobuf_package + ".TestRequiredMessage"
  11438. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11439. 1: .standard(proto: "optional_message"),
  11440. 2: .standard(proto: "repeated_message"),
  11441. 3: .standard(proto: "required_message"),
  11442. ]
  11443. public var isInitialized: Bool {
  11444. if self._requiredMessage == nil {return false}
  11445. if let v = self._optionalMessage, !v.isInitialized {return false}
  11446. if !SwiftProtobuf.Internal.areAllInitialized(self.repeatedMessage) {return false}
  11447. if let v = self._requiredMessage, !v.isInitialized {return false}
  11448. return true
  11449. }
  11450. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11451. while let fieldNumber = try decoder.nextFieldNumber() {
  11452. // The use of inline closures is to circumvent an issue where the compiler
  11453. // allocates stack space for every case branch when no optimizations are
  11454. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11455. switch fieldNumber {
  11456. case 1: try { try decoder.decodeSingularMessageField(value: &self._optionalMessage) }()
  11457. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedMessage) }()
  11458. case 3: try { try decoder.decodeSingularMessageField(value: &self._requiredMessage) }()
  11459. default: break
  11460. }
  11461. }
  11462. }
  11463. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11464. // The use of inline closures is to circumvent an issue where the compiler
  11465. // allocates stack space for every if/case branch local when no optimizations
  11466. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11467. // https://github.com/apple/swift-protobuf/issues/1182
  11468. try { if let v = self._optionalMessage {
  11469. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  11470. } }()
  11471. if !self.repeatedMessage.isEmpty {
  11472. try visitor.visitRepeatedMessageField(value: self.repeatedMessage, fieldNumber: 2)
  11473. }
  11474. try { if let v = self._requiredMessage {
  11475. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  11476. } }()
  11477. try unknownFields.traverse(visitor: &visitor)
  11478. }
  11479. static func ==(lhs: Proto2Unittest_TestRequiredMessage, rhs: Proto2Unittest_TestRequiredMessage) -> Bool {
  11480. if lhs._optionalMessage != rhs._optionalMessage {return false}
  11481. if lhs.repeatedMessage != rhs.repeatedMessage {return false}
  11482. if lhs._requiredMessage != rhs._requiredMessage {return false}
  11483. if lhs.unknownFields != rhs.unknownFields {return false}
  11484. return true
  11485. }
  11486. }
  11487. extension Proto2Unittest_TestNestedRequiredForeign: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11488. static let protoMessageName: String = _protobuf_package + ".TestNestedRequiredForeign"
  11489. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11490. 1: .same(proto: "child"),
  11491. 2: .same(proto: "payload"),
  11492. 3: .same(proto: "dummy"),
  11493. 5: .standard(proto: "required_enum"),
  11494. 6: .standard(proto: "required_enum_no_mask"),
  11495. 7: .standard(proto: "required_enum_multi"),
  11496. 9: .standard(proto: "required_no_mask"),
  11497. ]
  11498. fileprivate class _StorageClass {
  11499. var _child: Proto2Unittest_TestNestedRequiredForeign? = nil
  11500. var _payload: Proto2Unittest_TestRequiredForeign? = nil
  11501. var _dummy: Int32? = nil
  11502. var _requiredEnum: Proto2Unittest_TestRequiredEnum? = nil
  11503. var _requiredEnumNoMask: Proto2Unittest_TestRequiredEnumNoMask? = nil
  11504. var _requiredEnumMulti: Proto2Unittest_TestRequiredEnumMulti? = nil
  11505. var _requiredNoMask: Proto2Unittest_TestRequiredNoMaskMulti? = nil
  11506. // This property is used as the initial default value for new instances of the type.
  11507. // The type itself is protecting the reference to its storage via CoW semantics.
  11508. // This will force a copy to be made of this reference when the first mutation occurs;
  11509. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  11510. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  11511. private init() {}
  11512. init(copying source: _StorageClass) {
  11513. _child = source._child
  11514. _payload = source._payload
  11515. _dummy = source._dummy
  11516. _requiredEnum = source._requiredEnum
  11517. _requiredEnumNoMask = source._requiredEnumNoMask
  11518. _requiredEnumMulti = source._requiredEnumMulti
  11519. _requiredNoMask = source._requiredNoMask
  11520. }
  11521. }
  11522. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  11523. if !isKnownUniquelyReferenced(&_storage) {
  11524. _storage = _StorageClass(copying: _storage)
  11525. }
  11526. return _storage
  11527. }
  11528. public var isInitialized: Bool {
  11529. return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11530. if let v = _storage._child, !v.isInitialized {return false}
  11531. if let v = _storage._payload, !v.isInitialized {return false}
  11532. if let v = _storage._requiredEnum, !v.isInitialized {return false}
  11533. if let v = _storage._requiredEnumNoMask, !v.isInitialized {return false}
  11534. if let v = _storage._requiredEnumMulti, !v.isInitialized {return false}
  11535. if let v = _storage._requiredNoMask, !v.isInitialized {return false}
  11536. return true
  11537. }
  11538. }
  11539. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11540. _ = _uniqueStorage()
  11541. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11542. while let fieldNumber = try decoder.nextFieldNumber() {
  11543. // The use of inline closures is to circumvent an issue where the compiler
  11544. // allocates stack space for every case branch when no optimizations are
  11545. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11546. switch fieldNumber {
  11547. case 1: try { try decoder.decodeSingularMessageField(value: &_storage._child) }()
  11548. case 2: try { try decoder.decodeSingularMessageField(value: &_storage._payload) }()
  11549. case 3: try { try decoder.decodeSingularInt32Field(value: &_storage._dummy) }()
  11550. case 5: try { try decoder.decodeSingularMessageField(value: &_storage._requiredEnum) }()
  11551. case 6: try { try decoder.decodeSingularMessageField(value: &_storage._requiredEnumNoMask) }()
  11552. case 7: try { try decoder.decodeSingularMessageField(value: &_storage._requiredEnumMulti) }()
  11553. case 9: try { try decoder.decodeSingularMessageField(value: &_storage._requiredNoMask) }()
  11554. default: break
  11555. }
  11556. }
  11557. }
  11558. }
  11559. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11560. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11561. // The use of inline closures is to circumvent an issue where the compiler
  11562. // allocates stack space for every if/case branch local when no optimizations
  11563. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11564. // https://github.com/apple/swift-protobuf/issues/1182
  11565. try { if let v = _storage._child {
  11566. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  11567. } }()
  11568. try { if let v = _storage._payload {
  11569. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  11570. } }()
  11571. try { if let v = _storage._dummy {
  11572. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  11573. } }()
  11574. try { if let v = _storage._requiredEnum {
  11575. try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
  11576. } }()
  11577. try { if let v = _storage._requiredEnumNoMask {
  11578. try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
  11579. } }()
  11580. try { if let v = _storage._requiredEnumMulti {
  11581. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  11582. } }()
  11583. try { if let v = _storage._requiredNoMask {
  11584. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  11585. } }()
  11586. }
  11587. try unknownFields.traverse(visitor: &visitor)
  11588. }
  11589. static func ==(lhs: Proto2Unittest_TestNestedRequiredForeign, rhs: Proto2Unittest_TestNestedRequiredForeign) -> Bool {
  11590. if lhs._storage !== rhs._storage {
  11591. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  11592. let _storage = _args.0
  11593. let rhs_storage = _args.1
  11594. if _storage._child != rhs_storage._child {return false}
  11595. if _storage._payload != rhs_storage._payload {return false}
  11596. if _storage._dummy != rhs_storage._dummy {return false}
  11597. if _storage._requiredEnum != rhs_storage._requiredEnum {return false}
  11598. if _storage._requiredEnumNoMask != rhs_storage._requiredEnumNoMask {return false}
  11599. if _storage._requiredEnumMulti != rhs_storage._requiredEnumMulti {return false}
  11600. if _storage._requiredNoMask != rhs_storage._requiredNoMask {return false}
  11601. return true
  11602. }
  11603. if !storagesAreEqual {return false}
  11604. }
  11605. if lhs.unknownFields != rhs.unknownFields {return false}
  11606. return true
  11607. }
  11608. }
  11609. extension Proto2Unittest_TestForeignNested: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11610. static let protoMessageName: String = _protobuf_package + ".TestForeignNested"
  11611. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11612. 1: .standard(proto: "foreign_nested"),
  11613. ]
  11614. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11615. while let fieldNumber = try decoder.nextFieldNumber() {
  11616. // The use of inline closures is to circumvent an issue where the compiler
  11617. // allocates stack space for every case branch when no optimizations are
  11618. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11619. switch fieldNumber {
  11620. case 1: try { try decoder.decodeSingularMessageField(value: &self._foreignNested) }()
  11621. default: break
  11622. }
  11623. }
  11624. }
  11625. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11626. // The use of inline closures is to circumvent an issue where the compiler
  11627. // allocates stack space for every if/case branch local when no optimizations
  11628. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11629. // https://github.com/apple/swift-protobuf/issues/1182
  11630. try { if let v = self._foreignNested {
  11631. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  11632. } }()
  11633. try unknownFields.traverse(visitor: &visitor)
  11634. }
  11635. static func ==(lhs: Proto2Unittest_TestForeignNested, rhs: Proto2Unittest_TestForeignNested) -> Bool {
  11636. if lhs._foreignNested != rhs._foreignNested {return false}
  11637. if lhs.unknownFields != rhs.unknownFields {return false}
  11638. return true
  11639. }
  11640. }
  11641. extension Proto2Unittest_TestEmptyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11642. static let protoMessageName: String = _protobuf_package + ".TestEmptyMessage"
  11643. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  11644. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11645. // Load everything into unknown fields
  11646. while try decoder.nextFieldNumber() != nil {}
  11647. }
  11648. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11649. try unknownFields.traverse(visitor: &visitor)
  11650. }
  11651. static func ==(lhs: Proto2Unittest_TestEmptyMessage, rhs: Proto2Unittest_TestEmptyMessage) -> Bool {
  11652. if lhs.unknownFields != rhs.unknownFields {return false}
  11653. return true
  11654. }
  11655. }
  11656. extension Proto2Unittest_TestEmptyMessageWithExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11657. static let protoMessageName: String = _protobuf_package + ".TestEmptyMessageWithExtensions"
  11658. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  11659. public var isInitialized: Bool {
  11660. if !_protobuf_extensionFieldValues.isInitialized {return false}
  11661. return true
  11662. }
  11663. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11664. while let fieldNumber = try decoder.nextFieldNumber() {
  11665. if (1 <= fieldNumber && fieldNumber < 536870912) {
  11666. try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestEmptyMessageWithExtensions.self, fieldNumber: fieldNumber)
  11667. }
  11668. }
  11669. }
  11670. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11671. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1, end: 536870912)
  11672. try unknownFields.traverse(visitor: &visitor)
  11673. }
  11674. static func ==(lhs: Proto2Unittest_TestEmptyMessageWithExtensions, rhs: Proto2Unittest_TestEmptyMessageWithExtensions) -> Bool {
  11675. if lhs.unknownFields != rhs.unknownFields {return false}
  11676. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  11677. return true
  11678. }
  11679. }
  11680. extension Proto2Unittest_TestPickleNestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11681. static let protoMessageName: String = _protobuf_package + ".TestPickleNestedMessage"
  11682. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  11683. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11684. // Load everything into unknown fields
  11685. while try decoder.nextFieldNumber() != nil {}
  11686. }
  11687. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11688. try unknownFields.traverse(visitor: &visitor)
  11689. }
  11690. static func ==(lhs: Proto2Unittest_TestPickleNestedMessage, rhs: Proto2Unittest_TestPickleNestedMessage) -> Bool {
  11691. if lhs.unknownFields != rhs.unknownFields {return false}
  11692. return true
  11693. }
  11694. }
  11695. extension Proto2Unittest_TestPickleNestedMessage.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11696. static let protoMessageName: String = Proto2Unittest_TestPickleNestedMessage.protoMessageName + ".NestedMessage"
  11697. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11698. 1: .same(proto: "bb"),
  11699. ]
  11700. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11701. while let fieldNumber = try decoder.nextFieldNumber() {
  11702. // The use of inline closures is to circumvent an issue where the compiler
  11703. // allocates stack space for every case branch when no optimizations are
  11704. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11705. switch fieldNumber {
  11706. case 1: try { try decoder.decodeSingularInt32Field(value: &self._bb) }()
  11707. default: break
  11708. }
  11709. }
  11710. }
  11711. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11712. // The use of inline closures is to circumvent an issue where the compiler
  11713. // allocates stack space for every if/case branch local when no optimizations
  11714. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11715. // https://github.com/apple/swift-protobuf/issues/1182
  11716. try { if let v = self._bb {
  11717. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  11718. } }()
  11719. try unknownFields.traverse(visitor: &visitor)
  11720. }
  11721. static func ==(lhs: Proto2Unittest_TestPickleNestedMessage.NestedMessage, rhs: Proto2Unittest_TestPickleNestedMessage.NestedMessage) -> Bool {
  11722. if lhs._bb != rhs._bb {return false}
  11723. if lhs.unknownFields != rhs.unknownFields {return false}
  11724. return true
  11725. }
  11726. }
  11727. extension Proto2Unittest_TestPickleNestedMessage.NestedMessage.NestedNestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11728. static let protoMessageName: String = Proto2Unittest_TestPickleNestedMessage.NestedMessage.protoMessageName + ".NestedNestedMessage"
  11729. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11730. 1: .same(proto: "cc"),
  11731. ]
  11732. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11733. while let fieldNumber = try decoder.nextFieldNumber() {
  11734. // The use of inline closures is to circumvent an issue where the compiler
  11735. // allocates stack space for every case branch when no optimizations are
  11736. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11737. switch fieldNumber {
  11738. case 1: try { try decoder.decodeSingularInt32Field(value: &self._cc) }()
  11739. default: break
  11740. }
  11741. }
  11742. }
  11743. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11744. // The use of inline closures is to circumvent an issue where the compiler
  11745. // allocates stack space for every if/case branch local when no optimizations
  11746. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11747. // https://github.com/apple/swift-protobuf/issues/1182
  11748. try { if let v = self._cc {
  11749. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  11750. } }()
  11751. try unknownFields.traverse(visitor: &visitor)
  11752. }
  11753. static func ==(lhs: Proto2Unittest_TestPickleNestedMessage.NestedMessage.NestedNestedMessage, rhs: Proto2Unittest_TestPickleNestedMessage.NestedMessage.NestedNestedMessage) -> Bool {
  11754. if lhs._cc != rhs._cc {return false}
  11755. if lhs.unknownFields != rhs.unknownFields {return false}
  11756. return true
  11757. }
  11758. }
  11759. extension Proto2Unittest_TestMultipleExtensionRanges: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11760. static let protoMessageName: String = _protobuf_package + ".TestMultipleExtensionRanges"
  11761. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  11762. public var isInitialized: Bool {
  11763. if !_protobuf_extensionFieldValues.isInitialized {return false}
  11764. return true
  11765. }
  11766. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11767. while let fieldNumber = try decoder.nextFieldNumber() {
  11768. if (42 == fieldNumber) || (4143 <= fieldNumber && fieldNumber < 4244) || (65536 <= fieldNumber && fieldNumber < 536870912) {
  11769. try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestMultipleExtensionRanges.self, fieldNumber: fieldNumber)
  11770. }
  11771. }
  11772. }
  11773. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11774. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 42, end: 536870912)
  11775. try unknownFields.traverse(visitor: &visitor)
  11776. }
  11777. static func ==(lhs: Proto2Unittest_TestMultipleExtensionRanges, rhs: Proto2Unittest_TestMultipleExtensionRanges) -> Bool {
  11778. if lhs.unknownFields != rhs.unknownFields {return false}
  11779. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  11780. return true
  11781. }
  11782. }
  11783. extension Proto2Unittest_TestReallyLargeTagNumber: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11784. static let protoMessageName: String = _protobuf_package + ".TestReallyLargeTagNumber"
  11785. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11786. 1: .same(proto: "a"),
  11787. 268435455: .same(proto: "bb"),
  11788. ]
  11789. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11790. while let fieldNumber = try decoder.nextFieldNumber() {
  11791. // The use of inline closures is to circumvent an issue where the compiler
  11792. // allocates stack space for every case branch when no optimizations are
  11793. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11794. switch fieldNumber {
  11795. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  11796. case 268435455: try { try decoder.decodeSingularInt32Field(value: &self._bb) }()
  11797. default: break
  11798. }
  11799. }
  11800. }
  11801. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11802. // The use of inline closures is to circumvent an issue where the compiler
  11803. // allocates stack space for every if/case branch local when no optimizations
  11804. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11805. // https://github.com/apple/swift-protobuf/issues/1182
  11806. try { if let v = self._a {
  11807. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  11808. } }()
  11809. try { if let v = self._bb {
  11810. try visitor.visitSingularInt32Field(value: v, fieldNumber: 268435455)
  11811. } }()
  11812. try unknownFields.traverse(visitor: &visitor)
  11813. }
  11814. static func ==(lhs: Proto2Unittest_TestReallyLargeTagNumber, rhs: Proto2Unittest_TestReallyLargeTagNumber) -> Bool {
  11815. if lhs._a != rhs._a {return false}
  11816. if lhs._bb != rhs._bb {return false}
  11817. if lhs.unknownFields != rhs.unknownFields {return false}
  11818. return true
  11819. }
  11820. }
  11821. extension Proto2Unittest_TestRecursiveMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11822. static let protoMessageName: String = _protobuf_package + ".TestRecursiveMessage"
  11823. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11824. 1: .same(proto: "a"),
  11825. 2: .same(proto: "i"),
  11826. ]
  11827. fileprivate class _StorageClass {
  11828. var _a: Proto2Unittest_TestRecursiveMessage? = nil
  11829. var _i: Int32? = nil
  11830. // This property is used as the initial default value for new instances of the type.
  11831. // The type itself is protecting the reference to its storage via CoW semantics.
  11832. // This will force a copy to be made of this reference when the first mutation occurs;
  11833. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  11834. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  11835. private init() {}
  11836. init(copying source: _StorageClass) {
  11837. _a = source._a
  11838. _i = source._i
  11839. }
  11840. }
  11841. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  11842. if !isKnownUniquelyReferenced(&_storage) {
  11843. _storage = _StorageClass(copying: _storage)
  11844. }
  11845. return _storage
  11846. }
  11847. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11848. _ = _uniqueStorage()
  11849. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11850. while let fieldNumber = try decoder.nextFieldNumber() {
  11851. // The use of inline closures is to circumvent an issue where the compiler
  11852. // allocates stack space for every case branch when no optimizations are
  11853. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11854. switch fieldNumber {
  11855. case 1: try { try decoder.decodeSingularMessageField(value: &_storage._a) }()
  11856. case 2: try { try decoder.decodeSingularInt32Field(value: &_storage._i) }()
  11857. default: break
  11858. }
  11859. }
  11860. }
  11861. }
  11862. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11863. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11864. // The use of inline closures is to circumvent an issue where the compiler
  11865. // allocates stack space for every if/case branch local when no optimizations
  11866. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11867. // https://github.com/apple/swift-protobuf/issues/1182
  11868. try { if let v = _storage._a {
  11869. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  11870. } }()
  11871. try { if let v = _storage._i {
  11872. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  11873. } }()
  11874. }
  11875. try unknownFields.traverse(visitor: &visitor)
  11876. }
  11877. static func ==(lhs: Proto2Unittest_TestRecursiveMessage, rhs: Proto2Unittest_TestRecursiveMessage) -> Bool {
  11878. if lhs._storage !== rhs._storage {
  11879. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  11880. let _storage = _args.0
  11881. let rhs_storage = _args.1
  11882. if _storage._a != rhs_storage._a {return false}
  11883. if _storage._i != rhs_storage._i {return false}
  11884. return true
  11885. }
  11886. if !storagesAreEqual {return false}
  11887. }
  11888. if lhs.unknownFields != rhs.unknownFields {return false}
  11889. return true
  11890. }
  11891. }
  11892. extension Proto2Unittest_TestMutualRecursionA: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11893. static let protoMessageName: String = _protobuf_package + ".TestMutualRecursionA"
  11894. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11895. 1: .same(proto: "bb"),
  11896. 2: .same(proto: "subgroup"),
  11897. 2: .unique(proto: "SubGroup", json: "subgroup"),
  11898. 5: .same(proto: "subgroupr"),
  11899. 5: .unique(proto: "SubGroupR", json: "subgroupr"),
  11900. ]
  11901. fileprivate class _StorageClass {
  11902. var _bb: Proto2Unittest_TestMutualRecursionB? = nil
  11903. var _subGroup: Proto2Unittest_TestMutualRecursionA.SubGroup? = nil
  11904. var _subGroupR: [Proto2Unittest_TestMutualRecursionA.SubGroupR] = []
  11905. // This property is used as the initial default value for new instances of the type.
  11906. // The type itself is protecting the reference to its storage via CoW semantics.
  11907. // This will force a copy to be made of this reference when the first mutation occurs;
  11908. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  11909. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  11910. private init() {}
  11911. init(copying source: _StorageClass) {
  11912. _bb = source._bb
  11913. _subGroup = source._subGroup
  11914. _subGroupR = source._subGroupR
  11915. }
  11916. }
  11917. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  11918. if !isKnownUniquelyReferenced(&_storage) {
  11919. _storage = _StorageClass(copying: _storage)
  11920. }
  11921. return _storage
  11922. }
  11923. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11924. _ = _uniqueStorage()
  11925. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11926. while let fieldNumber = try decoder.nextFieldNumber() {
  11927. // The use of inline closures is to circumvent an issue where the compiler
  11928. // allocates stack space for every case branch when no optimizations are
  11929. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  11930. switch fieldNumber {
  11931. case 1: try { try decoder.decodeSingularMessageField(value: &_storage._bb) }()
  11932. case 2: try { try decoder.decodeSingularGroupField(value: &_storage._subGroup) }()
  11933. case 5: try { try decoder.decodeRepeatedGroupField(value: &_storage._subGroupR) }()
  11934. default: break
  11935. }
  11936. }
  11937. }
  11938. }
  11939. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  11940. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11941. // The use of inline closures is to circumvent an issue where the compiler
  11942. // allocates stack space for every if/case branch local when no optimizations
  11943. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  11944. // https://github.com/apple/swift-protobuf/issues/1182
  11945. try { if let v = _storage._bb {
  11946. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  11947. } }()
  11948. try { if let v = _storage._subGroup {
  11949. try visitor.visitSingularGroupField(value: v, fieldNumber: 2)
  11950. } }()
  11951. if !_storage._subGroupR.isEmpty {
  11952. try visitor.visitRepeatedGroupField(value: _storage._subGroupR, fieldNumber: 5)
  11953. }
  11954. }
  11955. try unknownFields.traverse(visitor: &visitor)
  11956. }
  11957. static func ==(lhs: Proto2Unittest_TestMutualRecursionA, rhs: Proto2Unittest_TestMutualRecursionA) -> Bool {
  11958. if lhs._storage !== rhs._storage {
  11959. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  11960. let _storage = _args.0
  11961. let rhs_storage = _args.1
  11962. if _storage._bb != rhs_storage._bb {return false}
  11963. if _storage._subGroup != rhs_storage._subGroup {return false}
  11964. if _storage._subGroupR != rhs_storage._subGroupR {return false}
  11965. return true
  11966. }
  11967. if !storagesAreEqual {return false}
  11968. }
  11969. if lhs.unknownFields != rhs.unknownFields {return false}
  11970. return true
  11971. }
  11972. }
  11973. extension Proto2Unittest_TestMutualRecursionA.SubMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  11974. static let protoMessageName: String = Proto2Unittest_TestMutualRecursionA.protoMessageName + ".SubMessage"
  11975. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  11976. 1: .same(proto: "b"),
  11977. ]
  11978. fileprivate class _StorageClass {
  11979. var _b: Proto2Unittest_TestMutualRecursionB? = nil
  11980. // This property is used as the initial default value for new instances of the type.
  11981. // The type itself is protecting the reference to its storage via CoW semantics.
  11982. // This will force a copy to be made of this reference when the first mutation occurs;
  11983. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  11984. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  11985. private init() {}
  11986. init(copying source: _StorageClass) {
  11987. _b = source._b
  11988. }
  11989. }
  11990. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  11991. if !isKnownUniquelyReferenced(&_storage) {
  11992. _storage = _StorageClass(copying: _storage)
  11993. }
  11994. return _storage
  11995. }
  11996. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  11997. _ = _uniqueStorage()
  11998. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  11999. while let fieldNumber = try decoder.nextFieldNumber() {
  12000. // The use of inline closures is to circumvent an issue where the compiler
  12001. // allocates stack space for every case branch when no optimizations are
  12002. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12003. switch fieldNumber {
  12004. case 1: try { try decoder.decodeSingularMessageField(value: &_storage._b) }()
  12005. default: break
  12006. }
  12007. }
  12008. }
  12009. }
  12010. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12011. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  12012. // The use of inline closures is to circumvent an issue where the compiler
  12013. // allocates stack space for every if/case branch local when no optimizations
  12014. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12015. // https://github.com/apple/swift-protobuf/issues/1182
  12016. try { if let v = _storage._b {
  12017. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  12018. } }()
  12019. }
  12020. try unknownFields.traverse(visitor: &visitor)
  12021. }
  12022. static func ==(lhs: Proto2Unittest_TestMutualRecursionA.SubMessage, rhs: Proto2Unittest_TestMutualRecursionA.SubMessage) -> Bool {
  12023. if lhs._storage !== rhs._storage {
  12024. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  12025. let _storage = _args.0
  12026. let rhs_storage = _args.1
  12027. if _storage._b != rhs_storage._b {return false}
  12028. return true
  12029. }
  12030. if !storagesAreEqual {return false}
  12031. }
  12032. if lhs.unknownFields != rhs.unknownFields {return false}
  12033. return true
  12034. }
  12035. }
  12036. extension Proto2Unittest_TestMutualRecursionA.SubGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12037. static let protoMessageName: String = Proto2Unittest_TestMutualRecursionA.protoMessageName + ".SubGroup"
  12038. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12039. 3: .standard(proto: "sub_message"),
  12040. 4: .standard(proto: "not_in_this_scc"),
  12041. ]
  12042. fileprivate class _StorageClass {
  12043. var _subMessage: Proto2Unittest_TestMutualRecursionA.SubMessage? = nil
  12044. var _notInThisScc: Proto2Unittest_TestAllTypes? = nil
  12045. // This property is used as the initial default value for new instances of the type.
  12046. // The type itself is protecting the reference to its storage via CoW semantics.
  12047. // This will force a copy to be made of this reference when the first mutation occurs;
  12048. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  12049. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  12050. private init() {}
  12051. init(copying source: _StorageClass) {
  12052. _subMessage = source._subMessage
  12053. _notInThisScc = source._notInThisScc
  12054. }
  12055. }
  12056. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  12057. if !isKnownUniquelyReferenced(&_storage) {
  12058. _storage = _StorageClass(copying: _storage)
  12059. }
  12060. return _storage
  12061. }
  12062. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12063. _ = _uniqueStorage()
  12064. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  12065. while let fieldNumber = try decoder.nextFieldNumber() {
  12066. // The use of inline closures is to circumvent an issue where the compiler
  12067. // allocates stack space for every case branch when no optimizations are
  12068. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12069. switch fieldNumber {
  12070. case 3: try { try decoder.decodeSingularMessageField(value: &_storage._subMessage) }()
  12071. case 4: try { try decoder.decodeSingularMessageField(value: &_storage._notInThisScc) }()
  12072. default: break
  12073. }
  12074. }
  12075. }
  12076. }
  12077. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12078. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  12079. // The use of inline closures is to circumvent an issue where the compiler
  12080. // allocates stack space for every if/case branch local when no optimizations
  12081. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12082. // https://github.com/apple/swift-protobuf/issues/1182
  12083. try { if let v = _storage._subMessage {
  12084. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  12085. } }()
  12086. try { if let v = _storage._notInThisScc {
  12087. try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
  12088. } }()
  12089. }
  12090. try unknownFields.traverse(visitor: &visitor)
  12091. }
  12092. static func ==(lhs: Proto2Unittest_TestMutualRecursionA.SubGroup, rhs: Proto2Unittest_TestMutualRecursionA.SubGroup) -> Bool {
  12093. if lhs._storage !== rhs._storage {
  12094. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  12095. let _storage = _args.0
  12096. let rhs_storage = _args.1
  12097. if _storage._subMessage != rhs_storage._subMessage {return false}
  12098. if _storage._notInThisScc != rhs_storage._notInThisScc {return false}
  12099. return true
  12100. }
  12101. if !storagesAreEqual {return false}
  12102. }
  12103. if lhs.unknownFields != rhs.unknownFields {return false}
  12104. return true
  12105. }
  12106. }
  12107. extension Proto2Unittest_TestMutualRecursionA.SubGroupR: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12108. static let protoMessageName: String = Proto2Unittest_TestMutualRecursionA.protoMessageName + ".SubGroupR"
  12109. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12110. 6: .same(proto: "payload"),
  12111. ]
  12112. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12113. while let fieldNumber = try decoder.nextFieldNumber() {
  12114. // The use of inline closures is to circumvent an issue where the compiler
  12115. // allocates stack space for every case branch when no optimizations are
  12116. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12117. switch fieldNumber {
  12118. case 6: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  12119. default: break
  12120. }
  12121. }
  12122. }
  12123. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12124. // The use of inline closures is to circumvent an issue where the compiler
  12125. // allocates stack space for every if/case branch local when no optimizations
  12126. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12127. // https://github.com/apple/swift-protobuf/issues/1182
  12128. try { if let v = self._payload {
  12129. try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
  12130. } }()
  12131. try unknownFields.traverse(visitor: &visitor)
  12132. }
  12133. static func ==(lhs: Proto2Unittest_TestMutualRecursionA.SubGroupR, rhs: Proto2Unittest_TestMutualRecursionA.SubGroupR) -> Bool {
  12134. if lhs._payload != rhs._payload {return false}
  12135. if lhs.unknownFields != rhs.unknownFields {return false}
  12136. return true
  12137. }
  12138. }
  12139. extension Proto2Unittest_TestMutualRecursionB: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12140. static let protoMessageName: String = _protobuf_package + ".TestMutualRecursionB"
  12141. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12142. 1: .same(proto: "a"),
  12143. 2: .standard(proto: "optional_int32"),
  12144. ]
  12145. fileprivate class _StorageClass {
  12146. var _a: Proto2Unittest_TestMutualRecursionA? = nil
  12147. var _optionalInt32: Int32? = nil
  12148. // This property is used as the initial default value for new instances of the type.
  12149. // The type itself is protecting the reference to its storage via CoW semantics.
  12150. // This will force a copy to be made of this reference when the first mutation occurs;
  12151. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  12152. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  12153. private init() {}
  12154. init(copying source: _StorageClass) {
  12155. _a = source._a
  12156. _optionalInt32 = source._optionalInt32
  12157. }
  12158. }
  12159. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  12160. if !isKnownUniquelyReferenced(&_storage) {
  12161. _storage = _StorageClass(copying: _storage)
  12162. }
  12163. return _storage
  12164. }
  12165. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12166. _ = _uniqueStorage()
  12167. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  12168. while let fieldNumber = try decoder.nextFieldNumber() {
  12169. // The use of inline closures is to circumvent an issue where the compiler
  12170. // allocates stack space for every case branch when no optimizations are
  12171. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12172. switch fieldNumber {
  12173. case 1: try { try decoder.decodeSingularMessageField(value: &_storage._a) }()
  12174. case 2: try { try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) }()
  12175. default: break
  12176. }
  12177. }
  12178. }
  12179. }
  12180. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12181. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  12182. // The use of inline closures is to circumvent an issue where the compiler
  12183. // allocates stack space for every if/case branch local when no optimizations
  12184. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12185. // https://github.com/apple/swift-protobuf/issues/1182
  12186. try { if let v = _storage._a {
  12187. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  12188. } }()
  12189. try { if let v = _storage._optionalInt32 {
  12190. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  12191. } }()
  12192. }
  12193. try unknownFields.traverse(visitor: &visitor)
  12194. }
  12195. static func ==(lhs: Proto2Unittest_TestMutualRecursionB, rhs: Proto2Unittest_TestMutualRecursionB) -> Bool {
  12196. if lhs._storage !== rhs._storage {
  12197. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  12198. let _storage = _args.0
  12199. let rhs_storage = _args.1
  12200. if _storage._a != rhs_storage._a {return false}
  12201. if _storage._optionalInt32 != rhs_storage._optionalInt32 {return false}
  12202. return true
  12203. }
  12204. if !storagesAreEqual {return false}
  12205. }
  12206. if lhs.unknownFields != rhs.unknownFields {return false}
  12207. return true
  12208. }
  12209. }
  12210. extension Proto2Unittest_TestIsInitialized: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12211. static let protoMessageName: String = _protobuf_package + ".TestIsInitialized"
  12212. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12213. 1: .standard(proto: "sub_message"),
  12214. ]
  12215. public var isInitialized: Bool {
  12216. if let v = self._subMessage, !v.isInitialized {return false}
  12217. return true
  12218. }
  12219. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12220. while let fieldNumber = try decoder.nextFieldNumber() {
  12221. // The use of inline closures is to circumvent an issue where the compiler
  12222. // allocates stack space for every case branch when no optimizations are
  12223. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12224. switch fieldNumber {
  12225. case 1: try { try decoder.decodeSingularMessageField(value: &self._subMessage) }()
  12226. default: break
  12227. }
  12228. }
  12229. }
  12230. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12231. // The use of inline closures is to circumvent an issue where the compiler
  12232. // allocates stack space for every if/case branch local when no optimizations
  12233. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12234. // https://github.com/apple/swift-protobuf/issues/1182
  12235. try { if let v = self._subMessage {
  12236. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  12237. } }()
  12238. try unknownFields.traverse(visitor: &visitor)
  12239. }
  12240. static func ==(lhs: Proto2Unittest_TestIsInitialized, rhs: Proto2Unittest_TestIsInitialized) -> Bool {
  12241. if lhs._subMessage != rhs._subMessage {return false}
  12242. if lhs.unknownFields != rhs.unknownFields {return false}
  12243. return true
  12244. }
  12245. }
  12246. extension Proto2Unittest_TestIsInitialized.SubMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12247. static let protoMessageName: String = Proto2Unittest_TestIsInitialized.protoMessageName + ".SubMessage"
  12248. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12249. 1: .same(proto: "subgroup"),
  12250. 1: .unique(proto: "SubGroup", json: "subgroup"),
  12251. ]
  12252. public var isInitialized: Bool {
  12253. if let v = self._subGroup, !v.isInitialized {return false}
  12254. return true
  12255. }
  12256. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12257. while let fieldNumber = try decoder.nextFieldNumber() {
  12258. // The use of inline closures is to circumvent an issue where the compiler
  12259. // allocates stack space for every case branch when no optimizations are
  12260. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12261. switch fieldNumber {
  12262. case 1: try { try decoder.decodeSingularGroupField(value: &self._subGroup) }()
  12263. default: break
  12264. }
  12265. }
  12266. }
  12267. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12268. // The use of inline closures is to circumvent an issue where the compiler
  12269. // allocates stack space for every if/case branch local when no optimizations
  12270. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12271. // https://github.com/apple/swift-protobuf/issues/1182
  12272. try { if let v = self._subGroup {
  12273. try visitor.visitSingularGroupField(value: v, fieldNumber: 1)
  12274. } }()
  12275. try unknownFields.traverse(visitor: &visitor)
  12276. }
  12277. static func ==(lhs: Proto2Unittest_TestIsInitialized.SubMessage, rhs: Proto2Unittest_TestIsInitialized.SubMessage) -> Bool {
  12278. if lhs._subGroup != rhs._subGroup {return false}
  12279. if lhs.unknownFields != rhs.unknownFields {return false}
  12280. return true
  12281. }
  12282. }
  12283. extension Proto2Unittest_TestIsInitialized.SubMessage.SubGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12284. static let protoMessageName: String = Proto2Unittest_TestIsInitialized.SubMessage.protoMessageName + ".SubGroup"
  12285. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12286. 2: .same(proto: "i"),
  12287. ]
  12288. public var isInitialized: Bool {
  12289. if self._i == nil {return false}
  12290. return true
  12291. }
  12292. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12293. while let fieldNumber = try decoder.nextFieldNumber() {
  12294. // The use of inline closures is to circumvent an issue where the compiler
  12295. // allocates stack space for every case branch when no optimizations are
  12296. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12297. switch fieldNumber {
  12298. case 2: try { try decoder.decodeSingularInt32Field(value: &self._i) }()
  12299. default: break
  12300. }
  12301. }
  12302. }
  12303. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12304. // The use of inline closures is to circumvent an issue where the compiler
  12305. // allocates stack space for every if/case branch local when no optimizations
  12306. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12307. // https://github.com/apple/swift-protobuf/issues/1182
  12308. try { if let v = self._i {
  12309. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  12310. } }()
  12311. try unknownFields.traverse(visitor: &visitor)
  12312. }
  12313. static func ==(lhs: Proto2Unittest_TestIsInitialized.SubMessage.SubGroup, rhs: Proto2Unittest_TestIsInitialized.SubMessage.SubGroup) -> Bool {
  12314. if lhs._i != rhs._i {return false}
  12315. if lhs.unknownFields != rhs.unknownFields {return false}
  12316. return true
  12317. }
  12318. }
  12319. extension Proto2Unittest_TestDupFieldNumber: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12320. static let protoMessageName: String = _protobuf_package + ".TestDupFieldNumber"
  12321. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12322. 1: .same(proto: "a"),
  12323. 2: .same(proto: "foo"),
  12324. 2: .unique(proto: "Foo", json: "foo"),
  12325. 3: .same(proto: "bar"),
  12326. 3: .unique(proto: "Bar", json: "bar"),
  12327. ]
  12328. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12329. while let fieldNumber = try decoder.nextFieldNumber() {
  12330. // The use of inline closures is to circumvent an issue where the compiler
  12331. // allocates stack space for every case branch when no optimizations are
  12332. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12333. switch fieldNumber {
  12334. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  12335. case 2: try { try decoder.decodeSingularGroupField(value: &self._foo) }()
  12336. case 3: try { try decoder.decodeSingularGroupField(value: &self._bar) }()
  12337. default: break
  12338. }
  12339. }
  12340. }
  12341. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12342. // The use of inline closures is to circumvent an issue where the compiler
  12343. // allocates stack space for every if/case branch local when no optimizations
  12344. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12345. // https://github.com/apple/swift-protobuf/issues/1182
  12346. try { if let v = self._a {
  12347. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  12348. } }()
  12349. try { if let v = self._foo {
  12350. try visitor.visitSingularGroupField(value: v, fieldNumber: 2)
  12351. } }()
  12352. try { if let v = self._bar {
  12353. try visitor.visitSingularGroupField(value: v, fieldNumber: 3)
  12354. } }()
  12355. try unknownFields.traverse(visitor: &visitor)
  12356. }
  12357. static func ==(lhs: Proto2Unittest_TestDupFieldNumber, rhs: Proto2Unittest_TestDupFieldNumber) -> Bool {
  12358. if lhs._a != rhs._a {return false}
  12359. if lhs._foo != rhs._foo {return false}
  12360. if lhs._bar != rhs._bar {return false}
  12361. if lhs.unknownFields != rhs.unknownFields {return false}
  12362. return true
  12363. }
  12364. }
  12365. extension Proto2Unittest_TestDupFieldNumber.Foo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12366. static let protoMessageName: String = Proto2Unittest_TestDupFieldNumber.protoMessageName + ".Foo"
  12367. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12368. 1: .same(proto: "a"),
  12369. ]
  12370. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12371. while let fieldNumber = try decoder.nextFieldNumber() {
  12372. // The use of inline closures is to circumvent an issue where the compiler
  12373. // allocates stack space for every case branch when no optimizations are
  12374. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12375. switch fieldNumber {
  12376. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  12377. default: break
  12378. }
  12379. }
  12380. }
  12381. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12382. // The use of inline closures is to circumvent an issue where the compiler
  12383. // allocates stack space for every if/case branch local when no optimizations
  12384. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12385. // https://github.com/apple/swift-protobuf/issues/1182
  12386. try { if let v = self._a {
  12387. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  12388. } }()
  12389. try unknownFields.traverse(visitor: &visitor)
  12390. }
  12391. static func ==(lhs: Proto2Unittest_TestDupFieldNumber.Foo, rhs: Proto2Unittest_TestDupFieldNumber.Foo) -> Bool {
  12392. if lhs._a != rhs._a {return false}
  12393. if lhs.unknownFields != rhs.unknownFields {return false}
  12394. return true
  12395. }
  12396. }
  12397. extension Proto2Unittest_TestDupFieldNumber.Bar: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12398. static let protoMessageName: String = Proto2Unittest_TestDupFieldNumber.protoMessageName + ".Bar"
  12399. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12400. 1: .same(proto: "a"),
  12401. ]
  12402. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12403. while let fieldNumber = try decoder.nextFieldNumber() {
  12404. // The use of inline closures is to circumvent an issue where the compiler
  12405. // allocates stack space for every case branch when no optimizations are
  12406. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12407. switch fieldNumber {
  12408. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  12409. default: break
  12410. }
  12411. }
  12412. }
  12413. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12414. // The use of inline closures is to circumvent an issue where the compiler
  12415. // allocates stack space for every if/case branch local when no optimizations
  12416. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12417. // https://github.com/apple/swift-protobuf/issues/1182
  12418. try { if let v = self._a {
  12419. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  12420. } }()
  12421. try unknownFields.traverse(visitor: &visitor)
  12422. }
  12423. static func ==(lhs: Proto2Unittest_TestDupFieldNumber.Bar, rhs: Proto2Unittest_TestDupFieldNumber.Bar) -> Bool {
  12424. if lhs._a != rhs._a {return false}
  12425. if lhs.unknownFields != rhs.unknownFields {return false}
  12426. return true
  12427. }
  12428. }
  12429. extension Proto2Unittest_TestEagerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12430. static let protoMessageName: String = _protobuf_package + ".TestEagerMessage"
  12431. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12432. 1: .standard(proto: "sub_message"),
  12433. ]
  12434. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12435. while let fieldNumber = try decoder.nextFieldNumber() {
  12436. // The use of inline closures is to circumvent an issue where the compiler
  12437. // allocates stack space for every case branch when no optimizations are
  12438. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12439. switch fieldNumber {
  12440. case 1: try { try decoder.decodeSingularMessageField(value: &self._subMessage) }()
  12441. default: break
  12442. }
  12443. }
  12444. }
  12445. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12446. // The use of inline closures is to circumvent an issue where the compiler
  12447. // allocates stack space for every if/case branch local when no optimizations
  12448. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12449. // https://github.com/apple/swift-protobuf/issues/1182
  12450. try { if let v = self._subMessage {
  12451. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  12452. } }()
  12453. try unknownFields.traverse(visitor: &visitor)
  12454. }
  12455. static func ==(lhs: Proto2Unittest_TestEagerMessage, rhs: Proto2Unittest_TestEagerMessage) -> Bool {
  12456. if lhs._subMessage != rhs._subMessage {return false}
  12457. if lhs.unknownFields != rhs.unknownFields {return false}
  12458. return true
  12459. }
  12460. }
  12461. extension Proto2Unittest_TestLazyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12462. static let protoMessageName: String = _protobuf_package + ".TestLazyMessage"
  12463. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12464. 1: .standard(proto: "sub_message"),
  12465. ]
  12466. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12467. while let fieldNumber = try decoder.nextFieldNumber() {
  12468. // The use of inline closures is to circumvent an issue where the compiler
  12469. // allocates stack space for every case branch when no optimizations are
  12470. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12471. switch fieldNumber {
  12472. case 1: try { try decoder.decodeSingularMessageField(value: &self._subMessage) }()
  12473. default: break
  12474. }
  12475. }
  12476. }
  12477. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12478. // The use of inline closures is to circumvent an issue where the compiler
  12479. // allocates stack space for every if/case branch local when no optimizations
  12480. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12481. // https://github.com/apple/swift-protobuf/issues/1182
  12482. try { if let v = self._subMessage {
  12483. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  12484. } }()
  12485. try unknownFields.traverse(visitor: &visitor)
  12486. }
  12487. static func ==(lhs: Proto2Unittest_TestLazyMessage, rhs: Proto2Unittest_TestLazyMessage) -> Bool {
  12488. if lhs._subMessage != rhs._subMessage {return false}
  12489. if lhs.unknownFields != rhs.unknownFields {return false}
  12490. return true
  12491. }
  12492. }
  12493. extension Proto2Unittest_TestLazyMessageRepeated: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12494. static let protoMessageName: String = _protobuf_package + ".TestLazyMessageRepeated"
  12495. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12496. 1: .standard(proto: "repeated_message"),
  12497. ]
  12498. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12499. while let fieldNumber = try decoder.nextFieldNumber() {
  12500. // The use of inline closures is to circumvent an issue where the compiler
  12501. // allocates stack space for every case branch when no optimizations are
  12502. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12503. switch fieldNumber {
  12504. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedMessage) }()
  12505. default: break
  12506. }
  12507. }
  12508. }
  12509. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12510. if !self.repeatedMessage.isEmpty {
  12511. try visitor.visitRepeatedMessageField(value: self.repeatedMessage, fieldNumber: 1)
  12512. }
  12513. try unknownFields.traverse(visitor: &visitor)
  12514. }
  12515. static func ==(lhs: Proto2Unittest_TestLazyMessageRepeated, rhs: Proto2Unittest_TestLazyMessageRepeated) -> Bool {
  12516. if lhs.repeatedMessage != rhs.repeatedMessage {return false}
  12517. if lhs.unknownFields != rhs.unknownFields {return false}
  12518. return true
  12519. }
  12520. }
  12521. extension Proto2Unittest_TestEagerMaybeLazy: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12522. static let protoMessageName: String = _protobuf_package + ".TestEagerMaybeLazy"
  12523. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12524. 1: .standard(proto: "message_foo"),
  12525. 2: .standard(proto: "message_bar"),
  12526. 3: .standard(proto: "message_baz"),
  12527. ]
  12528. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12529. while let fieldNumber = try decoder.nextFieldNumber() {
  12530. // The use of inline closures is to circumvent an issue where the compiler
  12531. // allocates stack space for every case branch when no optimizations are
  12532. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12533. switch fieldNumber {
  12534. case 1: try { try decoder.decodeSingularMessageField(value: &self._messageFoo) }()
  12535. case 2: try { try decoder.decodeSingularMessageField(value: &self._messageBar) }()
  12536. case 3: try { try decoder.decodeSingularMessageField(value: &self._messageBaz) }()
  12537. default: break
  12538. }
  12539. }
  12540. }
  12541. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12542. // The use of inline closures is to circumvent an issue where the compiler
  12543. // allocates stack space for every if/case branch local when no optimizations
  12544. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12545. // https://github.com/apple/swift-protobuf/issues/1182
  12546. try { if let v = self._messageFoo {
  12547. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  12548. } }()
  12549. try { if let v = self._messageBar {
  12550. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  12551. } }()
  12552. try { if let v = self._messageBaz {
  12553. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  12554. } }()
  12555. try unknownFields.traverse(visitor: &visitor)
  12556. }
  12557. static func ==(lhs: Proto2Unittest_TestEagerMaybeLazy, rhs: Proto2Unittest_TestEagerMaybeLazy) -> Bool {
  12558. if lhs._messageFoo != rhs._messageFoo {return false}
  12559. if lhs._messageBar != rhs._messageBar {return false}
  12560. if lhs._messageBaz != rhs._messageBaz {return false}
  12561. if lhs.unknownFields != rhs.unknownFields {return false}
  12562. return true
  12563. }
  12564. }
  12565. extension Proto2Unittest_TestEagerMaybeLazy.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12566. static let protoMessageName: String = Proto2Unittest_TestEagerMaybeLazy.protoMessageName + ".NestedMessage"
  12567. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12568. 1: .same(proto: "packed"),
  12569. ]
  12570. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12571. while let fieldNumber = try decoder.nextFieldNumber() {
  12572. // The use of inline closures is to circumvent an issue where the compiler
  12573. // allocates stack space for every case branch when no optimizations are
  12574. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12575. switch fieldNumber {
  12576. case 1: try { try decoder.decodeSingularMessageField(value: &self._packed) }()
  12577. default: break
  12578. }
  12579. }
  12580. }
  12581. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12582. // The use of inline closures is to circumvent an issue where the compiler
  12583. // allocates stack space for every if/case branch local when no optimizations
  12584. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12585. // https://github.com/apple/swift-protobuf/issues/1182
  12586. try { if let v = self._packed {
  12587. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  12588. } }()
  12589. try unknownFields.traverse(visitor: &visitor)
  12590. }
  12591. static func ==(lhs: Proto2Unittest_TestEagerMaybeLazy.NestedMessage, rhs: Proto2Unittest_TestEagerMaybeLazy.NestedMessage) -> Bool {
  12592. if lhs._packed != rhs._packed {return false}
  12593. if lhs.unknownFields != rhs.unknownFields {return false}
  12594. return true
  12595. }
  12596. }
  12597. extension Proto2Unittest_TestNestedMessageHasBits: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12598. static let protoMessageName: String = _protobuf_package + ".TestNestedMessageHasBits"
  12599. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12600. 1: .standard(proto: "optional_nested_message"),
  12601. ]
  12602. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12603. while let fieldNumber = try decoder.nextFieldNumber() {
  12604. // The use of inline closures is to circumvent an issue where the compiler
  12605. // allocates stack space for every case branch when no optimizations are
  12606. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12607. switch fieldNumber {
  12608. case 1: try { try decoder.decodeSingularMessageField(value: &self._optionalNestedMessage) }()
  12609. default: break
  12610. }
  12611. }
  12612. }
  12613. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12614. // The use of inline closures is to circumvent an issue where the compiler
  12615. // allocates stack space for every if/case branch local when no optimizations
  12616. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12617. // https://github.com/apple/swift-protobuf/issues/1182
  12618. try { if let v = self._optionalNestedMessage {
  12619. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  12620. } }()
  12621. try unknownFields.traverse(visitor: &visitor)
  12622. }
  12623. static func ==(lhs: Proto2Unittest_TestNestedMessageHasBits, rhs: Proto2Unittest_TestNestedMessageHasBits) -> Bool {
  12624. if lhs._optionalNestedMessage != rhs._optionalNestedMessage {return false}
  12625. if lhs.unknownFields != rhs.unknownFields {return false}
  12626. return true
  12627. }
  12628. }
  12629. extension Proto2Unittest_TestNestedMessageHasBits.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12630. static let protoMessageName: String = Proto2Unittest_TestNestedMessageHasBits.protoMessageName + ".NestedMessage"
  12631. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12632. 1: .standard(proto: "nestedmessage_repeated_int32"),
  12633. 2: .standard(proto: "nestedmessage_repeated_foreignmessage"),
  12634. ]
  12635. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12636. while let fieldNumber = try decoder.nextFieldNumber() {
  12637. // The use of inline closures is to circumvent an issue where the compiler
  12638. // allocates stack space for every case branch when no optimizations are
  12639. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12640. switch fieldNumber {
  12641. case 1: try { try decoder.decodeRepeatedInt32Field(value: &self.nestedmessageRepeatedInt32) }()
  12642. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.nestedmessageRepeatedForeignmessage) }()
  12643. default: break
  12644. }
  12645. }
  12646. }
  12647. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12648. if !self.nestedmessageRepeatedInt32.isEmpty {
  12649. try visitor.visitRepeatedInt32Field(value: self.nestedmessageRepeatedInt32, fieldNumber: 1)
  12650. }
  12651. if !self.nestedmessageRepeatedForeignmessage.isEmpty {
  12652. try visitor.visitRepeatedMessageField(value: self.nestedmessageRepeatedForeignmessage, fieldNumber: 2)
  12653. }
  12654. try unknownFields.traverse(visitor: &visitor)
  12655. }
  12656. static func ==(lhs: Proto2Unittest_TestNestedMessageHasBits.NestedMessage, rhs: Proto2Unittest_TestNestedMessageHasBits.NestedMessage) -> Bool {
  12657. if lhs.nestedmessageRepeatedInt32 != rhs.nestedmessageRepeatedInt32 {return false}
  12658. if lhs.nestedmessageRepeatedForeignmessage != rhs.nestedmessageRepeatedForeignmessage {return false}
  12659. if lhs.unknownFields != rhs.unknownFields {return false}
  12660. return true
  12661. }
  12662. }
  12663. extension Proto2Unittest_TestCamelCaseFieldNames: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12664. static let protoMessageName: String = _protobuf_package + ".TestCamelCaseFieldNames"
  12665. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12666. 1: .same(proto: "PrimitiveField"),
  12667. 2: .same(proto: "StringField"),
  12668. 3: .same(proto: "EnumField"),
  12669. 4: .same(proto: "MessageField"),
  12670. 5: .same(proto: "StringPieceField"),
  12671. 6: .same(proto: "CordField"),
  12672. 7: .same(proto: "RepeatedPrimitiveField"),
  12673. 8: .same(proto: "RepeatedStringField"),
  12674. 9: .same(proto: "RepeatedEnumField"),
  12675. 10: .same(proto: "RepeatedMessageField"),
  12676. 11: .same(proto: "RepeatedStringPieceField"),
  12677. 12: .same(proto: "RepeatedCordField"),
  12678. ]
  12679. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12680. while let fieldNumber = try decoder.nextFieldNumber() {
  12681. // The use of inline closures is to circumvent an issue where the compiler
  12682. // allocates stack space for every case branch when no optimizations are
  12683. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12684. switch fieldNumber {
  12685. case 1: try { try decoder.decodeSingularInt32Field(value: &self._primitiveField) }()
  12686. case 2: try { try decoder.decodeSingularStringField(value: &self._stringField) }()
  12687. case 3: try { try decoder.decodeSingularEnumField(value: &self._enumField) }()
  12688. case 4: try { try decoder.decodeSingularMessageField(value: &self._messageField) }()
  12689. case 5: try { try decoder.decodeSingularStringField(value: &self._stringPieceField) }()
  12690. case 6: try { try decoder.decodeSingularStringField(value: &self._cordField) }()
  12691. case 7: try { try decoder.decodeRepeatedInt32Field(value: &self.repeatedPrimitiveField) }()
  12692. case 8: try { try decoder.decodeRepeatedStringField(value: &self.repeatedStringField) }()
  12693. case 9: try { try decoder.decodeRepeatedEnumField(value: &self.repeatedEnumField) }()
  12694. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedMessageField) }()
  12695. case 11: try { try decoder.decodeRepeatedStringField(value: &self.repeatedStringPieceField) }()
  12696. case 12: try { try decoder.decodeRepeatedStringField(value: &self.repeatedCordField) }()
  12697. default: break
  12698. }
  12699. }
  12700. }
  12701. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12702. // The use of inline closures is to circumvent an issue where the compiler
  12703. // allocates stack space for every if/case branch local when no optimizations
  12704. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12705. // https://github.com/apple/swift-protobuf/issues/1182
  12706. try { if let v = self._primitiveField {
  12707. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  12708. } }()
  12709. try { if let v = self._stringField {
  12710. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  12711. } }()
  12712. try { if let v = self._enumField {
  12713. try visitor.visitSingularEnumField(value: v, fieldNumber: 3)
  12714. } }()
  12715. try { if let v = self._messageField {
  12716. try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
  12717. } }()
  12718. try { if let v = self._stringPieceField {
  12719. try visitor.visitSingularStringField(value: v, fieldNumber: 5)
  12720. } }()
  12721. try { if let v = self._cordField {
  12722. try visitor.visitSingularStringField(value: v, fieldNumber: 6)
  12723. } }()
  12724. if !self.repeatedPrimitiveField.isEmpty {
  12725. try visitor.visitRepeatedInt32Field(value: self.repeatedPrimitiveField, fieldNumber: 7)
  12726. }
  12727. if !self.repeatedStringField.isEmpty {
  12728. try visitor.visitRepeatedStringField(value: self.repeatedStringField, fieldNumber: 8)
  12729. }
  12730. if !self.repeatedEnumField.isEmpty {
  12731. try visitor.visitRepeatedEnumField(value: self.repeatedEnumField, fieldNumber: 9)
  12732. }
  12733. if !self.repeatedMessageField.isEmpty {
  12734. try visitor.visitRepeatedMessageField(value: self.repeatedMessageField, fieldNumber: 10)
  12735. }
  12736. if !self.repeatedStringPieceField.isEmpty {
  12737. try visitor.visitRepeatedStringField(value: self.repeatedStringPieceField, fieldNumber: 11)
  12738. }
  12739. if !self.repeatedCordField.isEmpty {
  12740. try visitor.visitRepeatedStringField(value: self.repeatedCordField, fieldNumber: 12)
  12741. }
  12742. try unknownFields.traverse(visitor: &visitor)
  12743. }
  12744. static func ==(lhs: Proto2Unittest_TestCamelCaseFieldNames, rhs: Proto2Unittest_TestCamelCaseFieldNames) -> Bool {
  12745. if lhs._primitiveField != rhs._primitiveField {return false}
  12746. if lhs._stringField != rhs._stringField {return false}
  12747. if lhs._enumField != rhs._enumField {return false}
  12748. if lhs._messageField != rhs._messageField {return false}
  12749. if lhs._stringPieceField != rhs._stringPieceField {return false}
  12750. if lhs._cordField != rhs._cordField {return false}
  12751. if lhs.repeatedPrimitiveField != rhs.repeatedPrimitiveField {return false}
  12752. if lhs.repeatedStringField != rhs.repeatedStringField {return false}
  12753. if lhs.repeatedEnumField != rhs.repeatedEnumField {return false}
  12754. if lhs.repeatedMessageField != rhs.repeatedMessageField {return false}
  12755. if lhs.repeatedStringPieceField != rhs.repeatedStringPieceField {return false}
  12756. if lhs.repeatedCordField != rhs.repeatedCordField {return false}
  12757. if lhs.unknownFields != rhs.unknownFields {return false}
  12758. return true
  12759. }
  12760. }
  12761. extension Proto2Unittest_TestFieldOrderings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12762. static let protoMessageName: String = _protobuf_package + ".TestFieldOrderings"
  12763. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12764. 11: .standard(proto: "my_string"),
  12765. 1: .standard(proto: "my_int"),
  12766. 101: .standard(proto: "my_float"),
  12767. 200: .standard(proto: "optional_nested_message"),
  12768. ]
  12769. public var isInitialized: Bool {
  12770. if !_protobuf_extensionFieldValues.isInitialized {return false}
  12771. return true
  12772. }
  12773. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12774. while let fieldNumber = try decoder.nextFieldNumber() {
  12775. // The use of inline closures is to circumvent an issue where the compiler
  12776. // allocates stack space for every case branch when no optimizations are
  12777. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12778. switch fieldNumber {
  12779. case 1: try { try decoder.decodeSingularInt64Field(value: &self._myInt) }()
  12780. case 11: try { try decoder.decodeSingularStringField(value: &self._myString) }()
  12781. case 101: try { try decoder.decodeSingularFloatField(value: &self._myFloat) }()
  12782. case 200: try { try decoder.decodeSingularMessageField(value: &self._optionalNestedMessage) }()
  12783. case 2..<11, 12..<101:
  12784. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestFieldOrderings.self, fieldNumber: fieldNumber) }()
  12785. default: break
  12786. }
  12787. }
  12788. }
  12789. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12790. // The use of inline closures is to circumvent an issue where the compiler
  12791. // allocates stack space for every if/case branch local when no optimizations
  12792. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12793. // https://github.com/apple/swift-protobuf/issues/1182
  12794. try { if let v = self._myInt {
  12795. try visitor.visitSingularInt64Field(value: v, fieldNumber: 1)
  12796. } }()
  12797. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2, end: 11)
  12798. try { if let v = self._myString {
  12799. try visitor.visitSingularStringField(value: v, fieldNumber: 11)
  12800. } }()
  12801. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 12, end: 101)
  12802. try { if let v = self._myFloat {
  12803. try visitor.visitSingularFloatField(value: v, fieldNumber: 101)
  12804. } }()
  12805. try { if let v = self._optionalNestedMessage {
  12806. try visitor.visitSingularMessageField(value: v, fieldNumber: 200)
  12807. } }()
  12808. try unknownFields.traverse(visitor: &visitor)
  12809. }
  12810. static func ==(lhs: Proto2Unittest_TestFieldOrderings, rhs: Proto2Unittest_TestFieldOrderings) -> Bool {
  12811. if lhs._myString != rhs._myString {return false}
  12812. if lhs._myInt != rhs._myInt {return false}
  12813. if lhs._myFloat != rhs._myFloat {return false}
  12814. if lhs._optionalNestedMessage != rhs._optionalNestedMessage {return false}
  12815. if lhs.unknownFields != rhs.unknownFields {return false}
  12816. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  12817. return true
  12818. }
  12819. }
  12820. extension Proto2Unittest_TestFieldOrderings.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12821. static let protoMessageName: String = Proto2Unittest_TestFieldOrderings.protoMessageName + ".NestedMessage"
  12822. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12823. 2: .same(proto: "oo"),
  12824. 1: .same(proto: "bb"),
  12825. ]
  12826. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12827. while let fieldNumber = try decoder.nextFieldNumber() {
  12828. // The use of inline closures is to circumvent an issue where the compiler
  12829. // allocates stack space for every case branch when no optimizations are
  12830. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12831. switch fieldNumber {
  12832. case 1: try { try decoder.decodeSingularInt32Field(value: &self._bb) }()
  12833. case 2: try { try decoder.decodeSingularInt64Field(value: &self._oo) }()
  12834. default: break
  12835. }
  12836. }
  12837. }
  12838. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12839. // The use of inline closures is to circumvent an issue where the compiler
  12840. // allocates stack space for every if/case branch local when no optimizations
  12841. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12842. // https://github.com/apple/swift-protobuf/issues/1182
  12843. try { if let v = self._bb {
  12844. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  12845. } }()
  12846. try { if let v = self._oo {
  12847. try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
  12848. } }()
  12849. try unknownFields.traverse(visitor: &visitor)
  12850. }
  12851. static func ==(lhs: Proto2Unittest_TestFieldOrderings.NestedMessage, rhs: Proto2Unittest_TestFieldOrderings.NestedMessage) -> Bool {
  12852. if lhs._oo != rhs._oo {return false}
  12853. if lhs._bb != rhs._bb {return false}
  12854. if lhs.unknownFields != rhs.unknownFields {return false}
  12855. return true
  12856. }
  12857. }
  12858. extension Proto2Unittest_TestExtensionOrderings1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12859. static let protoMessageName: String = _protobuf_package + ".TestExtensionOrderings1"
  12860. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12861. 1: .standard(proto: "my_string"),
  12862. ]
  12863. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12864. while let fieldNumber = try decoder.nextFieldNumber() {
  12865. // The use of inline closures is to circumvent an issue where the compiler
  12866. // allocates stack space for every case branch when no optimizations are
  12867. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12868. switch fieldNumber {
  12869. case 1: try { try decoder.decodeSingularStringField(value: &self._myString) }()
  12870. default: break
  12871. }
  12872. }
  12873. }
  12874. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12875. // The use of inline closures is to circumvent an issue where the compiler
  12876. // allocates stack space for every if/case branch local when no optimizations
  12877. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12878. // https://github.com/apple/swift-protobuf/issues/1182
  12879. try { if let v = self._myString {
  12880. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  12881. } }()
  12882. try unknownFields.traverse(visitor: &visitor)
  12883. }
  12884. static func ==(lhs: Proto2Unittest_TestExtensionOrderings1, rhs: Proto2Unittest_TestExtensionOrderings1) -> Bool {
  12885. if lhs._myString != rhs._myString {return false}
  12886. if lhs.unknownFields != rhs.unknownFields {return false}
  12887. return true
  12888. }
  12889. }
  12890. extension Proto2Unittest_TestExtensionOrderings2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12891. static let protoMessageName: String = _protobuf_package + ".TestExtensionOrderings2"
  12892. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12893. 1: .standard(proto: "my_string"),
  12894. ]
  12895. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12896. while let fieldNumber = try decoder.nextFieldNumber() {
  12897. // The use of inline closures is to circumvent an issue where the compiler
  12898. // allocates stack space for every case branch when no optimizations are
  12899. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12900. switch fieldNumber {
  12901. case 1: try { try decoder.decodeSingularStringField(value: &self._myString) }()
  12902. default: break
  12903. }
  12904. }
  12905. }
  12906. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12907. // The use of inline closures is to circumvent an issue where the compiler
  12908. // allocates stack space for every if/case branch local when no optimizations
  12909. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12910. // https://github.com/apple/swift-protobuf/issues/1182
  12911. try { if let v = self._myString {
  12912. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  12913. } }()
  12914. try unknownFields.traverse(visitor: &visitor)
  12915. }
  12916. static func ==(lhs: Proto2Unittest_TestExtensionOrderings2, rhs: Proto2Unittest_TestExtensionOrderings2) -> Bool {
  12917. if lhs._myString != rhs._myString {return false}
  12918. if lhs.unknownFields != rhs.unknownFields {return false}
  12919. return true
  12920. }
  12921. }
  12922. extension Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12923. static let protoMessageName: String = Proto2Unittest_TestExtensionOrderings2.protoMessageName + ".TestExtensionOrderings3"
  12924. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12925. 1: .standard(proto: "my_string"),
  12926. ]
  12927. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  12928. while let fieldNumber = try decoder.nextFieldNumber() {
  12929. // The use of inline closures is to circumvent an issue where the compiler
  12930. // allocates stack space for every case branch when no optimizations are
  12931. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  12932. switch fieldNumber {
  12933. case 1: try { try decoder.decodeSingularStringField(value: &self._myString) }()
  12934. default: break
  12935. }
  12936. }
  12937. }
  12938. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  12939. // The use of inline closures is to circumvent an issue where the compiler
  12940. // allocates stack space for every if/case branch local when no optimizations
  12941. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  12942. // https://github.com/apple/swift-protobuf/issues/1182
  12943. try { if let v = self._myString {
  12944. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  12945. } }()
  12946. try unknownFields.traverse(visitor: &visitor)
  12947. }
  12948. static func ==(lhs: Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3, rhs: Proto2Unittest_TestExtensionOrderings2.TestExtensionOrderings3) -> Bool {
  12949. if lhs._myString != rhs._myString {return false}
  12950. if lhs.unknownFields != rhs.unknownFields {return false}
  12951. return true
  12952. }
  12953. }
  12954. extension Proto2Unittest_TestExtremeDefaultValues: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  12955. static let protoMessageName: String = _protobuf_package + ".TestExtremeDefaultValues"
  12956. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  12957. 1: .standard(proto: "escaped_bytes"),
  12958. 2: .standard(proto: "large_uint32"),
  12959. 3: .standard(proto: "large_uint64"),
  12960. 4: .standard(proto: "small_int32"),
  12961. 5: .standard(proto: "small_int64"),
  12962. 21: .standard(proto: "really_small_int32"),
  12963. 22: .standard(proto: "really_small_int64"),
  12964. 6: .standard(proto: "utf8_string"),
  12965. 7: .standard(proto: "zero_float"),
  12966. 8: .standard(proto: "one_float"),
  12967. 9: .standard(proto: "small_float"),
  12968. 10: .standard(proto: "negative_one_float"),
  12969. 11: .standard(proto: "negative_float"),
  12970. 12: .standard(proto: "large_float"),
  12971. 13: .standard(proto: "small_negative_float"),
  12972. 14: .standard(proto: "inf_double"),
  12973. 15: .standard(proto: "neg_inf_double"),
  12974. 16: .standard(proto: "nan_double"),
  12975. 17: .standard(proto: "inf_float"),
  12976. 18: .standard(proto: "neg_inf_float"),
  12977. 19: .standard(proto: "nan_float"),
  12978. 20: .standard(proto: "cpp_trigraph"),
  12979. 23: .standard(proto: "string_with_zero"),
  12980. 24: .standard(proto: "bytes_with_zero"),
  12981. 25: .standard(proto: "string_piece_with_zero"),
  12982. 26: .standard(proto: "cord_with_zero"),
  12983. 27: .standard(proto: "replacement_string"),
  12984. ]
  12985. fileprivate class _StorageClass {
  12986. var _escapedBytes: Data? = nil
  12987. var _largeUint32: UInt32? = nil
  12988. var _largeUint64: UInt64? = nil
  12989. var _smallInt32: Int32? = nil
  12990. var _smallInt64: Int64? = nil
  12991. var _reallySmallInt32: Int32? = nil
  12992. var _reallySmallInt64: Int64? = nil
  12993. var _utf8String: String? = nil
  12994. var _zeroFloat: Float? = nil
  12995. var _oneFloat: Float? = nil
  12996. var _smallFloat: Float? = nil
  12997. var _negativeOneFloat: Float? = nil
  12998. var _negativeFloat: Float? = nil
  12999. var _largeFloat: Float? = nil
  13000. var _smallNegativeFloat: Float? = nil
  13001. var _infDouble: Double? = nil
  13002. var _negInfDouble: Double? = nil
  13003. var _nanDouble: Double? = nil
  13004. var _infFloat: Float? = nil
  13005. var _negInfFloat: Float? = nil
  13006. var _nanFloat: Float? = nil
  13007. var _cppTrigraph: String? = nil
  13008. var _stringWithZero: String? = nil
  13009. var _bytesWithZero: Data? = nil
  13010. var _stringPieceWithZero: String? = nil
  13011. var _cordWithZero: String? = nil
  13012. var _replacementString: String? = nil
  13013. // This property is used as the initial default value for new instances of the type.
  13014. // The type itself is protecting the reference to its storage via CoW semantics.
  13015. // This will force a copy to be made of this reference when the first mutation occurs;
  13016. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  13017. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  13018. private init() {}
  13019. init(copying source: _StorageClass) {
  13020. _escapedBytes = source._escapedBytes
  13021. _largeUint32 = source._largeUint32
  13022. _largeUint64 = source._largeUint64
  13023. _smallInt32 = source._smallInt32
  13024. _smallInt64 = source._smallInt64
  13025. _reallySmallInt32 = source._reallySmallInt32
  13026. _reallySmallInt64 = source._reallySmallInt64
  13027. _utf8String = source._utf8String
  13028. _zeroFloat = source._zeroFloat
  13029. _oneFloat = source._oneFloat
  13030. _smallFloat = source._smallFloat
  13031. _negativeOneFloat = source._negativeOneFloat
  13032. _negativeFloat = source._negativeFloat
  13033. _largeFloat = source._largeFloat
  13034. _smallNegativeFloat = source._smallNegativeFloat
  13035. _infDouble = source._infDouble
  13036. _negInfDouble = source._negInfDouble
  13037. _nanDouble = source._nanDouble
  13038. _infFloat = source._infFloat
  13039. _negInfFloat = source._negInfFloat
  13040. _nanFloat = source._nanFloat
  13041. _cppTrigraph = source._cppTrigraph
  13042. _stringWithZero = source._stringWithZero
  13043. _bytesWithZero = source._bytesWithZero
  13044. _stringPieceWithZero = source._stringPieceWithZero
  13045. _cordWithZero = source._cordWithZero
  13046. _replacementString = source._replacementString
  13047. }
  13048. }
  13049. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  13050. if !isKnownUniquelyReferenced(&_storage) {
  13051. _storage = _StorageClass(copying: _storage)
  13052. }
  13053. return _storage
  13054. }
  13055. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13056. _ = _uniqueStorage()
  13057. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  13058. while let fieldNumber = try decoder.nextFieldNumber() {
  13059. // The use of inline closures is to circumvent an issue where the compiler
  13060. // allocates stack space for every case branch when no optimizations are
  13061. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13062. switch fieldNumber {
  13063. case 1: try { try decoder.decodeSingularBytesField(value: &_storage._escapedBytes) }()
  13064. case 2: try { try decoder.decodeSingularUInt32Field(value: &_storage._largeUint32) }()
  13065. case 3: try { try decoder.decodeSingularUInt64Field(value: &_storage._largeUint64) }()
  13066. case 4: try { try decoder.decodeSingularInt32Field(value: &_storage._smallInt32) }()
  13067. case 5: try { try decoder.decodeSingularInt64Field(value: &_storage._smallInt64) }()
  13068. case 6: try { try decoder.decodeSingularStringField(value: &_storage._utf8String) }()
  13069. case 7: try { try decoder.decodeSingularFloatField(value: &_storage._zeroFloat) }()
  13070. case 8: try { try decoder.decodeSingularFloatField(value: &_storage._oneFloat) }()
  13071. case 9: try { try decoder.decodeSingularFloatField(value: &_storage._smallFloat) }()
  13072. case 10: try { try decoder.decodeSingularFloatField(value: &_storage._negativeOneFloat) }()
  13073. case 11: try { try decoder.decodeSingularFloatField(value: &_storage._negativeFloat) }()
  13074. case 12: try { try decoder.decodeSingularFloatField(value: &_storage._largeFloat) }()
  13075. case 13: try { try decoder.decodeSingularFloatField(value: &_storage._smallNegativeFloat) }()
  13076. case 14: try { try decoder.decodeSingularDoubleField(value: &_storage._infDouble) }()
  13077. case 15: try { try decoder.decodeSingularDoubleField(value: &_storage._negInfDouble) }()
  13078. case 16: try { try decoder.decodeSingularDoubleField(value: &_storage._nanDouble) }()
  13079. case 17: try { try decoder.decodeSingularFloatField(value: &_storage._infFloat) }()
  13080. case 18: try { try decoder.decodeSingularFloatField(value: &_storage._negInfFloat) }()
  13081. case 19: try { try decoder.decodeSingularFloatField(value: &_storage._nanFloat) }()
  13082. case 20: try { try decoder.decodeSingularStringField(value: &_storage._cppTrigraph) }()
  13083. case 21: try { try decoder.decodeSingularInt32Field(value: &_storage._reallySmallInt32) }()
  13084. case 22: try { try decoder.decodeSingularInt64Field(value: &_storage._reallySmallInt64) }()
  13085. case 23: try { try decoder.decodeSingularStringField(value: &_storage._stringWithZero) }()
  13086. case 24: try { try decoder.decodeSingularBytesField(value: &_storage._bytesWithZero) }()
  13087. case 25: try { try decoder.decodeSingularStringField(value: &_storage._stringPieceWithZero) }()
  13088. case 26: try { try decoder.decodeSingularStringField(value: &_storage._cordWithZero) }()
  13089. case 27: try { try decoder.decodeSingularStringField(value: &_storage._replacementString) }()
  13090. default: break
  13091. }
  13092. }
  13093. }
  13094. }
  13095. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13096. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  13097. // The use of inline closures is to circumvent an issue where the compiler
  13098. // allocates stack space for every if/case branch local when no optimizations
  13099. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13100. // https://github.com/apple/swift-protobuf/issues/1182
  13101. try { if let v = _storage._escapedBytes {
  13102. try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
  13103. } }()
  13104. try { if let v = _storage._largeUint32 {
  13105. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
  13106. } }()
  13107. try { if let v = _storage._largeUint64 {
  13108. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 3)
  13109. } }()
  13110. try { if let v = _storage._smallInt32 {
  13111. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  13112. } }()
  13113. try { if let v = _storage._smallInt64 {
  13114. try visitor.visitSingularInt64Field(value: v, fieldNumber: 5)
  13115. } }()
  13116. try { if let v = _storage._utf8String {
  13117. try visitor.visitSingularStringField(value: v, fieldNumber: 6)
  13118. } }()
  13119. try { if let v = _storage._zeroFloat {
  13120. try visitor.visitSingularFloatField(value: v, fieldNumber: 7)
  13121. } }()
  13122. try { if let v = _storage._oneFloat {
  13123. try visitor.visitSingularFloatField(value: v, fieldNumber: 8)
  13124. } }()
  13125. try { if let v = _storage._smallFloat {
  13126. try visitor.visitSingularFloatField(value: v, fieldNumber: 9)
  13127. } }()
  13128. try { if let v = _storage._negativeOneFloat {
  13129. try visitor.visitSingularFloatField(value: v, fieldNumber: 10)
  13130. } }()
  13131. try { if let v = _storage._negativeFloat {
  13132. try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
  13133. } }()
  13134. try { if let v = _storage._largeFloat {
  13135. try visitor.visitSingularFloatField(value: v, fieldNumber: 12)
  13136. } }()
  13137. try { if let v = _storage._smallNegativeFloat {
  13138. try visitor.visitSingularFloatField(value: v, fieldNumber: 13)
  13139. } }()
  13140. try { if let v = _storage._infDouble {
  13141. try visitor.visitSingularDoubleField(value: v, fieldNumber: 14)
  13142. } }()
  13143. try { if let v = _storage._negInfDouble {
  13144. try visitor.visitSingularDoubleField(value: v, fieldNumber: 15)
  13145. } }()
  13146. try { if let v = _storage._nanDouble {
  13147. try visitor.visitSingularDoubleField(value: v, fieldNumber: 16)
  13148. } }()
  13149. try { if let v = _storage._infFloat {
  13150. try visitor.visitSingularFloatField(value: v, fieldNumber: 17)
  13151. } }()
  13152. try { if let v = _storage._negInfFloat {
  13153. try visitor.visitSingularFloatField(value: v, fieldNumber: 18)
  13154. } }()
  13155. try { if let v = _storage._nanFloat {
  13156. try visitor.visitSingularFloatField(value: v, fieldNumber: 19)
  13157. } }()
  13158. try { if let v = _storage._cppTrigraph {
  13159. try visitor.visitSingularStringField(value: v, fieldNumber: 20)
  13160. } }()
  13161. try { if let v = _storage._reallySmallInt32 {
  13162. try visitor.visitSingularInt32Field(value: v, fieldNumber: 21)
  13163. } }()
  13164. try { if let v = _storage._reallySmallInt64 {
  13165. try visitor.visitSingularInt64Field(value: v, fieldNumber: 22)
  13166. } }()
  13167. try { if let v = _storage._stringWithZero {
  13168. try visitor.visitSingularStringField(value: v, fieldNumber: 23)
  13169. } }()
  13170. try { if let v = _storage._bytesWithZero {
  13171. try visitor.visitSingularBytesField(value: v, fieldNumber: 24)
  13172. } }()
  13173. try { if let v = _storage._stringPieceWithZero {
  13174. try visitor.visitSingularStringField(value: v, fieldNumber: 25)
  13175. } }()
  13176. try { if let v = _storage._cordWithZero {
  13177. try visitor.visitSingularStringField(value: v, fieldNumber: 26)
  13178. } }()
  13179. try { if let v = _storage._replacementString {
  13180. try visitor.visitSingularStringField(value: v, fieldNumber: 27)
  13181. } }()
  13182. }
  13183. try unknownFields.traverse(visitor: &visitor)
  13184. }
  13185. static func ==(lhs: Proto2Unittest_TestExtremeDefaultValues, rhs: Proto2Unittest_TestExtremeDefaultValues) -> Bool {
  13186. if lhs._storage !== rhs._storage {
  13187. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  13188. let _storage = _args.0
  13189. let rhs_storage = _args.1
  13190. if _storage._escapedBytes != rhs_storage._escapedBytes {return false}
  13191. if _storage._largeUint32 != rhs_storage._largeUint32 {return false}
  13192. if _storage._largeUint64 != rhs_storage._largeUint64 {return false}
  13193. if _storage._smallInt32 != rhs_storage._smallInt32 {return false}
  13194. if _storage._smallInt64 != rhs_storage._smallInt64 {return false}
  13195. if _storage._reallySmallInt32 != rhs_storage._reallySmallInt32 {return false}
  13196. if _storage._reallySmallInt64 != rhs_storage._reallySmallInt64 {return false}
  13197. if _storage._utf8String != rhs_storage._utf8String {return false}
  13198. if _storage._zeroFloat != rhs_storage._zeroFloat {return false}
  13199. if _storage._oneFloat != rhs_storage._oneFloat {return false}
  13200. if _storage._smallFloat != rhs_storage._smallFloat {return false}
  13201. if _storage._negativeOneFloat != rhs_storage._negativeOneFloat {return false}
  13202. if _storage._negativeFloat != rhs_storage._negativeFloat {return false}
  13203. if _storage._largeFloat != rhs_storage._largeFloat {return false}
  13204. if _storage._smallNegativeFloat != rhs_storage._smallNegativeFloat {return false}
  13205. if _storage._infDouble != rhs_storage._infDouble {return false}
  13206. if _storage._negInfDouble != rhs_storage._negInfDouble {return false}
  13207. if _storage._nanDouble != rhs_storage._nanDouble {return false}
  13208. if _storage._infFloat != rhs_storage._infFloat {return false}
  13209. if _storage._negInfFloat != rhs_storage._negInfFloat {return false}
  13210. if _storage._nanFloat != rhs_storage._nanFloat {return false}
  13211. if _storage._cppTrigraph != rhs_storage._cppTrigraph {return false}
  13212. if _storage._stringWithZero != rhs_storage._stringWithZero {return false}
  13213. if _storage._bytesWithZero != rhs_storage._bytesWithZero {return false}
  13214. if _storage._stringPieceWithZero != rhs_storage._stringPieceWithZero {return false}
  13215. if _storage._cordWithZero != rhs_storage._cordWithZero {return false}
  13216. if _storage._replacementString != rhs_storage._replacementString {return false}
  13217. return true
  13218. }
  13219. if !storagesAreEqual {return false}
  13220. }
  13221. if lhs.unknownFields != rhs.unknownFields {return false}
  13222. return true
  13223. }
  13224. }
  13225. extension Proto2Unittest_SparseEnumMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13226. static let protoMessageName: String = _protobuf_package + ".SparseEnumMessage"
  13227. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13228. 1: .standard(proto: "sparse_enum"),
  13229. ]
  13230. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13231. while let fieldNumber = try decoder.nextFieldNumber() {
  13232. // The use of inline closures is to circumvent an issue where the compiler
  13233. // allocates stack space for every case branch when no optimizations are
  13234. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13235. switch fieldNumber {
  13236. case 1: try { try decoder.decodeSingularEnumField(value: &self._sparseEnum) }()
  13237. default: break
  13238. }
  13239. }
  13240. }
  13241. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13242. // The use of inline closures is to circumvent an issue where the compiler
  13243. // allocates stack space for every if/case branch local when no optimizations
  13244. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13245. // https://github.com/apple/swift-protobuf/issues/1182
  13246. try { if let v = self._sparseEnum {
  13247. try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
  13248. } }()
  13249. try unknownFields.traverse(visitor: &visitor)
  13250. }
  13251. static func ==(lhs: Proto2Unittest_SparseEnumMessage, rhs: Proto2Unittest_SparseEnumMessage) -> Bool {
  13252. if lhs._sparseEnum != rhs._sparseEnum {return false}
  13253. if lhs.unknownFields != rhs.unknownFields {return false}
  13254. return true
  13255. }
  13256. }
  13257. extension Proto2Unittest_OneString: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13258. static let protoMessageName: String = _protobuf_package + ".OneString"
  13259. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13260. 1: .same(proto: "data"),
  13261. ]
  13262. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13263. while let fieldNumber = try decoder.nextFieldNumber() {
  13264. // The use of inline closures is to circumvent an issue where the compiler
  13265. // allocates stack space for every case branch when no optimizations are
  13266. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13267. switch fieldNumber {
  13268. case 1: try { try decoder.decodeSingularStringField(value: &self._data) }()
  13269. default: break
  13270. }
  13271. }
  13272. }
  13273. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13274. // The use of inline closures is to circumvent an issue where the compiler
  13275. // allocates stack space for every if/case branch local when no optimizations
  13276. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13277. // https://github.com/apple/swift-protobuf/issues/1182
  13278. try { if let v = self._data {
  13279. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  13280. } }()
  13281. try unknownFields.traverse(visitor: &visitor)
  13282. }
  13283. static func ==(lhs: Proto2Unittest_OneString, rhs: Proto2Unittest_OneString) -> Bool {
  13284. if lhs._data != rhs._data {return false}
  13285. if lhs.unknownFields != rhs.unknownFields {return false}
  13286. return true
  13287. }
  13288. }
  13289. extension Proto2Unittest_MoreString: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13290. static let protoMessageName: String = _protobuf_package + ".MoreString"
  13291. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13292. 1: .same(proto: "data"),
  13293. ]
  13294. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13295. while let fieldNumber = try decoder.nextFieldNumber() {
  13296. // The use of inline closures is to circumvent an issue where the compiler
  13297. // allocates stack space for every case branch when no optimizations are
  13298. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13299. switch fieldNumber {
  13300. case 1: try { try decoder.decodeRepeatedStringField(value: &self.data) }()
  13301. default: break
  13302. }
  13303. }
  13304. }
  13305. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13306. if !self.data.isEmpty {
  13307. try visitor.visitRepeatedStringField(value: self.data, fieldNumber: 1)
  13308. }
  13309. try unknownFields.traverse(visitor: &visitor)
  13310. }
  13311. static func ==(lhs: Proto2Unittest_MoreString, rhs: Proto2Unittest_MoreString) -> Bool {
  13312. if lhs.data != rhs.data {return false}
  13313. if lhs.unknownFields != rhs.unknownFields {return false}
  13314. return true
  13315. }
  13316. }
  13317. extension Proto2Unittest_OneBytes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13318. static let protoMessageName: String = _protobuf_package + ".OneBytes"
  13319. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13320. 1: .same(proto: "data"),
  13321. ]
  13322. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13323. while let fieldNumber = try decoder.nextFieldNumber() {
  13324. // The use of inline closures is to circumvent an issue where the compiler
  13325. // allocates stack space for every case branch when no optimizations are
  13326. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13327. switch fieldNumber {
  13328. case 1: try { try decoder.decodeSingularBytesField(value: &self._data) }()
  13329. default: break
  13330. }
  13331. }
  13332. }
  13333. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13334. // The use of inline closures is to circumvent an issue where the compiler
  13335. // allocates stack space for every if/case branch local when no optimizations
  13336. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13337. // https://github.com/apple/swift-protobuf/issues/1182
  13338. try { if let v = self._data {
  13339. try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
  13340. } }()
  13341. try unknownFields.traverse(visitor: &visitor)
  13342. }
  13343. static func ==(lhs: Proto2Unittest_OneBytes, rhs: Proto2Unittest_OneBytes) -> Bool {
  13344. if lhs._data != rhs._data {return false}
  13345. if lhs.unknownFields != rhs.unknownFields {return false}
  13346. return true
  13347. }
  13348. }
  13349. extension Proto2Unittest_MoreBytes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13350. static let protoMessageName: String = _protobuf_package + ".MoreBytes"
  13351. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13352. 1: .same(proto: "data"),
  13353. ]
  13354. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13355. while let fieldNumber = try decoder.nextFieldNumber() {
  13356. // The use of inline closures is to circumvent an issue where the compiler
  13357. // allocates stack space for every case branch when no optimizations are
  13358. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13359. switch fieldNumber {
  13360. case 1: try { try decoder.decodeRepeatedBytesField(value: &self.data) }()
  13361. default: break
  13362. }
  13363. }
  13364. }
  13365. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13366. if !self.data.isEmpty {
  13367. try visitor.visitRepeatedBytesField(value: self.data, fieldNumber: 1)
  13368. }
  13369. try unknownFields.traverse(visitor: &visitor)
  13370. }
  13371. static func ==(lhs: Proto2Unittest_MoreBytes, rhs: Proto2Unittest_MoreBytes) -> Bool {
  13372. if lhs.data != rhs.data {return false}
  13373. if lhs.unknownFields != rhs.unknownFields {return false}
  13374. return true
  13375. }
  13376. }
  13377. extension Proto2Unittest_ManyOptionalString: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13378. static let protoMessageName: String = _protobuf_package + ".ManyOptionalString"
  13379. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13380. 1: .same(proto: "str1"),
  13381. 2: .same(proto: "str2"),
  13382. 3: .same(proto: "str3"),
  13383. 4: .same(proto: "str4"),
  13384. 5: .same(proto: "str5"),
  13385. 6: .same(proto: "str6"),
  13386. 7: .same(proto: "str7"),
  13387. 8: .same(proto: "str8"),
  13388. 9: .same(proto: "str9"),
  13389. 10: .same(proto: "str10"),
  13390. 11: .same(proto: "str11"),
  13391. 12: .same(proto: "str12"),
  13392. 13: .same(proto: "str13"),
  13393. 14: .same(proto: "str14"),
  13394. 15: .same(proto: "str15"),
  13395. 16: .same(proto: "str16"),
  13396. 17: .same(proto: "str17"),
  13397. 18: .same(proto: "str18"),
  13398. 19: .same(proto: "str19"),
  13399. 20: .same(proto: "str20"),
  13400. 21: .same(proto: "str21"),
  13401. 22: .same(proto: "str22"),
  13402. 23: .same(proto: "str23"),
  13403. 24: .same(proto: "str24"),
  13404. 25: .same(proto: "str25"),
  13405. 26: .same(proto: "str26"),
  13406. 27: .same(proto: "str27"),
  13407. 28: .same(proto: "str28"),
  13408. 29: .same(proto: "str29"),
  13409. 30: .same(proto: "str30"),
  13410. 31: .same(proto: "str31"),
  13411. 32: .same(proto: "str32"),
  13412. ]
  13413. fileprivate class _StorageClass {
  13414. var _str1: String? = nil
  13415. var _str2: String? = nil
  13416. var _str3: String? = nil
  13417. var _str4: String? = nil
  13418. var _str5: String? = nil
  13419. var _str6: String? = nil
  13420. var _str7: String? = nil
  13421. var _str8: String? = nil
  13422. var _str9: String? = nil
  13423. var _str10: String? = nil
  13424. var _str11: String? = nil
  13425. var _str12: String? = nil
  13426. var _str13: String? = nil
  13427. var _str14: String? = nil
  13428. var _str15: String? = nil
  13429. var _str16: String? = nil
  13430. var _str17: String? = nil
  13431. var _str18: String? = nil
  13432. var _str19: String? = nil
  13433. var _str20: String? = nil
  13434. var _str21: String? = nil
  13435. var _str22: String? = nil
  13436. var _str23: String? = nil
  13437. var _str24: String? = nil
  13438. var _str25: String? = nil
  13439. var _str26: String? = nil
  13440. var _str27: String? = nil
  13441. var _str28: String? = nil
  13442. var _str29: String? = nil
  13443. var _str30: String? = nil
  13444. var _str31: String? = nil
  13445. var _str32: String? = nil
  13446. // This property is used as the initial default value for new instances of the type.
  13447. // The type itself is protecting the reference to its storage via CoW semantics.
  13448. // This will force a copy to be made of this reference when the first mutation occurs;
  13449. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  13450. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  13451. private init() {}
  13452. init(copying source: _StorageClass) {
  13453. _str1 = source._str1
  13454. _str2 = source._str2
  13455. _str3 = source._str3
  13456. _str4 = source._str4
  13457. _str5 = source._str5
  13458. _str6 = source._str6
  13459. _str7 = source._str7
  13460. _str8 = source._str8
  13461. _str9 = source._str9
  13462. _str10 = source._str10
  13463. _str11 = source._str11
  13464. _str12 = source._str12
  13465. _str13 = source._str13
  13466. _str14 = source._str14
  13467. _str15 = source._str15
  13468. _str16 = source._str16
  13469. _str17 = source._str17
  13470. _str18 = source._str18
  13471. _str19 = source._str19
  13472. _str20 = source._str20
  13473. _str21 = source._str21
  13474. _str22 = source._str22
  13475. _str23 = source._str23
  13476. _str24 = source._str24
  13477. _str25 = source._str25
  13478. _str26 = source._str26
  13479. _str27 = source._str27
  13480. _str28 = source._str28
  13481. _str29 = source._str29
  13482. _str30 = source._str30
  13483. _str31 = source._str31
  13484. _str32 = source._str32
  13485. }
  13486. }
  13487. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  13488. if !isKnownUniquelyReferenced(&_storage) {
  13489. _storage = _StorageClass(copying: _storage)
  13490. }
  13491. return _storage
  13492. }
  13493. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13494. _ = _uniqueStorage()
  13495. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  13496. while let fieldNumber = try decoder.nextFieldNumber() {
  13497. // The use of inline closures is to circumvent an issue where the compiler
  13498. // allocates stack space for every case branch when no optimizations are
  13499. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13500. switch fieldNumber {
  13501. case 1: try { try decoder.decodeSingularStringField(value: &_storage._str1) }()
  13502. case 2: try { try decoder.decodeSingularStringField(value: &_storage._str2) }()
  13503. case 3: try { try decoder.decodeSingularStringField(value: &_storage._str3) }()
  13504. case 4: try { try decoder.decodeSingularStringField(value: &_storage._str4) }()
  13505. case 5: try { try decoder.decodeSingularStringField(value: &_storage._str5) }()
  13506. case 6: try { try decoder.decodeSingularStringField(value: &_storage._str6) }()
  13507. case 7: try { try decoder.decodeSingularStringField(value: &_storage._str7) }()
  13508. case 8: try { try decoder.decodeSingularStringField(value: &_storage._str8) }()
  13509. case 9: try { try decoder.decodeSingularStringField(value: &_storage._str9) }()
  13510. case 10: try { try decoder.decodeSingularStringField(value: &_storage._str10) }()
  13511. case 11: try { try decoder.decodeSingularStringField(value: &_storage._str11) }()
  13512. case 12: try { try decoder.decodeSingularStringField(value: &_storage._str12) }()
  13513. case 13: try { try decoder.decodeSingularStringField(value: &_storage._str13) }()
  13514. case 14: try { try decoder.decodeSingularStringField(value: &_storage._str14) }()
  13515. case 15: try { try decoder.decodeSingularStringField(value: &_storage._str15) }()
  13516. case 16: try { try decoder.decodeSingularStringField(value: &_storage._str16) }()
  13517. case 17: try { try decoder.decodeSingularStringField(value: &_storage._str17) }()
  13518. case 18: try { try decoder.decodeSingularStringField(value: &_storage._str18) }()
  13519. case 19: try { try decoder.decodeSingularStringField(value: &_storage._str19) }()
  13520. case 20: try { try decoder.decodeSingularStringField(value: &_storage._str20) }()
  13521. case 21: try { try decoder.decodeSingularStringField(value: &_storage._str21) }()
  13522. case 22: try { try decoder.decodeSingularStringField(value: &_storage._str22) }()
  13523. case 23: try { try decoder.decodeSingularStringField(value: &_storage._str23) }()
  13524. case 24: try { try decoder.decodeSingularStringField(value: &_storage._str24) }()
  13525. case 25: try { try decoder.decodeSingularStringField(value: &_storage._str25) }()
  13526. case 26: try { try decoder.decodeSingularStringField(value: &_storage._str26) }()
  13527. case 27: try { try decoder.decodeSingularStringField(value: &_storage._str27) }()
  13528. case 28: try { try decoder.decodeSingularStringField(value: &_storage._str28) }()
  13529. case 29: try { try decoder.decodeSingularStringField(value: &_storage._str29) }()
  13530. case 30: try { try decoder.decodeSingularStringField(value: &_storage._str30) }()
  13531. case 31: try { try decoder.decodeSingularStringField(value: &_storage._str31) }()
  13532. case 32: try { try decoder.decodeSingularStringField(value: &_storage._str32) }()
  13533. default: break
  13534. }
  13535. }
  13536. }
  13537. }
  13538. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13539. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  13540. // The use of inline closures is to circumvent an issue where the compiler
  13541. // allocates stack space for every if/case branch local when no optimizations
  13542. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13543. // https://github.com/apple/swift-protobuf/issues/1182
  13544. try { if let v = _storage._str1 {
  13545. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  13546. } }()
  13547. try { if let v = _storage._str2 {
  13548. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  13549. } }()
  13550. try { if let v = _storage._str3 {
  13551. try visitor.visitSingularStringField(value: v, fieldNumber: 3)
  13552. } }()
  13553. try { if let v = _storage._str4 {
  13554. try visitor.visitSingularStringField(value: v, fieldNumber: 4)
  13555. } }()
  13556. try { if let v = _storage._str5 {
  13557. try visitor.visitSingularStringField(value: v, fieldNumber: 5)
  13558. } }()
  13559. try { if let v = _storage._str6 {
  13560. try visitor.visitSingularStringField(value: v, fieldNumber: 6)
  13561. } }()
  13562. try { if let v = _storage._str7 {
  13563. try visitor.visitSingularStringField(value: v, fieldNumber: 7)
  13564. } }()
  13565. try { if let v = _storage._str8 {
  13566. try visitor.visitSingularStringField(value: v, fieldNumber: 8)
  13567. } }()
  13568. try { if let v = _storage._str9 {
  13569. try visitor.visitSingularStringField(value: v, fieldNumber: 9)
  13570. } }()
  13571. try { if let v = _storage._str10 {
  13572. try visitor.visitSingularStringField(value: v, fieldNumber: 10)
  13573. } }()
  13574. try { if let v = _storage._str11 {
  13575. try visitor.visitSingularStringField(value: v, fieldNumber: 11)
  13576. } }()
  13577. try { if let v = _storage._str12 {
  13578. try visitor.visitSingularStringField(value: v, fieldNumber: 12)
  13579. } }()
  13580. try { if let v = _storage._str13 {
  13581. try visitor.visitSingularStringField(value: v, fieldNumber: 13)
  13582. } }()
  13583. try { if let v = _storage._str14 {
  13584. try visitor.visitSingularStringField(value: v, fieldNumber: 14)
  13585. } }()
  13586. try { if let v = _storage._str15 {
  13587. try visitor.visitSingularStringField(value: v, fieldNumber: 15)
  13588. } }()
  13589. try { if let v = _storage._str16 {
  13590. try visitor.visitSingularStringField(value: v, fieldNumber: 16)
  13591. } }()
  13592. try { if let v = _storage._str17 {
  13593. try visitor.visitSingularStringField(value: v, fieldNumber: 17)
  13594. } }()
  13595. try { if let v = _storage._str18 {
  13596. try visitor.visitSingularStringField(value: v, fieldNumber: 18)
  13597. } }()
  13598. try { if let v = _storage._str19 {
  13599. try visitor.visitSingularStringField(value: v, fieldNumber: 19)
  13600. } }()
  13601. try { if let v = _storage._str20 {
  13602. try visitor.visitSingularStringField(value: v, fieldNumber: 20)
  13603. } }()
  13604. try { if let v = _storage._str21 {
  13605. try visitor.visitSingularStringField(value: v, fieldNumber: 21)
  13606. } }()
  13607. try { if let v = _storage._str22 {
  13608. try visitor.visitSingularStringField(value: v, fieldNumber: 22)
  13609. } }()
  13610. try { if let v = _storage._str23 {
  13611. try visitor.visitSingularStringField(value: v, fieldNumber: 23)
  13612. } }()
  13613. try { if let v = _storage._str24 {
  13614. try visitor.visitSingularStringField(value: v, fieldNumber: 24)
  13615. } }()
  13616. try { if let v = _storage._str25 {
  13617. try visitor.visitSingularStringField(value: v, fieldNumber: 25)
  13618. } }()
  13619. try { if let v = _storage._str26 {
  13620. try visitor.visitSingularStringField(value: v, fieldNumber: 26)
  13621. } }()
  13622. try { if let v = _storage._str27 {
  13623. try visitor.visitSingularStringField(value: v, fieldNumber: 27)
  13624. } }()
  13625. try { if let v = _storage._str28 {
  13626. try visitor.visitSingularStringField(value: v, fieldNumber: 28)
  13627. } }()
  13628. try { if let v = _storage._str29 {
  13629. try visitor.visitSingularStringField(value: v, fieldNumber: 29)
  13630. } }()
  13631. try { if let v = _storage._str30 {
  13632. try visitor.visitSingularStringField(value: v, fieldNumber: 30)
  13633. } }()
  13634. try { if let v = _storage._str31 {
  13635. try visitor.visitSingularStringField(value: v, fieldNumber: 31)
  13636. } }()
  13637. try { if let v = _storage._str32 {
  13638. try visitor.visitSingularStringField(value: v, fieldNumber: 32)
  13639. } }()
  13640. }
  13641. try unknownFields.traverse(visitor: &visitor)
  13642. }
  13643. static func ==(lhs: Proto2Unittest_ManyOptionalString, rhs: Proto2Unittest_ManyOptionalString) -> Bool {
  13644. if lhs._storage !== rhs._storage {
  13645. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  13646. let _storage = _args.0
  13647. let rhs_storage = _args.1
  13648. if _storage._str1 != rhs_storage._str1 {return false}
  13649. if _storage._str2 != rhs_storage._str2 {return false}
  13650. if _storage._str3 != rhs_storage._str3 {return false}
  13651. if _storage._str4 != rhs_storage._str4 {return false}
  13652. if _storage._str5 != rhs_storage._str5 {return false}
  13653. if _storage._str6 != rhs_storage._str6 {return false}
  13654. if _storage._str7 != rhs_storage._str7 {return false}
  13655. if _storage._str8 != rhs_storage._str8 {return false}
  13656. if _storage._str9 != rhs_storage._str9 {return false}
  13657. if _storage._str10 != rhs_storage._str10 {return false}
  13658. if _storage._str11 != rhs_storage._str11 {return false}
  13659. if _storage._str12 != rhs_storage._str12 {return false}
  13660. if _storage._str13 != rhs_storage._str13 {return false}
  13661. if _storage._str14 != rhs_storage._str14 {return false}
  13662. if _storage._str15 != rhs_storage._str15 {return false}
  13663. if _storage._str16 != rhs_storage._str16 {return false}
  13664. if _storage._str17 != rhs_storage._str17 {return false}
  13665. if _storage._str18 != rhs_storage._str18 {return false}
  13666. if _storage._str19 != rhs_storage._str19 {return false}
  13667. if _storage._str20 != rhs_storage._str20 {return false}
  13668. if _storage._str21 != rhs_storage._str21 {return false}
  13669. if _storage._str22 != rhs_storage._str22 {return false}
  13670. if _storage._str23 != rhs_storage._str23 {return false}
  13671. if _storage._str24 != rhs_storage._str24 {return false}
  13672. if _storage._str25 != rhs_storage._str25 {return false}
  13673. if _storage._str26 != rhs_storage._str26 {return false}
  13674. if _storage._str27 != rhs_storage._str27 {return false}
  13675. if _storage._str28 != rhs_storage._str28 {return false}
  13676. if _storage._str29 != rhs_storage._str29 {return false}
  13677. if _storage._str30 != rhs_storage._str30 {return false}
  13678. if _storage._str31 != rhs_storage._str31 {return false}
  13679. if _storage._str32 != rhs_storage._str32 {return false}
  13680. return true
  13681. }
  13682. if !storagesAreEqual {return false}
  13683. }
  13684. if lhs.unknownFields != rhs.unknownFields {return false}
  13685. return true
  13686. }
  13687. }
  13688. extension Proto2Unittest_Int32Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13689. static let protoMessageName: String = _protobuf_package + ".Int32Message"
  13690. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13691. 1: .same(proto: "data"),
  13692. ]
  13693. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13694. while let fieldNumber = try decoder.nextFieldNumber() {
  13695. // The use of inline closures is to circumvent an issue where the compiler
  13696. // allocates stack space for every case branch when no optimizations are
  13697. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13698. switch fieldNumber {
  13699. case 1: try { try decoder.decodeSingularInt32Field(value: &self._data) }()
  13700. default: break
  13701. }
  13702. }
  13703. }
  13704. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13705. // The use of inline closures is to circumvent an issue where the compiler
  13706. // allocates stack space for every if/case branch local when no optimizations
  13707. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13708. // https://github.com/apple/swift-protobuf/issues/1182
  13709. try { if let v = self._data {
  13710. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  13711. } }()
  13712. try unknownFields.traverse(visitor: &visitor)
  13713. }
  13714. static func ==(lhs: Proto2Unittest_Int32Message, rhs: Proto2Unittest_Int32Message) -> Bool {
  13715. if lhs._data != rhs._data {return false}
  13716. if lhs.unknownFields != rhs.unknownFields {return false}
  13717. return true
  13718. }
  13719. }
  13720. extension Proto2Unittest_Uint32Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13721. static let protoMessageName: String = _protobuf_package + ".Uint32Message"
  13722. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13723. 1: .same(proto: "data"),
  13724. ]
  13725. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13726. while let fieldNumber = try decoder.nextFieldNumber() {
  13727. // The use of inline closures is to circumvent an issue where the compiler
  13728. // allocates stack space for every case branch when no optimizations are
  13729. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13730. switch fieldNumber {
  13731. case 1: try { try decoder.decodeSingularUInt32Field(value: &self._data) }()
  13732. default: break
  13733. }
  13734. }
  13735. }
  13736. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13737. // The use of inline closures is to circumvent an issue where the compiler
  13738. // allocates stack space for every if/case branch local when no optimizations
  13739. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13740. // https://github.com/apple/swift-protobuf/issues/1182
  13741. try { if let v = self._data {
  13742. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
  13743. } }()
  13744. try unknownFields.traverse(visitor: &visitor)
  13745. }
  13746. static func ==(lhs: Proto2Unittest_Uint32Message, rhs: Proto2Unittest_Uint32Message) -> Bool {
  13747. if lhs._data != rhs._data {return false}
  13748. if lhs.unknownFields != rhs.unknownFields {return false}
  13749. return true
  13750. }
  13751. }
  13752. extension Proto2Unittest_Int64Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13753. static let protoMessageName: String = _protobuf_package + ".Int64Message"
  13754. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13755. 1: .same(proto: "data"),
  13756. ]
  13757. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13758. while let fieldNumber = try decoder.nextFieldNumber() {
  13759. // The use of inline closures is to circumvent an issue where the compiler
  13760. // allocates stack space for every case branch when no optimizations are
  13761. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13762. switch fieldNumber {
  13763. case 1: try { try decoder.decodeSingularInt64Field(value: &self._data) }()
  13764. default: break
  13765. }
  13766. }
  13767. }
  13768. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13769. // The use of inline closures is to circumvent an issue where the compiler
  13770. // allocates stack space for every if/case branch local when no optimizations
  13771. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13772. // https://github.com/apple/swift-protobuf/issues/1182
  13773. try { if let v = self._data {
  13774. try visitor.visitSingularInt64Field(value: v, fieldNumber: 1)
  13775. } }()
  13776. try unknownFields.traverse(visitor: &visitor)
  13777. }
  13778. static func ==(lhs: Proto2Unittest_Int64Message, rhs: Proto2Unittest_Int64Message) -> Bool {
  13779. if lhs._data != rhs._data {return false}
  13780. if lhs.unknownFields != rhs.unknownFields {return false}
  13781. return true
  13782. }
  13783. }
  13784. extension Proto2Unittest_Uint64Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13785. static let protoMessageName: String = _protobuf_package + ".Uint64Message"
  13786. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13787. 1: .same(proto: "data"),
  13788. ]
  13789. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13790. while let fieldNumber = try decoder.nextFieldNumber() {
  13791. // The use of inline closures is to circumvent an issue where the compiler
  13792. // allocates stack space for every case branch when no optimizations are
  13793. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13794. switch fieldNumber {
  13795. case 1: try { try decoder.decodeSingularUInt64Field(value: &self._data) }()
  13796. default: break
  13797. }
  13798. }
  13799. }
  13800. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13801. // The use of inline closures is to circumvent an issue where the compiler
  13802. // allocates stack space for every if/case branch local when no optimizations
  13803. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13804. // https://github.com/apple/swift-protobuf/issues/1182
  13805. try { if let v = self._data {
  13806. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
  13807. } }()
  13808. try unknownFields.traverse(visitor: &visitor)
  13809. }
  13810. static func ==(lhs: Proto2Unittest_Uint64Message, rhs: Proto2Unittest_Uint64Message) -> Bool {
  13811. if lhs._data != rhs._data {return false}
  13812. if lhs.unknownFields != rhs.unknownFields {return false}
  13813. return true
  13814. }
  13815. }
  13816. extension Proto2Unittest_BoolMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13817. static let protoMessageName: String = _protobuf_package + ".BoolMessage"
  13818. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13819. 1: .same(proto: "data"),
  13820. ]
  13821. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13822. while let fieldNumber = try decoder.nextFieldNumber() {
  13823. // The use of inline closures is to circumvent an issue where the compiler
  13824. // allocates stack space for every case branch when no optimizations are
  13825. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13826. switch fieldNumber {
  13827. case 1: try { try decoder.decodeSingularBoolField(value: &self._data) }()
  13828. default: break
  13829. }
  13830. }
  13831. }
  13832. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13833. // The use of inline closures is to circumvent an issue where the compiler
  13834. // allocates stack space for every if/case branch local when no optimizations
  13835. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13836. // https://github.com/apple/swift-protobuf/issues/1182
  13837. try { if let v = self._data {
  13838. try visitor.visitSingularBoolField(value: v, fieldNumber: 1)
  13839. } }()
  13840. try unknownFields.traverse(visitor: &visitor)
  13841. }
  13842. static func ==(lhs: Proto2Unittest_BoolMessage, rhs: Proto2Unittest_BoolMessage) -> Bool {
  13843. if lhs._data != rhs._data {return false}
  13844. if lhs.unknownFields != rhs.unknownFields {return false}
  13845. return true
  13846. }
  13847. }
  13848. extension Proto2Unittest_TestOneof: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13849. static let protoMessageName: String = _protobuf_package + ".TestOneof"
  13850. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13851. 1: .standard(proto: "foo_int"),
  13852. 2: .standard(proto: "foo_string"),
  13853. 3: .standard(proto: "foo_message"),
  13854. 4: .same(proto: "foogroup"),
  13855. 4: .unique(proto: "FooGroup", json: "foogroup"),
  13856. ]
  13857. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13858. while let fieldNumber = try decoder.nextFieldNumber() {
  13859. // The use of inline closures is to circumvent an issue where the compiler
  13860. // allocates stack space for every case branch when no optimizations are
  13861. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13862. switch fieldNumber {
  13863. case 1: try {
  13864. var v: Int32?
  13865. try decoder.decodeSingularInt32Field(value: &v)
  13866. if let v = v {
  13867. if self.foo != nil {try decoder.handleConflictingOneOf()}
  13868. self.foo = .fooInt(v)
  13869. }
  13870. }()
  13871. case 2: try {
  13872. var v: String?
  13873. try decoder.decodeSingularStringField(value: &v)
  13874. if let v = v {
  13875. if self.foo != nil {try decoder.handleConflictingOneOf()}
  13876. self.foo = .fooString(v)
  13877. }
  13878. }()
  13879. case 3: try {
  13880. var v: Proto2Unittest_TestAllTypes?
  13881. var hadOneofValue = false
  13882. if let current = self.foo {
  13883. hadOneofValue = true
  13884. if case .fooMessage(let m) = current {v = m}
  13885. }
  13886. try decoder.decodeSingularMessageField(value: &v)
  13887. if let v = v {
  13888. if hadOneofValue {try decoder.handleConflictingOneOf()}
  13889. self.foo = .fooMessage(v)
  13890. }
  13891. }()
  13892. case 4: try {
  13893. var v: Proto2Unittest_TestOneof.FooGroup?
  13894. var hadOneofValue = false
  13895. if let current = self.foo {
  13896. hadOneofValue = true
  13897. if case .fooGroup(let m) = current {v = m}
  13898. }
  13899. try decoder.decodeSingularGroupField(value: &v)
  13900. if let v = v {
  13901. if hadOneofValue {try decoder.handleConflictingOneOf()}
  13902. self.foo = .fooGroup(v)
  13903. }
  13904. }()
  13905. default: break
  13906. }
  13907. }
  13908. }
  13909. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13910. // The use of inline closures is to circumvent an issue where the compiler
  13911. // allocates stack space for every if/case branch local when no optimizations
  13912. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13913. // https://github.com/apple/swift-protobuf/issues/1182
  13914. switch self.foo {
  13915. case .fooInt?: try {
  13916. guard case .fooInt(let v)? = self.foo else { preconditionFailure() }
  13917. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  13918. }()
  13919. case .fooString?: try {
  13920. guard case .fooString(let v)? = self.foo else { preconditionFailure() }
  13921. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  13922. }()
  13923. case .fooMessage?: try {
  13924. guard case .fooMessage(let v)? = self.foo else { preconditionFailure() }
  13925. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  13926. }()
  13927. case .fooGroup?: try {
  13928. guard case .fooGroup(let v)? = self.foo else { preconditionFailure() }
  13929. try visitor.visitSingularGroupField(value: v, fieldNumber: 4)
  13930. }()
  13931. case nil: break
  13932. }
  13933. try unknownFields.traverse(visitor: &visitor)
  13934. }
  13935. static func ==(lhs: Proto2Unittest_TestOneof, rhs: Proto2Unittest_TestOneof) -> Bool {
  13936. if lhs.foo != rhs.foo {return false}
  13937. if lhs.unknownFields != rhs.unknownFields {return false}
  13938. return true
  13939. }
  13940. }
  13941. extension Proto2Unittest_TestOneof.FooGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13942. static let protoMessageName: String = Proto2Unittest_TestOneof.protoMessageName + ".FooGroup"
  13943. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13944. 5: .same(proto: "a"),
  13945. 6: .same(proto: "b"),
  13946. ]
  13947. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13948. while let fieldNumber = try decoder.nextFieldNumber() {
  13949. // The use of inline closures is to circumvent an issue where the compiler
  13950. // allocates stack space for every case branch when no optimizations are
  13951. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13952. switch fieldNumber {
  13953. case 5: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  13954. case 6: try { try decoder.decodeSingularStringField(value: &self._b) }()
  13955. default: break
  13956. }
  13957. }
  13958. }
  13959. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  13960. // The use of inline closures is to circumvent an issue where the compiler
  13961. // allocates stack space for every if/case branch local when no optimizations
  13962. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  13963. // https://github.com/apple/swift-protobuf/issues/1182
  13964. try { if let v = self._a {
  13965. try visitor.visitSingularInt32Field(value: v, fieldNumber: 5)
  13966. } }()
  13967. try { if let v = self._b {
  13968. try visitor.visitSingularStringField(value: v, fieldNumber: 6)
  13969. } }()
  13970. try unknownFields.traverse(visitor: &visitor)
  13971. }
  13972. static func ==(lhs: Proto2Unittest_TestOneof.FooGroup, rhs: Proto2Unittest_TestOneof.FooGroup) -> Bool {
  13973. if lhs._a != rhs._a {return false}
  13974. if lhs._b != rhs._b {return false}
  13975. if lhs.unknownFields != rhs.unknownFields {return false}
  13976. return true
  13977. }
  13978. }
  13979. extension Proto2Unittest_TestOneofBackwardsCompatible: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  13980. static let protoMessageName: String = _protobuf_package + ".TestOneofBackwardsCompatible"
  13981. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  13982. 1: .standard(proto: "foo_int"),
  13983. 2: .standard(proto: "foo_string"),
  13984. 3: .standard(proto: "foo_message"),
  13985. 4: .same(proto: "foogroup"),
  13986. 4: .unique(proto: "FooGroup", json: "foogroup"),
  13987. ]
  13988. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  13989. while let fieldNumber = try decoder.nextFieldNumber() {
  13990. // The use of inline closures is to circumvent an issue where the compiler
  13991. // allocates stack space for every case branch when no optimizations are
  13992. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  13993. switch fieldNumber {
  13994. case 1: try { try decoder.decodeSingularInt32Field(value: &self._fooInt) }()
  13995. case 2: try { try decoder.decodeSingularStringField(value: &self._fooString) }()
  13996. case 3: try { try decoder.decodeSingularMessageField(value: &self._fooMessage) }()
  13997. case 4: try { try decoder.decodeSingularGroupField(value: &self._fooGroup) }()
  13998. default: break
  13999. }
  14000. }
  14001. }
  14002. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14003. // The use of inline closures is to circumvent an issue where the compiler
  14004. // allocates stack space for every if/case branch local when no optimizations
  14005. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  14006. // https://github.com/apple/swift-protobuf/issues/1182
  14007. try { if let v = self._fooInt {
  14008. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  14009. } }()
  14010. try { if let v = self._fooString {
  14011. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  14012. } }()
  14013. try { if let v = self._fooMessage {
  14014. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  14015. } }()
  14016. try { if let v = self._fooGroup {
  14017. try visitor.visitSingularGroupField(value: v, fieldNumber: 4)
  14018. } }()
  14019. try unknownFields.traverse(visitor: &visitor)
  14020. }
  14021. static func ==(lhs: Proto2Unittest_TestOneofBackwardsCompatible, rhs: Proto2Unittest_TestOneofBackwardsCompatible) -> Bool {
  14022. if lhs._fooInt != rhs._fooInt {return false}
  14023. if lhs._fooString != rhs._fooString {return false}
  14024. if lhs._fooMessage != rhs._fooMessage {return false}
  14025. if lhs._fooGroup != rhs._fooGroup {return false}
  14026. if lhs.unknownFields != rhs.unknownFields {return false}
  14027. return true
  14028. }
  14029. }
  14030. extension Proto2Unittest_TestOneofBackwardsCompatible.FooGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14031. static let protoMessageName: String = Proto2Unittest_TestOneofBackwardsCompatible.protoMessageName + ".FooGroup"
  14032. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14033. 5: .same(proto: "a"),
  14034. 6: .same(proto: "b"),
  14035. ]
  14036. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14037. while let fieldNumber = try decoder.nextFieldNumber() {
  14038. // The use of inline closures is to circumvent an issue where the compiler
  14039. // allocates stack space for every case branch when no optimizations are
  14040. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14041. switch fieldNumber {
  14042. case 5: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  14043. case 6: try { try decoder.decodeSingularStringField(value: &self._b) }()
  14044. default: break
  14045. }
  14046. }
  14047. }
  14048. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14049. // The use of inline closures is to circumvent an issue where the compiler
  14050. // allocates stack space for every if/case branch local when no optimizations
  14051. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  14052. // https://github.com/apple/swift-protobuf/issues/1182
  14053. try { if let v = self._a {
  14054. try visitor.visitSingularInt32Field(value: v, fieldNumber: 5)
  14055. } }()
  14056. try { if let v = self._b {
  14057. try visitor.visitSingularStringField(value: v, fieldNumber: 6)
  14058. } }()
  14059. try unknownFields.traverse(visitor: &visitor)
  14060. }
  14061. static func ==(lhs: Proto2Unittest_TestOneofBackwardsCompatible.FooGroup, rhs: Proto2Unittest_TestOneofBackwardsCompatible.FooGroup) -> Bool {
  14062. if lhs._a != rhs._a {return false}
  14063. if lhs._b != rhs._b {return false}
  14064. if lhs.unknownFields != rhs.unknownFields {return false}
  14065. return true
  14066. }
  14067. }
  14068. extension Proto2Unittest_TestOneof2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14069. static let protoMessageName: String = _protobuf_package + ".TestOneof2"
  14070. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14071. 1: .standard(proto: "foo_int"),
  14072. 2: .standard(proto: "foo_string"),
  14073. 3: .standard(proto: "foo_cord"),
  14074. 4: .standard(proto: "foo_string_piece"),
  14075. 5: .standard(proto: "foo_bytes"),
  14076. 6: .standard(proto: "foo_enum"),
  14077. 7: .standard(proto: "foo_message"),
  14078. 8: .same(proto: "foogroup"),
  14079. 8: .unique(proto: "FooGroup", json: "foogroup"),
  14080. 11: .standard(proto: "foo_lazy_message"),
  14081. 30: .standard(proto: "foo_bytes_cord"),
  14082. 12: .standard(proto: "bar_int"),
  14083. 13: .standard(proto: "bar_string"),
  14084. 14: .standard(proto: "bar_cord"),
  14085. 15: .standard(proto: "bar_string_piece"),
  14086. 16: .standard(proto: "bar_bytes"),
  14087. 17: .standard(proto: "bar_enum"),
  14088. 20: .standard(proto: "bar_string_with_empty_default"),
  14089. 21: .standard(proto: "bar_cord_with_empty_default"),
  14090. 22: .standard(proto: "bar_string_piece_with_empty_default"),
  14091. 23: .standard(proto: "bar_bytes_with_empty_default"),
  14092. 18: .standard(proto: "baz_int"),
  14093. 19: .standard(proto: "baz_string"),
  14094. ]
  14095. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14096. while let fieldNumber = try decoder.nextFieldNumber() {
  14097. // The use of inline closures is to circumvent an issue where the compiler
  14098. // allocates stack space for every case branch when no optimizations are
  14099. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14100. switch fieldNumber {
  14101. case 1: try {
  14102. var v: Int32?
  14103. try decoder.decodeSingularInt32Field(value: &v)
  14104. if let v = v {
  14105. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14106. self.foo = .fooInt(v)
  14107. }
  14108. }()
  14109. case 2: try {
  14110. var v: String?
  14111. try decoder.decodeSingularStringField(value: &v)
  14112. if let v = v {
  14113. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14114. self.foo = .fooString(v)
  14115. }
  14116. }()
  14117. case 3: try {
  14118. var v: String?
  14119. try decoder.decodeSingularStringField(value: &v)
  14120. if let v = v {
  14121. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14122. self.foo = .fooCord(v)
  14123. }
  14124. }()
  14125. case 4: try {
  14126. var v: String?
  14127. try decoder.decodeSingularStringField(value: &v)
  14128. if let v = v {
  14129. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14130. self.foo = .fooStringPiece(v)
  14131. }
  14132. }()
  14133. case 5: try {
  14134. var v: Data?
  14135. try decoder.decodeSingularBytesField(value: &v)
  14136. if let v = v {
  14137. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14138. self.foo = .fooBytes(v)
  14139. }
  14140. }()
  14141. case 6: try {
  14142. var v: Proto2Unittest_TestOneof2.NestedEnum?
  14143. try decoder.decodeSingularEnumField(value: &v)
  14144. if let v = v {
  14145. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14146. self.foo = .fooEnum(v)
  14147. }
  14148. }()
  14149. case 7: try {
  14150. var v: Proto2Unittest_TestOneof2.NestedMessage?
  14151. var hadOneofValue = false
  14152. if let current = self.foo {
  14153. hadOneofValue = true
  14154. if case .fooMessage(let m) = current {v = m}
  14155. }
  14156. try decoder.decodeSingularMessageField(value: &v)
  14157. if let v = v {
  14158. if hadOneofValue {try decoder.handleConflictingOneOf()}
  14159. self.foo = .fooMessage(v)
  14160. }
  14161. }()
  14162. case 8: try {
  14163. var v: Proto2Unittest_TestOneof2.FooGroup?
  14164. var hadOneofValue = false
  14165. if let current = self.foo {
  14166. hadOneofValue = true
  14167. if case .fooGroup(let m) = current {v = m}
  14168. }
  14169. try decoder.decodeSingularGroupField(value: &v)
  14170. if let v = v {
  14171. if hadOneofValue {try decoder.handleConflictingOneOf()}
  14172. self.foo = .fooGroup(v)
  14173. }
  14174. }()
  14175. case 11: try {
  14176. var v: Proto2Unittest_TestOneof2.NestedMessage?
  14177. var hadOneofValue = false
  14178. if let current = self.foo {
  14179. hadOneofValue = true
  14180. if case .fooLazyMessage(let m) = current {v = m}
  14181. }
  14182. try decoder.decodeSingularMessageField(value: &v)
  14183. if let v = v {
  14184. if hadOneofValue {try decoder.handleConflictingOneOf()}
  14185. self.foo = .fooLazyMessage(v)
  14186. }
  14187. }()
  14188. case 12: try {
  14189. var v: Int32?
  14190. try decoder.decodeSingularInt32Field(value: &v)
  14191. if let v = v {
  14192. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14193. self.bar = .barInt(v)
  14194. }
  14195. }()
  14196. case 13: try {
  14197. var v: String?
  14198. try decoder.decodeSingularStringField(value: &v)
  14199. if let v = v {
  14200. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14201. self.bar = .barString(v)
  14202. }
  14203. }()
  14204. case 14: try {
  14205. var v: String?
  14206. try decoder.decodeSingularStringField(value: &v)
  14207. if let v = v {
  14208. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14209. self.bar = .barCord(v)
  14210. }
  14211. }()
  14212. case 15: try {
  14213. var v: String?
  14214. try decoder.decodeSingularStringField(value: &v)
  14215. if let v = v {
  14216. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14217. self.bar = .barStringPiece(v)
  14218. }
  14219. }()
  14220. case 16: try {
  14221. var v: Data?
  14222. try decoder.decodeSingularBytesField(value: &v)
  14223. if let v = v {
  14224. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14225. self.bar = .barBytes(v)
  14226. }
  14227. }()
  14228. case 17: try {
  14229. var v: Proto2Unittest_TestOneof2.NestedEnum?
  14230. try decoder.decodeSingularEnumField(value: &v)
  14231. if let v = v {
  14232. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14233. self.bar = .barEnum(v)
  14234. }
  14235. }()
  14236. case 18: try { try decoder.decodeSingularInt32Field(value: &self._bazInt) }()
  14237. case 19: try { try decoder.decodeSingularStringField(value: &self._bazString) }()
  14238. case 20: try {
  14239. var v: String?
  14240. try decoder.decodeSingularStringField(value: &v)
  14241. if let v = v {
  14242. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14243. self.bar = .barStringWithEmptyDefault(v)
  14244. }
  14245. }()
  14246. case 21: try {
  14247. var v: String?
  14248. try decoder.decodeSingularStringField(value: &v)
  14249. if let v = v {
  14250. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14251. self.bar = .barCordWithEmptyDefault(v)
  14252. }
  14253. }()
  14254. case 22: try {
  14255. var v: String?
  14256. try decoder.decodeSingularStringField(value: &v)
  14257. if let v = v {
  14258. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14259. self.bar = .barStringPieceWithEmptyDefault(v)
  14260. }
  14261. }()
  14262. case 23: try {
  14263. var v: Data?
  14264. try decoder.decodeSingularBytesField(value: &v)
  14265. if let v = v {
  14266. if self.bar != nil {try decoder.handleConflictingOneOf()}
  14267. self.bar = .barBytesWithEmptyDefault(v)
  14268. }
  14269. }()
  14270. case 30: try {
  14271. var v: Data?
  14272. try decoder.decodeSingularBytesField(value: &v)
  14273. if let v = v {
  14274. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14275. self.foo = .fooBytesCord(v)
  14276. }
  14277. }()
  14278. default: break
  14279. }
  14280. }
  14281. }
  14282. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14283. // The use of inline closures is to circumvent an issue where the compiler
  14284. // allocates stack space for every if/case branch local when no optimizations
  14285. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  14286. // https://github.com/apple/swift-protobuf/issues/1182
  14287. switch self.foo {
  14288. case .fooInt?: try {
  14289. guard case .fooInt(let v)? = self.foo else { preconditionFailure() }
  14290. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  14291. }()
  14292. case .fooString?: try {
  14293. guard case .fooString(let v)? = self.foo else { preconditionFailure() }
  14294. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  14295. }()
  14296. case .fooCord?: try {
  14297. guard case .fooCord(let v)? = self.foo else { preconditionFailure() }
  14298. try visitor.visitSingularStringField(value: v, fieldNumber: 3)
  14299. }()
  14300. case .fooStringPiece?: try {
  14301. guard case .fooStringPiece(let v)? = self.foo else { preconditionFailure() }
  14302. try visitor.visitSingularStringField(value: v, fieldNumber: 4)
  14303. }()
  14304. case .fooBytes?: try {
  14305. guard case .fooBytes(let v)? = self.foo else { preconditionFailure() }
  14306. try visitor.visitSingularBytesField(value: v, fieldNumber: 5)
  14307. }()
  14308. case .fooEnum?: try {
  14309. guard case .fooEnum(let v)? = self.foo else { preconditionFailure() }
  14310. try visitor.visitSingularEnumField(value: v, fieldNumber: 6)
  14311. }()
  14312. case .fooMessage?: try {
  14313. guard case .fooMessage(let v)? = self.foo else { preconditionFailure() }
  14314. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  14315. }()
  14316. case .fooGroup?: try {
  14317. guard case .fooGroup(let v)? = self.foo else { preconditionFailure() }
  14318. try visitor.visitSingularGroupField(value: v, fieldNumber: 8)
  14319. }()
  14320. case .fooLazyMessage?: try {
  14321. guard case .fooLazyMessage(let v)? = self.foo else { preconditionFailure() }
  14322. try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
  14323. }()
  14324. default: break
  14325. }
  14326. switch self.bar {
  14327. case .barInt?: try {
  14328. guard case .barInt(let v)? = self.bar else { preconditionFailure() }
  14329. try visitor.visitSingularInt32Field(value: v, fieldNumber: 12)
  14330. }()
  14331. case .barString?: try {
  14332. guard case .barString(let v)? = self.bar else { preconditionFailure() }
  14333. try visitor.visitSingularStringField(value: v, fieldNumber: 13)
  14334. }()
  14335. case .barCord?: try {
  14336. guard case .barCord(let v)? = self.bar else { preconditionFailure() }
  14337. try visitor.visitSingularStringField(value: v, fieldNumber: 14)
  14338. }()
  14339. case .barStringPiece?: try {
  14340. guard case .barStringPiece(let v)? = self.bar else { preconditionFailure() }
  14341. try visitor.visitSingularStringField(value: v, fieldNumber: 15)
  14342. }()
  14343. case .barBytes?: try {
  14344. guard case .barBytes(let v)? = self.bar else { preconditionFailure() }
  14345. try visitor.visitSingularBytesField(value: v, fieldNumber: 16)
  14346. }()
  14347. case .barEnum?: try {
  14348. guard case .barEnum(let v)? = self.bar else { preconditionFailure() }
  14349. try visitor.visitSingularEnumField(value: v, fieldNumber: 17)
  14350. }()
  14351. default: break
  14352. }
  14353. try { if let v = self._bazInt {
  14354. try visitor.visitSingularInt32Field(value: v, fieldNumber: 18)
  14355. } }()
  14356. try { if let v = self._bazString {
  14357. try visitor.visitSingularStringField(value: v, fieldNumber: 19)
  14358. } }()
  14359. switch self.bar {
  14360. case .barStringWithEmptyDefault?: try {
  14361. guard case .barStringWithEmptyDefault(let v)? = self.bar else { preconditionFailure() }
  14362. try visitor.visitSingularStringField(value: v, fieldNumber: 20)
  14363. }()
  14364. case .barCordWithEmptyDefault?: try {
  14365. guard case .barCordWithEmptyDefault(let v)? = self.bar else { preconditionFailure() }
  14366. try visitor.visitSingularStringField(value: v, fieldNumber: 21)
  14367. }()
  14368. case .barStringPieceWithEmptyDefault?: try {
  14369. guard case .barStringPieceWithEmptyDefault(let v)? = self.bar else { preconditionFailure() }
  14370. try visitor.visitSingularStringField(value: v, fieldNumber: 22)
  14371. }()
  14372. case .barBytesWithEmptyDefault?: try {
  14373. guard case .barBytesWithEmptyDefault(let v)? = self.bar else { preconditionFailure() }
  14374. try visitor.visitSingularBytesField(value: v, fieldNumber: 23)
  14375. }()
  14376. default: break
  14377. }
  14378. try { if case .fooBytesCord(let v)? = self.foo {
  14379. try visitor.visitSingularBytesField(value: v, fieldNumber: 30)
  14380. } }()
  14381. try unknownFields.traverse(visitor: &visitor)
  14382. }
  14383. static func ==(lhs: Proto2Unittest_TestOneof2, rhs: Proto2Unittest_TestOneof2) -> Bool {
  14384. if lhs.foo != rhs.foo {return false}
  14385. if lhs.bar != rhs.bar {return false}
  14386. if lhs._bazInt != rhs._bazInt {return false}
  14387. if lhs._bazString != rhs._bazString {return false}
  14388. if lhs.unknownFields != rhs.unknownFields {return false}
  14389. return true
  14390. }
  14391. }
  14392. extension Proto2Unittest_TestOneof2.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  14393. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14394. 1: .same(proto: "FOO"),
  14395. 2: .same(proto: "BAR"),
  14396. 3: .same(proto: "BAZ"),
  14397. ]
  14398. }
  14399. extension Proto2Unittest_TestOneof2.FooGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14400. static let protoMessageName: String = Proto2Unittest_TestOneof2.protoMessageName + ".FooGroup"
  14401. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14402. 9: .same(proto: "a"),
  14403. 10: .same(proto: "b"),
  14404. ]
  14405. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14406. while let fieldNumber = try decoder.nextFieldNumber() {
  14407. // The use of inline closures is to circumvent an issue where the compiler
  14408. // allocates stack space for every case branch when no optimizations are
  14409. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14410. switch fieldNumber {
  14411. case 9: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  14412. case 10: try { try decoder.decodeSingularStringField(value: &self._b) }()
  14413. default: break
  14414. }
  14415. }
  14416. }
  14417. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14418. // The use of inline closures is to circumvent an issue where the compiler
  14419. // allocates stack space for every if/case branch local when no optimizations
  14420. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  14421. // https://github.com/apple/swift-protobuf/issues/1182
  14422. try { if let v = self._a {
  14423. try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
  14424. } }()
  14425. try { if let v = self._b {
  14426. try visitor.visitSingularStringField(value: v, fieldNumber: 10)
  14427. } }()
  14428. try unknownFields.traverse(visitor: &visitor)
  14429. }
  14430. static func ==(lhs: Proto2Unittest_TestOneof2.FooGroup, rhs: Proto2Unittest_TestOneof2.FooGroup) -> Bool {
  14431. if lhs._a != rhs._a {return false}
  14432. if lhs._b != rhs._b {return false}
  14433. if lhs.unknownFields != rhs.unknownFields {return false}
  14434. return true
  14435. }
  14436. }
  14437. extension Proto2Unittest_TestOneof2.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14438. static let protoMessageName: String = Proto2Unittest_TestOneof2.protoMessageName + ".NestedMessage"
  14439. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14440. 1: .standard(proto: "moo_int"),
  14441. 2: .standard(proto: "corge_int"),
  14442. 3: .same(proto: "child"),
  14443. ]
  14444. fileprivate class _StorageClass {
  14445. var _mooInt: Int64? = nil
  14446. var _corgeInt: [Int32] = []
  14447. var _child: Proto2Unittest_TestOneof2.NestedMessage? = nil
  14448. // This property is used as the initial default value for new instances of the type.
  14449. // The type itself is protecting the reference to its storage via CoW semantics.
  14450. // This will force a copy to be made of this reference when the first mutation occurs;
  14451. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  14452. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  14453. private init() {}
  14454. init(copying source: _StorageClass) {
  14455. _mooInt = source._mooInt
  14456. _corgeInt = source._corgeInt
  14457. _child = source._child
  14458. }
  14459. }
  14460. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  14461. if !isKnownUniquelyReferenced(&_storage) {
  14462. _storage = _StorageClass(copying: _storage)
  14463. }
  14464. return _storage
  14465. }
  14466. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14467. _ = _uniqueStorage()
  14468. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  14469. while let fieldNumber = try decoder.nextFieldNumber() {
  14470. // The use of inline closures is to circumvent an issue where the compiler
  14471. // allocates stack space for every case branch when no optimizations are
  14472. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14473. switch fieldNumber {
  14474. case 1: try { try decoder.decodeSingularInt64Field(value: &_storage._mooInt) }()
  14475. case 2: try { try decoder.decodeRepeatedInt32Field(value: &_storage._corgeInt) }()
  14476. case 3: try { try decoder.decodeSingularMessageField(value: &_storage._child) }()
  14477. default: break
  14478. }
  14479. }
  14480. }
  14481. }
  14482. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14483. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  14484. // The use of inline closures is to circumvent an issue where the compiler
  14485. // allocates stack space for every if/case branch local when no optimizations
  14486. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  14487. // https://github.com/apple/swift-protobuf/issues/1182
  14488. try { if let v = _storage._mooInt {
  14489. try visitor.visitSingularInt64Field(value: v, fieldNumber: 1)
  14490. } }()
  14491. if !_storage._corgeInt.isEmpty {
  14492. try visitor.visitRepeatedInt32Field(value: _storage._corgeInt, fieldNumber: 2)
  14493. }
  14494. try { if let v = _storage._child {
  14495. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  14496. } }()
  14497. }
  14498. try unknownFields.traverse(visitor: &visitor)
  14499. }
  14500. static func ==(lhs: Proto2Unittest_TestOneof2.NestedMessage, rhs: Proto2Unittest_TestOneof2.NestedMessage) -> Bool {
  14501. if lhs._storage !== rhs._storage {
  14502. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  14503. let _storage = _args.0
  14504. let rhs_storage = _args.1
  14505. if _storage._mooInt != rhs_storage._mooInt {return false}
  14506. if _storage._corgeInt != rhs_storage._corgeInt {return false}
  14507. if _storage._child != rhs_storage._child {return false}
  14508. return true
  14509. }
  14510. if !storagesAreEqual {return false}
  14511. }
  14512. if lhs.unknownFields != rhs.unknownFields {return false}
  14513. return true
  14514. }
  14515. }
  14516. extension Proto2Unittest_TestRequiredOneof: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14517. static let protoMessageName: String = _protobuf_package + ".TestRequiredOneof"
  14518. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14519. 1: .standard(proto: "foo_int"),
  14520. 2: .standard(proto: "foo_string"),
  14521. 3: .standard(proto: "foo_message"),
  14522. 4: .standard(proto: "foo_lazy_message"),
  14523. ]
  14524. public var isInitialized: Bool {
  14525. if let v = self.foo, !v.isInitialized {return false}
  14526. return true
  14527. }
  14528. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14529. while let fieldNumber = try decoder.nextFieldNumber() {
  14530. // The use of inline closures is to circumvent an issue where the compiler
  14531. // allocates stack space for every case branch when no optimizations are
  14532. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14533. switch fieldNumber {
  14534. case 1: try {
  14535. var v: Int32?
  14536. try decoder.decodeSingularInt32Field(value: &v)
  14537. if let v = v {
  14538. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14539. self.foo = .fooInt(v)
  14540. }
  14541. }()
  14542. case 2: try {
  14543. var v: String?
  14544. try decoder.decodeSingularStringField(value: &v)
  14545. if let v = v {
  14546. if self.foo != nil {try decoder.handleConflictingOneOf()}
  14547. self.foo = .fooString(v)
  14548. }
  14549. }()
  14550. case 3: try {
  14551. var v: Proto2Unittest_TestRequiredOneof.NestedMessage?
  14552. var hadOneofValue = false
  14553. if let current = self.foo {
  14554. hadOneofValue = true
  14555. if case .fooMessage(let m) = current {v = m}
  14556. }
  14557. try decoder.decodeSingularMessageField(value: &v)
  14558. if let v = v {
  14559. if hadOneofValue {try decoder.handleConflictingOneOf()}
  14560. self.foo = .fooMessage(v)
  14561. }
  14562. }()
  14563. case 4: try {
  14564. var v: Proto2Unittest_TestRequiredOneof.NestedMessage?
  14565. var hadOneofValue = false
  14566. if let current = self.foo {
  14567. hadOneofValue = true
  14568. if case .fooLazyMessage(let m) = current {v = m}
  14569. }
  14570. try decoder.decodeSingularMessageField(value: &v)
  14571. if let v = v {
  14572. if hadOneofValue {try decoder.handleConflictingOneOf()}
  14573. self.foo = .fooLazyMessage(v)
  14574. }
  14575. }()
  14576. default: break
  14577. }
  14578. }
  14579. }
  14580. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14581. // The use of inline closures is to circumvent an issue where the compiler
  14582. // allocates stack space for every if/case branch local when no optimizations
  14583. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  14584. // https://github.com/apple/swift-protobuf/issues/1182
  14585. switch self.foo {
  14586. case .fooInt?: try {
  14587. guard case .fooInt(let v)? = self.foo else { preconditionFailure() }
  14588. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  14589. }()
  14590. case .fooString?: try {
  14591. guard case .fooString(let v)? = self.foo else { preconditionFailure() }
  14592. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  14593. }()
  14594. case .fooMessage?: try {
  14595. guard case .fooMessage(let v)? = self.foo else { preconditionFailure() }
  14596. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  14597. }()
  14598. case .fooLazyMessage?: try {
  14599. guard case .fooLazyMessage(let v)? = self.foo else { preconditionFailure() }
  14600. try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
  14601. }()
  14602. case nil: break
  14603. }
  14604. try unknownFields.traverse(visitor: &visitor)
  14605. }
  14606. static func ==(lhs: Proto2Unittest_TestRequiredOneof, rhs: Proto2Unittest_TestRequiredOneof) -> Bool {
  14607. if lhs.foo != rhs.foo {return false}
  14608. if lhs.unknownFields != rhs.unknownFields {return false}
  14609. return true
  14610. }
  14611. }
  14612. extension Proto2Unittest_TestRequiredOneof.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14613. static let protoMessageName: String = Proto2Unittest_TestRequiredOneof.protoMessageName + ".NestedMessage"
  14614. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14615. 1: .standard(proto: "required_double"),
  14616. ]
  14617. public var isInitialized: Bool {
  14618. if self._requiredDouble == nil {return false}
  14619. return true
  14620. }
  14621. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14622. while let fieldNumber = try decoder.nextFieldNumber() {
  14623. // The use of inline closures is to circumvent an issue where the compiler
  14624. // allocates stack space for every case branch when no optimizations are
  14625. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14626. switch fieldNumber {
  14627. case 1: try { try decoder.decodeSingularDoubleField(value: &self._requiredDouble) }()
  14628. default: break
  14629. }
  14630. }
  14631. }
  14632. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14633. // The use of inline closures is to circumvent an issue where the compiler
  14634. // allocates stack space for every if/case branch local when no optimizations
  14635. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  14636. // https://github.com/apple/swift-protobuf/issues/1182
  14637. try { if let v = self._requiredDouble {
  14638. try visitor.visitSingularDoubleField(value: v, fieldNumber: 1)
  14639. } }()
  14640. try unknownFields.traverse(visitor: &visitor)
  14641. }
  14642. static func ==(lhs: Proto2Unittest_TestRequiredOneof.NestedMessage, rhs: Proto2Unittest_TestRequiredOneof.NestedMessage) -> Bool {
  14643. if lhs._requiredDouble != rhs._requiredDouble {return false}
  14644. if lhs.unknownFields != rhs.unknownFields {return false}
  14645. return true
  14646. }
  14647. }
  14648. extension Proto2Unittest_TestPackedTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14649. static let protoMessageName: String = _protobuf_package + ".TestPackedTypes"
  14650. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14651. 90: .standard(proto: "packed_int32"),
  14652. 91: .standard(proto: "packed_int64"),
  14653. 92: .standard(proto: "packed_uint32"),
  14654. 93: .standard(proto: "packed_uint64"),
  14655. 94: .standard(proto: "packed_sint32"),
  14656. 95: .standard(proto: "packed_sint64"),
  14657. 96: .standard(proto: "packed_fixed32"),
  14658. 97: .standard(proto: "packed_fixed64"),
  14659. 98: .standard(proto: "packed_sfixed32"),
  14660. 99: .standard(proto: "packed_sfixed64"),
  14661. 100: .standard(proto: "packed_float"),
  14662. 101: .standard(proto: "packed_double"),
  14663. 102: .standard(proto: "packed_bool"),
  14664. 103: .standard(proto: "packed_enum"),
  14665. ]
  14666. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14667. while let fieldNumber = try decoder.nextFieldNumber() {
  14668. // The use of inline closures is to circumvent an issue where the compiler
  14669. // allocates stack space for every case branch when no optimizations are
  14670. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14671. switch fieldNumber {
  14672. case 90: try { try decoder.decodeRepeatedInt32Field(value: &self.packedInt32) }()
  14673. case 91: try { try decoder.decodeRepeatedInt64Field(value: &self.packedInt64) }()
  14674. case 92: try { try decoder.decodeRepeatedUInt32Field(value: &self.packedUint32) }()
  14675. case 93: try { try decoder.decodeRepeatedUInt64Field(value: &self.packedUint64) }()
  14676. case 94: try { try decoder.decodeRepeatedSInt32Field(value: &self.packedSint32) }()
  14677. case 95: try { try decoder.decodeRepeatedSInt64Field(value: &self.packedSint64) }()
  14678. case 96: try { try decoder.decodeRepeatedFixed32Field(value: &self.packedFixed32) }()
  14679. case 97: try { try decoder.decodeRepeatedFixed64Field(value: &self.packedFixed64) }()
  14680. case 98: try { try decoder.decodeRepeatedSFixed32Field(value: &self.packedSfixed32) }()
  14681. case 99: try { try decoder.decodeRepeatedSFixed64Field(value: &self.packedSfixed64) }()
  14682. case 100: try { try decoder.decodeRepeatedFloatField(value: &self.packedFloat) }()
  14683. case 101: try { try decoder.decodeRepeatedDoubleField(value: &self.packedDouble) }()
  14684. case 102: try { try decoder.decodeRepeatedBoolField(value: &self.packedBool) }()
  14685. case 103: try { try decoder.decodeRepeatedEnumField(value: &self.packedEnum) }()
  14686. default: break
  14687. }
  14688. }
  14689. }
  14690. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14691. if !self.packedInt32.isEmpty {
  14692. try visitor.visitPackedInt32Field(value: self.packedInt32, fieldNumber: 90)
  14693. }
  14694. if !self.packedInt64.isEmpty {
  14695. try visitor.visitPackedInt64Field(value: self.packedInt64, fieldNumber: 91)
  14696. }
  14697. if !self.packedUint32.isEmpty {
  14698. try visitor.visitPackedUInt32Field(value: self.packedUint32, fieldNumber: 92)
  14699. }
  14700. if !self.packedUint64.isEmpty {
  14701. try visitor.visitPackedUInt64Field(value: self.packedUint64, fieldNumber: 93)
  14702. }
  14703. if !self.packedSint32.isEmpty {
  14704. try visitor.visitPackedSInt32Field(value: self.packedSint32, fieldNumber: 94)
  14705. }
  14706. if !self.packedSint64.isEmpty {
  14707. try visitor.visitPackedSInt64Field(value: self.packedSint64, fieldNumber: 95)
  14708. }
  14709. if !self.packedFixed32.isEmpty {
  14710. try visitor.visitPackedFixed32Field(value: self.packedFixed32, fieldNumber: 96)
  14711. }
  14712. if !self.packedFixed64.isEmpty {
  14713. try visitor.visitPackedFixed64Field(value: self.packedFixed64, fieldNumber: 97)
  14714. }
  14715. if !self.packedSfixed32.isEmpty {
  14716. try visitor.visitPackedSFixed32Field(value: self.packedSfixed32, fieldNumber: 98)
  14717. }
  14718. if !self.packedSfixed64.isEmpty {
  14719. try visitor.visitPackedSFixed64Field(value: self.packedSfixed64, fieldNumber: 99)
  14720. }
  14721. if !self.packedFloat.isEmpty {
  14722. try visitor.visitPackedFloatField(value: self.packedFloat, fieldNumber: 100)
  14723. }
  14724. if !self.packedDouble.isEmpty {
  14725. try visitor.visitPackedDoubleField(value: self.packedDouble, fieldNumber: 101)
  14726. }
  14727. if !self.packedBool.isEmpty {
  14728. try visitor.visitPackedBoolField(value: self.packedBool, fieldNumber: 102)
  14729. }
  14730. if !self.packedEnum.isEmpty {
  14731. try visitor.visitPackedEnumField(value: self.packedEnum, fieldNumber: 103)
  14732. }
  14733. try unknownFields.traverse(visitor: &visitor)
  14734. }
  14735. static func ==(lhs: Proto2Unittest_TestPackedTypes, rhs: Proto2Unittest_TestPackedTypes) -> Bool {
  14736. if lhs.packedInt32 != rhs.packedInt32 {return false}
  14737. if lhs.packedInt64 != rhs.packedInt64 {return false}
  14738. if lhs.packedUint32 != rhs.packedUint32 {return false}
  14739. if lhs.packedUint64 != rhs.packedUint64 {return false}
  14740. if lhs.packedSint32 != rhs.packedSint32 {return false}
  14741. if lhs.packedSint64 != rhs.packedSint64 {return false}
  14742. if lhs.packedFixed32 != rhs.packedFixed32 {return false}
  14743. if lhs.packedFixed64 != rhs.packedFixed64 {return false}
  14744. if lhs.packedSfixed32 != rhs.packedSfixed32 {return false}
  14745. if lhs.packedSfixed64 != rhs.packedSfixed64 {return false}
  14746. if lhs.packedFloat != rhs.packedFloat {return false}
  14747. if lhs.packedDouble != rhs.packedDouble {return false}
  14748. if lhs.packedBool != rhs.packedBool {return false}
  14749. if lhs.packedEnum != rhs.packedEnum {return false}
  14750. if lhs.unknownFields != rhs.unknownFields {return false}
  14751. return true
  14752. }
  14753. }
  14754. extension Proto2Unittest_TestUnpackedTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14755. static let protoMessageName: String = _protobuf_package + ".TestUnpackedTypes"
  14756. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14757. 90: .standard(proto: "unpacked_int32"),
  14758. 91: .standard(proto: "unpacked_int64"),
  14759. 92: .standard(proto: "unpacked_uint32"),
  14760. 93: .standard(proto: "unpacked_uint64"),
  14761. 94: .standard(proto: "unpacked_sint32"),
  14762. 95: .standard(proto: "unpacked_sint64"),
  14763. 96: .standard(proto: "unpacked_fixed32"),
  14764. 97: .standard(proto: "unpacked_fixed64"),
  14765. 98: .standard(proto: "unpacked_sfixed32"),
  14766. 99: .standard(proto: "unpacked_sfixed64"),
  14767. 100: .standard(proto: "unpacked_float"),
  14768. 101: .standard(proto: "unpacked_double"),
  14769. 102: .standard(proto: "unpacked_bool"),
  14770. 103: .standard(proto: "unpacked_enum"),
  14771. ]
  14772. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14773. while let fieldNumber = try decoder.nextFieldNumber() {
  14774. // The use of inline closures is to circumvent an issue where the compiler
  14775. // allocates stack space for every case branch when no optimizations are
  14776. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14777. switch fieldNumber {
  14778. case 90: try { try decoder.decodeRepeatedInt32Field(value: &self.unpackedInt32) }()
  14779. case 91: try { try decoder.decodeRepeatedInt64Field(value: &self.unpackedInt64) }()
  14780. case 92: try { try decoder.decodeRepeatedUInt32Field(value: &self.unpackedUint32) }()
  14781. case 93: try { try decoder.decodeRepeatedUInt64Field(value: &self.unpackedUint64) }()
  14782. case 94: try { try decoder.decodeRepeatedSInt32Field(value: &self.unpackedSint32) }()
  14783. case 95: try { try decoder.decodeRepeatedSInt64Field(value: &self.unpackedSint64) }()
  14784. case 96: try { try decoder.decodeRepeatedFixed32Field(value: &self.unpackedFixed32) }()
  14785. case 97: try { try decoder.decodeRepeatedFixed64Field(value: &self.unpackedFixed64) }()
  14786. case 98: try { try decoder.decodeRepeatedSFixed32Field(value: &self.unpackedSfixed32) }()
  14787. case 99: try { try decoder.decodeRepeatedSFixed64Field(value: &self.unpackedSfixed64) }()
  14788. case 100: try { try decoder.decodeRepeatedFloatField(value: &self.unpackedFloat) }()
  14789. case 101: try { try decoder.decodeRepeatedDoubleField(value: &self.unpackedDouble) }()
  14790. case 102: try { try decoder.decodeRepeatedBoolField(value: &self.unpackedBool) }()
  14791. case 103: try { try decoder.decodeRepeatedEnumField(value: &self.unpackedEnum) }()
  14792. default: break
  14793. }
  14794. }
  14795. }
  14796. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14797. if !self.unpackedInt32.isEmpty {
  14798. try visitor.visitRepeatedInt32Field(value: self.unpackedInt32, fieldNumber: 90)
  14799. }
  14800. if !self.unpackedInt64.isEmpty {
  14801. try visitor.visitRepeatedInt64Field(value: self.unpackedInt64, fieldNumber: 91)
  14802. }
  14803. if !self.unpackedUint32.isEmpty {
  14804. try visitor.visitRepeatedUInt32Field(value: self.unpackedUint32, fieldNumber: 92)
  14805. }
  14806. if !self.unpackedUint64.isEmpty {
  14807. try visitor.visitRepeatedUInt64Field(value: self.unpackedUint64, fieldNumber: 93)
  14808. }
  14809. if !self.unpackedSint32.isEmpty {
  14810. try visitor.visitRepeatedSInt32Field(value: self.unpackedSint32, fieldNumber: 94)
  14811. }
  14812. if !self.unpackedSint64.isEmpty {
  14813. try visitor.visitRepeatedSInt64Field(value: self.unpackedSint64, fieldNumber: 95)
  14814. }
  14815. if !self.unpackedFixed32.isEmpty {
  14816. try visitor.visitRepeatedFixed32Field(value: self.unpackedFixed32, fieldNumber: 96)
  14817. }
  14818. if !self.unpackedFixed64.isEmpty {
  14819. try visitor.visitRepeatedFixed64Field(value: self.unpackedFixed64, fieldNumber: 97)
  14820. }
  14821. if !self.unpackedSfixed32.isEmpty {
  14822. try visitor.visitRepeatedSFixed32Field(value: self.unpackedSfixed32, fieldNumber: 98)
  14823. }
  14824. if !self.unpackedSfixed64.isEmpty {
  14825. try visitor.visitRepeatedSFixed64Field(value: self.unpackedSfixed64, fieldNumber: 99)
  14826. }
  14827. if !self.unpackedFloat.isEmpty {
  14828. try visitor.visitRepeatedFloatField(value: self.unpackedFloat, fieldNumber: 100)
  14829. }
  14830. if !self.unpackedDouble.isEmpty {
  14831. try visitor.visitRepeatedDoubleField(value: self.unpackedDouble, fieldNumber: 101)
  14832. }
  14833. if !self.unpackedBool.isEmpty {
  14834. try visitor.visitRepeatedBoolField(value: self.unpackedBool, fieldNumber: 102)
  14835. }
  14836. if !self.unpackedEnum.isEmpty {
  14837. try visitor.visitRepeatedEnumField(value: self.unpackedEnum, fieldNumber: 103)
  14838. }
  14839. try unknownFields.traverse(visitor: &visitor)
  14840. }
  14841. static func ==(lhs: Proto2Unittest_TestUnpackedTypes, rhs: Proto2Unittest_TestUnpackedTypes) -> Bool {
  14842. if lhs.unpackedInt32 != rhs.unpackedInt32 {return false}
  14843. if lhs.unpackedInt64 != rhs.unpackedInt64 {return false}
  14844. if lhs.unpackedUint32 != rhs.unpackedUint32 {return false}
  14845. if lhs.unpackedUint64 != rhs.unpackedUint64 {return false}
  14846. if lhs.unpackedSint32 != rhs.unpackedSint32 {return false}
  14847. if lhs.unpackedSint64 != rhs.unpackedSint64 {return false}
  14848. if lhs.unpackedFixed32 != rhs.unpackedFixed32 {return false}
  14849. if lhs.unpackedFixed64 != rhs.unpackedFixed64 {return false}
  14850. if lhs.unpackedSfixed32 != rhs.unpackedSfixed32 {return false}
  14851. if lhs.unpackedSfixed64 != rhs.unpackedSfixed64 {return false}
  14852. if lhs.unpackedFloat != rhs.unpackedFloat {return false}
  14853. if lhs.unpackedDouble != rhs.unpackedDouble {return false}
  14854. if lhs.unpackedBool != rhs.unpackedBool {return false}
  14855. if lhs.unpackedEnum != rhs.unpackedEnum {return false}
  14856. if lhs.unknownFields != rhs.unknownFields {return false}
  14857. return true
  14858. }
  14859. }
  14860. extension Proto2Unittest_TestPackedExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14861. static let protoMessageName: String = _protobuf_package + ".TestPackedExtensions"
  14862. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  14863. public var isInitialized: Bool {
  14864. if !_protobuf_extensionFieldValues.isInitialized {return false}
  14865. return true
  14866. }
  14867. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14868. while let fieldNumber = try decoder.nextFieldNumber() {
  14869. if (1 <= fieldNumber && fieldNumber < 536870912) {
  14870. try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestPackedExtensions.self, fieldNumber: fieldNumber)
  14871. }
  14872. }
  14873. }
  14874. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14875. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1, end: 536870912)
  14876. try unknownFields.traverse(visitor: &visitor)
  14877. }
  14878. static func ==(lhs: Proto2Unittest_TestPackedExtensions, rhs: Proto2Unittest_TestPackedExtensions) -> Bool {
  14879. if lhs.unknownFields != rhs.unknownFields {return false}
  14880. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  14881. return true
  14882. }
  14883. }
  14884. extension Proto2Unittest_TestUnpackedExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14885. static let protoMessageName: String = _protobuf_package + ".TestUnpackedExtensions"
  14886. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  14887. public var isInitialized: Bool {
  14888. if !_protobuf_extensionFieldValues.isInitialized {return false}
  14889. return true
  14890. }
  14891. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14892. while let fieldNumber = try decoder.nextFieldNumber() {
  14893. if (1 <= fieldNumber && fieldNumber < 536870912) {
  14894. try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestUnpackedExtensions.self, fieldNumber: fieldNumber)
  14895. }
  14896. }
  14897. }
  14898. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14899. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1, end: 536870912)
  14900. try unknownFields.traverse(visitor: &visitor)
  14901. }
  14902. static func ==(lhs: Proto2Unittest_TestUnpackedExtensions, rhs: Proto2Unittest_TestUnpackedExtensions) -> Bool {
  14903. if lhs.unknownFields != rhs.unknownFields {return false}
  14904. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  14905. return true
  14906. }
  14907. }
  14908. extension Proto2Unittest_TestDynamicExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14909. static let protoMessageName: String = _protobuf_package + ".TestDynamicExtensions"
  14910. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14911. 2000: .standard(proto: "scalar_extension"),
  14912. 2001: .standard(proto: "enum_extension"),
  14913. 2002: .standard(proto: "dynamic_enum_extension"),
  14914. 2003: .standard(proto: "message_extension"),
  14915. 2004: .standard(proto: "dynamic_message_extension"),
  14916. 2005: .standard(proto: "repeated_extension"),
  14917. 2006: .standard(proto: "packed_extension"),
  14918. ]
  14919. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14920. while let fieldNumber = try decoder.nextFieldNumber() {
  14921. // The use of inline closures is to circumvent an issue where the compiler
  14922. // allocates stack space for every case branch when no optimizations are
  14923. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14924. switch fieldNumber {
  14925. case 2000: try { try decoder.decodeSingularFixed32Field(value: &self._scalarExtension) }()
  14926. case 2001: try { try decoder.decodeSingularEnumField(value: &self._enumExtension) }()
  14927. case 2002: try { try decoder.decodeSingularEnumField(value: &self._dynamicEnumExtension) }()
  14928. case 2003: try { try decoder.decodeSingularMessageField(value: &self._messageExtension) }()
  14929. case 2004: try { try decoder.decodeSingularMessageField(value: &self._dynamicMessageExtension) }()
  14930. case 2005: try { try decoder.decodeRepeatedStringField(value: &self.repeatedExtension) }()
  14931. case 2006: try { try decoder.decodeRepeatedSInt32Field(value: &self.packedExtension) }()
  14932. default: break
  14933. }
  14934. }
  14935. }
  14936. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  14937. // The use of inline closures is to circumvent an issue where the compiler
  14938. // allocates stack space for every if/case branch local when no optimizations
  14939. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  14940. // https://github.com/apple/swift-protobuf/issues/1182
  14941. try { if let v = self._scalarExtension {
  14942. try visitor.visitSingularFixed32Field(value: v, fieldNumber: 2000)
  14943. } }()
  14944. try { if let v = self._enumExtension {
  14945. try visitor.visitSingularEnumField(value: v, fieldNumber: 2001)
  14946. } }()
  14947. try { if let v = self._dynamicEnumExtension {
  14948. try visitor.visitSingularEnumField(value: v, fieldNumber: 2002)
  14949. } }()
  14950. try { if let v = self._messageExtension {
  14951. try visitor.visitSingularMessageField(value: v, fieldNumber: 2003)
  14952. } }()
  14953. try { if let v = self._dynamicMessageExtension {
  14954. try visitor.visitSingularMessageField(value: v, fieldNumber: 2004)
  14955. } }()
  14956. if !self.repeatedExtension.isEmpty {
  14957. try visitor.visitRepeatedStringField(value: self.repeatedExtension, fieldNumber: 2005)
  14958. }
  14959. if !self.packedExtension.isEmpty {
  14960. try visitor.visitPackedSInt32Field(value: self.packedExtension, fieldNumber: 2006)
  14961. }
  14962. try unknownFields.traverse(visitor: &visitor)
  14963. }
  14964. static func ==(lhs: Proto2Unittest_TestDynamicExtensions, rhs: Proto2Unittest_TestDynamicExtensions) -> Bool {
  14965. if lhs._scalarExtension != rhs._scalarExtension {return false}
  14966. if lhs._enumExtension != rhs._enumExtension {return false}
  14967. if lhs._dynamicEnumExtension != rhs._dynamicEnumExtension {return false}
  14968. if lhs._messageExtension != rhs._messageExtension {return false}
  14969. if lhs._dynamicMessageExtension != rhs._dynamicMessageExtension {return false}
  14970. if lhs.repeatedExtension != rhs.repeatedExtension {return false}
  14971. if lhs.packedExtension != rhs.packedExtension {return false}
  14972. if lhs.unknownFields != rhs.unknownFields {return false}
  14973. return true
  14974. }
  14975. }
  14976. extension Proto2Unittest_TestDynamicExtensions.DynamicEnumType: SwiftProtobuf._ProtoNameProviding {
  14977. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14978. 2200: .same(proto: "DYNAMIC_FOO"),
  14979. 2201: .same(proto: "DYNAMIC_BAR"),
  14980. 2202: .same(proto: "DYNAMIC_BAZ"),
  14981. ]
  14982. }
  14983. extension Proto2Unittest_TestDynamicExtensions.DynamicMessageType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  14984. static let protoMessageName: String = Proto2Unittest_TestDynamicExtensions.protoMessageName + ".DynamicMessageType"
  14985. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  14986. 2100: .standard(proto: "dynamic_field"),
  14987. ]
  14988. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  14989. while let fieldNumber = try decoder.nextFieldNumber() {
  14990. // The use of inline closures is to circumvent an issue where the compiler
  14991. // allocates stack space for every case branch when no optimizations are
  14992. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  14993. switch fieldNumber {
  14994. case 2100: try { try decoder.decodeSingularInt32Field(value: &self._dynamicField) }()
  14995. default: break
  14996. }
  14997. }
  14998. }
  14999. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15000. // The use of inline closures is to circumvent an issue where the compiler
  15001. // allocates stack space for every if/case branch local when no optimizations
  15002. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15003. // https://github.com/apple/swift-protobuf/issues/1182
  15004. try { if let v = self._dynamicField {
  15005. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2100)
  15006. } }()
  15007. try unknownFields.traverse(visitor: &visitor)
  15008. }
  15009. static func ==(lhs: Proto2Unittest_TestDynamicExtensions.DynamicMessageType, rhs: Proto2Unittest_TestDynamicExtensions.DynamicMessageType) -> Bool {
  15010. if lhs._dynamicField != rhs._dynamicField {return false}
  15011. if lhs.unknownFields != rhs.unknownFields {return false}
  15012. return true
  15013. }
  15014. }
  15015. extension Proto2Unittest_TestRepeatedString: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15016. static let protoMessageName: String = _protobuf_package + ".TestRepeatedString"
  15017. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15018. 1: .standard(proto: "repeated_string1"),
  15019. 2: .standard(proto: "repeated_string2"),
  15020. 11: .standard(proto: "repeated_bytes11"),
  15021. 12: .standard(proto: "repeated_bytes12"),
  15022. ]
  15023. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15024. while let fieldNumber = try decoder.nextFieldNumber() {
  15025. // The use of inline closures is to circumvent an issue where the compiler
  15026. // allocates stack space for every case branch when no optimizations are
  15027. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15028. switch fieldNumber {
  15029. case 1: try { try decoder.decodeRepeatedStringField(value: &self.repeatedString1) }()
  15030. case 2: try { try decoder.decodeRepeatedStringField(value: &self.repeatedString2) }()
  15031. case 11: try { try decoder.decodeRepeatedBytesField(value: &self.repeatedBytes11) }()
  15032. case 12: try { try decoder.decodeRepeatedBytesField(value: &self.repeatedBytes12) }()
  15033. default: break
  15034. }
  15035. }
  15036. }
  15037. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15038. if !self.repeatedString1.isEmpty {
  15039. try visitor.visitRepeatedStringField(value: self.repeatedString1, fieldNumber: 1)
  15040. }
  15041. if !self.repeatedString2.isEmpty {
  15042. try visitor.visitRepeatedStringField(value: self.repeatedString2, fieldNumber: 2)
  15043. }
  15044. if !self.repeatedBytes11.isEmpty {
  15045. try visitor.visitRepeatedBytesField(value: self.repeatedBytes11, fieldNumber: 11)
  15046. }
  15047. if !self.repeatedBytes12.isEmpty {
  15048. try visitor.visitRepeatedBytesField(value: self.repeatedBytes12, fieldNumber: 12)
  15049. }
  15050. try unknownFields.traverse(visitor: &visitor)
  15051. }
  15052. static func ==(lhs: Proto2Unittest_TestRepeatedString, rhs: Proto2Unittest_TestRepeatedString) -> Bool {
  15053. if lhs.repeatedString1 != rhs.repeatedString1 {return false}
  15054. if lhs.repeatedString2 != rhs.repeatedString2 {return false}
  15055. if lhs.repeatedBytes11 != rhs.repeatedBytes11 {return false}
  15056. if lhs.repeatedBytes12 != rhs.repeatedBytes12 {return false}
  15057. if lhs.unknownFields != rhs.unknownFields {return false}
  15058. return true
  15059. }
  15060. }
  15061. extension Proto2Unittest_TestRepeatedScalarDifferentTagSizes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15062. static let protoMessageName: String = _protobuf_package + ".TestRepeatedScalarDifferentTagSizes"
  15063. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15064. 12: .standard(proto: "repeated_fixed32"),
  15065. 13: .standard(proto: "repeated_int32"),
  15066. 2046: .standard(proto: "repeated_fixed64"),
  15067. 2047: .standard(proto: "repeated_int64"),
  15068. 262142: .standard(proto: "repeated_float"),
  15069. 262143: .standard(proto: "repeated_uint64"),
  15070. ]
  15071. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15072. while let fieldNumber = try decoder.nextFieldNumber() {
  15073. // The use of inline closures is to circumvent an issue where the compiler
  15074. // allocates stack space for every case branch when no optimizations are
  15075. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15076. switch fieldNumber {
  15077. case 12: try { try decoder.decodeRepeatedFixed32Field(value: &self.repeatedFixed32) }()
  15078. case 13: try { try decoder.decodeRepeatedInt32Field(value: &self.repeatedInt32) }()
  15079. case 2046: try { try decoder.decodeRepeatedFixed64Field(value: &self.repeatedFixed64) }()
  15080. case 2047: try { try decoder.decodeRepeatedInt64Field(value: &self.repeatedInt64) }()
  15081. case 262142: try { try decoder.decodeRepeatedFloatField(value: &self.repeatedFloat) }()
  15082. case 262143: try { try decoder.decodeRepeatedUInt64Field(value: &self.repeatedUint64) }()
  15083. default: break
  15084. }
  15085. }
  15086. }
  15087. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15088. if !self.repeatedFixed32.isEmpty {
  15089. try visitor.visitRepeatedFixed32Field(value: self.repeatedFixed32, fieldNumber: 12)
  15090. }
  15091. if !self.repeatedInt32.isEmpty {
  15092. try visitor.visitRepeatedInt32Field(value: self.repeatedInt32, fieldNumber: 13)
  15093. }
  15094. if !self.repeatedFixed64.isEmpty {
  15095. try visitor.visitRepeatedFixed64Field(value: self.repeatedFixed64, fieldNumber: 2046)
  15096. }
  15097. if !self.repeatedInt64.isEmpty {
  15098. try visitor.visitRepeatedInt64Field(value: self.repeatedInt64, fieldNumber: 2047)
  15099. }
  15100. if !self.repeatedFloat.isEmpty {
  15101. try visitor.visitRepeatedFloatField(value: self.repeatedFloat, fieldNumber: 262142)
  15102. }
  15103. if !self.repeatedUint64.isEmpty {
  15104. try visitor.visitRepeatedUInt64Field(value: self.repeatedUint64, fieldNumber: 262143)
  15105. }
  15106. try unknownFields.traverse(visitor: &visitor)
  15107. }
  15108. static func ==(lhs: Proto2Unittest_TestRepeatedScalarDifferentTagSizes, rhs: Proto2Unittest_TestRepeatedScalarDifferentTagSizes) -> Bool {
  15109. if lhs.repeatedFixed32 != rhs.repeatedFixed32 {return false}
  15110. if lhs.repeatedInt32 != rhs.repeatedInt32 {return false}
  15111. if lhs.repeatedFixed64 != rhs.repeatedFixed64 {return false}
  15112. if lhs.repeatedInt64 != rhs.repeatedInt64 {return false}
  15113. if lhs.repeatedFloat != rhs.repeatedFloat {return false}
  15114. if lhs.repeatedUint64 != rhs.repeatedUint64 {return false}
  15115. if lhs.unknownFields != rhs.unknownFields {return false}
  15116. return true
  15117. }
  15118. }
  15119. extension Proto2Unittest_TestParsingMerge: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15120. static let protoMessageName: String = _protobuf_package + ".TestParsingMerge"
  15121. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15122. 1: .standard(proto: "required_all_types"),
  15123. 2: .standard(proto: "optional_all_types"),
  15124. 3: .standard(proto: "repeated_all_types"),
  15125. 10: .same(proto: "optionalgroup"),
  15126. 10: .unique(proto: "OptionalGroup", json: "optionalgroup"),
  15127. 20: .same(proto: "repeatedgroup"),
  15128. 20: .unique(proto: "RepeatedGroup", json: "repeatedgroup"),
  15129. ]
  15130. public var isInitialized: Bool {
  15131. if !_protobuf_extensionFieldValues.isInitialized {return false}
  15132. if self._requiredAllTypes == nil {return false}
  15133. return true
  15134. }
  15135. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15136. while let fieldNumber = try decoder.nextFieldNumber() {
  15137. // The use of inline closures is to circumvent an issue where the compiler
  15138. // allocates stack space for every case branch when no optimizations are
  15139. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15140. switch fieldNumber {
  15141. case 1: try { try decoder.decodeSingularMessageField(value: &self._requiredAllTypes) }()
  15142. case 2: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  15143. case 3: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  15144. case 10: try { try decoder.decodeSingularGroupField(value: &self._optionalGroup) }()
  15145. case 20: try { try decoder.decodeRepeatedGroupField(value: &self.repeatedGroup) }()
  15146. case 1000..<536870912:
  15147. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestParsingMerge.self, fieldNumber: fieldNumber) }()
  15148. default: break
  15149. }
  15150. }
  15151. }
  15152. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15153. // The use of inline closures is to circumvent an issue where the compiler
  15154. // allocates stack space for every if/case branch local when no optimizations
  15155. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15156. // https://github.com/apple/swift-protobuf/issues/1182
  15157. try { if let v = self._requiredAllTypes {
  15158. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  15159. } }()
  15160. try { if let v = self._optionalAllTypes {
  15161. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  15162. } }()
  15163. if !self.repeatedAllTypes.isEmpty {
  15164. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 3)
  15165. }
  15166. try { if let v = self._optionalGroup {
  15167. try visitor.visitSingularGroupField(value: v, fieldNumber: 10)
  15168. } }()
  15169. if !self.repeatedGroup.isEmpty {
  15170. try visitor.visitRepeatedGroupField(value: self.repeatedGroup, fieldNumber: 20)
  15171. }
  15172. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
  15173. try unknownFields.traverse(visitor: &visitor)
  15174. }
  15175. static func ==(lhs: Proto2Unittest_TestParsingMerge, rhs: Proto2Unittest_TestParsingMerge) -> Bool {
  15176. if lhs._requiredAllTypes != rhs._requiredAllTypes {return false}
  15177. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  15178. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  15179. if lhs._optionalGroup != rhs._optionalGroup {return false}
  15180. if lhs.repeatedGroup != rhs.repeatedGroup {return false}
  15181. if lhs.unknownFields != rhs.unknownFields {return false}
  15182. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  15183. return true
  15184. }
  15185. }
  15186. extension Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15187. static let protoMessageName: String = Proto2Unittest_TestParsingMerge.protoMessageName + ".RepeatedFieldsGenerator"
  15188. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15189. 1: .same(proto: "field1"),
  15190. 2: .same(proto: "field2"),
  15191. 3: .same(proto: "field3"),
  15192. 10: .same(proto: "group1"),
  15193. 10: .unique(proto: "Group1", json: "group1"),
  15194. 20: .same(proto: "group2"),
  15195. 20: .unique(proto: "Group2", json: "group2"),
  15196. 1000: .same(proto: "ext1"),
  15197. 1001: .same(proto: "ext2"),
  15198. ]
  15199. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15200. while let fieldNumber = try decoder.nextFieldNumber() {
  15201. // The use of inline closures is to circumvent an issue where the compiler
  15202. // allocates stack space for every case branch when no optimizations are
  15203. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15204. switch fieldNumber {
  15205. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.field1) }()
  15206. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.field2) }()
  15207. case 3: try { try decoder.decodeRepeatedMessageField(value: &self.field3) }()
  15208. case 10: try { try decoder.decodeRepeatedGroupField(value: &self.group1) }()
  15209. case 20: try { try decoder.decodeRepeatedGroupField(value: &self.group2) }()
  15210. case 1000: try { try decoder.decodeRepeatedMessageField(value: &self.ext1) }()
  15211. case 1001: try { try decoder.decodeRepeatedMessageField(value: &self.ext2) }()
  15212. default: break
  15213. }
  15214. }
  15215. }
  15216. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15217. if !self.field1.isEmpty {
  15218. try visitor.visitRepeatedMessageField(value: self.field1, fieldNumber: 1)
  15219. }
  15220. if !self.field2.isEmpty {
  15221. try visitor.visitRepeatedMessageField(value: self.field2, fieldNumber: 2)
  15222. }
  15223. if !self.field3.isEmpty {
  15224. try visitor.visitRepeatedMessageField(value: self.field3, fieldNumber: 3)
  15225. }
  15226. if !self.group1.isEmpty {
  15227. try visitor.visitRepeatedGroupField(value: self.group1, fieldNumber: 10)
  15228. }
  15229. if !self.group2.isEmpty {
  15230. try visitor.visitRepeatedGroupField(value: self.group2, fieldNumber: 20)
  15231. }
  15232. if !self.ext1.isEmpty {
  15233. try visitor.visitRepeatedMessageField(value: self.ext1, fieldNumber: 1000)
  15234. }
  15235. if !self.ext2.isEmpty {
  15236. try visitor.visitRepeatedMessageField(value: self.ext2, fieldNumber: 1001)
  15237. }
  15238. try unknownFields.traverse(visitor: &visitor)
  15239. }
  15240. static func ==(lhs: Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator, rhs: Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator) -> Bool {
  15241. if lhs.field1 != rhs.field1 {return false}
  15242. if lhs.field2 != rhs.field2 {return false}
  15243. if lhs.field3 != rhs.field3 {return false}
  15244. if lhs.group1 != rhs.group1 {return false}
  15245. if lhs.group2 != rhs.group2 {return false}
  15246. if lhs.ext1 != rhs.ext1 {return false}
  15247. if lhs.ext2 != rhs.ext2 {return false}
  15248. if lhs.unknownFields != rhs.unknownFields {return false}
  15249. return true
  15250. }
  15251. }
  15252. extension Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.Group1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15253. static let protoMessageName: String = Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.protoMessageName + ".Group1"
  15254. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15255. 11: .same(proto: "field1"),
  15256. ]
  15257. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15258. while let fieldNumber = try decoder.nextFieldNumber() {
  15259. // The use of inline closures is to circumvent an issue where the compiler
  15260. // allocates stack space for every case branch when no optimizations are
  15261. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15262. switch fieldNumber {
  15263. case 11: try { try decoder.decodeSingularMessageField(value: &self._field1) }()
  15264. default: break
  15265. }
  15266. }
  15267. }
  15268. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15269. // The use of inline closures is to circumvent an issue where the compiler
  15270. // allocates stack space for every if/case branch local when no optimizations
  15271. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15272. // https://github.com/apple/swift-protobuf/issues/1182
  15273. try { if let v = self._field1 {
  15274. try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
  15275. } }()
  15276. try unknownFields.traverse(visitor: &visitor)
  15277. }
  15278. static func ==(lhs: Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.Group1, rhs: Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.Group1) -> Bool {
  15279. if lhs._field1 != rhs._field1 {return false}
  15280. if lhs.unknownFields != rhs.unknownFields {return false}
  15281. return true
  15282. }
  15283. }
  15284. extension Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.Group2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15285. static let protoMessageName: String = Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.protoMessageName + ".Group2"
  15286. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15287. 21: .same(proto: "field1"),
  15288. ]
  15289. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15290. while let fieldNumber = try decoder.nextFieldNumber() {
  15291. // The use of inline closures is to circumvent an issue where the compiler
  15292. // allocates stack space for every case branch when no optimizations are
  15293. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15294. switch fieldNumber {
  15295. case 21: try { try decoder.decodeSingularMessageField(value: &self._field1) }()
  15296. default: break
  15297. }
  15298. }
  15299. }
  15300. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15301. // The use of inline closures is to circumvent an issue where the compiler
  15302. // allocates stack space for every if/case branch local when no optimizations
  15303. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15304. // https://github.com/apple/swift-protobuf/issues/1182
  15305. try { if let v = self._field1 {
  15306. try visitor.visitSingularMessageField(value: v, fieldNumber: 21)
  15307. } }()
  15308. try unknownFields.traverse(visitor: &visitor)
  15309. }
  15310. static func ==(lhs: Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.Group2, rhs: Proto2Unittest_TestParsingMerge.RepeatedFieldsGenerator.Group2) -> Bool {
  15311. if lhs._field1 != rhs._field1 {return false}
  15312. if lhs.unknownFields != rhs.unknownFields {return false}
  15313. return true
  15314. }
  15315. }
  15316. extension Proto2Unittest_TestParsingMerge.OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15317. static let protoMessageName: String = Proto2Unittest_TestParsingMerge.protoMessageName + ".OptionalGroup"
  15318. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15319. 11: .standard(proto: "optional_group_all_types"),
  15320. ]
  15321. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15322. while let fieldNumber = try decoder.nextFieldNumber() {
  15323. // The use of inline closures is to circumvent an issue where the compiler
  15324. // allocates stack space for every case branch when no optimizations are
  15325. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15326. switch fieldNumber {
  15327. case 11: try { try decoder.decodeSingularMessageField(value: &self._optionalGroupAllTypes) }()
  15328. default: break
  15329. }
  15330. }
  15331. }
  15332. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15333. // The use of inline closures is to circumvent an issue where the compiler
  15334. // allocates stack space for every if/case branch local when no optimizations
  15335. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15336. // https://github.com/apple/swift-protobuf/issues/1182
  15337. try { if let v = self._optionalGroupAllTypes {
  15338. try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
  15339. } }()
  15340. try unknownFields.traverse(visitor: &visitor)
  15341. }
  15342. static func ==(lhs: Proto2Unittest_TestParsingMerge.OptionalGroup, rhs: Proto2Unittest_TestParsingMerge.OptionalGroup) -> Bool {
  15343. if lhs._optionalGroupAllTypes != rhs._optionalGroupAllTypes {return false}
  15344. if lhs.unknownFields != rhs.unknownFields {return false}
  15345. return true
  15346. }
  15347. }
  15348. extension Proto2Unittest_TestParsingMerge.RepeatedGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15349. static let protoMessageName: String = Proto2Unittest_TestParsingMerge.protoMessageName + ".RepeatedGroup"
  15350. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15351. 21: .standard(proto: "repeated_group_all_types"),
  15352. ]
  15353. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15354. while let fieldNumber = try decoder.nextFieldNumber() {
  15355. // The use of inline closures is to circumvent an issue where the compiler
  15356. // allocates stack space for every case branch when no optimizations are
  15357. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15358. switch fieldNumber {
  15359. case 21: try { try decoder.decodeSingularMessageField(value: &self._repeatedGroupAllTypes) }()
  15360. default: break
  15361. }
  15362. }
  15363. }
  15364. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15365. // The use of inline closures is to circumvent an issue where the compiler
  15366. // allocates stack space for every if/case branch local when no optimizations
  15367. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15368. // https://github.com/apple/swift-protobuf/issues/1182
  15369. try { if let v = self._repeatedGroupAllTypes {
  15370. try visitor.visitSingularMessageField(value: v, fieldNumber: 21)
  15371. } }()
  15372. try unknownFields.traverse(visitor: &visitor)
  15373. }
  15374. static func ==(lhs: Proto2Unittest_TestParsingMerge.RepeatedGroup, rhs: Proto2Unittest_TestParsingMerge.RepeatedGroup) -> Bool {
  15375. if lhs._repeatedGroupAllTypes != rhs._repeatedGroupAllTypes {return false}
  15376. if lhs.unknownFields != rhs.unknownFields {return false}
  15377. return true
  15378. }
  15379. }
  15380. extension Proto2Unittest_TestMergeException: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15381. static let protoMessageName: String = _protobuf_package + ".TestMergeException"
  15382. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15383. 1: .standard(proto: "all_extensions"),
  15384. ]
  15385. public var isInitialized: Bool {
  15386. if let v = self._allExtensions, !v.isInitialized {return false}
  15387. return true
  15388. }
  15389. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15390. while let fieldNumber = try decoder.nextFieldNumber() {
  15391. // The use of inline closures is to circumvent an issue where the compiler
  15392. // allocates stack space for every case branch when no optimizations are
  15393. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15394. switch fieldNumber {
  15395. case 1: try { try decoder.decodeSingularMessageField(value: &self._allExtensions) }()
  15396. default: break
  15397. }
  15398. }
  15399. }
  15400. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15401. // The use of inline closures is to circumvent an issue where the compiler
  15402. // allocates stack space for every if/case branch local when no optimizations
  15403. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15404. // https://github.com/apple/swift-protobuf/issues/1182
  15405. try { if let v = self._allExtensions {
  15406. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  15407. } }()
  15408. try unknownFields.traverse(visitor: &visitor)
  15409. }
  15410. static func ==(lhs: Proto2Unittest_TestMergeException, rhs: Proto2Unittest_TestMergeException) -> Bool {
  15411. if lhs._allExtensions != rhs._allExtensions {return false}
  15412. if lhs.unknownFields != rhs.unknownFields {return false}
  15413. return true
  15414. }
  15415. }
  15416. extension Proto2Unittest_TestCommentInjectionMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15417. static let protoMessageName: String = _protobuf_package + ".TestCommentInjectionMessage"
  15418. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15419. 1: .same(proto: "a"),
  15420. ]
  15421. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15422. while let fieldNumber = try decoder.nextFieldNumber() {
  15423. // The use of inline closures is to circumvent an issue where the compiler
  15424. // allocates stack space for every case branch when no optimizations are
  15425. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15426. switch fieldNumber {
  15427. case 1: try { try decoder.decodeSingularStringField(value: &self._a) }()
  15428. default: break
  15429. }
  15430. }
  15431. }
  15432. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15433. // The use of inline closures is to circumvent an issue where the compiler
  15434. // allocates stack space for every if/case branch local when no optimizations
  15435. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15436. // https://github.com/apple/swift-protobuf/issues/1182
  15437. try { if let v = self._a {
  15438. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  15439. } }()
  15440. try unknownFields.traverse(visitor: &visitor)
  15441. }
  15442. static func ==(lhs: Proto2Unittest_TestCommentInjectionMessage, rhs: Proto2Unittest_TestCommentInjectionMessage) -> Bool {
  15443. if lhs._a != rhs._a {return false}
  15444. if lhs.unknownFields != rhs.unknownFields {return false}
  15445. return true
  15446. }
  15447. }
  15448. extension Proto2Unittest_TestMessageSize: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15449. static let protoMessageName: String = _protobuf_package + ".TestMessageSize"
  15450. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15451. 1: .same(proto: "m1"),
  15452. 2: .same(proto: "m2"),
  15453. 3: .same(proto: "m3"),
  15454. 4: .same(proto: "m4"),
  15455. 5: .same(proto: "m5"),
  15456. 6: .same(proto: "m6"),
  15457. ]
  15458. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15459. while let fieldNumber = try decoder.nextFieldNumber() {
  15460. // The use of inline closures is to circumvent an issue where the compiler
  15461. // allocates stack space for every case branch when no optimizations are
  15462. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15463. switch fieldNumber {
  15464. case 1: try { try decoder.decodeSingularBoolField(value: &self._m1) }()
  15465. case 2: try { try decoder.decodeSingularInt64Field(value: &self._m2) }()
  15466. case 3: try { try decoder.decodeSingularBoolField(value: &self._m3) }()
  15467. case 4: try { try decoder.decodeSingularStringField(value: &self._m4) }()
  15468. case 5: try { try decoder.decodeSingularInt32Field(value: &self._m5) }()
  15469. case 6: try { try decoder.decodeSingularInt64Field(value: &self._m6) }()
  15470. default: break
  15471. }
  15472. }
  15473. }
  15474. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15475. // The use of inline closures is to circumvent an issue where the compiler
  15476. // allocates stack space for every if/case branch local when no optimizations
  15477. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15478. // https://github.com/apple/swift-protobuf/issues/1182
  15479. try { if let v = self._m1 {
  15480. try visitor.visitSingularBoolField(value: v, fieldNumber: 1)
  15481. } }()
  15482. try { if let v = self._m2 {
  15483. try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
  15484. } }()
  15485. try { if let v = self._m3 {
  15486. try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
  15487. } }()
  15488. try { if let v = self._m4 {
  15489. try visitor.visitSingularStringField(value: v, fieldNumber: 4)
  15490. } }()
  15491. try { if let v = self._m5 {
  15492. try visitor.visitSingularInt32Field(value: v, fieldNumber: 5)
  15493. } }()
  15494. try { if let v = self._m6 {
  15495. try visitor.visitSingularInt64Field(value: v, fieldNumber: 6)
  15496. } }()
  15497. try unknownFields.traverse(visitor: &visitor)
  15498. }
  15499. static func ==(lhs: Proto2Unittest_TestMessageSize, rhs: Proto2Unittest_TestMessageSize) -> Bool {
  15500. if lhs._m1 != rhs._m1 {return false}
  15501. if lhs._m2 != rhs._m2 {return false}
  15502. if lhs._m3 != rhs._m3 {return false}
  15503. if lhs._m4 != rhs._m4 {return false}
  15504. if lhs._m5 != rhs._m5 {return false}
  15505. if lhs._m6 != rhs._m6 {return false}
  15506. if lhs.unknownFields != rhs.unknownFields {return false}
  15507. return true
  15508. }
  15509. }
  15510. extension Proto2Unittest_OpenEnumMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15511. static let protoMessageName: String = _protobuf_package + ".OpenEnumMessage"
  15512. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15513. 1: .standard(proto: "opt_open"),
  15514. 2: .standard(proto: "opt_closed"),
  15515. 3: .standard(proto: "repeated_open"),
  15516. 4: .standard(proto: "repeated_closed"),
  15517. ]
  15518. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15519. while let fieldNumber = try decoder.nextFieldNumber() {
  15520. // The use of inline closures is to circumvent an issue where the compiler
  15521. // allocates stack space for every case branch when no optimizations are
  15522. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15523. switch fieldNumber {
  15524. case 1: try { try decoder.decodeSingularEnumField(value: &self._optOpen) }()
  15525. case 2: try { try decoder.decodeSingularEnumField(value: &self._optClosed) }()
  15526. case 3: try { try decoder.decodeRepeatedEnumField(value: &self.repeatedOpen) }()
  15527. case 4: try { try decoder.decodeRepeatedEnumField(value: &self.repeatedClosed) }()
  15528. default: break
  15529. }
  15530. }
  15531. }
  15532. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15533. // The use of inline closures is to circumvent an issue where the compiler
  15534. // allocates stack space for every if/case branch local when no optimizations
  15535. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15536. // https://github.com/apple/swift-protobuf/issues/1182
  15537. try { if let v = self._optOpen {
  15538. try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
  15539. } }()
  15540. try { if let v = self._optClosed {
  15541. try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
  15542. } }()
  15543. if !self.repeatedOpen.isEmpty {
  15544. try visitor.visitRepeatedEnumField(value: self.repeatedOpen, fieldNumber: 3)
  15545. }
  15546. if !self.repeatedClosed.isEmpty {
  15547. try visitor.visitRepeatedEnumField(value: self.repeatedClosed, fieldNumber: 4)
  15548. }
  15549. try unknownFields.traverse(visitor: &visitor)
  15550. }
  15551. static func ==(lhs: Proto2Unittest_OpenEnumMessage, rhs: Proto2Unittest_OpenEnumMessage) -> Bool {
  15552. if lhs._optOpen != rhs._optOpen {return false}
  15553. if lhs._optClosed != rhs._optClosed {return false}
  15554. if lhs.repeatedOpen != rhs.repeatedOpen {return false}
  15555. if lhs.repeatedClosed != rhs.repeatedClosed {return false}
  15556. if lhs.unknownFields != rhs.unknownFields {return false}
  15557. return true
  15558. }
  15559. }
  15560. extension Proto2Unittest_OpenEnumMessage.TestEnum: SwiftProtobuf._ProtoNameProviding {
  15561. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15562. 0: .same(proto: "UNKNOWN"),
  15563. 1: .same(proto: "FOO"),
  15564. 2: .same(proto: "BAR"),
  15565. 3: .same(proto: "BAZ"),
  15566. ]
  15567. }
  15568. extension Proto2Unittest_TestEagerlyVerifiedLazyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15569. static let protoMessageName: String = _protobuf_package + ".TestEagerlyVerifiedLazyMessage"
  15570. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15571. 1: .standard(proto: "lazy_message"),
  15572. ]
  15573. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15574. while let fieldNumber = try decoder.nextFieldNumber() {
  15575. // The use of inline closures is to circumvent an issue where the compiler
  15576. // allocates stack space for every case branch when no optimizations are
  15577. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15578. switch fieldNumber {
  15579. case 1: try { try decoder.decodeSingularMessageField(value: &self._lazyMessage) }()
  15580. default: break
  15581. }
  15582. }
  15583. }
  15584. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15585. // The use of inline closures is to circumvent an issue where the compiler
  15586. // allocates stack space for every if/case branch local when no optimizations
  15587. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15588. // https://github.com/apple/swift-protobuf/issues/1182
  15589. try { if let v = self._lazyMessage {
  15590. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  15591. } }()
  15592. try unknownFields.traverse(visitor: &visitor)
  15593. }
  15594. static func ==(lhs: Proto2Unittest_TestEagerlyVerifiedLazyMessage, rhs: Proto2Unittest_TestEagerlyVerifiedLazyMessage) -> Bool {
  15595. if lhs._lazyMessage != rhs._lazyMessage {return false}
  15596. if lhs.unknownFields != rhs.unknownFields {return false}
  15597. return true
  15598. }
  15599. }
  15600. extension Proto2Unittest_TestEagerlyVerifiedLazyMessage.LazyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15601. static let protoMessageName: String = Proto2Unittest_TestEagerlyVerifiedLazyMessage.protoMessageName + ".LazyMessage"
  15602. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15603. 1: .standard(proto: "bytes_field"),
  15604. ]
  15605. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15606. while let fieldNumber = try decoder.nextFieldNumber() {
  15607. // The use of inline closures is to circumvent an issue where the compiler
  15608. // allocates stack space for every case branch when no optimizations are
  15609. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15610. switch fieldNumber {
  15611. case 1: try { try decoder.decodeSingularBytesField(value: &self._bytesField) }()
  15612. default: break
  15613. }
  15614. }
  15615. }
  15616. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15617. // The use of inline closures is to circumvent an issue where the compiler
  15618. // allocates stack space for every if/case branch local when no optimizations
  15619. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15620. // https://github.com/apple/swift-protobuf/issues/1182
  15621. try { if let v = self._bytesField {
  15622. try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
  15623. } }()
  15624. try unknownFields.traverse(visitor: &visitor)
  15625. }
  15626. static func ==(lhs: Proto2Unittest_TestEagerlyVerifiedLazyMessage.LazyMessage, rhs: Proto2Unittest_TestEagerlyVerifiedLazyMessage.LazyMessage) -> Bool {
  15627. if lhs._bytesField != rhs._bytesField {return false}
  15628. if lhs.unknownFields != rhs.unknownFields {return false}
  15629. return true
  15630. }
  15631. }
  15632. extension Proto2Unittest_FooRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15633. static let protoMessageName: String = _protobuf_package + ".FooRequest"
  15634. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  15635. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15636. // Load everything into unknown fields
  15637. while try decoder.nextFieldNumber() != nil {}
  15638. }
  15639. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15640. try unknownFields.traverse(visitor: &visitor)
  15641. }
  15642. static func ==(lhs: Proto2Unittest_FooRequest, rhs: Proto2Unittest_FooRequest) -> Bool {
  15643. if lhs.unknownFields != rhs.unknownFields {return false}
  15644. return true
  15645. }
  15646. }
  15647. extension Proto2Unittest_FooResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15648. static let protoMessageName: String = _protobuf_package + ".FooResponse"
  15649. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  15650. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15651. // Load everything into unknown fields
  15652. while try decoder.nextFieldNumber() != nil {}
  15653. }
  15654. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15655. try unknownFields.traverse(visitor: &visitor)
  15656. }
  15657. static func ==(lhs: Proto2Unittest_FooResponse, rhs: Proto2Unittest_FooResponse) -> Bool {
  15658. if lhs.unknownFields != rhs.unknownFields {return false}
  15659. return true
  15660. }
  15661. }
  15662. extension Proto2Unittest_FooClientMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15663. static let protoMessageName: String = _protobuf_package + ".FooClientMessage"
  15664. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  15665. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15666. // Load everything into unknown fields
  15667. while try decoder.nextFieldNumber() != nil {}
  15668. }
  15669. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15670. try unknownFields.traverse(visitor: &visitor)
  15671. }
  15672. static func ==(lhs: Proto2Unittest_FooClientMessage, rhs: Proto2Unittest_FooClientMessage) -> Bool {
  15673. if lhs.unknownFields != rhs.unknownFields {return false}
  15674. return true
  15675. }
  15676. }
  15677. extension Proto2Unittest_FooServerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15678. static let protoMessageName: String = _protobuf_package + ".FooServerMessage"
  15679. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  15680. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15681. // Load everything into unknown fields
  15682. while try decoder.nextFieldNumber() != nil {}
  15683. }
  15684. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15685. try unknownFields.traverse(visitor: &visitor)
  15686. }
  15687. static func ==(lhs: Proto2Unittest_FooServerMessage, rhs: Proto2Unittest_FooServerMessage) -> Bool {
  15688. if lhs.unknownFields != rhs.unknownFields {return false}
  15689. return true
  15690. }
  15691. }
  15692. extension Proto2Unittest_BarRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15693. static let protoMessageName: String = _protobuf_package + ".BarRequest"
  15694. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  15695. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15696. // Load everything into unknown fields
  15697. while try decoder.nextFieldNumber() != nil {}
  15698. }
  15699. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15700. try unknownFields.traverse(visitor: &visitor)
  15701. }
  15702. static func ==(lhs: Proto2Unittest_BarRequest, rhs: Proto2Unittest_BarRequest) -> Bool {
  15703. if lhs.unknownFields != rhs.unknownFields {return false}
  15704. return true
  15705. }
  15706. }
  15707. extension Proto2Unittest_BarResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15708. static let protoMessageName: String = _protobuf_package + ".BarResponse"
  15709. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  15710. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15711. // Load everything into unknown fields
  15712. while try decoder.nextFieldNumber() != nil {}
  15713. }
  15714. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15715. try unknownFields.traverse(visitor: &visitor)
  15716. }
  15717. static func ==(lhs: Proto2Unittest_BarResponse, rhs: Proto2Unittest_BarResponse) -> Bool {
  15718. if lhs.unknownFields != rhs.unknownFields {return false}
  15719. return true
  15720. }
  15721. }
  15722. extension Proto2Unittest_TestJsonName: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15723. static let protoMessageName: String = _protobuf_package + ".TestJsonName"
  15724. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15725. 1: .standard(proto: "field_name1"),
  15726. 2: .same(proto: "fieldName2"),
  15727. 3: .same(proto: "FieldName3"),
  15728. 4: .standard(proto: "_field_name4"),
  15729. 5: .standard(proto: "FIELD_NAME5"),
  15730. 6: .unique(proto: "field_name6", json: "@type"),
  15731. 7: .same(proto: "fieldname7"),
  15732. ]
  15733. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15734. while let fieldNumber = try decoder.nextFieldNumber() {
  15735. // The use of inline closures is to circumvent an issue where the compiler
  15736. // allocates stack space for every case branch when no optimizations are
  15737. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15738. switch fieldNumber {
  15739. case 1: try { try decoder.decodeSingularInt32Field(value: &self._fieldName1) }()
  15740. case 2: try { try decoder.decodeSingularInt32Field(value: &self._fieldName2) }()
  15741. case 3: try { try decoder.decodeSingularInt32Field(value: &self._fieldName3) }()
  15742. case 4: try { try decoder.decodeSingularInt32Field(value: &self._fieldName4) }()
  15743. case 5: try { try decoder.decodeSingularInt32Field(value: &self._fieldName5) }()
  15744. case 6: try { try decoder.decodeSingularInt32Field(value: &self._fieldName6) }()
  15745. case 7: try { try decoder.decodeSingularInt32Field(value: &self._fieldname7) }()
  15746. default: break
  15747. }
  15748. }
  15749. }
  15750. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15751. // The use of inline closures is to circumvent an issue where the compiler
  15752. // allocates stack space for every if/case branch local when no optimizations
  15753. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15754. // https://github.com/apple/swift-protobuf/issues/1182
  15755. try { if let v = self._fieldName1 {
  15756. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  15757. } }()
  15758. try { if let v = self._fieldName2 {
  15759. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  15760. } }()
  15761. try { if let v = self._fieldName3 {
  15762. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  15763. } }()
  15764. try { if let v = self._fieldName4 {
  15765. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  15766. } }()
  15767. try { if let v = self._fieldName5 {
  15768. try visitor.visitSingularInt32Field(value: v, fieldNumber: 5)
  15769. } }()
  15770. try { if let v = self._fieldName6 {
  15771. try visitor.visitSingularInt32Field(value: v, fieldNumber: 6)
  15772. } }()
  15773. try { if let v = self._fieldname7 {
  15774. try visitor.visitSingularInt32Field(value: v, fieldNumber: 7)
  15775. } }()
  15776. try unknownFields.traverse(visitor: &visitor)
  15777. }
  15778. static func ==(lhs: Proto2Unittest_TestJsonName, rhs: Proto2Unittest_TestJsonName) -> Bool {
  15779. if lhs._fieldName1 != rhs._fieldName1 {return false}
  15780. if lhs._fieldName2 != rhs._fieldName2 {return false}
  15781. if lhs._fieldName3 != rhs._fieldName3 {return false}
  15782. if lhs._fieldName4 != rhs._fieldName4 {return false}
  15783. if lhs._fieldName5 != rhs._fieldName5 {return false}
  15784. if lhs._fieldName6 != rhs._fieldName6 {return false}
  15785. if lhs._fieldname7 != rhs._fieldname7 {return false}
  15786. if lhs.unknownFields != rhs.unknownFields {return false}
  15787. return true
  15788. }
  15789. }
  15790. extension Proto2Unittest_TestHugeFieldNumbers: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15791. static let protoMessageName: String = _protobuf_package + ".TestHugeFieldNumbers"
  15792. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15793. 536870000: .standard(proto: "optional_int32"),
  15794. 536870001: .standard(proto: "fixed_32"),
  15795. 536870002: .standard(proto: "repeated_int32"),
  15796. 536870003: .standard(proto: "packed_int32"),
  15797. 536870004: .standard(proto: "optional_enum"),
  15798. 536870005: .standard(proto: "optional_string"),
  15799. 536870006: .standard(proto: "optional_bytes"),
  15800. 536870007: .standard(proto: "optional_message"),
  15801. 536870008: .same(proto: "optionalgroup"),
  15802. 536870008: .unique(proto: "OptionalGroup", json: "optionalgroup"),
  15803. 536870010: .standard(proto: "string_string_map"),
  15804. 536870011: .standard(proto: "oneof_uint32"),
  15805. 536870012: .standard(proto: "oneof_test_all_types"),
  15806. 536870013: .standard(proto: "oneof_string"),
  15807. 536870014: .standard(proto: "oneof_bytes"),
  15808. ]
  15809. public var isInitialized: Bool {
  15810. if !_protobuf_extensionFieldValues.isInitialized {return false}
  15811. return true
  15812. }
  15813. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15814. while let fieldNumber = try decoder.nextFieldNumber() {
  15815. // The use of inline closures is to circumvent an issue where the compiler
  15816. // allocates stack space for every case branch when no optimizations are
  15817. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15818. switch fieldNumber {
  15819. case 536870000: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt32) }()
  15820. case 536870001: try { try decoder.decodeSingularInt32Field(value: &self._fixed32) }()
  15821. case 536870002: try { try decoder.decodeRepeatedInt32Field(value: &self.repeatedInt32) }()
  15822. case 536870003: try { try decoder.decodeRepeatedInt32Field(value: &self.packedInt32) }()
  15823. case 536870004: try { try decoder.decodeSingularEnumField(value: &self._optionalEnum) }()
  15824. case 536870005: try { try decoder.decodeSingularStringField(value: &self._optionalString) }()
  15825. case 536870006: try { try decoder.decodeSingularBytesField(value: &self._optionalBytes) }()
  15826. case 536870007: try { try decoder.decodeSingularMessageField(value: &self._optionalMessage) }()
  15827. case 536870008: try { try decoder.decodeSingularGroupField(value: &self._optionalGroup) }()
  15828. case 536870010: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &self.stringStringMap) }()
  15829. case 536870011: try {
  15830. var v: UInt32?
  15831. try decoder.decodeSingularUInt32Field(value: &v)
  15832. if let v = v {
  15833. if self.oneofField != nil {try decoder.handleConflictingOneOf()}
  15834. self.oneofField = .oneofUint32(v)
  15835. }
  15836. }()
  15837. case 536870012: try {
  15838. var v: Proto2Unittest_TestAllTypes?
  15839. var hadOneofValue = false
  15840. if let current = self.oneofField {
  15841. hadOneofValue = true
  15842. if case .oneofTestAllTypes(let m) = current {v = m}
  15843. }
  15844. try decoder.decodeSingularMessageField(value: &v)
  15845. if let v = v {
  15846. if hadOneofValue {try decoder.handleConflictingOneOf()}
  15847. self.oneofField = .oneofTestAllTypes(v)
  15848. }
  15849. }()
  15850. case 536870013: try {
  15851. var v: String?
  15852. try decoder.decodeSingularStringField(value: &v)
  15853. if let v = v {
  15854. if self.oneofField != nil {try decoder.handleConflictingOneOf()}
  15855. self.oneofField = .oneofString(v)
  15856. }
  15857. }()
  15858. case 536870014: try {
  15859. var v: Data?
  15860. try decoder.decodeSingularBytesField(value: &v)
  15861. if let v = v {
  15862. if self.oneofField != nil {try decoder.handleConflictingOneOf()}
  15863. self.oneofField = .oneofBytes(v)
  15864. }
  15865. }()
  15866. case 536860000..<536870000:
  15867. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestHugeFieldNumbers.self, fieldNumber: fieldNumber) }()
  15868. default: break
  15869. }
  15870. }
  15871. }
  15872. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15873. // The use of inline closures is to circumvent an issue where the compiler
  15874. // allocates stack space for every if/case branch local when no optimizations
  15875. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15876. // https://github.com/apple/swift-protobuf/issues/1182
  15877. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 536860000, end: 536870000)
  15878. try { if let v = self._optionalInt32 {
  15879. try visitor.visitSingularInt32Field(value: v, fieldNumber: 536870000)
  15880. } }()
  15881. try { if let v = self._fixed32 {
  15882. try visitor.visitSingularInt32Field(value: v, fieldNumber: 536870001)
  15883. } }()
  15884. if !self.repeatedInt32.isEmpty {
  15885. try visitor.visitRepeatedInt32Field(value: self.repeatedInt32, fieldNumber: 536870002)
  15886. }
  15887. if !self.packedInt32.isEmpty {
  15888. try visitor.visitPackedInt32Field(value: self.packedInt32, fieldNumber: 536870003)
  15889. }
  15890. try { if let v = self._optionalEnum {
  15891. try visitor.visitSingularEnumField(value: v, fieldNumber: 536870004)
  15892. } }()
  15893. try { if let v = self._optionalString {
  15894. try visitor.visitSingularStringField(value: v, fieldNumber: 536870005)
  15895. } }()
  15896. try { if let v = self._optionalBytes {
  15897. try visitor.visitSingularBytesField(value: v, fieldNumber: 536870006)
  15898. } }()
  15899. try { if let v = self._optionalMessage {
  15900. try visitor.visitSingularMessageField(value: v, fieldNumber: 536870007)
  15901. } }()
  15902. try { if let v = self._optionalGroup {
  15903. try visitor.visitSingularGroupField(value: v, fieldNumber: 536870008)
  15904. } }()
  15905. if !self.stringStringMap.isEmpty {
  15906. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: self.stringStringMap, fieldNumber: 536870010)
  15907. }
  15908. switch self.oneofField {
  15909. case .oneofUint32?: try {
  15910. guard case .oneofUint32(let v)? = self.oneofField else { preconditionFailure() }
  15911. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 536870011)
  15912. }()
  15913. case .oneofTestAllTypes?: try {
  15914. guard case .oneofTestAllTypes(let v)? = self.oneofField else { preconditionFailure() }
  15915. try visitor.visitSingularMessageField(value: v, fieldNumber: 536870012)
  15916. }()
  15917. case .oneofString?: try {
  15918. guard case .oneofString(let v)? = self.oneofField else { preconditionFailure() }
  15919. try visitor.visitSingularStringField(value: v, fieldNumber: 536870013)
  15920. }()
  15921. case .oneofBytes?: try {
  15922. guard case .oneofBytes(let v)? = self.oneofField else { preconditionFailure() }
  15923. try visitor.visitSingularBytesField(value: v, fieldNumber: 536870014)
  15924. }()
  15925. case nil: break
  15926. }
  15927. try unknownFields.traverse(visitor: &visitor)
  15928. }
  15929. static func ==(lhs: Proto2Unittest_TestHugeFieldNumbers, rhs: Proto2Unittest_TestHugeFieldNumbers) -> Bool {
  15930. if lhs._optionalInt32 != rhs._optionalInt32 {return false}
  15931. if lhs._fixed32 != rhs._fixed32 {return false}
  15932. if lhs.repeatedInt32 != rhs.repeatedInt32 {return false}
  15933. if lhs.packedInt32 != rhs.packedInt32 {return false}
  15934. if lhs._optionalEnum != rhs._optionalEnum {return false}
  15935. if lhs._optionalString != rhs._optionalString {return false}
  15936. if lhs._optionalBytes != rhs._optionalBytes {return false}
  15937. if lhs._optionalMessage != rhs._optionalMessage {return false}
  15938. if lhs._optionalGroup != rhs._optionalGroup {return false}
  15939. if lhs.stringStringMap != rhs.stringStringMap {return false}
  15940. if lhs.oneofField != rhs.oneofField {return false}
  15941. if lhs.unknownFields != rhs.unknownFields {return false}
  15942. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  15943. return true
  15944. }
  15945. }
  15946. extension Proto2Unittest_TestHugeFieldNumbers.OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15947. static let protoMessageName: String = Proto2Unittest_TestHugeFieldNumbers.protoMessageName + ".OptionalGroup"
  15948. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15949. 536870009: .standard(proto: "group_a"),
  15950. ]
  15951. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15952. while let fieldNumber = try decoder.nextFieldNumber() {
  15953. // The use of inline closures is to circumvent an issue where the compiler
  15954. // allocates stack space for every case branch when no optimizations are
  15955. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  15956. switch fieldNumber {
  15957. case 536870009: try { try decoder.decodeSingularInt32Field(value: &self._groupA) }()
  15958. default: break
  15959. }
  15960. }
  15961. }
  15962. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  15963. // The use of inline closures is to circumvent an issue where the compiler
  15964. // allocates stack space for every if/case branch local when no optimizations
  15965. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  15966. // https://github.com/apple/swift-protobuf/issues/1182
  15967. try { if let v = self._groupA {
  15968. try visitor.visitSingularInt32Field(value: v, fieldNumber: 536870009)
  15969. } }()
  15970. try unknownFields.traverse(visitor: &visitor)
  15971. }
  15972. static func ==(lhs: Proto2Unittest_TestHugeFieldNumbers.OptionalGroup, rhs: Proto2Unittest_TestHugeFieldNumbers.OptionalGroup) -> Bool {
  15973. if lhs._groupA != rhs._groupA {return false}
  15974. if lhs.unknownFields != rhs.unknownFields {return false}
  15975. return true
  15976. }
  15977. }
  15978. extension Proto2Unittest_TestExtensionInsideTable: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  15979. static let protoMessageName: String = _protobuf_package + ".TestExtensionInsideTable"
  15980. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  15981. 1: .same(proto: "field1"),
  15982. 2: .same(proto: "field2"),
  15983. 3: .same(proto: "field3"),
  15984. 4: .same(proto: "field4"),
  15985. 6: .same(proto: "field6"),
  15986. 7: .same(proto: "field7"),
  15987. 8: .same(proto: "field8"),
  15988. 9: .same(proto: "field9"),
  15989. 10: .same(proto: "field10"),
  15990. ]
  15991. public var isInitialized: Bool {
  15992. if !_protobuf_extensionFieldValues.isInitialized {return false}
  15993. return true
  15994. }
  15995. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  15996. while let fieldNumber = try decoder.nextFieldNumber() {
  15997. // The use of inline closures is to circumvent an issue where the compiler
  15998. // allocates stack space for every case branch when no optimizations are
  15999. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16000. switch fieldNumber {
  16001. case 1: try { try decoder.decodeSingularInt32Field(value: &self._field1) }()
  16002. case 2: try { try decoder.decodeSingularInt32Field(value: &self._field2) }()
  16003. case 3: try { try decoder.decodeSingularInt32Field(value: &self._field3) }()
  16004. case 4: try { try decoder.decodeSingularInt32Field(value: &self._field4) }()
  16005. case 6: try { try decoder.decodeSingularInt32Field(value: &self._field6) }()
  16006. case 7: try { try decoder.decodeSingularInt32Field(value: &self._field7) }()
  16007. case 8: try { try decoder.decodeSingularInt32Field(value: &self._field8) }()
  16008. case 9: try { try decoder.decodeSingularInt32Field(value: &self._field9) }()
  16009. case 10: try { try decoder.decodeSingularInt32Field(value: &self._field10) }()
  16010. case 5:
  16011. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestExtensionInsideTable.self, fieldNumber: fieldNumber) }()
  16012. default: break
  16013. }
  16014. }
  16015. }
  16016. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16017. // The use of inline closures is to circumvent an issue where the compiler
  16018. // allocates stack space for every if/case branch local when no optimizations
  16019. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16020. // https://github.com/apple/swift-protobuf/issues/1182
  16021. try { if let v = self._field1 {
  16022. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  16023. } }()
  16024. try { if let v = self._field2 {
  16025. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  16026. } }()
  16027. try { if let v = self._field3 {
  16028. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  16029. } }()
  16030. try { if let v = self._field4 {
  16031. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  16032. } }()
  16033. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 5, end: 6)
  16034. try { if let v = self._field6 {
  16035. try visitor.visitSingularInt32Field(value: v, fieldNumber: 6)
  16036. } }()
  16037. try { if let v = self._field7 {
  16038. try visitor.visitSingularInt32Field(value: v, fieldNumber: 7)
  16039. } }()
  16040. try { if let v = self._field8 {
  16041. try visitor.visitSingularInt32Field(value: v, fieldNumber: 8)
  16042. } }()
  16043. try { if let v = self._field9 {
  16044. try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
  16045. } }()
  16046. try { if let v = self._field10 {
  16047. try visitor.visitSingularInt32Field(value: v, fieldNumber: 10)
  16048. } }()
  16049. try unknownFields.traverse(visitor: &visitor)
  16050. }
  16051. static func ==(lhs: Proto2Unittest_TestExtensionInsideTable, rhs: Proto2Unittest_TestExtensionInsideTable) -> Bool {
  16052. if lhs._field1 != rhs._field1 {return false}
  16053. if lhs._field2 != rhs._field2 {return false}
  16054. if lhs._field3 != rhs._field3 {return false}
  16055. if lhs._field4 != rhs._field4 {return false}
  16056. if lhs._field6 != rhs._field6 {return false}
  16057. if lhs._field7 != rhs._field7 {return false}
  16058. if lhs._field8 != rhs._field8 {return false}
  16059. if lhs._field9 != rhs._field9 {return false}
  16060. if lhs._field10 != rhs._field10 {return false}
  16061. if lhs.unknownFields != rhs.unknownFields {return false}
  16062. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  16063. return true
  16064. }
  16065. }
  16066. extension Proto2Unittest_TestNestedGroupExtensionOuter: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16067. static let protoMessageName: String = _protobuf_package + ".TestNestedGroupExtensionOuter"
  16068. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16069. 1: .same(proto: "layer1optionalgroup"),
  16070. 1: .unique(proto: "Layer1OptionalGroup", json: "layer1optionalgroup"),
  16071. ]
  16072. public var isInitialized: Bool {
  16073. if let v = self._layer1OptionalGroup, !v.isInitialized {return false}
  16074. return true
  16075. }
  16076. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16077. while let fieldNumber = try decoder.nextFieldNumber() {
  16078. // The use of inline closures is to circumvent an issue where the compiler
  16079. // allocates stack space for every case branch when no optimizations are
  16080. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16081. switch fieldNumber {
  16082. case 1: try { try decoder.decodeSingularGroupField(value: &self._layer1OptionalGroup) }()
  16083. default: break
  16084. }
  16085. }
  16086. }
  16087. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16088. // The use of inline closures is to circumvent an issue where the compiler
  16089. // allocates stack space for every if/case branch local when no optimizations
  16090. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16091. // https://github.com/apple/swift-protobuf/issues/1182
  16092. try { if let v = self._layer1OptionalGroup {
  16093. try visitor.visitSingularGroupField(value: v, fieldNumber: 1)
  16094. } }()
  16095. try unknownFields.traverse(visitor: &visitor)
  16096. }
  16097. static func ==(lhs: Proto2Unittest_TestNestedGroupExtensionOuter, rhs: Proto2Unittest_TestNestedGroupExtensionOuter) -> Bool {
  16098. if lhs._layer1OptionalGroup != rhs._layer1OptionalGroup {return false}
  16099. if lhs.unknownFields != rhs.unknownFields {return false}
  16100. return true
  16101. }
  16102. }
  16103. extension Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16104. static let protoMessageName: String = Proto2Unittest_TestNestedGroupExtensionOuter.protoMessageName + ".Layer1OptionalGroup"
  16105. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16106. 2: .same(proto: "layer2repeatedgroup"),
  16107. 2: .unique(proto: "Layer2RepeatedGroup", json: "layer2repeatedgroup"),
  16108. 4: .same(proto: "layer2anotheroptionalrepeatedgroup"),
  16109. 4: .unique(proto: "Layer2AnotherOptionalRepeatedGroup", json: "layer2anotheroptionalrepeatedgroup"),
  16110. ]
  16111. public var isInitialized: Bool {
  16112. if !SwiftProtobuf.Internal.areAllInitialized(self.layer2RepeatedGroup) {return false}
  16113. return true
  16114. }
  16115. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16116. while let fieldNumber = try decoder.nextFieldNumber() {
  16117. // The use of inline closures is to circumvent an issue where the compiler
  16118. // allocates stack space for every case branch when no optimizations are
  16119. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16120. switch fieldNumber {
  16121. case 2: try { try decoder.decodeRepeatedGroupField(value: &self.layer2RepeatedGroup) }()
  16122. case 4: try { try decoder.decodeRepeatedGroupField(value: &self.layer2AnotherOptionalRepeatedGroup) }()
  16123. default: break
  16124. }
  16125. }
  16126. }
  16127. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16128. if !self.layer2RepeatedGroup.isEmpty {
  16129. try visitor.visitRepeatedGroupField(value: self.layer2RepeatedGroup, fieldNumber: 2)
  16130. }
  16131. if !self.layer2AnotherOptionalRepeatedGroup.isEmpty {
  16132. try visitor.visitRepeatedGroupField(value: self.layer2AnotherOptionalRepeatedGroup, fieldNumber: 4)
  16133. }
  16134. try unknownFields.traverse(visitor: &visitor)
  16135. }
  16136. static func ==(lhs: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup, rhs: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup) -> Bool {
  16137. if lhs.layer2RepeatedGroup != rhs.layer2RepeatedGroup {return false}
  16138. if lhs.layer2AnotherOptionalRepeatedGroup != rhs.layer2AnotherOptionalRepeatedGroup {return false}
  16139. if lhs.unknownFields != rhs.unknownFields {return false}
  16140. return true
  16141. }
  16142. }
  16143. extension Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16144. static let protoMessageName: String = Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.protoMessageName + ".Layer2RepeatedGroup"
  16145. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16146. 6: .standard(proto: "another_field"),
  16147. ]
  16148. public var isInitialized: Bool {
  16149. if !_protobuf_extensionFieldValues.isInitialized {return false}
  16150. return true
  16151. }
  16152. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16153. while let fieldNumber = try decoder.nextFieldNumber() {
  16154. // The use of inline closures is to circumvent an issue where the compiler
  16155. // allocates stack space for every case branch when no optimizations are
  16156. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16157. switch fieldNumber {
  16158. case 6: try { try decoder.decodeSingularStringField(value: &self._anotherField) }()
  16159. case 3:
  16160. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup.self, fieldNumber: fieldNumber) }()
  16161. default: break
  16162. }
  16163. }
  16164. }
  16165. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16166. // The use of inline closures is to circumvent an issue where the compiler
  16167. // allocates stack space for every if/case branch local when no optimizations
  16168. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16169. // https://github.com/apple/swift-protobuf/issues/1182
  16170. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 3, end: 4)
  16171. try { if let v = self._anotherField {
  16172. try visitor.visitSingularStringField(value: v, fieldNumber: 6)
  16173. } }()
  16174. try unknownFields.traverse(visitor: &visitor)
  16175. }
  16176. static func ==(lhs: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup, rhs: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup) -> Bool {
  16177. if lhs._anotherField != rhs._anotherField {return false}
  16178. if lhs.unknownFields != rhs.unknownFields {return false}
  16179. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  16180. return true
  16181. }
  16182. }
  16183. extension Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2AnotherOptionalRepeatedGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16184. static let protoMessageName: String = Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.protoMessageName + ".Layer2AnotherOptionalRepeatedGroup"
  16185. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16186. 5: .standard(proto: "but_why_tho"),
  16187. ]
  16188. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16189. while let fieldNumber = try decoder.nextFieldNumber() {
  16190. // The use of inline closures is to circumvent an issue where the compiler
  16191. // allocates stack space for every case branch when no optimizations are
  16192. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16193. switch fieldNumber {
  16194. case 5: try { try decoder.decodeSingularStringField(value: &self._butWhyTho) }()
  16195. default: break
  16196. }
  16197. }
  16198. }
  16199. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16200. // The use of inline closures is to circumvent an issue where the compiler
  16201. // allocates stack space for every if/case branch local when no optimizations
  16202. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16203. // https://github.com/apple/swift-protobuf/issues/1182
  16204. try { if let v = self._butWhyTho {
  16205. try visitor.visitSingularStringField(value: v, fieldNumber: 5)
  16206. } }()
  16207. try unknownFields.traverse(visitor: &visitor)
  16208. }
  16209. static func ==(lhs: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2AnotherOptionalRepeatedGroup, rhs: Proto2Unittest_TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2AnotherOptionalRepeatedGroup) -> Bool {
  16210. if lhs._butWhyTho != rhs._butWhyTho {return false}
  16211. if lhs.unknownFields != rhs.unknownFields {return false}
  16212. return true
  16213. }
  16214. }
  16215. extension Proto2Unittest_TestNestedGroupExtensionInnerExtension: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16216. static let protoMessageName: String = _protobuf_package + ".TestNestedGroupExtensionInnerExtension"
  16217. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16218. 1: .standard(proto: "inner_name"),
  16219. ]
  16220. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16221. while let fieldNumber = try decoder.nextFieldNumber() {
  16222. // The use of inline closures is to circumvent an issue where the compiler
  16223. // allocates stack space for every case branch when no optimizations are
  16224. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16225. switch fieldNumber {
  16226. case 1: try { try decoder.decodeSingularStringField(value: &self._innerName) }()
  16227. default: break
  16228. }
  16229. }
  16230. }
  16231. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16232. // The use of inline closures is to circumvent an issue where the compiler
  16233. // allocates stack space for every if/case branch local when no optimizations
  16234. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16235. // https://github.com/apple/swift-protobuf/issues/1182
  16236. try { if let v = self._innerName {
  16237. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  16238. } }()
  16239. try unknownFields.traverse(visitor: &visitor)
  16240. }
  16241. static func ==(lhs: Proto2Unittest_TestNestedGroupExtensionInnerExtension, rhs: Proto2Unittest_TestNestedGroupExtensionInnerExtension) -> Bool {
  16242. if lhs._innerName != rhs._innerName {return false}
  16243. if lhs.unknownFields != rhs.unknownFields {return false}
  16244. return true
  16245. }
  16246. }
  16247. extension Proto2Unittest_TestExtensionRangeSerialize: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16248. static let protoMessageName: String = _protobuf_package + ".TestExtensionRangeSerialize"
  16249. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16250. 1: .standard(proto: "foo_one"),
  16251. 6: .standard(proto: "foo_two"),
  16252. 7: .standard(proto: "foo_three"),
  16253. 13: .standard(proto: "foo_four"),
  16254. ]
  16255. public var isInitialized: Bool {
  16256. if !_protobuf_extensionFieldValues.isInitialized {return false}
  16257. return true
  16258. }
  16259. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16260. while let fieldNumber = try decoder.nextFieldNumber() {
  16261. // The use of inline closures is to circumvent an issue where the compiler
  16262. // allocates stack space for every case branch when no optimizations are
  16263. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16264. switch fieldNumber {
  16265. case 1: try { try decoder.decodeSingularInt32Field(value: &self._fooOne) }()
  16266. case 6: try { try decoder.decodeSingularInt32Field(value: &self._fooTwo) }()
  16267. case 7: try { try decoder.decodeSingularInt32Field(value: &self._fooThree) }()
  16268. case 13: try { try decoder.decodeSingularInt32Field(value: &self._fooFour) }()
  16269. case 2..<5, 9..<11, 15, 17, 19:
  16270. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_TestExtensionRangeSerialize.self, fieldNumber: fieldNumber) }()
  16271. default: break
  16272. }
  16273. }
  16274. }
  16275. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16276. // The use of inline closures is to circumvent an issue where the compiler
  16277. // allocates stack space for every if/case branch local when no optimizations
  16278. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16279. // https://github.com/apple/swift-protobuf/issues/1182
  16280. try { if let v = self._fooOne {
  16281. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  16282. } }()
  16283. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2, end: 5)
  16284. try { if let v = self._fooTwo {
  16285. try visitor.visitSingularInt32Field(value: v, fieldNumber: 6)
  16286. } }()
  16287. try { if let v = self._fooThree {
  16288. try visitor.visitSingularInt32Field(value: v, fieldNumber: 7)
  16289. } }()
  16290. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 9, end: 11)
  16291. try { if let v = self._fooFour {
  16292. try visitor.visitSingularInt32Field(value: v, fieldNumber: 13)
  16293. } }()
  16294. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 15, end: 20)
  16295. try unknownFields.traverse(visitor: &visitor)
  16296. }
  16297. static func ==(lhs: Proto2Unittest_TestExtensionRangeSerialize, rhs: Proto2Unittest_TestExtensionRangeSerialize) -> Bool {
  16298. if lhs._fooOne != rhs._fooOne {return false}
  16299. if lhs._fooTwo != rhs._fooTwo {return false}
  16300. if lhs._fooThree != rhs._fooThree {return false}
  16301. if lhs._fooFour != rhs._fooFour {return false}
  16302. if lhs.unknownFields != rhs.unknownFields {return false}
  16303. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  16304. return true
  16305. }
  16306. }
  16307. extension Proto2Unittest_TestVerifyInt32Simple: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16308. static let protoMessageName: String = _protobuf_package + ".TestVerifyInt32Simple"
  16309. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16310. 1: .standard(proto: "optional_int32_1"),
  16311. 2: .standard(proto: "optional_int32_2"),
  16312. 63: .standard(proto: "optional_int32_63"),
  16313. 64: .standard(proto: "optional_int32_64"),
  16314. ]
  16315. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16316. while let fieldNumber = try decoder.nextFieldNumber() {
  16317. // The use of inline closures is to circumvent an issue where the compiler
  16318. // allocates stack space for every case branch when no optimizations are
  16319. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16320. switch fieldNumber {
  16321. case 1: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt321) }()
  16322. case 2: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt322) }()
  16323. case 63: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3263) }()
  16324. case 64: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3264) }()
  16325. default: break
  16326. }
  16327. }
  16328. }
  16329. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16330. // The use of inline closures is to circumvent an issue where the compiler
  16331. // allocates stack space for every if/case branch local when no optimizations
  16332. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16333. // https://github.com/apple/swift-protobuf/issues/1182
  16334. try { if let v = self._optionalInt321 {
  16335. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  16336. } }()
  16337. try { if let v = self._optionalInt322 {
  16338. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  16339. } }()
  16340. try { if let v = self._optionalInt3263 {
  16341. try visitor.visitSingularInt32Field(value: v, fieldNumber: 63)
  16342. } }()
  16343. try { if let v = self._optionalInt3264 {
  16344. try visitor.visitSingularInt32Field(value: v, fieldNumber: 64)
  16345. } }()
  16346. try unknownFields.traverse(visitor: &visitor)
  16347. }
  16348. static func ==(lhs: Proto2Unittest_TestVerifyInt32Simple, rhs: Proto2Unittest_TestVerifyInt32Simple) -> Bool {
  16349. if lhs._optionalInt321 != rhs._optionalInt321 {return false}
  16350. if lhs._optionalInt322 != rhs._optionalInt322 {return false}
  16351. if lhs._optionalInt3263 != rhs._optionalInt3263 {return false}
  16352. if lhs._optionalInt3264 != rhs._optionalInt3264 {return false}
  16353. if lhs.unknownFields != rhs.unknownFields {return false}
  16354. return true
  16355. }
  16356. }
  16357. extension Proto2Unittest_TestVerifyInt32: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16358. static let protoMessageName: String = _protobuf_package + ".TestVerifyInt32"
  16359. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16360. 1: .standard(proto: "optional_int32_1"),
  16361. 2: .standard(proto: "optional_int32_2"),
  16362. 63: .standard(proto: "optional_int32_63"),
  16363. 64: .standard(proto: "optional_int32_64"),
  16364. 9: .standard(proto: "optional_all_types"),
  16365. 10: .standard(proto: "repeated_all_types"),
  16366. ]
  16367. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16368. while let fieldNumber = try decoder.nextFieldNumber() {
  16369. // The use of inline closures is to circumvent an issue where the compiler
  16370. // allocates stack space for every case branch when no optimizations are
  16371. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16372. switch fieldNumber {
  16373. case 1: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt321) }()
  16374. case 2: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt322) }()
  16375. case 9: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  16376. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  16377. case 63: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3263) }()
  16378. case 64: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3264) }()
  16379. default: break
  16380. }
  16381. }
  16382. }
  16383. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16384. // The use of inline closures is to circumvent an issue where the compiler
  16385. // allocates stack space for every if/case branch local when no optimizations
  16386. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16387. // https://github.com/apple/swift-protobuf/issues/1182
  16388. try { if let v = self._optionalInt321 {
  16389. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  16390. } }()
  16391. try { if let v = self._optionalInt322 {
  16392. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  16393. } }()
  16394. try { if let v = self._optionalAllTypes {
  16395. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  16396. } }()
  16397. if !self.repeatedAllTypes.isEmpty {
  16398. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 10)
  16399. }
  16400. try { if let v = self._optionalInt3263 {
  16401. try visitor.visitSingularInt32Field(value: v, fieldNumber: 63)
  16402. } }()
  16403. try { if let v = self._optionalInt3264 {
  16404. try visitor.visitSingularInt32Field(value: v, fieldNumber: 64)
  16405. } }()
  16406. try unknownFields.traverse(visitor: &visitor)
  16407. }
  16408. static func ==(lhs: Proto2Unittest_TestVerifyInt32, rhs: Proto2Unittest_TestVerifyInt32) -> Bool {
  16409. if lhs._optionalInt321 != rhs._optionalInt321 {return false}
  16410. if lhs._optionalInt322 != rhs._optionalInt322 {return false}
  16411. if lhs._optionalInt3263 != rhs._optionalInt3263 {return false}
  16412. if lhs._optionalInt3264 != rhs._optionalInt3264 {return false}
  16413. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  16414. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  16415. if lhs.unknownFields != rhs.unknownFields {return false}
  16416. return true
  16417. }
  16418. }
  16419. extension Proto2Unittest_TestVerifyMostlyInt32: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16420. static let protoMessageName: String = _protobuf_package + ".TestVerifyMostlyInt32"
  16421. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16422. 30: .standard(proto: "optional_int64_30"),
  16423. 1: .standard(proto: "optional_int32_1"),
  16424. 2: .standard(proto: "optional_int32_2"),
  16425. 3: .standard(proto: "optional_int32_3"),
  16426. 4: .standard(proto: "optional_int32_4"),
  16427. 63: .standard(proto: "optional_int32_63"),
  16428. 64: .standard(proto: "optional_int32_64"),
  16429. 9: .standard(proto: "optional_all_types"),
  16430. 10: .standard(proto: "repeated_all_types"),
  16431. ]
  16432. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16433. while let fieldNumber = try decoder.nextFieldNumber() {
  16434. // The use of inline closures is to circumvent an issue where the compiler
  16435. // allocates stack space for every case branch when no optimizations are
  16436. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16437. switch fieldNumber {
  16438. case 1: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt321) }()
  16439. case 2: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt322) }()
  16440. case 3: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt323) }()
  16441. case 4: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt324) }()
  16442. case 9: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  16443. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  16444. case 30: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt6430) }()
  16445. case 63: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3263) }()
  16446. case 64: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3264) }()
  16447. default: break
  16448. }
  16449. }
  16450. }
  16451. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16452. // The use of inline closures is to circumvent an issue where the compiler
  16453. // allocates stack space for every if/case branch local when no optimizations
  16454. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16455. // https://github.com/apple/swift-protobuf/issues/1182
  16456. try { if let v = self._optionalInt321 {
  16457. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  16458. } }()
  16459. try { if let v = self._optionalInt322 {
  16460. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  16461. } }()
  16462. try { if let v = self._optionalInt323 {
  16463. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  16464. } }()
  16465. try { if let v = self._optionalInt324 {
  16466. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  16467. } }()
  16468. try { if let v = self._optionalAllTypes {
  16469. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  16470. } }()
  16471. if !self.repeatedAllTypes.isEmpty {
  16472. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 10)
  16473. }
  16474. try { if let v = self._optionalInt6430 {
  16475. try visitor.visitSingularInt64Field(value: v, fieldNumber: 30)
  16476. } }()
  16477. try { if let v = self._optionalInt3263 {
  16478. try visitor.visitSingularInt32Field(value: v, fieldNumber: 63)
  16479. } }()
  16480. try { if let v = self._optionalInt3264 {
  16481. try visitor.visitSingularInt32Field(value: v, fieldNumber: 64)
  16482. } }()
  16483. try unknownFields.traverse(visitor: &visitor)
  16484. }
  16485. static func ==(lhs: Proto2Unittest_TestVerifyMostlyInt32, rhs: Proto2Unittest_TestVerifyMostlyInt32) -> Bool {
  16486. if lhs._optionalInt6430 != rhs._optionalInt6430 {return false}
  16487. if lhs._optionalInt321 != rhs._optionalInt321 {return false}
  16488. if lhs._optionalInt322 != rhs._optionalInt322 {return false}
  16489. if lhs._optionalInt323 != rhs._optionalInt323 {return false}
  16490. if lhs._optionalInt324 != rhs._optionalInt324 {return false}
  16491. if lhs._optionalInt3263 != rhs._optionalInt3263 {return false}
  16492. if lhs._optionalInt3264 != rhs._optionalInt3264 {return false}
  16493. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  16494. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  16495. if lhs.unknownFields != rhs.unknownFields {return false}
  16496. return true
  16497. }
  16498. }
  16499. extension Proto2Unittest_TestVerifyMostlyInt32BigFieldNumber: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16500. static let protoMessageName: String = _protobuf_package + ".TestVerifyMostlyInt32BigFieldNumber"
  16501. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16502. 30: .standard(proto: "optional_int64_30"),
  16503. 300: .standard(proto: "optional_int32_300"),
  16504. 1: .standard(proto: "optional_int32_1"),
  16505. 2: .standard(proto: "optional_int32_2"),
  16506. 3: .standard(proto: "optional_int32_3"),
  16507. 4: .standard(proto: "optional_int32_4"),
  16508. 63: .standard(proto: "optional_int32_63"),
  16509. 64: .standard(proto: "optional_int32_64"),
  16510. 9: .standard(proto: "optional_all_types"),
  16511. 10: .standard(proto: "repeated_all_types"),
  16512. ]
  16513. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16514. while let fieldNumber = try decoder.nextFieldNumber() {
  16515. // The use of inline closures is to circumvent an issue where the compiler
  16516. // allocates stack space for every case branch when no optimizations are
  16517. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16518. switch fieldNumber {
  16519. case 1: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt321) }()
  16520. case 2: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt322) }()
  16521. case 3: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt323) }()
  16522. case 4: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt324) }()
  16523. case 9: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  16524. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  16525. case 30: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt6430) }()
  16526. case 63: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3263) }()
  16527. case 64: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3264) }()
  16528. case 300: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt32300) }()
  16529. default: break
  16530. }
  16531. }
  16532. }
  16533. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16534. // The use of inline closures is to circumvent an issue where the compiler
  16535. // allocates stack space for every if/case branch local when no optimizations
  16536. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16537. // https://github.com/apple/swift-protobuf/issues/1182
  16538. try { if let v = self._optionalInt321 {
  16539. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  16540. } }()
  16541. try { if let v = self._optionalInt322 {
  16542. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  16543. } }()
  16544. try { if let v = self._optionalInt323 {
  16545. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  16546. } }()
  16547. try { if let v = self._optionalInt324 {
  16548. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  16549. } }()
  16550. try { if let v = self._optionalAllTypes {
  16551. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  16552. } }()
  16553. if !self.repeatedAllTypes.isEmpty {
  16554. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 10)
  16555. }
  16556. try { if let v = self._optionalInt6430 {
  16557. try visitor.visitSingularInt64Field(value: v, fieldNumber: 30)
  16558. } }()
  16559. try { if let v = self._optionalInt3263 {
  16560. try visitor.visitSingularInt32Field(value: v, fieldNumber: 63)
  16561. } }()
  16562. try { if let v = self._optionalInt3264 {
  16563. try visitor.visitSingularInt32Field(value: v, fieldNumber: 64)
  16564. } }()
  16565. try { if let v = self._optionalInt32300 {
  16566. try visitor.visitSingularInt32Field(value: v, fieldNumber: 300)
  16567. } }()
  16568. try unknownFields.traverse(visitor: &visitor)
  16569. }
  16570. static func ==(lhs: Proto2Unittest_TestVerifyMostlyInt32BigFieldNumber, rhs: Proto2Unittest_TestVerifyMostlyInt32BigFieldNumber) -> Bool {
  16571. if lhs._optionalInt6430 != rhs._optionalInt6430 {return false}
  16572. if lhs._optionalInt32300 != rhs._optionalInt32300 {return false}
  16573. if lhs._optionalInt321 != rhs._optionalInt321 {return false}
  16574. if lhs._optionalInt322 != rhs._optionalInt322 {return false}
  16575. if lhs._optionalInt323 != rhs._optionalInt323 {return false}
  16576. if lhs._optionalInt324 != rhs._optionalInt324 {return false}
  16577. if lhs._optionalInt3263 != rhs._optionalInt3263 {return false}
  16578. if lhs._optionalInt3264 != rhs._optionalInt3264 {return false}
  16579. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  16580. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  16581. if lhs.unknownFields != rhs.unknownFields {return false}
  16582. return true
  16583. }
  16584. }
  16585. extension Proto2Unittest_TestVerifyUint32Simple: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16586. static let protoMessageName: String = _protobuf_package + ".TestVerifyUint32Simple"
  16587. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16588. 1: .standard(proto: "optional_uint32_1"),
  16589. 2: .standard(proto: "optional_uint32_2"),
  16590. 63: .standard(proto: "optional_uint32_63"),
  16591. 64: .standard(proto: "optional_uint32_64"),
  16592. ]
  16593. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16594. while let fieldNumber = try decoder.nextFieldNumber() {
  16595. // The use of inline closures is to circumvent an issue where the compiler
  16596. // allocates stack space for every case branch when no optimizations are
  16597. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16598. switch fieldNumber {
  16599. case 1: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint321) }()
  16600. case 2: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint322) }()
  16601. case 63: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint3263) }()
  16602. case 64: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint3264) }()
  16603. default: break
  16604. }
  16605. }
  16606. }
  16607. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16608. // The use of inline closures is to circumvent an issue where the compiler
  16609. // allocates stack space for every if/case branch local when no optimizations
  16610. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16611. // https://github.com/apple/swift-protobuf/issues/1182
  16612. try { if let v = self._optionalUint321 {
  16613. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
  16614. } }()
  16615. try { if let v = self._optionalUint322 {
  16616. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
  16617. } }()
  16618. try { if let v = self._optionalUint3263 {
  16619. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 63)
  16620. } }()
  16621. try { if let v = self._optionalUint3264 {
  16622. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 64)
  16623. } }()
  16624. try unknownFields.traverse(visitor: &visitor)
  16625. }
  16626. static func ==(lhs: Proto2Unittest_TestVerifyUint32Simple, rhs: Proto2Unittest_TestVerifyUint32Simple) -> Bool {
  16627. if lhs._optionalUint321 != rhs._optionalUint321 {return false}
  16628. if lhs._optionalUint322 != rhs._optionalUint322 {return false}
  16629. if lhs._optionalUint3263 != rhs._optionalUint3263 {return false}
  16630. if lhs._optionalUint3264 != rhs._optionalUint3264 {return false}
  16631. if lhs.unknownFields != rhs.unknownFields {return false}
  16632. return true
  16633. }
  16634. }
  16635. extension Proto2Unittest_TestVerifyUint32: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16636. static let protoMessageName: String = _protobuf_package + ".TestVerifyUint32"
  16637. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16638. 1: .standard(proto: "optional_uint32_1"),
  16639. 2: .standard(proto: "optional_uint32_2"),
  16640. 63: .standard(proto: "optional_uint32_63"),
  16641. 64: .standard(proto: "optional_uint32_64"),
  16642. 9: .standard(proto: "optional_all_types"),
  16643. 10: .standard(proto: "repeated_all_types"),
  16644. ]
  16645. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16646. while let fieldNumber = try decoder.nextFieldNumber() {
  16647. // The use of inline closures is to circumvent an issue where the compiler
  16648. // allocates stack space for every case branch when no optimizations are
  16649. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16650. switch fieldNumber {
  16651. case 1: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint321) }()
  16652. case 2: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint322) }()
  16653. case 9: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  16654. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  16655. case 63: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint3263) }()
  16656. case 64: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint3264) }()
  16657. default: break
  16658. }
  16659. }
  16660. }
  16661. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16662. // The use of inline closures is to circumvent an issue where the compiler
  16663. // allocates stack space for every if/case branch local when no optimizations
  16664. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16665. // https://github.com/apple/swift-protobuf/issues/1182
  16666. try { if let v = self._optionalUint321 {
  16667. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
  16668. } }()
  16669. try { if let v = self._optionalUint322 {
  16670. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
  16671. } }()
  16672. try { if let v = self._optionalAllTypes {
  16673. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  16674. } }()
  16675. if !self.repeatedAllTypes.isEmpty {
  16676. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 10)
  16677. }
  16678. try { if let v = self._optionalUint3263 {
  16679. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 63)
  16680. } }()
  16681. try { if let v = self._optionalUint3264 {
  16682. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 64)
  16683. } }()
  16684. try unknownFields.traverse(visitor: &visitor)
  16685. }
  16686. static func ==(lhs: Proto2Unittest_TestVerifyUint32, rhs: Proto2Unittest_TestVerifyUint32) -> Bool {
  16687. if lhs._optionalUint321 != rhs._optionalUint321 {return false}
  16688. if lhs._optionalUint322 != rhs._optionalUint322 {return false}
  16689. if lhs._optionalUint3263 != rhs._optionalUint3263 {return false}
  16690. if lhs._optionalUint3264 != rhs._optionalUint3264 {return false}
  16691. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  16692. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  16693. if lhs.unknownFields != rhs.unknownFields {return false}
  16694. return true
  16695. }
  16696. }
  16697. extension Proto2Unittest_TestVerifyOneUint32: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16698. static let protoMessageName: String = _protobuf_package + ".TestVerifyOneUint32"
  16699. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16700. 1: .standard(proto: "optional_uint32_1"),
  16701. 2: .standard(proto: "optional_int32_2"),
  16702. 63: .standard(proto: "optional_int32_63"),
  16703. 64: .standard(proto: "optional_int32_64"),
  16704. 9: .standard(proto: "optional_all_types"),
  16705. 10: .standard(proto: "repeated_all_types"),
  16706. ]
  16707. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16708. while let fieldNumber = try decoder.nextFieldNumber() {
  16709. // The use of inline closures is to circumvent an issue where the compiler
  16710. // allocates stack space for every case branch when no optimizations are
  16711. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16712. switch fieldNumber {
  16713. case 1: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint321) }()
  16714. case 2: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt322) }()
  16715. case 9: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  16716. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  16717. case 63: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3263) }()
  16718. case 64: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3264) }()
  16719. default: break
  16720. }
  16721. }
  16722. }
  16723. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16724. // The use of inline closures is to circumvent an issue where the compiler
  16725. // allocates stack space for every if/case branch local when no optimizations
  16726. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16727. // https://github.com/apple/swift-protobuf/issues/1182
  16728. try { if let v = self._optionalUint321 {
  16729. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
  16730. } }()
  16731. try { if let v = self._optionalInt322 {
  16732. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  16733. } }()
  16734. try { if let v = self._optionalAllTypes {
  16735. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  16736. } }()
  16737. if !self.repeatedAllTypes.isEmpty {
  16738. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 10)
  16739. }
  16740. try { if let v = self._optionalInt3263 {
  16741. try visitor.visitSingularInt32Field(value: v, fieldNumber: 63)
  16742. } }()
  16743. try { if let v = self._optionalInt3264 {
  16744. try visitor.visitSingularInt32Field(value: v, fieldNumber: 64)
  16745. } }()
  16746. try unknownFields.traverse(visitor: &visitor)
  16747. }
  16748. static func ==(lhs: Proto2Unittest_TestVerifyOneUint32, rhs: Proto2Unittest_TestVerifyOneUint32) -> Bool {
  16749. if lhs._optionalUint321 != rhs._optionalUint321 {return false}
  16750. if lhs._optionalInt322 != rhs._optionalInt322 {return false}
  16751. if lhs._optionalInt3263 != rhs._optionalInt3263 {return false}
  16752. if lhs._optionalInt3264 != rhs._optionalInt3264 {return false}
  16753. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  16754. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  16755. if lhs.unknownFields != rhs.unknownFields {return false}
  16756. return true
  16757. }
  16758. }
  16759. extension Proto2Unittest_TestVerifyOneInt32BigFieldNumber: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16760. static let protoMessageName: String = _protobuf_package + ".TestVerifyOneInt32BigFieldNumber"
  16761. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16762. 65: .standard(proto: "optional_int32_65"),
  16763. 1: .standard(proto: "optional_int64_1"),
  16764. 2: .standard(proto: "optional_int64_2"),
  16765. 63: .standard(proto: "optional_int64_63"),
  16766. 64: .standard(proto: "optional_int64_64"),
  16767. 9: .standard(proto: "optional_all_types"),
  16768. 10: .standard(proto: "repeated_all_types"),
  16769. ]
  16770. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16771. while let fieldNumber = try decoder.nextFieldNumber() {
  16772. // The use of inline closures is to circumvent an issue where the compiler
  16773. // allocates stack space for every case branch when no optimizations are
  16774. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16775. switch fieldNumber {
  16776. case 1: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt641) }()
  16777. case 2: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt642) }()
  16778. case 9: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  16779. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  16780. case 63: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt6463) }()
  16781. case 64: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt6464) }()
  16782. case 65: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3265) }()
  16783. default: break
  16784. }
  16785. }
  16786. }
  16787. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16788. // The use of inline closures is to circumvent an issue where the compiler
  16789. // allocates stack space for every if/case branch local when no optimizations
  16790. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16791. // https://github.com/apple/swift-protobuf/issues/1182
  16792. try { if let v = self._optionalInt641 {
  16793. try visitor.visitSingularInt64Field(value: v, fieldNumber: 1)
  16794. } }()
  16795. try { if let v = self._optionalInt642 {
  16796. try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
  16797. } }()
  16798. try { if let v = self._optionalAllTypes {
  16799. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  16800. } }()
  16801. if !self.repeatedAllTypes.isEmpty {
  16802. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 10)
  16803. }
  16804. try { if let v = self._optionalInt6463 {
  16805. try visitor.visitSingularInt64Field(value: v, fieldNumber: 63)
  16806. } }()
  16807. try { if let v = self._optionalInt6464 {
  16808. try visitor.visitSingularInt64Field(value: v, fieldNumber: 64)
  16809. } }()
  16810. try { if let v = self._optionalInt3265 {
  16811. try visitor.visitSingularInt32Field(value: v, fieldNumber: 65)
  16812. } }()
  16813. try unknownFields.traverse(visitor: &visitor)
  16814. }
  16815. static func ==(lhs: Proto2Unittest_TestVerifyOneInt32BigFieldNumber, rhs: Proto2Unittest_TestVerifyOneInt32BigFieldNumber) -> Bool {
  16816. if lhs._optionalInt3265 != rhs._optionalInt3265 {return false}
  16817. if lhs._optionalInt641 != rhs._optionalInt641 {return false}
  16818. if lhs._optionalInt642 != rhs._optionalInt642 {return false}
  16819. if lhs._optionalInt6463 != rhs._optionalInt6463 {return false}
  16820. if lhs._optionalInt6464 != rhs._optionalInt6464 {return false}
  16821. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  16822. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  16823. if lhs.unknownFields != rhs.unknownFields {return false}
  16824. return true
  16825. }
  16826. }
  16827. extension Proto2Unittest_TestVerifyInt32BigFieldNumber: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16828. static let protoMessageName: String = _protobuf_package + ".TestVerifyInt32BigFieldNumber"
  16829. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16830. 1000: .standard(proto: "optional_int32_1000"),
  16831. 65: .standard(proto: "optional_int32_65"),
  16832. 1: .standard(proto: "optional_int32_1"),
  16833. 2: .standard(proto: "optional_int32_2"),
  16834. 63: .standard(proto: "optional_int32_63"),
  16835. 64: .standard(proto: "optional_int32_64"),
  16836. 9: .standard(proto: "optional_all_types"),
  16837. 10: .standard(proto: "repeated_all_types"),
  16838. ]
  16839. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16840. while let fieldNumber = try decoder.nextFieldNumber() {
  16841. // The use of inline closures is to circumvent an issue where the compiler
  16842. // allocates stack space for every case branch when no optimizations are
  16843. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16844. switch fieldNumber {
  16845. case 1: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt321) }()
  16846. case 2: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt322) }()
  16847. case 9: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  16848. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  16849. case 63: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3263) }()
  16850. case 64: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3264) }()
  16851. case 65: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt3265) }()
  16852. case 1000: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt321000) }()
  16853. default: break
  16854. }
  16855. }
  16856. }
  16857. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16858. // The use of inline closures is to circumvent an issue where the compiler
  16859. // allocates stack space for every if/case branch local when no optimizations
  16860. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16861. // https://github.com/apple/swift-protobuf/issues/1182
  16862. try { if let v = self._optionalInt321 {
  16863. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  16864. } }()
  16865. try { if let v = self._optionalInt322 {
  16866. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  16867. } }()
  16868. try { if let v = self._optionalAllTypes {
  16869. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  16870. } }()
  16871. if !self.repeatedAllTypes.isEmpty {
  16872. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 10)
  16873. }
  16874. try { if let v = self._optionalInt3263 {
  16875. try visitor.visitSingularInt32Field(value: v, fieldNumber: 63)
  16876. } }()
  16877. try { if let v = self._optionalInt3264 {
  16878. try visitor.visitSingularInt32Field(value: v, fieldNumber: 64)
  16879. } }()
  16880. try { if let v = self._optionalInt3265 {
  16881. try visitor.visitSingularInt32Field(value: v, fieldNumber: 65)
  16882. } }()
  16883. try { if let v = self._optionalInt321000 {
  16884. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1000)
  16885. } }()
  16886. try unknownFields.traverse(visitor: &visitor)
  16887. }
  16888. static func ==(lhs: Proto2Unittest_TestVerifyInt32BigFieldNumber, rhs: Proto2Unittest_TestVerifyInt32BigFieldNumber) -> Bool {
  16889. if lhs._optionalInt321000 != rhs._optionalInt321000 {return false}
  16890. if lhs._optionalInt3265 != rhs._optionalInt3265 {return false}
  16891. if lhs._optionalInt321 != rhs._optionalInt321 {return false}
  16892. if lhs._optionalInt322 != rhs._optionalInt322 {return false}
  16893. if lhs._optionalInt3263 != rhs._optionalInt3263 {return false}
  16894. if lhs._optionalInt3264 != rhs._optionalInt3264 {return false}
  16895. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  16896. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  16897. if lhs.unknownFields != rhs.unknownFields {return false}
  16898. return true
  16899. }
  16900. }
  16901. extension Proto2Unittest_TestVerifyUint32BigFieldNumber: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16902. static let protoMessageName: String = _protobuf_package + ".TestVerifyUint32BigFieldNumber"
  16903. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16904. 1000: .standard(proto: "optional_uint32_1000"),
  16905. 65: .standard(proto: "optional_uint32_65"),
  16906. 1: .standard(proto: "optional_uint32_1"),
  16907. 2: .standard(proto: "optional_uint32_2"),
  16908. 63: .standard(proto: "optional_uint32_63"),
  16909. 64: .standard(proto: "optional_uint32_64"),
  16910. 9: .standard(proto: "optional_all_types"),
  16911. 10: .standard(proto: "repeated_all_types"),
  16912. ]
  16913. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16914. while let fieldNumber = try decoder.nextFieldNumber() {
  16915. // The use of inline closures is to circumvent an issue where the compiler
  16916. // allocates stack space for every case branch when no optimizations are
  16917. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16918. switch fieldNumber {
  16919. case 1: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint321) }()
  16920. case 2: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint322) }()
  16921. case 9: try { try decoder.decodeSingularMessageField(value: &self._optionalAllTypes) }()
  16922. case 10: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedAllTypes) }()
  16923. case 63: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint3263) }()
  16924. case 64: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint3264) }()
  16925. case 65: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint3265) }()
  16926. case 1000: try { try decoder.decodeSingularUInt32Field(value: &self._optionalUint321000) }()
  16927. default: break
  16928. }
  16929. }
  16930. }
  16931. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16932. // The use of inline closures is to circumvent an issue where the compiler
  16933. // allocates stack space for every if/case branch local when no optimizations
  16934. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16935. // https://github.com/apple/swift-protobuf/issues/1182
  16936. try { if let v = self._optionalUint321 {
  16937. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
  16938. } }()
  16939. try { if let v = self._optionalUint322 {
  16940. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
  16941. } }()
  16942. try { if let v = self._optionalAllTypes {
  16943. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  16944. } }()
  16945. if !self.repeatedAllTypes.isEmpty {
  16946. try visitor.visitRepeatedMessageField(value: self.repeatedAllTypes, fieldNumber: 10)
  16947. }
  16948. try { if let v = self._optionalUint3263 {
  16949. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 63)
  16950. } }()
  16951. try { if let v = self._optionalUint3264 {
  16952. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 64)
  16953. } }()
  16954. try { if let v = self._optionalUint3265 {
  16955. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 65)
  16956. } }()
  16957. try { if let v = self._optionalUint321000 {
  16958. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1000)
  16959. } }()
  16960. try unknownFields.traverse(visitor: &visitor)
  16961. }
  16962. static func ==(lhs: Proto2Unittest_TestVerifyUint32BigFieldNumber, rhs: Proto2Unittest_TestVerifyUint32BigFieldNumber) -> Bool {
  16963. if lhs._optionalUint321000 != rhs._optionalUint321000 {return false}
  16964. if lhs._optionalUint3265 != rhs._optionalUint3265 {return false}
  16965. if lhs._optionalUint321 != rhs._optionalUint321 {return false}
  16966. if lhs._optionalUint322 != rhs._optionalUint322 {return false}
  16967. if lhs._optionalUint3263 != rhs._optionalUint3263 {return false}
  16968. if lhs._optionalUint3264 != rhs._optionalUint3264 {return false}
  16969. if lhs._optionalAllTypes != rhs._optionalAllTypes {return false}
  16970. if lhs.repeatedAllTypes != rhs.repeatedAllTypes {return false}
  16971. if lhs.unknownFields != rhs.unknownFields {return false}
  16972. return true
  16973. }
  16974. }
  16975. extension Proto2Unittest_TestVerifyBigFieldNumberUint32: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  16976. static let protoMessageName: String = _protobuf_package + ".TestVerifyBigFieldNumberUint32"
  16977. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  16978. 1: .standard(proto: "optional_nested"),
  16979. ]
  16980. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  16981. while let fieldNumber = try decoder.nextFieldNumber() {
  16982. // The use of inline closures is to circumvent an issue where the compiler
  16983. // allocates stack space for every case branch when no optimizations are
  16984. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  16985. switch fieldNumber {
  16986. case 1: try { try decoder.decodeSingularMessageField(value: &self._optionalNested) }()
  16987. default: break
  16988. }
  16989. }
  16990. }
  16991. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  16992. // The use of inline closures is to circumvent an issue where the compiler
  16993. // allocates stack space for every if/case branch local when no optimizations
  16994. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  16995. // https://github.com/apple/swift-protobuf/issues/1182
  16996. try { if let v = self._optionalNested {
  16997. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  16998. } }()
  16999. try unknownFields.traverse(visitor: &visitor)
  17000. }
  17001. static func ==(lhs: Proto2Unittest_TestVerifyBigFieldNumberUint32, rhs: Proto2Unittest_TestVerifyBigFieldNumberUint32) -> Bool {
  17002. if lhs._optionalNested != rhs._optionalNested {return false}
  17003. if lhs.unknownFields != rhs.unknownFields {return false}
  17004. return true
  17005. }
  17006. }
  17007. extension Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  17008. static let protoMessageName: String = Proto2Unittest_TestVerifyBigFieldNumberUint32.protoMessageName + ".Nested"
  17009. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17010. 5000: .standard(proto: "optional_uint32_5000"),
  17011. 1000: .standard(proto: "optional_uint32_1000"),
  17012. 66: .standard(proto: "optional_uint32_66"),
  17013. 65: .standard(proto: "optional_uint32_65"),
  17014. 1: .standard(proto: "optional_uint32_1"),
  17015. 2: .standard(proto: "optional_uint32_2"),
  17016. 63: .standard(proto: "optional_uint32_63"),
  17017. 64: .standard(proto: "optional_uint32_64"),
  17018. 9: .standard(proto: "optional_nested"),
  17019. 10: .standard(proto: "repeated_nested"),
  17020. ]
  17021. fileprivate class _StorageClass {
  17022. var _optionalUint325000: UInt32? = nil
  17023. var _optionalUint321000: UInt32? = nil
  17024. var _optionalUint3266: UInt32? = nil
  17025. var _optionalUint3265: UInt32? = nil
  17026. var _optionalUint321: UInt32? = nil
  17027. var _optionalUint322: UInt32? = nil
  17028. var _optionalUint3263: UInt32? = nil
  17029. var _optionalUint3264: UInt32? = nil
  17030. var _optionalNested: Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested? = nil
  17031. var _repeatedNested: [Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested] = []
  17032. // This property is used as the initial default value for new instances of the type.
  17033. // The type itself is protecting the reference to its storage via CoW semantics.
  17034. // This will force a copy to be made of this reference when the first mutation occurs;
  17035. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  17036. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  17037. private init() {}
  17038. init(copying source: _StorageClass) {
  17039. _optionalUint325000 = source._optionalUint325000
  17040. _optionalUint321000 = source._optionalUint321000
  17041. _optionalUint3266 = source._optionalUint3266
  17042. _optionalUint3265 = source._optionalUint3265
  17043. _optionalUint321 = source._optionalUint321
  17044. _optionalUint322 = source._optionalUint322
  17045. _optionalUint3263 = source._optionalUint3263
  17046. _optionalUint3264 = source._optionalUint3264
  17047. _optionalNested = source._optionalNested
  17048. _repeatedNested = source._repeatedNested
  17049. }
  17050. }
  17051. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  17052. if !isKnownUniquelyReferenced(&_storage) {
  17053. _storage = _StorageClass(copying: _storage)
  17054. }
  17055. return _storage
  17056. }
  17057. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  17058. _ = _uniqueStorage()
  17059. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  17060. while let fieldNumber = try decoder.nextFieldNumber() {
  17061. // The use of inline closures is to circumvent an issue where the compiler
  17062. // allocates stack space for every case branch when no optimizations are
  17063. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  17064. switch fieldNumber {
  17065. case 1: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint321) }()
  17066. case 2: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint322) }()
  17067. case 9: try { try decoder.decodeSingularMessageField(value: &_storage._optionalNested) }()
  17068. case 10: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNested) }()
  17069. case 63: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint3263) }()
  17070. case 64: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint3264) }()
  17071. case 65: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint3265) }()
  17072. case 66: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint3266) }()
  17073. case 1000: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint321000) }()
  17074. case 5000: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint325000) }()
  17075. default: break
  17076. }
  17077. }
  17078. }
  17079. }
  17080. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  17081. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  17082. // The use of inline closures is to circumvent an issue where the compiler
  17083. // allocates stack space for every if/case branch local when no optimizations
  17084. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  17085. // https://github.com/apple/swift-protobuf/issues/1182
  17086. try { if let v = _storage._optionalUint321 {
  17087. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
  17088. } }()
  17089. try { if let v = _storage._optionalUint322 {
  17090. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
  17091. } }()
  17092. try { if let v = _storage._optionalNested {
  17093. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  17094. } }()
  17095. if !_storage._repeatedNested.isEmpty {
  17096. try visitor.visitRepeatedMessageField(value: _storage._repeatedNested, fieldNumber: 10)
  17097. }
  17098. try { if let v = _storage._optionalUint3263 {
  17099. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 63)
  17100. } }()
  17101. try { if let v = _storage._optionalUint3264 {
  17102. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 64)
  17103. } }()
  17104. try { if let v = _storage._optionalUint3265 {
  17105. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 65)
  17106. } }()
  17107. try { if let v = _storage._optionalUint3266 {
  17108. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 66)
  17109. } }()
  17110. try { if let v = _storage._optionalUint321000 {
  17111. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1000)
  17112. } }()
  17113. try { if let v = _storage._optionalUint325000 {
  17114. try visitor.visitSingularUInt32Field(value: v, fieldNumber: 5000)
  17115. } }()
  17116. }
  17117. try unknownFields.traverse(visitor: &visitor)
  17118. }
  17119. static func ==(lhs: Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested, rhs: Proto2Unittest_TestVerifyBigFieldNumberUint32.Nested) -> Bool {
  17120. if lhs._storage !== rhs._storage {
  17121. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  17122. let _storage = _args.0
  17123. let rhs_storage = _args.1
  17124. if _storage._optionalUint325000 != rhs_storage._optionalUint325000 {return false}
  17125. if _storage._optionalUint321000 != rhs_storage._optionalUint321000 {return false}
  17126. if _storage._optionalUint3266 != rhs_storage._optionalUint3266 {return false}
  17127. if _storage._optionalUint3265 != rhs_storage._optionalUint3265 {return false}
  17128. if _storage._optionalUint321 != rhs_storage._optionalUint321 {return false}
  17129. if _storage._optionalUint322 != rhs_storage._optionalUint322 {return false}
  17130. if _storage._optionalUint3263 != rhs_storage._optionalUint3263 {return false}
  17131. if _storage._optionalUint3264 != rhs_storage._optionalUint3264 {return false}
  17132. if _storage._optionalNested != rhs_storage._optionalNested {return false}
  17133. if _storage._repeatedNested != rhs_storage._repeatedNested {return false}
  17134. return true
  17135. }
  17136. if !storagesAreEqual {return false}
  17137. }
  17138. if lhs.unknownFields != rhs.unknownFields {return false}
  17139. return true
  17140. }
  17141. }
  17142. extension Proto2Unittest_EnumParseTester: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  17143. static let protoMessageName: String = _protobuf_package + ".EnumParseTester"
  17144. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17145. 1: .standard(proto: "optional_seq_small_0_lowfield"),
  17146. 1001: .standard(proto: "optional_seq_small_0_midfield"),
  17147. 1000001: .standard(proto: "optional_seq_small_0_hifield"),
  17148. 2: .standard(proto: "repeated_seq_small_0_lowfield"),
  17149. 1002: .standard(proto: "repeated_seq_small_0_midfield"),
  17150. 1000002: .standard(proto: "repeated_seq_small_0_hifield"),
  17151. 3: .standard(proto: "packed_seq_small_0_lowfield"),
  17152. 1003: .standard(proto: "packed_seq_small_0_midfield"),
  17153. 1000003: .standard(proto: "packed_seq_small_0_hifield"),
  17154. 4: .standard(proto: "optional_seq_small_1_lowfield"),
  17155. 1004: .standard(proto: "optional_seq_small_1_midfield"),
  17156. 1000004: .standard(proto: "optional_seq_small_1_hifield"),
  17157. 5: .standard(proto: "repeated_seq_small_1_lowfield"),
  17158. 1005: .standard(proto: "repeated_seq_small_1_midfield"),
  17159. 1000005: .standard(proto: "repeated_seq_small_1_hifield"),
  17160. 6: .standard(proto: "packed_seq_small_1_lowfield"),
  17161. 1006: .standard(proto: "packed_seq_small_1_midfield"),
  17162. 1000006: .standard(proto: "packed_seq_small_1_hifield"),
  17163. 7: .standard(proto: "optional_seq_large_lowfield"),
  17164. 1007: .standard(proto: "optional_seq_large_midfield"),
  17165. 1000007: .standard(proto: "optional_seq_large_hifield"),
  17166. 8: .standard(proto: "repeated_seq_large_lowfield"),
  17167. 1008: .standard(proto: "repeated_seq_large_midfield"),
  17168. 1000008: .standard(proto: "repeated_seq_large_hifield"),
  17169. 9: .standard(proto: "packed_seq_large_lowfield"),
  17170. 1009: .standard(proto: "packed_seq_large_midfield"),
  17171. 1000009: .standard(proto: "packed_seq_large_hifield"),
  17172. 10: .standard(proto: "optional_arbitrary_lowfield"),
  17173. 1010: .standard(proto: "optional_arbitrary_midfield"),
  17174. 1000010: .standard(proto: "optional_arbitrary_hifield"),
  17175. 11: .standard(proto: "repeated_arbitrary_lowfield"),
  17176. 1011: .standard(proto: "repeated_arbitrary_midfield"),
  17177. 1000011: .standard(proto: "repeated_arbitrary_hifield"),
  17178. 12: .standard(proto: "packed_arbitrary_lowfield"),
  17179. 1012: .standard(proto: "packed_arbitrary_midfield"),
  17180. 1000012: .standard(proto: "packed_arbitrary_hifield"),
  17181. 99: .standard(proto: "other_field"),
  17182. ]
  17183. fileprivate class _StorageClass {
  17184. var _optionalSeqSmall0Lowfield: Proto2Unittest_EnumParseTester.SeqSmall0? = nil
  17185. var _optionalSeqSmall0Midfield: Proto2Unittest_EnumParseTester.SeqSmall0? = nil
  17186. var _optionalSeqSmall0Hifield: Proto2Unittest_EnumParseTester.SeqSmall0? = nil
  17187. var _repeatedSeqSmall0Lowfield: [Proto2Unittest_EnumParseTester.SeqSmall0] = []
  17188. var _repeatedSeqSmall0Midfield: [Proto2Unittest_EnumParseTester.SeqSmall0] = []
  17189. var _repeatedSeqSmall0Hifield: [Proto2Unittest_EnumParseTester.SeqSmall0] = []
  17190. var _packedSeqSmall0Lowfield: [Proto2Unittest_EnumParseTester.SeqSmall0] = []
  17191. var _packedSeqSmall0Midfield: [Proto2Unittest_EnumParseTester.SeqSmall0] = []
  17192. var _packedSeqSmall0Hifield: [Proto2Unittest_EnumParseTester.SeqSmall0] = []
  17193. var _optionalSeqSmall1Lowfield: Proto2Unittest_EnumParseTester.SeqSmall1? = nil
  17194. var _optionalSeqSmall1Midfield: Proto2Unittest_EnumParseTester.SeqSmall1? = nil
  17195. var _optionalSeqSmall1Hifield: Proto2Unittest_EnumParseTester.SeqSmall1? = nil
  17196. var _repeatedSeqSmall1Lowfield: [Proto2Unittest_EnumParseTester.SeqSmall1] = []
  17197. var _repeatedSeqSmall1Midfield: [Proto2Unittest_EnumParseTester.SeqSmall1] = []
  17198. var _repeatedSeqSmall1Hifield: [Proto2Unittest_EnumParseTester.SeqSmall1] = []
  17199. var _packedSeqSmall1Lowfield: [Proto2Unittest_EnumParseTester.SeqSmall1] = []
  17200. var _packedSeqSmall1Midfield: [Proto2Unittest_EnumParseTester.SeqSmall1] = []
  17201. var _packedSeqSmall1Hifield: [Proto2Unittest_EnumParseTester.SeqSmall1] = []
  17202. var _optionalSeqLargeLowfield: Proto2Unittest_EnumParseTester.SeqLarge? = nil
  17203. var _optionalSeqLargeMidfield: Proto2Unittest_EnumParseTester.SeqLarge? = nil
  17204. var _optionalSeqLargeHifield: Proto2Unittest_EnumParseTester.SeqLarge? = nil
  17205. var _repeatedSeqLargeLowfield: [Proto2Unittest_EnumParseTester.SeqLarge] = []
  17206. var _repeatedSeqLargeMidfield: [Proto2Unittest_EnumParseTester.SeqLarge] = []
  17207. var _repeatedSeqLargeHifield: [Proto2Unittest_EnumParseTester.SeqLarge] = []
  17208. var _packedSeqLargeLowfield: [Proto2Unittest_EnumParseTester.SeqLarge] = []
  17209. var _packedSeqLargeMidfield: [Proto2Unittest_EnumParseTester.SeqLarge] = []
  17210. var _packedSeqLargeHifield: [Proto2Unittest_EnumParseTester.SeqLarge] = []
  17211. var _optionalArbitraryLowfield: Proto2Unittest_EnumParseTester.Arbitrary? = nil
  17212. var _optionalArbitraryMidfield: Proto2Unittest_EnumParseTester.Arbitrary? = nil
  17213. var _optionalArbitraryHifield: Proto2Unittest_EnumParseTester.Arbitrary? = nil
  17214. var _repeatedArbitraryLowfield: [Proto2Unittest_EnumParseTester.Arbitrary] = []
  17215. var _repeatedArbitraryMidfield: [Proto2Unittest_EnumParseTester.Arbitrary] = []
  17216. var _repeatedArbitraryHifield: [Proto2Unittest_EnumParseTester.Arbitrary] = []
  17217. var _packedArbitraryLowfield: [Proto2Unittest_EnumParseTester.Arbitrary] = []
  17218. var _packedArbitraryMidfield: [Proto2Unittest_EnumParseTester.Arbitrary] = []
  17219. var _packedArbitraryHifield: [Proto2Unittest_EnumParseTester.Arbitrary] = []
  17220. var _otherField: Int32? = nil
  17221. // This property is used as the initial default value for new instances of the type.
  17222. // The type itself is protecting the reference to its storage via CoW semantics.
  17223. // This will force a copy to be made of this reference when the first mutation occurs;
  17224. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  17225. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  17226. private init() {}
  17227. init(copying source: _StorageClass) {
  17228. _optionalSeqSmall0Lowfield = source._optionalSeqSmall0Lowfield
  17229. _optionalSeqSmall0Midfield = source._optionalSeqSmall0Midfield
  17230. _optionalSeqSmall0Hifield = source._optionalSeqSmall0Hifield
  17231. _repeatedSeqSmall0Lowfield = source._repeatedSeqSmall0Lowfield
  17232. _repeatedSeqSmall0Midfield = source._repeatedSeqSmall0Midfield
  17233. _repeatedSeqSmall0Hifield = source._repeatedSeqSmall0Hifield
  17234. _packedSeqSmall0Lowfield = source._packedSeqSmall0Lowfield
  17235. _packedSeqSmall0Midfield = source._packedSeqSmall0Midfield
  17236. _packedSeqSmall0Hifield = source._packedSeqSmall0Hifield
  17237. _optionalSeqSmall1Lowfield = source._optionalSeqSmall1Lowfield
  17238. _optionalSeqSmall1Midfield = source._optionalSeqSmall1Midfield
  17239. _optionalSeqSmall1Hifield = source._optionalSeqSmall1Hifield
  17240. _repeatedSeqSmall1Lowfield = source._repeatedSeqSmall1Lowfield
  17241. _repeatedSeqSmall1Midfield = source._repeatedSeqSmall1Midfield
  17242. _repeatedSeqSmall1Hifield = source._repeatedSeqSmall1Hifield
  17243. _packedSeqSmall1Lowfield = source._packedSeqSmall1Lowfield
  17244. _packedSeqSmall1Midfield = source._packedSeqSmall1Midfield
  17245. _packedSeqSmall1Hifield = source._packedSeqSmall1Hifield
  17246. _optionalSeqLargeLowfield = source._optionalSeqLargeLowfield
  17247. _optionalSeqLargeMidfield = source._optionalSeqLargeMidfield
  17248. _optionalSeqLargeHifield = source._optionalSeqLargeHifield
  17249. _repeatedSeqLargeLowfield = source._repeatedSeqLargeLowfield
  17250. _repeatedSeqLargeMidfield = source._repeatedSeqLargeMidfield
  17251. _repeatedSeqLargeHifield = source._repeatedSeqLargeHifield
  17252. _packedSeqLargeLowfield = source._packedSeqLargeLowfield
  17253. _packedSeqLargeMidfield = source._packedSeqLargeMidfield
  17254. _packedSeqLargeHifield = source._packedSeqLargeHifield
  17255. _optionalArbitraryLowfield = source._optionalArbitraryLowfield
  17256. _optionalArbitraryMidfield = source._optionalArbitraryMidfield
  17257. _optionalArbitraryHifield = source._optionalArbitraryHifield
  17258. _repeatedArbitraryLowfield = source._repeatedArbitraryLowfield
  17259. _repeatedArbitraryMidfield = source._repeatedArbitraryMidfield
  17260. _repeatedArbitraryHifield = source._repeatedArbitraryHifield
  17261. _packedArbitraryLowfield = source._packedArbitraryLowfield
  17262. _packedArbitraryMidfield = source._packedArbitraryMidfield
  17263. _packedArbitraryHifield = source._packedArbitraryHifield
  17264. _otherField = source._otherField
  17265. }
  17266. }
  17267. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  17268. if !isKnownUniquelyReferenced(&_storage) {
  17269. _storage = _StorageClass(copying: _storage)
  17270. }
  17271. return _storage
  17272. }
  17273. public var isInitialized: Bool {
  17274. if !_protobuf_extensionFieldValues.isInitialized {return false}
  17275. return true
  17276. }
  17277. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  17278. _ = _uniqueStorage()
  17279. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  17280. while let fieldNumber = try decoder.nextFieldNumber() {
  17281. // The use of inline closures is to circumvent an issue where the compiler
  17282. // allocates stack space for every case branch when no optimizations are
  17283. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  17284. switch fieldNumber {
  17285. case 1: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqSmall0Lowfield) }()
  17286. case 2: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqSmall0Lowfield) }()
  17287. case 3: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqSmall0Lowfield) }()
  17288. case 4: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqSmall1Lowfield) }()
  17289. case 5: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqSmall1Lowfield) }()
  17290. case 6: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqSmall1Lowfield) }()
  17291. case 7: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqLargeLowfield) }()
  17292. case 8: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqLargeLowfield) }()
  17293. case 9: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqLargeLowfield) }()
  17294. case 10: try { try decoder.decodeSingularEnumField(value: &_storage._optionalArbitraryLowfield) }()
  17295. case 11: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedArbitraryLowfield) }()
  17296. case 12: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedArbitraryLowfield) }()
  17297. case 99: try { try decoder.decodeSingularInt32Field(value: &_storage._otherField) }()
  17298. case 1001: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqSmall0Midfield) }()
  17299. case 1002: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqSmall0Midfield) }()
  17300. case 1003: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqSmall0Midfield) }()
  17301. case 1004: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqSmall1Midfield) }()
  17302. case 1005: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqSmall1Midfield) }()
  17303. case 1006: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqSmall1Midfield) }()
  17304. case 1007: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqLargeMidfield) }()
  17305. case 1008: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqLargeMidfield) }()
  17306. case 1009: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqLargeMidfield) }()
  17307. case 1010: try { try decoder.decodeSingularEnumField(value: &_storage._optionalArbitraryMidfield) }()
  17308. case 1011: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedArbitraryMidfield) }()
  17309. case 1012: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedArbitraryMidfield) }()
  17310. case 1000001: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqSmall0Hifield) }()
  17311. case 1000002: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqSmall0Hifield) }()
  17312. case 1000003: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqSmall0Hifield) }()
  17313. case 1000004: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqSmall1Hifield) }()
  17314. case 1000005: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqSmall1Hifield) }()
  17315. case 1000006: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqSmall1Hifield) }()
  17316. case 1000007: try { try decoder.decodeSingularEnumField(value: &_storage._optionalSeqLargeHifield) }()
  17317. case 1000008: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedSeqLargeHifield) }()
  17318. case 1000009: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedSeqLargeHifield) }()
  17319. case 1000010: try { try decoder.decodeSingularEnumField(value: &_storage._optionalArbitraryHifield) }()
  17320. case 1000011: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedArbitraryHifield) }()
  17321. case 1000012: try { try decoder.decodeRepeatedEnumField(value: &_storage._packedArbitraryHifield) }()
  17322. case 2000000..<536870912:
  17323. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_EnumParseTester.self, fieldNumber: fieldNumber) }()
  17324. default: break
  17325. }
  17326. }
  17327. }
  17328. }
  17329. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  17330. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  17331. // The use of inline closures is to circumvent an issue where the compiler
  17332. // allocates stack space for every if/case branch local when no optimizations
  17333. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  17334. // https://github.com/apple/swift-protobuf/issues/1182
  17335. try { if let v = _storage._optionalSeqSmall0Lowfield {
  17336. try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
  17337. } }()
  17338. if !_storage._repeatedSeqSmall0Lowfield.isEmpty {
  17339. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqSmall0Lowfield, fieldNumber: 2)
  17340. }
  17341. if !_storage._packedSeqSmall0Lowfield.isEmpty {
  17342. try visitor.visitPackedEnumField(value: _storage._packedSeqSmall0Lowfield, fieldNumber: 3)
  17343. }
  17344. try { if let v = _storage._optionalSeqSmall1Lowfield {
  17345. try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
  17346. } }()
  17347. if !_storage._repeatedSeqSmall1Lowfield.isEmpty {
  17348. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqSmall1Lowfield, fieldNumber: 5)
  17349. }
  17350. if !_storage._packedSeqSmall1Lowfield.isEmpty {
  17351. try visitor.visitPackedEnumField(value: _storage._packedSeqSmall1Lowfield, fieldNumber: 6)
  17352. }
  17353. try { if let v = _storage._optionalSeqLargeLowfield {
  17354. try visitor.visitSingularEnumField(value: v, fieldNumber: 7)
  17355. } }()
  17356. if !_storage._repeatedSeqLargeLowfield.isEmpty {
  17357. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqLargeLowfield, fieldNumber: 8)
  17358. }
  17359. if !_storage._packedSeqLargeLowfield.isEmpty {
  17360. try visitor.visitPackedEnumField(value: _storage._packedSeqLargeLowfield, fieldNumber: 9)
  17361. }
  17362. try { if let v = _storage._optionalArbitraryLowfield {
  17363. try visitor.visitSingularEnumField(value: v, fieldNumber: 10)
  17364. } }()
  17365. if !_storage._repeatedArbitraryLowfield.isEmpty {
  17366. try visitor.visitRepeatedEnumField(value: _storage._repeatedArbitraryLowfield, fieldNumber: 11)
  17367. }
  17368. if !_storage._packedArbitraryLowfield.isEmpty {
  17369. try visitor.visitPackedEnumField(value: _storage._packedArbitraryLowfield, fieldNumber: 12)
  17370. }
  17371. try { if let v = _storage._otherField {
  17372. try visitor.visitSingularInt32Field(value: v, fieldNumber: 99)
  17373. } }()
  17374. try { if let v = _storage._optionalSeqSmall0Midfield {
  17375. try visitor.visitSingularEnumField(value: v, fieldNumber: 1001)
  17376. } }()
  17377. if !_storage._repeatedSeqSmall0Midfield.isEmpty {
  17378. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqSmall0Midfield, fieldNumber: 1002)
  17379. }
  17380. if !_storage._packedSeqSmall0Midfield.isEmpty {
  17381. try visitor.visitPackedEnumField(value: _storage._packedSeqSmall0Midfield, fieldNumber: 1003)
  17382. }
  17383. try { if let v = _storage._optionalSeqSmall1Midfield {
  17384. try visitor.visitSingularEnumField(value: v, fieldNumber: 1004)
  17385. } }()
  17386. if !_storage._repeatedSeqSmall1Midfield.isEmpty {
  17387. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqSmall1Midfield, fieldNumber: 1005)
  17388. }
  17389. if !_storage._packedSeqSmall1Midfield.isEmpty {
  17390. try visitor.visitPackedEnumField(value: _storage._packedSeqSmall1Midfield, fieldNumber: 1006)
  17391. }
  17392. try { if let v = _storage._optionalSeqLargeMidfield {
  17393. try visitor.visitSingularEnumField(value: v, fieldNumber: 1007)
  17394. } }()
  17395. if !_storage._repeatedSeqLargeMidfield.isEmpty {
  17396. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqLargeMidfield, fieldNumber: 1008)
  17397. }
  17398. if !_storage._packedSeqLargeMidfield.isEmpty {
  17399. try visitor.visitPackedEnumField(value: _storage._packedSeqLargeMidfield, fieldNumber: 1009)
  17400. }
  17401. try { if let v = _storage._optionalArbitraryMidfield {
  17402. try visitor.visitSingularEnumField(value: v, fieldNumber: 1010)
  17403. } }()
  17404. if !_storage._repeatedArbitraryMidfield.isEmpty {
  17405. try visitor.visitRepeatedEnumField(value: _storage._repeatedArbitraryMidfield, fieldNumber: 1011)
  17406. }
  17407. if !_storage._packedArbitraryMidfield.isEmpty {
  17408. try visitor.visitPackedEnumField(value: _storage._packedArbitraryMidfield, fieldNumber: 1012)
  17409. }
  17410. try { if let v = _storage._optionalSeqSmall0Hifield {
  17411. try visitor.visitSingularEnumField(value: v, fieldNumber: 1000001)
  17412. } }()
  17413. if !_storage._repeatedSeqSmall0Hifield.isEmpty {
  17414. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqSmall0Hifield, fieldNumber: 1000002)
  17415. }
  17416. if !_storage._packedSeqSmall0Hifield.isEmpty {
  17417. try visitor.visitPackedEnumField(value: _storage._packedSeqSmall0Hifield, fieldNumber: 1000003)
  17418. }
  17419. try { if let v = _storage._optionalSeqSmall1Hifield {
  17420. try visitor.visitSingularEnumField(value: v, fieldNumber: 1000004)
  17421. } }()
  17422. if !_storage._repeatedSeqSmall1Hifield.isEmpty {
  17423. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqSmall1Hifield, fieldNumber: 1000005)
  17424. }
  17425. if !_storage._packedSeqSmall1Hifield.isEmpty {
  17426. try visitor.visitPackedEnumField(value: _storage._packedSeqSmall1Hifield, fieldNumber: 1000006)
  17427. }
  17428. try { if let v = _storage._optionalSeqLargeHifield {
  17429. try visitor.visitSingularEnumField(value: v, fieldNumber: 1000007)
  17430. } }()
  17431. if !_storage._repeatedSeqLargeHifield.isEmpty {
  17432. try visitor.visitRepeatedEnumField(value: _storage._repeatedSeqLargeHifield, fieldNumber: 1000008)
  17433. }
  17434. if !_storage._packedSeqLargeHifield.isEmpty {
  17435. try visitor.visitPackedEnumField(value: _storage._packedSeqLargeHifield, fieldNumber: 1000009)
  17436. }
  17437. try { if let v = _storage._optionalArbitraryHifield {
  17438. try visitor.visitSingularEnumField(value: v, fieldNumber: 1000010)
  17439. } }()
  17440. if !_storage._repeatedArbitraryHifield.isEmpty {
  17441. try visitor.visitRepeatedEnumField(value: _storage._repeatedArbitraryHifield, fieldNumber: 1000011)
  17442. }
  17443. if !_storage._packedArbitraryHifield.isEmpty {
  17444. try visitor.visitPackedEnumField(value: _storage._packedArbitraryHifield, fieldNumber: 1000012)
  17445. }
  17446. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2000000, end: 536870912)
  17447. }
  17448. try unknownFields.traverse(visitor: &visitor)
  17449. }
  17450. static func ==(lhs: Proto2Unittest_EnumParseTester, rhs: Proto2Unittest_EnumParseTester) -> Bool {
  17451. if lhs._storage !== rhs._storage {
  17452. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  17453. let _storage = _args.0
  17454. let rhs_storage = _args.1
  17455. if _storage._optionalSeqSmall0Lowfield != rhs_storage._optionalSeqSmall0Lowfield {return false}
  17456. if _storage._optionalSeqSmall0Midfield != rhs_storage._optionalSeqSmall0Midfield {return false}
  17457. if _storage._optionalSeqSmall0Hifield != rhs_storage._optionalSeqSmall0Hifield {return false}
  17458. if _storage._repeatedSeqSmall0Lowfield != rhs_storage._repeatedSeqSmall0Lowfield {return false}
  17459. if _storage._repeatedSeqSmall0Midfield != rhs_storage._repeatedSeqSmall0Midfield {return false}
  17460. if _storage._repeatedSeqSmall0Hifield != rhs_storage._repeatedSeqSmall0Hifield {return false}
  17461. if _storage._packedSeqSmall0Lowfield != rhs_storage._packedSeqSmall0Lowfield {return false}
  17462. if _storage._packedSeqSmall0Midfield != rhs_storage._packedSeqSmall0Midfield {return false}
  17463. if _storage._packedSeqSmall0Hifield != rhs_storage._packedSeqSmall0Hifield {return false}
  17464. if _storage._optionalSeqSmall1Lowfield != rhs_storage._optionalSeqSmall1Lowfield {return false}
  17465. if _storage._optionalSeqSmall1Midfield != rhs_storage._optionalSeqSmall1Midfield {return false}
  17466. if _storage._optionalSeqSmall1Hifield != rhs_storage._optionalSeqSmall1Hifield {return false}
  17467. if _storage._repeatedSeqSmall1Lowfield != rhs_storage._repeatedSeqSmall1Lowfield {return false}
  17468. if _storage._repeatedSeqSmall1Midfield != rhs_storage._repeatedSeqSmall1Midfield {return false}
  17469. if _storage._repeatedSeqSmall1Hifield != rhs_storage._repeatedSeqSmall1Hifield {return false}
  17470. if _storage._packedSeqSmall1Lowfield != rhs_storage._packedSeqSmall1Lowfield {return false}
  17471. if _storage._packedSeqSmall1Midfield != rhs_storage._packedSeqSmall1Midfield {return false}
  17472. if _storage._packedSeqSmall1Hifield != rhs_storage._packedSeqSmall1Hifield {return false}
  17473. if _storage._optionalSeqLargeLowfield != rhs_storage._optionalSeqLargeLowfield {return false}
  17474. if _storage._optionalSeqLargeMidfield != rhs_storage._optionalSeqLargeMidfield {return false}
  17475. if _storage._optionalSeqLargeHifield != rhs_storage._optionalSeqLargeHifield {return false}
  17476. if _storage._repeatedSeqLargeLowfield != rhs_storage._repeatedSeqLargeLowfield {return false}
  17477. if _storage._repeatedSeqLargeMidfield != rhs_storage._repeatedSeqLargeMidfield {return false}
  17478. if _storage._repeatedSeqLargeHifield != rhs_storage._repeatedSeqLargeHifield {return false}
  17479. if _storage._packedSeqLargeLowfield != rhs_storage._packedSeqLargeLowfield {return false}
  17480. if _storage._packedSeqLargeMidfield != rhs_storage._packedSeqLargeMidfield {return false}
  17481. if _storage._packedSeqLargeHifield != rhs_storage._packedSeqLargeHifield {return false}
  17482. if _storage._optionalArbitraryLowfield != rhs_storage._optionalArbitraryLowfield {return false}
  17483. if _storage._optionalArbitraryMidfield != rhs_storage._optionalArbitraryMidfield {return false}
  17484. if _storage._optionalArbitraryHifield != rhs_storage._optionalArbitraryHifield {return false}
  17485. if _storage._repeatedArbitraryLowfield != rhs_storage._repeatedArbitraryLowfield {return false}
  17486. if _storage._repeatedArbitraryMidfield != rhs_storage._repeatedArbitraryMidfield {return false}
  17487. if _storage._repeatedArbitraryHifield != rhs_storage._repeatedArbitraryHifield {return false}
  17488. if _storage._packedArbitraryLowfield != rhs_storage._packedArbitraryLowfield {return false}
  17489. if _storage._packedArbitraryMidfield != rhs_storage._packedArbitraryMidfield {return false}
  17490. if _storage._packedArbitraryHifield != rhs_storage._packedArbitraryHifield {return false}
  17491. if _storage._otherField != rhs_storage._otherField {return false}
  17492. return true
  17493. }
  17494. if !storagesAreEqual {return false}
  17495. }
  17496. if lhs.unknownFields != rhs.unknownFields {return false}
  17497. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  17498. return true
  17499. }
  17500. }
  17501. extension Proto2Unittest_EnumParseTester.SeqSmall0: SwiftProtobuf._ProtoNameProviding {
  17502. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17503. 0: .same(proto: "SEQ_SMALL_0_DEFAULT"),
  17504. 1: .same(proto: "SEQ_SMALL_0_1"),
  17505. 2: .same(proto: "SEQ_SMALL_0_2"),
  17506. ]
  17507. }
  17508. extension Proto2Unittest_EnumParseTester.SeqSmall1: SwiftProtobuf._ProtoNameProviding {
  17509. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17510. 1: .same(proto: "SEQ_SMALL_1_DEFAULT"),
  17511. 2: .same(proto: "SEQ_SMALL_1_2"),
  17512. 3: .same(proto: "SEQ_SMALL_1_3"),
  17513. ]
  17514. }
  17515. extension Proto2Unittest_EnumParseTester.SeqLarge: SwiftProtobuf._ProtoNameProviding {
  17516. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17517. -1: .same(proto: "SEQ_LARGE_DEFAULT"),
  17518. 0: .same(proto: "SEQ_LARGE_0"),
  17519. 1: .same(proto: "SEQ_LARGE_1"),
  17520. 2: .same(proto: "SEQ_LARGE_2"),
  17521. 3: .same(proto: "SEQ_LARGE_3"),
  17522. 4: .same(proto: "SEQ_LARGE_4"),
  17523. 5: .same(proto: "SEQ_LARGE_5"),
  17524. 6: .same(proto: "SEQ_LARGE_6"),
  17525. 7: .same(proto: "SEQ_LARGE_7"),
  17526. 8: .same(proto: "SEQ_LARGE_8"),
  17527. 9: .same(proto: "SEQ_LARGE_9"),
  17528. 10: .same(proto: "SEQ_LARGE_10"),
  17529. 11: .same(proto: "SEQ_LARGE_11"),
  17530. 12: .same(proto: "SEQ_LARGE_12"),
  17531. 13: .same(proto: "SEQ_LARGE_13"),
  17532. 14: .same(proto: "SEQ_LARGE_14"),
  17533. 15: .same(proto: "SEQ_LARGE_15"),
  17534. 16: .same(proto: "SEQ_LARGE_16"),
  17535. 17: .same(proto: "SEQ_LARGE_17"),
  17536. 18: .same(proto: "SEQ_LARGE_18"),
  17537. 19: .same(proto: "SEQ_LARGE_19"),
  17538. 20: .same(proto: "SEQ_LARGE_20"),
  17539. 21: .same(proto: "SEQ_LARGE_21"),
  17540. 22: .same(proto: "SEQ_LARGE_22"),
  17541. 23: .same(proto: "SEQ_LARGE_23"),
  17542. 24: .same(proto: "SEQ_LARGE_24"),
  17543. 25: .same(proto: "SEQ_LARGE_25"),
  17544. 26: .same(proto: "SEQ_LARGE_26"),
  17545. 27: .same(proto: "SEQ_LARGE_27"),
  17546. 28: .same(proto: "SEQ_LARGE_28"),
  17547. 29: .same(proto: "SEQ_LARGE_29"),
  17548. 30: .same(proto: "SEQ_LARGE_30"),
  17549. 31: .same(proto: "SEQ_LARGE_31"),
  17550. 32: .same(proto: "SEQ_LARGE_32"),
  17551. 33: .same(proto: "SEQ_LARGE_33"),
  17552. ]
  17553. }
  17554. extension Proto2Unittest_EnumParseTester.Arbitrary: SwiftProtobuf._ProtoNameProviding {
  17555. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17556. -2147483648: .same(proto: "ARBITRARY_MIN"),
  17557. -123123: .same(proto: "ARBITRARY_DEFAULT"),
  17558. -123: .same(proto: "ARBITRARY_1"),
  17559. 213: .same(proto: "ARBITRARY_2"),
  17560. 213213: .same(proto: "ARBITRARY_3"),
  17561. 2147483647: .same(proto: "ARBITRARY_MAX"),
  17562. ]
  17563. }
  17564. extension Proto2Unittest_BoolParseTester: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  17565. static let protoMessageName: String = _protobuf_package + ".BoolParseTester"
  17566. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17567. 1: .standard(proto: "optional_bool_lowfield"),
  17568. 1001: .standard(proto: "optional_bool_midfield"),
  17569. 1000001: .standard(proto: "optional_bool_hifield"),
  17570. 2: .standard(proto: "repeated_bool_lowfield"),
  17571. 1002: .standard(proto: "repeated_bool_midfield"),
  17572. 1000002: .standard(proto: "repeated_bool_hifield"),
  17573. 3: .standard(proto: "packed_bool_lowfield"),
  17574. 1003: .standard(proto: "packed_bool_midfield"),
  17575. 1000003: .standard(proto: "packed_bool_hifield"),
  17576. 99: .standard(proto: "other_field"),
  17577. ]
  17578. public var isInitialized: Bool {
  17579. if !_protobuf_extensionFieldValues.isInitialized {return false}
  17580. return true
  17581. }
  17582. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  17583. while let fieldNumber = try decoder.nextFieldNumber() {
  17584. // The use of inline closures is to circumvent an issue where the compiler
  17585. // allocates stack space for every case branch when no optimizations are
  17586. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  17587. switch fieldNumber {
  17588. case 1: try { try decoder.decodeSingularBoolField(value: &self._optionalBoolLowfield) }()
  17589. case 2: try { try decoder.decodeRepeatedBoolField(value: &self.repeatedBoolLowfield) }()
  17590. case 3: try { try decoder.decodeRepeatedBoolField(value: &self.packedBoolLowfield) }()
  17591. case 99: try { try decoder.decodeSingularInt32Field(value: &self._otherField) }()
  17592. case 1001: try { try decoder.decodeSingularBoolField(value: &self._optionalBoolMidfield) }()
  17593. case 1002: try { try decoder.decodeRepeatedBoolField(value: &self.repeatedBoolMidfield) }()
  17594. case 1003: try { try decoder.decodeRepeatedBoolField(value: &self.packedBoolMidfield) }()
  17595. case 1000001: try { try decoder.decodeSingularBoolField(value: &self._optionalBoolHifield) }()
  17596. case 1000002: try { try decoder.decodeRepeatedBoolField(value: &self.repeatedBoolHifield) }()
  17597. case 1000003: try { try decoder.decodeRepeatedBoolField(value: &self.packedBoolHifield) }()
  17598. case 2000000..<536870912:
  17599. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_BoolParseTester.self, fieldNumber: fieldNumber) }()
  17600. default: break
  17601. }
  17602. }
  17603. }
  17604. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  17605. // The use of inline closures is to circumvent an issue where the compiler
  17606. // allocates stack space for every if/case branch local when no optimizations
  17607. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  17608. // https://github.com/apple/swift-protobuf/issues/1182
  17609. try { if let v = self._optionalBoolLowfield {
  17610. try visitor.visitSingularBoolField(value: v, fieldNumber: 1)
  17611. } }()
  17612. if !self.repeatedBoolLowfield.isEmpty {
  17613. try visitor.visitRepeatedBoolField(value: self.repeatedBoolLowfield, fieldNumber: 2)
  17614. }
  17615. if !self.packedBoolLowfield.isEmpty {
  17616. try visitor.visitPackedBoolField(value: self.packedBoolLowfield, fieldNumber: 3)
  17617. }
  17618. try { if let v = self._otherField {
  17619. try visitor.visitSingularInt32Field(value: v, fieldNumber: 99)
  17620. } }()
  17621. try { if let v = self._optionalBoolMidfield {
  17622. try visitor.visitSingularBoolField(value: v, fieldNumber: 1001)
  17623. } }()
  17624. if !self.repeatedBoolMidfield.isEmpty {
  17625. try visitor.visitRepeatedBoolField(value: self.repeatedBoolMidfield, fieldNumber: 1002)
  17626. }
  17627. if !self.packedBoolMidfield.isEmpty {
  17628. try visitor.visitPackedBoolField(value: self.packedBoolMidfield, fieldNumber: 1003)
  17629. }
  17630. try { if let v = self._optionalBoolHifield {
  17631. try visitor.visitSingularBoolField(value: v, fieldNumber: 1000001)
  17632. } }()
  17633. if !self.repeatedBoolHifield.isEmpty {
  17634. try visitor.visitRepeatedBoolField(value: self.repeatedBoolHifield, fieldNumber: 1000002)
  17635. }
  17636. if !self.packedBoolHifield.isEmpty {
  17637. try visitor.visitPackedBoolField(value: self.packedBoolHifield, fieldNumber: 1000003)
  17638. }
  17639. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2000000, end: 536870912)
  17640. try unknownFields.traverse(visitor: &visitor)
  17641. }
  17642. static func ==(lhs: Proto2Unittest_BoolParseTester, rhs: Proto2Unittest_BoolParseTester) -> Bool {
  17643. if lhs._optionalBoolLowfield != rhs._optionalBoolLowfield {return false}
  17644. if lhs._optionalBoolMidfield != rhs._optionalBoolMidfield {return false}
  17645. if lhs._optionalBoolHifield != rhs._optionalBoolHifield {return false}
  17646. if lhs.repeatedBoolLowfield != rhs.repeatedBoolLowfield {return false}
  17647. if lhs.repeatedBoolMidfield != rhs.repeatedBoolMidfield {return false}
  17648. if lhs.repeatedBoolHifield != rhs.repeatedBoolHifield {return false}
  17649. if lhs.packedBoolLowfield != rhs.packedBoolLowfield {return false}
  17650. if lhs.packedBoolMidfield != rhs.packedBoolMidfield {return false}
  17651. if lhs.packedBoolHifield != rhs.packedBoolHifield {return false}
  17652. if lhs._otherField != rhs._otherField {return false}
  17653. if lhs.unknownFields != rhs.unknownFields {return false}
  17654. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  17655. return true
  17656. }
  17657. }
  17658. extension Proto2Unittest_Int32ParseTester: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  17659. static let protoMessageName: String = _protobuf_package + ".Int32ParseTester"
  17660. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17661. 1: .standard(proto: "optional_int32_lowfield"),
  17662. 1001: .standard(proto: "optional_int32_midfield"),
  17663. 1000001: .standard(proto: "optional_int32_hifield"),
  17664. 2: .standard(proto: "repeated_int32_lowfield"),
  17665. 1002: .standard(proto: "repeated_int32_midfield"),
  17666. 1000002: .standard(proto: "repeated_int32_hifield"),
  17667. 3: .standard(proto: "packed_int32_lowfield"),
  17668. 1003: .standard(proto: "packed_int32_midfield"),
  17669. 1000003: .standard(proto: "packed_int32_hifield"),
  17670. 99: .standard(proto: "other_field"),
  17671. ]
  17672. public var isInitialized: Bool {
  17673. if !_protobuf_extensionFieldValues.isInitialized {return false}
  17674. return true
  17675. }
  17676. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  17677. while let fieldNumber = try decoder.nextFieldNumber() {
  17678. // The use of inline closures is to circumvent an issue where the compiler
  17679. // allocates stack space for every case branch when no optimizations are
  17680. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  17681. switch fieldNumber {
  17682. case 1: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt32Lowfield) }()
  17683. case 2: try { try decoder.decodeRepeatedInt32Field(value: &self.repeatedInt32Lowfield) }()
  17684. case 3: try { try decoder.decodeRepeatedInt32Field(value: &self.packedInt32Lowfield) }()
  17685. case 99: try { try decoder.decodeSingularInt32Field(value: &self._otherField) }()
  17686. case 1001: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt32Midfield) }()
  17687. case 1002: try { try decoder.decodeRepeatedInt32Field(value: &self.repeatedInt32Midfield) }()
  17688. case 1003: try { try decoder.decodeRepeatedInt32Field(value: &self.packedInt32Midfield) }()
  17689. case 1000001: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt32Hifield) }()
  17690. case 1000002: try { try decoder.decodeRepeatedInt32Field(value: &self.repeatedInt32Hifield) }()
  17691. case 1000003: try { try decoder.decodeRepeatedInt32Field(value: &self.packedInt32Hifield) }()
  17692. case 2000000..<536870912:
  17693. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_Int32ParseTester.self, fieldNumber: fieldNumber) }()
  17694. default: break
  17695. }
  17696. }
  17697. }
  17698. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  17699. // The use of inline closures is to circumvent an issue where the compiler
  17700. // allocates stack space for every if/case branch local when no optimizations
  17701. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  17702. // https://github.com/apple/swift-protobuf/issues/1182
  17703. try { if let v = self._optionalInt32Lowfield {
  17704. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  17705. } }()
  17706. if !self.repeatedInt32Lowfield.isEmpty {
  17707. try visitor.visitRepeatedInt32Field(value: self.repeatedInt32Lowfield, fieldNumber: 2)
  17708. }
  17709. if !self.packedInt32Lowfield.isEmpty {
  17710. try visitor.visitPackedInt32Field(value: self.packedInt32Lowfield, fieldNumber: 3)
  17711. }
  17712. try { if let v = self._otherField {
  17713. try visitor.visitSingularInt32Field(value: v, fieldNumber: 99)
  17714. } }()
  17715. try { if let v = self._optionalInt32Midfield {
  17716. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1001)
  17717. } }()
  17718. if !self.repeatedInt32Midfield.isEmpty {
  17719. try visitor.visitRepeatedInt32Field(value: self.repeatedInt32Midfield, fieldNumber: 1002)
  17720. }
  17721. if !self.packedInt32Midfield.isEmpty {
  17722. try visitor.visitPackedInt32Field(value: self.packedInt32Midfield, fieldNumber: 1003)
  17723. }
  17724. try { if let v = self._optionalInt32Hifield {
  17725. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1000001)
  17726. } }()
  17727. if !self.repeatedInt32Hifield.isEmpty {
  17728. try visitor.visitRepeatedInt32Field(value: self.repeatedInt32Hifield, fieldNumber: 1000002)
  17729. }
  17730. if !self.packedInt32Hifield.isEmpty {
  17731. try visitor.visitPackedInt32Field(value: self.packedInt32Hifield, fieldNumber: 1000003)
  17732. }
  17733. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2000000, end: 536870912)
  17734. try unknownFields.traverse(visitor: &visitor)
  17735. }
  17736. static func ==(lhs: Proto2Unittest_Int32ParseTester, rhs: Proto2Unittest_Int32ParseTester) -> Bool {
  17737. if lhs._optionalInt32Lowfield != rhs._optionalInt32Lowfield {return false}
  17738. if lhs._optionalInt32Midfield != rhs._optionalInt32Midfield {return false}
  17739. if lhs._optionalInt32Hifield != rhs._optionalInt32Hifield {return false}
  17740. if lhs.repeatedInt32Lowfield != rhs.repeatedInt32Lowfield {return false}
  17741. if lhs.repeatedInt32Midfield != rhs.repeatedInt32Midfield {return false}
  17742. if lhs.repeatedInt32Hifield != rhs.repeatedInt32Hifield {return false}
  17743. if lhs.packedInt32Lowfield != rhs.packedInt32Lowfield {return false}
  17744. if lhs.packedInt32Midfield != rhs.packedInt32Midfield {return false}
  17745. if lhs.packedInt32Hifield != rhs.packedInt32Hifield {return false}
  17746. if lhs._otherField != rhs._otherField {return false}
  17747. if lhs.unknownFields != rhs.unknownFields {return false}
  17748. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  17749. return true
  17750. }
  17751. }
  17752. extension Proto2Unittest_Int64ParseTester: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  17753. static let protoMessageName: String = _protobuf_package + ".Int64ParseTester"
  17754. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17755. 1: .standard(proto: "optional_int64_lowfield"),
  17756. 1001: .standard(proto: "optional_int64_midfield"),
  17757. 1000001: .standard(proto: "optional_int64_hifield"),
  17758. 2: .standard(proto: "repeated_int64_lowfield"),
  17759. 1002: .standard(proto: "repeated_int64_midfield"),
  17760. 1000002: .standard(proto: "repeated_int64_hifield"),
  17761. 3: .standard(proto: "packed_int64_lowfield"),
  17762. 1003: .standard(proto: "packed_int64_midfield"),
  17763. 1000003: .standard(proto: "packed_int64_hifield"),
  17764. 99: .standard(proto: "other_field"),
  17765. ]
  17766. public var isInitialized: Bool {
  17767. if !_protobuf_extensionFieldValues.isInitialized {return false}
  17768. return true
  17769. }
  17770. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  17771. while let fieldNumber = try decoder.nextFieldNumber() {
  17772. // The use of inline closures is to circumvent an issue where the compiler
  17773. // allocates stack space for every case branch when no optimizations are
  17774. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  17775. switch fieldNumber {
  17776. case 1: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt64Lowfield) }()
  17777. case 2: try { try decoder.decodeRepeatedInt64Field(value: &self.repeatedInt64Lowfield) }()
  17778. case 3: try { try decoder.decodeRepeatedInt64Field(value: &self.packedInt64Lowfield) }()
  17779. case 99: try { try decoder.decodeSingularInt32Field(value: &self._otherField) }()
  17780. case 1001: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt64Midfield) }()
  17781. case 1002: try { try decoder.decodeRepeatedInt64Field(value: &self.repeatedInt64Midfield) }()
  17782. case 1003: try { try decoder.decodeRepeatedInt64Field(value: &self.packedInt64Midfield) }()
  17783. case 1000001: try { try decoder.decodeSingularInt64Field(value: &self._optionalInt64Hifield) }()
  17784. case 1000002: try { try decoder.decodeRepeatedInt64Field(value: &self.repeatedInt64Hifield) }()
  17785. case 1000003: try { try decoder.decodeRepeatedInt64Field(value: &self.packedInt64Hifield) }()
  17786. case 2000000..<536870912:
  17787. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_Int64ParseTester.self, fieldNumber: fieldNumber) }()
  17788. default: break
  17789. }
  17790. }
  17791. }
  17792. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  17793. // The use of inline closures is to circumvent an issue where the compiler
  17794. // allocates stack space for every if/case branch local when no optimizations
  17795. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  17796. // https://github.com/apple/swift-protobuf/issues/1182
  17797. try { if let v = self._optionalInt64Lowfield {
  17798. try visitor.visitSingularInt64Field(value: v, fieldNumber: 1)
  17799. } }()
  17800. if !self.repeatedInt64Lowfield.isEmpty {
  17801. try visitor.visitRepeatedInt64Field(value: self.repeatedInt64Lowfield, fieldNumber: 2)
  17802. }
  17803. if !self.packedInt64Lowfield.isEmpty {
  17804. try visitor.visitPackedInt64Field(value: self.packedInt64Lowfield, fieldNumber: 3)
  17805. }
  17806. try { if let v = self._otherField {
  17807. try visitor.visitSingularInt32Field(value: v, fieldNumber: 99)
  17808. } }()
  17809. try { if let v = self._optionalInt64Midfield {
  17810. try visitor.visitSingularInt64Field(value: v, fieldNumber: 1001)
  17811. } }()
  17812. if !self.repeatedInt64Midfield.isEmpty {
  17813. try visitor.visitRepeatedInt64Field(value: self.repeatedInt64Midfield, fieldNumber: 1002)
  17814. }
  17815. if !self.packedInt64Midfield.isEmpty {
  17816. try visitor.visitPackedInt64Field(value: self.packedInt64Midfield, fieldNumber: 1003)
  17817. }
  17818. try { if let v = self._optionalInt64Hifield {
  17819. try visitor.visitSingularInt64Field(value: v, fieldNumber: 1000001)
  17820. } }()
  17821. if !self.repeatedInt64Hifield.isEmpty {
  17822. try visitor.visitRepeatedInt64Field(value: self.repeatedInt64Hifield, fieldNumber: 1000002)
  17823. }
  17824. if !self.packedInt64Hifield.isEmpty {
  17825. try visitor.visitPackedInt64Field(value: self.packedInt64Hifield, fieldNumber: 1000003)
  17826. }
  17827. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2000000, end: 536870912)
  17828. try unknownFields.traverse(visitor: &visitor)
  17829. }
  17830. static func ==(lhs: Proto2Unittest_Int64ParseTester, rhs: Proto2Unittest_Int64ParseTester) -> Bool {
  17831. if lhs._optionalInt64Lowfield != rhs._optionalInt64Lowfield {return false}
  17832. if lhs._optionalInt64Midfield != rhs._optionalInt64Midfield {return false}
  17833. if lhs._optionalInt64Hifield != rhs._optionalInt64Hifield {return false}
  17834. if lhs.repeatedInt64Lowfield != rhs.repeatedInt64Lowfield {return false}
  17835. if lhs.repeatedInt64Midfield != rhs.repeatedInt64Midfield {return false}
  17836. if lhs.repeatedInt64Hifield != rhs.repeatedInt64Hifield {return false}
  17837. if lhs.packedInt64Lowfield != rhs.packedInt64Lowfield {return false}
  17838. if lhs.packedInt64Midfield != rhs.packedInt64Midfield {return false}
  17839. if lhs.packedInt64Hifield != rhs.packedInt64Hifield {return false}
  17840. if lhs._otherField != rhs._otherField {return false}
  17841. if lhs.unknownFields != rhs.unknownFields {return false}
  17842. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  17843. return true
  17844. }
  17845. }
  17846. extension Proto2Unittest_InlinedStringIdxRegressionProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  17847. static let protoMessageName: String = _protobuf_package + ".InlinedStringIdxRegressionProto"
  17848. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17849. 1: .same(proto: "str1"),
  17850. 2: .same(proto: "sub"),
  17851. 3: .same(proto: "str2"),
  17852. 4: .same(proto: "str3"),
  17853. ]
  17854. fileprivate class _StorageClass {
  17855. var _str1: String? = nil
  17856. var _sub: Proto2Unittest_InlinedStringIdxRegressionProto? = nil
  17857. var _str2: String? = nil
  17858. var _str3: Data? = nil
  17859. // This property is used as the initial default value for new instances of the type.
  17860. // The type itself is protecting the reference to its storage via CoW semantics.
  17861. // This will force a copy to be made of this reference when the first mutation occurs;
  17862. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  17863. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  17864. private init() {}
  17865. init(copying source: _StorageClass) {
  17866. _str1 = source._str1
  17867. _sub = source._sub
  17868. _str2 = source._str2
  17869. _str3 = source._str3
  17870. }
  17871. }
  17872. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  17873. if !isKnownUniquelyReferenced(&_storage) {
  17874. _storage = _StorageClass(copying: _storage)
  17875. }
  17876. return _storage
  17877. }
  17878. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  17879. _ = _uniqueStorage()
  17880. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  17881. while let fieldNumber = try decoder.nextFieldNumber() {
  17882. // The use of inline closures is to circumvent an issue where the compiler
  17883. // allocates stack space for every case branch when no optimizations are
  17884. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  17885. switch fieldNumber {
  17886. case 1: try { try decoder.decodeSingularStringField(value: &_storage._str1) }()
  17887. case 2: try { try decoder.decodeSingularMessageField(value: &_storage._sub) }()
  17888. case 3: try { try decoder.decodeSingularStringField(value: &_storage._str2) }()
  17889. case 4: try { try decoder.decodeSingularBytesField(value: &_storage._str3) }()
  17890. default: break
  17891. }
  17892. }
  17893. }
  17894. }
  17895. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  17896. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  17897. // The use of inline closures is to circumvent an issue where the compiler
  17898. // allocates stack space for every if/case branch local when no optimizations
  17899. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  17900. // https://github.com/apple/swift-protobuf/issues/1182
  17901. try { if let v = _storage._str1 {
  17902. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  17903. } }()
  17904. try { if let v = _storage._sub {
  17905. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  17906. } }()
  17907. try { if let v = _storage._str2 {
  17908. try visitor.visitSingularStringField(value: v, fieldNumber: 3)
  17909. } }()
  17910. try { if let v = _storage._str3 {
  17911. try visitor.visitSingularBytesField(value: v, fieldNumber: 4)
  17912. } }()
  17913. }
  17914. try unknownFields.traverse(visitor: &visitor)
  17915. }
  17916. static func ==(lhs: Proto2Unittest_InlinedStringIdxRegressionProto, rhs: Proto2Unittest_InlinedStringIdxRegressionProto) -> Bool {
  17917. if lhs._storage !== rhs._storage {
  17918. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  17919. let _storage = _args.0
  17920. let rhs_storage = _args.1
  17921. if _storage._str1 != rhs_storage._str1 {return false}
  17922. if _storage._sub != rhs_storage._sub {return false}
  17923. if _storage._str2 != rhs_storage._str2 {return false}
  17924. if _storage._str3 != rhs_storage._str3 {return false}
  17925. return true
  17926. }
  17927. if !storagesAreEqual {return false}
  17928. }
  17929. if lhs.unknownFields != rhs.unknownFields {return false}
  17930. return true
  17931. }
  17932. }
  17933. extension Proto2Unittest_StringParseTester: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  17934. static let protoMessageName: String = _protobuf_package + ".StringParseTester"
  17935. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  17936. 1: .standard(proto: "optional_string_lowfield"),
  17937. 1001: .standard(proto: "optional_string_midfield"),
  17938. 1000001: .standard(proto: "optional_string_hifield"),
  17939. 2: .standard(proto: "repeated_string_lowfield"),
  17940. 1002: .standard(proto: "repeated_string_midfield"),
  17941. 1000002: .standard(proto: "repeated_string_hifield"),
  17942. ]
  17943. public var isInitialized: Bool {
  17944. if !_protobuf_extensionFieldValues.isInitialized {return false}
  17945. return true
  17946. }
  17947. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  17948. while let fieldNumber = try decoder.nextFieldNumber() {
  17949. // The use of inline closures is to circumvent an issue where the compiler
  17950. // allocates stack space for every case branch when no optimizations are
  17951. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  17952. switch fieldNumber {
  17953. case 1: try { try decoder.decodeSingularStringField(value: &self._optionalStringLowfield) }()
  17954. case 2: try { try decoder.decodeRepeatedStringField(value: &self.repeatedStringLowfield) }()
  17955. case 1001: try { try decoder.decodeSingularStringField(value: &self._optionalStringMidfield) }()
  17956. case 1002: try { try decoder.decodeRepeatedStringField(value: &self.repeatedStringMidfield) }()
  17957. case 1000001: try { try decoder.decodeSingularStringField(value: &self._optionalStringHifield) }()
  17958. case 1000002: try { try decoder.decodeRepeatedStringField(value: &self.repeatedStringHifield) }()
  17959. case 2000000..<536870912:
  17960. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_StringParseTester.self, fieldNumber: fieldNumber) }()
  17961. default: break
  17962. }
  17963. }
  17964. }
  17965. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  17966. // The use of inline closures is to circumvent an issue where the compiler
  17967. // allocates stack space for every if/case branch local when no optimizations
  17968. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  17969. // https://github.com/apple/swift-protobuf/issues/1182
  17970. try { if let v = self._optionalStringLowfield {
  17971. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  17972. } }()
  17973. if !self.repeatedStringLowfield.isEmpty {
  17974. try visitor.visitRepeatedStringField(value: self.repeatedStringLowfield, fieldNumber: 2)
  17975. }
  17976. try { if let v = self._optionalStringMidfield {
  17977. try visitor.visitSingularStringField(value: v, fieldNumber: 1001)
  17978. } }()
  17979. if !self.repeatedStringMidfield.isEmpty {
  17980. try visitor.visitRepeatedStringField(value: self.repeatedStringMidfield, fieldNumber: 1002)
  17981. }
  17982. try { if let v = self._optionalStringHifield {
  17983. try visitor.visitSingularStringField(value: v, fieldNumber: 1000001)
  17984. } }()
  17985. if !self.repeatedStringHifield.isEmpty {
  17986. try visitor.visitRepeatedStringField(value: self.repeatedStringHifield, fieldNumber: 1000002)
  17987. }
  17988. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2000000, end: 536870912)
  17989. try unknownFields.traverse(visitor: &visitor)
  17990. }
  17991. static func ==(lhs: Proto2Unittest_StringParseTester, rhs: Proto2Unittest_StringParseTester) -> Bool {
  17992. if lhs._optionalStringLowfield != rhs._optionalStringLowfield {return false}
  17993. if lhs._optionalStringMidfield != rhs._optionalStringMidfield {return false}
  17994. if lhs._optionalStringHifield != rhs._optionalStringHifield {return false}
  17995. if lhs.repeatedStringLowfield != rhs.repeatedStringLowfield {return false}
  17996. if lhs.repeatedStringMidfield != rhs.repeatedStringMidfield {return false}
  17997. if lhs.repeatedStringHifield != rhs.repeatedStringHifield {return false}
  17998. if lhs.unknownFields != rhs.unknownFields {return false}
  17999. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  18000. return true
  18001. }
  18002. }
  18003. extension Proto2Unittest_BadFieldNames: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18004. static let protoMessageName: String = _protobuf_package + ".BadFieldNames"
  18005. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18006. 1: .same(proto: "OptionalInt32"),
  18007. 2: .same(proto: "for"),
  18008. ]
  18009. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18010. while let fieldNumber = try decoder.nextFieldNumber() {
  18011. // The use of inline closures is to circumvent an issue where the compiler
  18012. // allocates stack space for every case branch when no optimizations are
  18013. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18014. switch fieldNumber {
  18015. case 1: try { try decoder.decodeSingularInt32Field(value: &self._optionalInt32) }()
  18016. case 2: try { try decoder.decodeSingularInt32Field(value: &self._for) }()
  18017. default: break
  18018. }
  18019. }
  18020. }
  18021. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18022. // The use of inline closures is to circumvent an issue where the compiler
  18023. // allocates stack space for every if/case branch local when no optimizations
  18024. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18025. // https://github.com/apple/swift-protobuf/issues/1182
  18026. try { if let v = self._optionalInt32 {
  18027. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  18028. } }()
  18029. try { if let v = self._for {
  18030. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  18031. } }()
  18032. try unknownFields.traverse(visitor: &visitor)
  18033. }
  18034. static func ==(lhs: Proto2Unittest_BadFieldNames, rhs: Proto2Unittest_BadFieldNames) -> Bool {
  18035. if lhs._optionalInt32 != rhs._optionalInt32 {return false}
  18036. if lhs._for != rhs._for {return false}
  18037. if lhs.unknownFields != rhs.unknownFields {return false}
  18038. return true
  18039. }
  18040. }
  18041. extension Proto2Unittest_TestNestedMessageRedaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18042. static let protoMessageName: String = _protobuf_package + ".TestNestedMessageRedaction"
  18043. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18044. 1: .standard(proto: "optional_unredacted_nested_string"),
  18045. 2: .standard(proto: "optional_redacted_nested_string"),
  18046. ]
  18047. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18048. while let fieldNumber = try decoder.nextFieldNumber() {
  18049. // The use of inline closures is to circumvent an issue where the compiler
  18050. // allocates stack space for every case branch when no optimizations are
  18051. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18052. switch fieldNumber {
  18053. case 1: try { try decoder.decodeSingularStringField(value: &self._optionalUnredactedNestedString) }()
  18054. case 2: try { try decoder.decodeSingularStringField(value: &self._optionalRedactedNestedString) }()
  18055. default: break
  18056. }
  18057. }
  18058. }
  18059. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18060. // The use of inline closures is to circumvent an issue where the compiler
  18061. // allocates stack space for every if/case branch local when no optimizations
  18062. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18063. // https://github.com/apple/swift-protobuf/issues/1182
  18064. try { if let v = self._optionalUnredactedNestedString {
  18065. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  18066. } }()
  18067. try { if let v = self._optionalRedactedNestedString {
  18068. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  18069. } }()
  18070. try unknownFields.traverse(visitor: &visitor)
  18071. }
  18072. static func ==(lhs: Proto2Unittest_TestNestedMessageRedaction, rhs: Proto2Unittest_TestNestedMessageRedaction) -> Bool {
  18073. if lhs._optionalUnredactedNestedString != rhs._optionalUnredactedNestedString {return false}
  18074. if lhs._optionalRedactedNestedString != rhs._optionalRedactedNestedString {return false}
  18075. if lhs.unknownFields != rhs.unknownFields {return false}
  18076. return true
  18077. }
  18078. }
  18079. extension Proto2Unittest_RedactedFields: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18080. static let protoMessageName: String = _protobuf_package + ".RedactedFields"
  18081. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18082. 1: .standard(proto: "optional_redacted_string"),
  18083. 2: .standard(proto: "optional_unredacted_string"),
  18084. 3: .standard(proto: "repeated_redacted_string"),
  18085. 4: .standard(proto: "repeated_unredacted_string"),
  18086. 5: .standard(proto: "optional_redacted_message"),
  18087. 6: .standard(proto: "optional_unredacted_message"),
  18088. 7: .standard(proto: "repeated_redacted_message"),
  18089. 8: .standard(proto: "repeated_unredacted_message"),
  18090. 9: .standard(proto: "map_redacted_string"),
  18091. 10: .standard(proto: "map_unredacted_string"),
  18092. 11: .standard(proto: "optional_redacted_false_string"),
  18093. ]
  18094. public var isInitialized: Bool {
  18095. if !_protobuf_extensionFieldValues.isInitialized {return false}
  18096. return true
  18097. }
  18098. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18099. while let fieldNumber = try decoder.nextFieldNumber() {
  18100. // The use of inline closures is to circumvent an issue where the compiler
  18101. // allocates stack space for every case branch when no optimizations are
  18102. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18103. switch fieldNumber {
  18104. case 1: try { try decoder.decodeSingularStringField(value: &self._optionalRedactedString) }()
  18105. case 2: try { try decoder.decodeSingularStringField(value: &self._optionalUnredactedString) }()
  18106. case 3: try { try decoder.decodeRepeatedStringField(value: &self.repeatedRedactedString) }()
  18107. case 4: try { try decoder.decodeRepeatedStringField(value: &self.repeatedUnredactedString) }()
  18108. case 5: try { try decoder.decodeSingularMessageField(value: &self._optionalRedactedMessage) }()
  18109. case 6: try { try decoder.decodeSingularMessageField(value: &self._optionalUnredactedMessage) }()
  18110. case 7: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedRedactedMessage) }()
  18111. case 8: try { try decoder.decodeRepeatedMessageField(value: &self.repeatedUnredactedMessage) }()
  18112. case 9: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &self.mapRedactedString) }()
  18113. case 10: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &self.mapUnredactedString) }()
  18114. case 11: try { try decoder.decodeSingularStringField(value: &self._optionalRedactedFalseString) }()
  18115. case 20..<31:
  18116. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Proto2Unittest_RedactedFields.self, fieldNumber: fieldNumber) }()
  18117. default: break
  18118. }
  18119. }
  18120. }
  18121. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18122. // The use of inline closures is to circumvent an issue where the compiler
  18123. // allocates stack space for every if/case branch local when no optimizations
  18124. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18125. // https://github.com/apple/swift-protobuf/issues/1182
  18126. try { if let v = self._optionalRedactedString {
  18127. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  18128. } }()
  18129. try { if let v = self._optionalUnredactedString {
  18130. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  18131. } }()
  18132. if !self.repeatedRedactedString.isEmpty {
  18133. try visitor.visitRepeatedStringField(value: self.repeatedRedactedString, fieldNumber: 3)
  18134. }
  18135. if !self.repeatedUnredactedString.isEmpty {
  18136. try visitor.visitRepeatedStringField(value: self.repeatedUnredactedString, fieldNumber: 4)
  18137. }
  18138. try { if let v = self._optionalRedactedMessage {
  18139. try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
  18140. } }()
  18141. try { if let v = self._optionalUnredactedMessage {
  18142. try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
  18143. } }()
  18144. if !self.repeatedRedactedMessage.isEmpty {
  18145. try visitor.visitRepeatedMessageField(value: self.repeatedRedactedMessage, fieldNumber: 7)
  18146. }
  18147. if !self.repeatedUnredactedMessage.isEmpty {
  18148. try visitor.visitRepeatedMessageField(value: self.repeatedUnredactedMessage, fieldNumber: 8)
  18149. }
  18150. if !self.mapRedactedString.isEmpty {
  18151. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: self.mapRedactedString, fieldNumber: 9)
  18152. }
  18153. if !self.mapUnredactedString.isEmpty {
  18154. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: self.mapUnredactedString, fieldNumber: 10)
  18155. }
  18156. try { if let v = self._optionalRedactedFalseString {
  18157. try visitor.visitSingularStringField(value: v, fieldNumber: 11)
  18158. } }()
  18159. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 20, end: 31)
  18160. try unknownFields.traverse(visitor: &visitor)
  18161. }
  18162. static func ==(lhs: Proto2Unittest_RedactedFields, rhs: Proto2Unittest_RedactedFields) -> Bool {
  18163. if lhs._optionalRedactedString != rhs._optionalRedactedString {return false}
  18164. if lhs._optionalUnredactedString != rhs._optionalUnredactedString {return false}
  18165. if lhs.repeatedRedactedString != rhs.repeatedRedactedString {return false}
  18166. if lhs.repeatedUnredactedString != rhs.repeatedUnredactedString {return false}
  18167. if lhs._optionalRedactedMessage != rhs._optionalRedactedMessage {return false}
  18168. if lhs._optionalUnredactedMessage != rhs._optionalUnredactedMessage {return false}
  18169. if lhs.repeatedRedactedMessage != rhs.repeatedRedactedMessage {return false}
  18170. if lhs.repeatedUnredactedMessage != rhs.repeatedUnredactedMessage {return false}
  18171. if lhs.mapRedactedString != rhs.mapRedactedString {return false}
  18172. if lhs.mapUnredactedString != rhs.mapUnredactedString {return false}
  18173. if lhs._optionalRedactedFalseString != rhs._optionalRedactedFalseString {return false}
  18174. if lhs.unknownFields != rhs.unknownFields {return false}
  18175. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  18176. return true
  18177. }
  18178. }
  18179. extension Proto2Unittest_TestString: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18180. static let protoMessageName: String = _protobuf_package + ".TestString"
  18181. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18182. 1: .standard(proto: "optional_string"),
  18183. ]
  18184. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18185. while let fieldNumber = try decoder.nextFieldNumber() {
  18186. // The use of inline closures is to circumvent an issue where the compiler
  18187. // allocates stack space for every case branch when no optimizations are
  18188. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18189. switch fieldNumber {
  18190. case 1: try { try decoder.decodeSingularStringField(value: &self._optionalString) }()
  18191. default: break
  18192. }
  18193. }
  18194. }
  18195. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18196. // The use of inline closures is to circumvent an issue where the compiler
  18197. // allocates stack space for every if/case branch local when no optimizations
  18198. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18199. // https://github.com/apple/swift-protobuf/issues/1182
  18200. try { if let v = self._optionalString {
  18201. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  18202. } }()
  18203. try unknownFields.traverse(visitor: &visitor)
  18204. }
  18205. static func ==(lhs: Proto2Unittest_TestString, rhs: Proto2Unittest_TestString) -> Bool {
  18206. if lhs._optionalString != rhs._optionalString {return false}
  18207. if lhs.unknownFields != rhs.unknownFields {return false}
  18208. return true
  18209. }
  18210. }
  18211. extension Proto2Unittest_TestCord: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18212. static let protoMessageName: String = _protobuf_package + ".TestCord"
  18213. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18214. 1: .standard(proto: "optional_bytes_cord"),
  18215. 2: .standard(proto: "optional_bytes_cord_default"),
  18216. ]
  18217. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18218. while let fieldNumber = try decoder.nextFieldNumber() {
  18219. // The use of inline closures is to circumvent an issue where the compiler
  18220. // allocates stack space for every case branch when no optimizations are
  18221. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18222. switch fieldNumber {
  18223. case 1: try { try decoder.decodeSingularBytesField(value: &self._optionalBytesCord) }()
  18224. case 2: try { try decoder.decodeSingularBytesField(value: &self._optionalBytesCordDefault) }()
  18225. default: break
  18226. }
  18227. }
  18228. }
  18229. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18230. // The use of inline closures is to circumvent an issue where the compiler
  18231. // allocates stack space for every if/case branch local when no optimizations
  18232. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18233. // https://github.com/apple/swift-protobuf/issues/1182
  18234. try { if let v = self._optionalBytesCord {
  18235. try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
  18236. } }()
  18237. try { if let v = self._optionalBytesCordDefault {
  18238. try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
  18239. } }()
  18240. try unknownFields.traverse(visitor: &visitor)
  18241. }
  18242. static func ==(lhs: Proto2Unittest_TestCord, rhs: Proto2Unittest_TestCord) -> Bool {
  18243. if lhs._optionalBytesCord != rhs._optionalBytesCord {return false}
  18244. if lhs._optionalBytesCordDefault != rhs._optionalBytesCordDefault {return false}
  18245. if lhs.unknownFields != rhs.unknownFields {return false}
  18246. return true
  18247. }
  18248. }
  18249. extension Proto2Unittest_TestPackedEnumSmallRange: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18250. static let protoMessageName: String = _protobuf_package + ".TestPackedEnumSmallRange"
  18251. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18252. 1: .same(proto: "vals"),
  18253. ]
  18254. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18255. while let fieldNumber = try decoder.nextFieldNumber() {
  18256. // The use of inline closures is to circumvent an issue where the compiler
  18257. // allocates stack space for every case branch when no optimizations are
  18258. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18259. switch fieldNumber {
  18260. case 1: try { try decoder.decodeRepeatedEnumField(value: &self.vals) }()
  18261. default: break
  18262. }
  18263. }
  18264. }
  18265. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18266. if !self.vals.isEmpty {
  18267. try visitor.visitPackedEnumField(value: self.vals, fieldNumber: 1)
  18268. }
  18269. try unknownFields.traverse(visitor: &visitor)
  18270. }
  18271. static func ==(lhs: Proto2Unittest_TestPackedEnumSmallRange, rhs: Proto2Unittest_TestPackedEnumSmallRange) -> Bool {
  18272. if lhs.vals != rhs.vals {return false}
  18273. if lhs.unknownFields != rhs.unknownFields {return false}
  18274. return true
  18275. }
  18276. }
  18277. extension Proto2Unittest_TestPackedEnumSmallRange.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  18278. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18279. 0: .same(proto: "UNSPECIFIED"),
  18280. 1: .same(proto: "FOO"),
  18281. 2: .same(proto: "BAR"),
  18282. 3: .same(proto: "BAZ"),
  18283. ]
  18284. }
  18285. extension Proto2Unittest_EnumsForBenchmark: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18286. static let protoMessageName: String = _protobuf_package + ".EnumsForBenchmark"
  18287. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  18288. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18289. // Load everything into unknown fields
  18290. while try decoder.nextFieldNumber() != nil {}
  18291. }
  18292. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18293. try unknownFields.traverse(visitor: &visitor)
  18294. }
  18295. static func ==(lhs: Proto2Unittest_EnumsForBenchmark, rhs: Proto2Unittest_EnumsForBenchmark) -> Bool {
  18296. if lhs.unknownFields != rhs.unknownFields {return false}
  18297. return true
  18298. }
  18299. }
  18300. extension Proto2Unittest_EnumsForBenchmark.Flat: SwiftProtobuf._ProtoNameProviding {
  18301. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18302. 0: .same(proto: "A0"),
  18303. 1: .same(proto: "A1"),
  18304. 2: .same(proto: "A2"),
  18305. 3: .same(proto: "A3"),
  18306. 4: .same(proto: "A4"),
  18307. 5: .same(proto: "A5"),
  18308. 6: .same(proto: "A6"),
  18309. 7: .same(proto: "A7"),
  18310. 8: .same(proto: "A8"),
  18311. 9: .same(proto: "A9"),
  18312. 10: .same(proto: "A10"),
  18313. 11: .same(proto: "A11"),
  18314. 12: .same(proto: "A12"),
  18315. 13: .same(proto: "A13"),
  18316. 14: .same(proto: "A14"),
  18317. 15: .same(proto: "A15"),
  18318. ]
  18319. }
  18320. extension Proto2Unittest_EnumsForBenchmark.AlmostFlat: SwiftProtobuf._ProtoNameProviding {
  18321. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18322. 0: .same(proto: "B0"),
  18323. 1: .same(proto: "B1"),
  18324. 2: .same(proto: "B2"),
  18325. 3: .same(proto: "B3"),
  18326. 5: .same(proto: "B5"),
  18327. 6: .same(proto: "B6"),
  18328. 7: .same(proto: "B7"),
  18329. 8: .same(proto: "B8"),
  18330. 9: .same(proto: "B9"),
  18331. 11: .same(proto: "B11"),
  18332. 12: .same(proto: "B12"),
  18333. 13: .same(proto: "B13"),
  18334. 14: .same(proto: "B14"),
  18335. 15: .same(proto: "B15"),
  18336. 17: .same(proto: "B17"),
  18337. 19: .same(proto: "B19"),
  18338. ]
  18339. }
  18340. extension Proto2Unittest_EnumsForBenchmark.Sparse: SwiftProtobuf._ProtoNameProviding {
  18341. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18342. 536: .same(proto: "C536"),
  18343. 8387: .same(proto: "C8387"),
  18344. 9673: .same(proto: "C9673"),
  18345. 10285: .same(proto: "C10285"),
  18346. 13318: .same(proto: "C13318"),
  18347. 15963: .same(proto: "C15963"),
  18348. 16439: .same(proto: "C16439"),
  18349. 18197: .same(proto: "C18197"),
  18350. 19430: .same(proto: "C19430"),
  18351. 20361: .same(proto: "C20361"),
  18352. 20706: .same(proto: "C20706"),
  18353. 21050: .same(proto: "C21050"),
  18354. 21906: .same(proto: "C21906"),
  18355. 27265: .same(proto: "C27265"),
  18356. 30109: .same(proto: "C30109"),
  18357. 31670: .same(proto: "C31670"),
  18358. ]
  18359. }
  18360. extension Proto2Unittest_TestMessageWithManyRepeatedPtrFields: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18361. static let protoMessageName: String = _protobuf_package + ".TestMessageWithManyRepeatedPtrFields"
  18362. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18363. 1: .standard(proto: "repeated_string_1"),
  18364. 2: .standard(proto: "repeated_string_2"),
  18365. 3: .standard(proto: "repeated_string_3"),
  18366. 4: .standard(proto: "repeated_string_4"),
  18367. 5: .standard(proto: "repeated_string_5"),
  18368. 6: .standard(proto: "repeated_string_6"),
  18369. 7: .standard(proto: "repeated_string_7"),
  18370. 8: .standard(proto: "repeated_string_8"),
  18371. 9: .standard(proto: "repeated_string_9"),
  18372. 10: .standard(proto: "repeated_string_10"),
  18373. 11: .standard(proto: "repeated_string_11"),
  18374. 12: .standard(proto: "repeated_string_12"),
  18375. 13: .standard(proto: "repeated_string_13"),
  18376. 14: .standard(proto: "repeated_string_14"),
  18377. 15: .standard(proto: "repeated_string_15"),
  18378. 16: .standard(proto: "repeated_string_16"),
  18379. 17: .standard(proto: "repeated_string_17"),
  18380. 18: .standard(proto: "repeated_string_18"),
  18381. 19: .standard(proto: "repeated_string_19"),
  18382. 20: .standard(proto: "repeated_string_20"),
  18383. 21: .standard(proto: "repeated_string_21"),
  18384. 22: .standard(proto: "repeated_string_22"),
  18385. 23: .standard(proto: "repeated_string_23"),
  18386. 24: .standard(proto: "repeated_string_24"),
  18387. 25: .standard(proto: "repeated_string_25"),
  18388. 26: .standard(proto: "repeated_string_26"),
  18389. 27: .standard(proto: "repeated_string_27"),
  18390. 28: .standard(proto: "repeated_string_28"),
  18391. 29: .standard(proto: "repeated_string_29"),
  18392. 30: .standard(proto: "repeated_string_30"),
  18393. 31: .standard(proto: "repeated_string_31"),
  18394. 32: .standard(proto: "repeated_string_32"),
  18395. ]
  18396. fileprivate class _StorageClass {
  18397. var _repeatedString1: [String] = []
  18398. var _repeatedString2: [String] = []
  18399. var _repeatedString3: [String] = []
  18400. var _repeatedString4: [String] = []
  18401. var _repeatedString5: [String] = []
  18402. var _repeatedString6: [String] = []
  18403. var _repeatedString7: [String] = []
  18404. var _repeatedString8: [String] = []
  18405. var _repeatedString9: [String] = []
  18406. var _repeatedString10: [String] = []
  18407. var _repeatedString11: [String] = []
  18408. var _repeatedString12: [String] = []
  18409. var _repeatedString13: [String] = []
  18410. var _repeatedString14: [String] = []
  18411. var _repeatedString15: [String] = []
  18412. var _repeatedString16: [String] = []
  18413. var _repeatedString17: [String] = []
  18414. var _repeatedString18: [String] = []
  18415. var _repeatedString19: [String] = []
  18416. var _repeatedString20: [String] = []
  18417. var _repeatedString21: [String] = []
  18418. var _repeatedString22: [String] = []
  18419. var _repeatedString23: [String] = []
  18420. var _repeatedString24: [String] = []
  18421. var _repeatedString25: [String] = []
  18422. var _repeatedString26: [String] = []
  18423. var _repeatedString27: [String] = []
  18424. var _repeatedString28: [String] = []
  18425. var _repeatedString29: [String] = []
  18426. var _repeatedString30: [String] = []
  18427. var _repeatedString31: [String] = []
  18428. var _repeatedString32: [String] = []
  18429. // This property is used as the initial default value for new instances of the type.
  18430. // The type itself is protecting the reference to its storage via CoW semantics.
  18431. // This will force a copy to be made of this reference when the first mutation occurs;
  18432. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  18433. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  18434. private init() {}
  18435. init(copying source: _StorageClass) {
  18436. _repeatedString1 = source._repeatedString1
  18437. _repeatedString2 = source._repeatedString2
  18438. _repeatedString3 = source._repeatedString3
  18439. _repeatedString4 = source._repeatedString4
  18440. _repeatedString5 = source._repeatedString5
  18441. _repeatedString6 = source._repeatedString6
  18442. _repeatedString7 = source._repeatedString7
  18443. _repeatedString8 = source._repeatedString8
  18444. _repeatedString9 = source._repeatedString9
  18445. _repeatedString10 = source._repeatedString10
  18446. _repeatedString11 = source._repeatedString11
  18447. _repeatedString12 = source._repeatedString12
  18448. _repeatedString13 = source._repeatedString13
  18449. _repeatedString14 = source._repeatedString14
  18450. _repeatedString15 = source._repeatedString15
  18451. _repeatedString16 = source._repeatedString16
  18452. _repeatedString17 = source._repeatedString17
  18453. _repeatedString18 = source._repeatedString18
  18454. _repeatedString19 = source._repeatedString19
  18455. _repeatedString20 = source._repeatedString20
  18456. _repeatedString21 = source._repeatedString21
  18457. _repeatedString22 = source._repeatedString22
  18458. _repeatedString23 = source._repeatedString23
  18459. _repeatedString24 = source._repeatedString24
  18460. _repeatedString25 = source._repeatedString25
  18461. _repeatedString26 = source._repeatedString26
  18462. _repeatedString27 = source._repeatedString27
  18463. _repeatedString28 = source._repeatedString28
  18464. _repeatedString29 = source._repeatedString29
  18465. _repeatedString30 = source._repeatedString30
  18466. _repeatedString31 = source._repeatedString31
  18467. _repeatedString32 = source._repeatedString32
  18468. }
  18469. }
  18470. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  18471. if !isKnownUniquelyReferenced(&_storage) {
  18472. _storage = _StorageClass(copying: _storage)
  18473. }
  18474. return _storage
  18475. }
  18476. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18477. _ = _uniqueStorage()
  18478. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  18479. while let fieldNumber = try decoder.nextFieldNumber() {
  18480. // The use of inline closures is to circumvent an issue where the compiler
  18481. // allocates stack space for every case branch when no optimizations are
  18482. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18483. switch fieldNumber {
  18484. case 1: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString1) }()
  18485. case 2: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString2) }()
  18486. case 3: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString3) }()
  18487. case 4: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString4) }()
  18488. case 5: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString5) }()
  18489. case 6: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString6) }()
  18490. case 7: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString7) }()
  18491. case 8: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString8) }()
  18492. case 9: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString9) }()
  18493. case 10: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString10) }()
  18494. case 11: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString11) }()
  18495. case 12: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString12) }()
  18496. case 13: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString13) }()
  18497. case 14: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString14) }()
  18498. case 15: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString15) }()
  18499. case 16: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString16) }()
  18500. case 17: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString17) }()
  18501. case 18: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString18) }()
  18502. case 19: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString19) }()
  18503. case 20: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString20) }()
  18504. case 21: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString21) }()
  18505. case 22: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString22) }()
  18506. case 23: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString23) }()
  18507. case 24: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString24) }()
  18508. case 25: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString25) }()
  18509. case 26: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString26) }()
  18510. case 27: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString27) }()
  18511. case 28: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString28) }()
  18512. case 29: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString29) }()
  18513. case 30: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString30) }()
  18514. case 31: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString31) }()
  18515. case 32: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString32) }()
  18516. default: break
  18517. }
  18518. }
  18519. }
  18520. }
  18521. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18522. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  18523. if !_storage._repeatedString1.isEmpty {
  18524. try visitor.visitRepeatedStringField(value: _storage._repeatedString1, fieldNumber: 1)
  18525. }
  18526. if !_storage._repeatedString2.isEmpty {
  18527. try visitor.visitRepeatedStringField(value: _storage._repeatedString2, fieldNumber: 2)
  18528. }
  18529. if !_storage._repeatedString3.isEmpty {
  18530. try visitor.visitRepeatedStringField(value: _storage._repeatedString3, fieldNumber: 3)
  18531. }
  18532. if !_storage._repeatedString4.isEmpty {
  18533. try visitor.visitRepeatedStringField(value: _storage._repeatedString4, fieldNumber: 4)
  18534. }
  18535. if !_storage._repeatedString5.isEmpty {
  18536. try visitor.visitRepeatedStringField(value: _storage._repeatedString5, fieldNumber: 5)
  18537. }
  18538. if !_storage._repeatedString6.isEmpty {
  18539. try visitor.visitRepeatedStringField(value: _storage._repeatedString6, fieldNumber: 6)
  18540. }
  18541. if !_storage._repeatedString7.isEmpty {
  18542. try visitor.visitRepeatedStringField(value: _storage._repeatedString7, fieldNumber: 7)
  18543. }
  18544. if !_storage._repeatedString8.isEmpty {
  18545. try visitor.visitRepeatedStringField(value: _storage._repeatedString8, fieldNumber: 8)
  18546. }
  18547. if !_storage._repeatedString9.isEmpty {
  18548. try visitor.visitRepeatedStringField(value: _storage._repeatedString9, fieldNumber: 9)
  18549. }
  18550. if !_storage._repeatedString10.isEmpty {
  18551. try visitor.visitRepeatedStringField(value: _storage._repeatedString10, fieldNumber: 10)
  18552. }
  18553. if !_storage._repeatedString11.isEmpty {
  18554. try visitor.visitRepeatedStringField(value: _storage._repeatedString11, fieldNumber: 11)
  18555. }
  18556. if !_storage._repeatedString12.isEmpty {
  18557. try visitor.visitRepeatedStringField(value: _storage._repeatedString12, fieldNumber: 12)
  18558. }
  18559. if !_storage._repeatedString13.isEmpty {
  18560. try visitor.visitRepeatedStringField(value: _storage._repeatedString13, fieldNumber: 13)
  18561. }
  18562. if !_storage._repeatedString14.isEmpty {
  18563. try visitor.visitRepeatedStringField(value: _storage._repeatedString14, fieldNumber: 14)
  18564. }
  18565. if !_storage._repeatedString15.isEmpty {
  18566. try visitor.visitRepeatedStringField(value: _storage._repeatedString15, fieldNumber: 15)
  18567. }
  18568. if !_storage._repeatedString16.isEmpty {
  18569. try visitor.visitRepeatedStringField(value: _storage._repeatedString16, fieldNumber: 16)
  18570. }
  18571. if !_storage._repeatedString17.isEmpty {
  18572. try visitor.visitRepeatedStringField(value: _storage._repeatedString17, fieldNumber: 17)
  18573. }
  18574. if !_storage._repeatedString18.isEmpty {
  18575. try visitor.visitRepeatedStringField(value: _storage._repeatedString18, fieldNumber: 18)
  18576. }
  18577. if !_storage._repeatedString19.isEmpty {
  18578. try visitor.visitRepeatedStringField(value: _storage._repeatedString19, fieldNumber: 19)
  18579. }
  18580. if !_storage._repeatedString20.isEmpty {
  18581. try visitor.visitRepeatedStringField(value: _storage._repeatedString20, fieldNumber: 20)
  18582. }
  18583. if !_storage._repeatedString21.isEmpty {
  18584. try visitor.visitRepeatedStringField(value: _storage._repeatedString21, fieldNumber: 21)
  18585. }
  18586. if !_storage._repeatedString22.isEmpty {
  18587. try visitor.visitRepeatedStringField(value: _storage._repeatedString22, fieldNumber: 22)
  18588. }
  18589. if !_storage._repeatedString23.isEmpty {
  18590. try visitor.visitRepeatedStringField(value: _storage._repeatedString23, fieldNumber: 23)
  18591. }
  18592. if !_storage._repeatedString24.isEmpty {
  18593. try visitor.visitRepeatedStringField(value: _storage._repeatedString24, fieldNumber: 24)
  18594. }
  18595. if !_storage._repeatedString25.isEmpty {
  18596. try visitor.visitRepeatedStringField(value: _storage._repeatedString25, fieldNumber: 25)
  18597. }
  18598. if !_storage._repeatedString26.isEmpty {
  18599. try visitor.visitRepeatedStringField(value: _storage._repeatedString26, fieldNumber: 26)
  18600. }
  18601. if !_storage._repeatedString27.isEmpty {
  18602. try visitor.visitRepeatedStringField(value: _storage._repeatedString27, fieldNumber: 27)
  18603. }
  18604. if !_storage._repeatedString28.isEmpty {
  18605. try visitor.visitRepeatedStringField(value: _storage._repeatedString28, fieldNumber: 28)
  18606. }
  18607. if !_storage._repeatedString29.isEmpty {
  18608. try visitor.visitRepeatedStringField(value: _storage._repeatedString29, fieldNumber: 29)
  18609. }
  18610. if !_storage._repeatedString30.isEmpty {
  18611. try visitor.visitRepeatedStringField(value: _storage._repeatedString30, fieldNumber: 30)
  18612. }
  18613. if !_storage._repeatedString31.isEmpty {
  18614. try visitor.visitRepeatedStringField(value: _storage._repeatedString31, fieldNumber: 31)
  18615. }
  18616. if !_storage._repeatedString32.isEmpty {
  18617. try visitor.visitRepeatedStringField(value: _storage._repeatedString32, fieldNumber: 32)
  18618. }
  18619. }
  18620. try unknownFields.traverse(visitor: &visitor)
  18621. }
  18622. static func ==(lhs: Proto2Unittest_TestMessageWithManyRepeatedPtrFields, rhs: Proto2Unittest_TestMessageWithManyRepeatedPtrFields) -> Bool {
  18623. if lhs._storage !== rhs._storage {
  18624. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  18625. let _storage = _args.0
  18626. let rhs_storage = _args.1
  18627. if _storage._repeatedString1 != rhs_storage._repeatedString1 {return false}
  18628. if _storage._repeatedString2 != rhs_storage._repeatedString2 {return false}
  18629. if _storage._repeatedString3 != rhs_storage._repeatedString3 {return false}
  18630. if _storage._repeatedString4 != rhs_storage._repeatedString4 {return false}
  18631. if _storage._repeatedString5 != rhs_storage._repeatedString5 {return false}
  18632. if _storage._repeatedString6 != rhs_storage._repeatedString6 {return false}
  18633. if _storage._repeatedString7 != rhs_storage._repeatedString7 {return false}
  18634. if _storage._repeatedString8 != rhs_storage._repeatedString8 {return false}
  18635. if _storage._repeatedString9 != rhs_storage._repeatedString9 {return false}
  18636. if _storage._repeatedString10 != rhs_storage._repeatedString10 {return false}
  18637. if _storage._repeatedString11 != rhs_storage._repeatedString11 {return false}
  18638. if _storage._repeatedString12 != rhs_storage._repeatedString12 {return false}
  18639. if _storage._repeatedString13 != rhs_storage._repeatedString13 {return false}
  18640. if _storage._repeatedString14 != rhs_storage._repeatedString14 {return false}
  18641. if _storage._repeatedString15 != rhs_storage._repeatedString15 {return false}
  18642. if _storage._repeatedString16 != rhs_storage._repeatedString16 {return false}
  18643. if _storage._repeatedString17 != rhs_storage._repeatedString17 {return false}
  18644. if _storage._repeatedString18 != rhs_storage._repeatedString18 {return false}
  18645. if _storage._repeatedString19 != rhs_storage._repeatedString19 {return false}
  18646. if _storage._repeatedString20 != rhs_storage._repeatedString20 {return false}
  18647. if _storage._repeatedString21 != rhs_storage._repeatedString21 {return false}
  18648. if _storage._repeatedString22 != rhs_storage._repeatedString22 {return false}
  18649. if _storage._repeatedString23 != rhs_storage._repeatedString23 {return false}
  18650. if _storage._repeatedString24 != rhs_storage._repeatedString24 {return false}
  18651. if _storage._repeatedString25 != rhs_storage._repeatedString25 {return false}
  18652. if _storage._repeatedString26 != rhs_storage._repeatedString26 {return false}
  18653. if _storage._repeatedString27 != rhs_storage._repeatedString27 {return false}
  18654. if _storage._repeatedString28 != rhs_storage._repeatedString28 {return false}
  18655. if _storage._repeatedString29 != rhs_storage._repeatedString29 {return false}
  18656. if _storage._repeatedString30 != rhs_storage._repeatedString30 {return false}
  18657. if _storage._repeatedString31 != rhs_storage._repeatedString31 {return false}
  18658. if _storage._repeatedString32 != rhs_storage._repeatedString32 {return false}
  18659. return true
  18660. }
  18661. if !storagesAreEqual {return false}
  18662. }
  18663. if lhs.unknownFields != rhs.unknownFields {return false}
  18664. return true
  18665. }
  18666. }
  18667. extension Proto2Unittest_MessageCreatorZeroInit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18668. static let protoMessageName: String = _protobuf_package + ".MessageCreatorZeroInit"
  18669. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18670. 1: .same(proto: "i"),
  18671. 2: .same(proto: "d"),
  18672. 3: .same(proto: "m"),
  18673. 10: .same(proto: "os"),
  18674. 11: .same(proto: "oc"),
  18675. 12: .same(proto: "of"),
  18676. 13: .same(proto: "ol"),
  18677. ]
  18678. fileprivate class _StorageClass {
  18679. var _i: Int32? = nil
  18680. var _d: Double? = nil
  18681. var _m: Proto2Unittest_MessageCreatorZeroInit? = nil
  18682. var _one: Proto2Unittest_MessageCreatorZeroInit.OneOf_One?
  18683. // This property is used as the initial default value for new instances of the type.
  18684. // The type itself is protecting the reference to its storage via CoW semantics.
  18685. // This will force a copy to be made of this reference when the first mutation occurs;
  18686. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  18687. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  18688. private init() {}
  18689. init(copying source: _StorageClass) {
  18690. _i = source._i
  18691. _d = source._d
  18692. _m = source._m
  18693. _one = source._one
  18694. }
  18695. }
  18696. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  18697. if !isKnownUniquelyReferenced(&_storage) {
  18698. _storage = _StorageClass(copying: _storage)
  18699. }
  18700. return _storage
  18701. }
  18702. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18703. _ = _uniqueStorage()
  18704. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  18705. while let fieldNumber = try decoder.nextFieldNumber() {
  18706. // The use of inline closures is to circumvent an issue where the compiler
  18707. // allocates stack space for every case branch when no optimizations are
  18708. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18709. switch fieldNumber {
  18710. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._i) }()
  18711. case 2: try { try decoder.decodeSingularDoubleField(value: &_storage._d) }()
  18712. case 3: try { try decoder.decodeSingularMessageField(value: &_storage._m) }()
  18713. case 10: try {
  18714. var v: String?
  18715. try decoder.decodeSingularStringField(value: &v)
  18716. if let v = v {
  18717. if _storage._one != nil {try decoder.handleConflictingOneOf()}
  18718. _storage._one = .os(v)
  18719. }
  18720. }()
  18721. case 11: try {
  18722. var v: String?
  18723. try decoder.decodeSingularStringField(value: &v)
  18724. if let v = v {
  18725. if _storage._one != nil {try decoder.handleConflictingOneOf()}
  18726. _storage._one = .oc(v)
  18727. }
  18728. }()
  18729. case 12: try {
  18730. var v: UInt64?
  18731. try decoder.decodeSingularFixed64Field(value: &v)
  18732. if let v = v {
  18733. if _storage._one != nil {try decoder.handleConflictingOneOf()}
  18734. _storage._one = .of(v)
  18735. }
  18736. }()
  18737. case 13: try {
  18738. var v: Proto2Unittest_MessageCreatorZeroInit?
  18739. var hadOneofValue = false
  18740. if let current = _storage._one {
  18741. hadOneofValue = true
  18742. if case .ol(let m) = current {v = m}
  18743. }
  18744. try decoder.decodeSingularMessageField(value: &v)
  18745. if let v = v {
  18746. if hadOneofValue {try decoder.handleConflictingOneOf()}
  18747. _storage._one = .ol(v)
  18748. }
  18749. }()
  18750. default: break
  18751. }
  18752. }
  18753. }
  18754. }
  18755. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18756. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  18757. // The use of inline closures is to circumvent an issue where the compiler
  18758. // allocates stack space for every if/case branch local when no optimizations
  18759. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18760. // https://github.com/apple/swift-protobuf/issues/1182
  18761. try { if let v = _storage._i {
  18762. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  18763. } }()
  18764. try { if let v = _storage._d {
  18765. try visitor.visitSingularDoubleField(value: v, fieldNumber: 2)
  18766. } }()
  18767. try { if let v = _storage._m {
  18768. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  18769. } }()
  18770. switch _storage._one {
  18771. case .os?: try {
  18772. guard case .os(let v)? = _storage._one else { preconditionFailure() }
  18773. try visitor.visitSingularStringField(value: v, fieldNumber: 10)
  18774. }()
  18775. case .oc?: try {
  18776. guard case .oc(let v)? = _storage._one else { preconditionFailure() }
  18777. try visitor.visitSingularStringField(value: v, fieldNumber: 11)
  18778. }()
  18779. case .of?: try {
  18780. guard case .of(let v)? = _storage._one else { preconditionFailure() }
  18781. try visitor.visitSingularFixed64Field(value: v, fieldNumber: 12)
  18782. }()
  18783. case .ol?: try {
  18784. guard case .ol(let v)? = _storage._one else { preconditionFailure() }
  18785. try visitor.visitSingularMessageField(value: v, fieldNumber: 13)
  18786. }()
  18787. case nil: break
  18788. }
  18789. }
  18790. try unknownFields.traverse(visitor: &visitor)
  18791. }
  18792. static func ==(lhs: Proto2Unittest_MessageCreatorZeroInit, rhs: Proto2Unittest_MessageCreatorZeroInit) -> Bool {
  18793. if lhs._storage !== rhs._storage {
  18794. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  18795. let _storage = _args.0
  18796. let rhs_storage = _args.1
  18797. if _storage._i != rhs_storage._i {return false}
  18798. if _storage._d != rhs_storage._d {return false}
  18799. if _storage._m != rhs_storage._m {return false}
  18800. if _storage._one != rhs_storage._one {return false}
  18801. return true
  18802. }
  18803. if !storagesAreEqual {return false}
  18804. }
  18805. if lhs.unknownFields != rhs.unknownFields {return false}
  18806. return true
  18807. }
  18808. }
  18809. extension Proto2Unittest_MessageCreatorMemcpy: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18810. static let protoMessageName: String = _protobuf_package + ".MessageCreatorMemcpy"
  18811. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18812. 1: .same(proto: "s"),
  18813. 2: .same(proto: "i"),
  18814. 3: .same(proto: "m"),
  18815. 4: .same(proto: "m2"),
  18816. ]
  18817. fileprivate class _StorageClass {
  18818. var _s: String? = nil
  18819. var _i: [Int32] = []
  18820. var _m: Proto2Unittest_MessageCreatorMemcpy? = nil
  18821. var _m2: Dictionary<Int32,Int32> = [:]
  18822. // This property is used as the initial default value for new instances of the type.
  18823. // The type itself is protecting the reference to its storage via CoW semantics.
  18824. // This will force a copy to be made of this reference when the first mutation occurs;
  18825. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  18826. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  18827. private init() {}
  18828. init(copying source: _StorageClass) {
  18829. _s = source._s
  18830. _i = source._i
  18831. _m = source._m
  18832. _m2 = source._m2
  18833. }
  18834. }
  18835. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  18836. if !isKnownUniquelyReferenced(&_storage) {
  18837. _storage = _StorageClass(copying: _storage)
  18838. }
  18839. return _storage
  18840. }
  18841. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18842. _ = _uniqueStorage()
  18843. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  18844. while let fieldNumber = try decoder.nextFieldNumber() {
  18845. // The use of inline closures is to circumvent an issue where the compiler
  18846. // allocates stack space for every case branch when no optimizations are
  18847. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18848. switch fieldNumber {
  18849. case 1: try { try decoder.decodeSingularStringField(value: &_storage._s) }()
  18850. case 2: try { try decoder.decodeRepeatedInt32Field(value: &_storage._i) }()
  18851. case 3: try { try decoder.decodeSingularMessageField(value: &_storage._m) }()
  18852. case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._m2) }()
  18853. default: break
  18854. }
  18855. }
  18856. }
  18857. }
  18858. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18859. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  18860. // The use of inline closures is to circumvent an issue where the compiler
  18861. // allocates stack space for every if/case branch local when no optimizations
  18862. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18863. // https://github.com/apple/swift-protobuf/issues/1182
  18864. try { if let v = _storage._s {
  18865. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  18866. } }()
  18867. if !_storage._i.isEmpty {
  18868. try visitor.visitPackedInt32Field(value: _storage._i, fieldNumber: 2)
  18869. }
  18870. try { if let v = _storage._m {
  18871. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  18872. } }()
  18873. if !_storage._m2.isEmpty {
  18874. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._m2, fieldNumber: 4)
  18875. }
  18876. }
  18877. try unknownFields.traverse(visitor: &visitor)
  18878. }
  18879. static func ==(lhs: Proto2Unittest_MessageCreatorMemcpy, rhs: Proto2Unittest_MessageCreatorMemcpy) -> Bool {
  18880. if lhs._storage !== rhs._storage {
  18881. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  18882. let _storage = _args.0
  18883. let rhs_storage = _args.1
  18884. if _storage._s != rhs_storage._s {return false}
  18885. if _storage._i != rhs_storage._i {return false}
  18886. if _storage._m != rhs_storage._m {return false}
  18887. if _storage._m2 != rhs_storage._m2 {return false}
  18888. return true
  18889. }
  18890. if !storagesAreEqual {return false}
  18891. }
  18892. if lhs.unknownFields != rhs.unknownFields {return false}
  18893. return true
  18894. }
  18895. }
  18896. extension Proto2Unittest_MessageCreatorFunc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18897. static let protoMessageName: String = _protobuf_package + ".MessageCreatorFunc"
  18898. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18899. 3: .same(proto: "c"),
  18900. ]
  18901. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18902. while let fieldNumber = try decoder.nextFieldNumber() {
  18903. // The use of inline closures is to circumvent an issue where the compiler
  18904. // allocates stack space for every case branch when no optimizations are
  18905. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18906. switch fieldNumber {
  18907. case 3: try { try decoder.decodeSingularStringField(value: &self._c) }()
  18908. default: break
  18909. }
  18910. }
  18911. }
  18912. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18913. // The use of inline closures is to circumvent an issue where the compiler
  18914. // allocates stack space for every if/case branch local when no optimizations
  18915. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18916. // https://github.com/apple/swift-protobuf/issues/1182
  18917. try { if let v = self._c {
  18918. try visitor.visitSingularStringField(value: v, fieldNumber: 3)
  18919. } }()
  18920. try unknownFields.traverse(visitor: &visitor)
  18921. }
  18922. static func ==(lhs: Proto2Unittest_MessageCreatorFunc, rhs: Proto2Unittest_MessageCreatorFunc) -> Bool {
  18923. if lhs._c != rhs._c {return false}
  18924. if lhs.unknownFields != rhs.unknownFields {return false}
  18925. return true
  18926. }
  18927. }
  18928. extension Proto2Unittest_FastParseTableCompression: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  18929. static let protoMessageName: String = _protobuf_package + ".FastParseTableCompression"
  18930. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  18931. 1: .standard(proto: "important_field_1"),
  18932. 2: .standard(proto: "important_field_2"),
  18933. 3: .standard(proto: "unimportant_field_3"),
  18934. 4: .standard(proto: "unimportant_field_4"),
  18935. 5: .standard(proto: "unimportant_field_5"),
  18936. 9: .standard(proto: "unimportant_field_9"),
  18937. 11: .standard(proto: "important_field_11"),
  18938. 12: .standard(proto: "unimportant_field_12"),
  18939. 14: .standard(proto: "important_field_14"),
  18940. 15: .standard(proto: "unimportant_field_15"),
  18941. ]
  18942. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  18943. while let fieldNumber = try decoder.nextFieldNumber() {
  18944. // The use of inline closures is to circumvent an issue where the compiler
  18945. // allocates stack space for every case branch when no optimizations are
  18946. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  18947. switch fieldNumber {
  18948. case 1: try { try decoder.decodeSingularInt32Field(value: &self._importantField1) }()
  18949. case 2: try { try decoder.decodeSingularInt32Field(value: &self._importantField2) }()
  18950. case 3: try { try decoder.decodeSingularInt32Field(value: &self._unimportantField3) }()
  18951. case 4: try { try decoder.decodeSingularInt32Field(value: &self._unimportantField4) }()
  18952. case 5: try { try decoder.decodeSingularInt32Field(value: &self._unimportantField5) }()
  18953. case 9: try { try decoder.decodeSingularInt32Field(value: &self._unimportantField9) }()
  18954. case 11: try { try decoder.decodeSingularInt32Field(value: &self._importantField11) }()
  18955. case 12: try { try decoder.decodeSingularInt32Field(value: &self._unimportantField12) }()
  18956. case 14: try { try decoder.decodeSingularInt32Field(value: &self._importantField14) }()
  18957. case 15: try { try decoder.decodeSingularInt32Field(value: &self._unimportantField15) }()
  18958. default: break
  18959. }
  18960. }
  18961. }
  18962. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  18963. // The use of inline closures is to circumvent an issue where the compiler
  18964. // allocates stack space for every if/case branch local when no optimizations
  18965. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  18966. // https://github.com/apple/swift-protobuf/issues/1182
  18967. try { if let v = self._importantField1 {
  18968. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  18969. } }()
  18970. try { if let v = self._importantField2 {
  18971. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  18972. } }()
  18973. try { if let v = self._unimportantField3 {
  18974. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  18975. } }()
  18976. try { if let v = self._unimportantField4 {
  18977. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  18978. } }()
  18979. try { if let v = self._unimportantField5 {
  18980. try visitor.visitSingularInt32Field(value: v, fieldNumber: 5)
  18981. } }()
  18982. try { if let v = self._unimportantField9 {
  18983. try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
  18984. } }()
  18985. try { if let v = self._importantField11 {
  18986. try visitor.visitSingularInt32Field(value: v, fieldNumber: 11)
  18987. } }()
  18988. try { if let v = self._unimportantField12 {
  18989. try visitor.visitSingularInt32Field(value: v, fieldNumber: 12)
  18990. } }()
  18991. try { if let v = self._importantField14 {
  18992. try visitor.visitSingularInt32Field(value: v, fieldNumber: 14)
  18993. } }()
  18994. try { if let v = self._unimportantField15 {
  18995. try visitor.visitSingularInt32Field(value: v, fieldNumber: 15)
  18996. } }()
  18997. try unknownFields.traverse(visitor: &visitor)
  18998. }
  18999. static func ==(lhs: Proto2Unittest_FastParseTableCompression, rhs: Proto2Unittest_FastParseTableCompression) -> Bool {
  19000. if lhs._importantField1 != rhs._importantField1 {return false}
  19001. if lhs._importantField2 != rhs._importantField2 {return false}
  19002. if lhs._unimportantField3 != rhs._unimportantField3 {return false}
  19003. if lhs._unimportantField4 != rhs._unimportantField4 {return false}
  19004. if lhs._unimportantField5 != rhs._unimportantField5 {return false}
  19005. if lhs._unimportantField9 != rhs._unimportantField9 {return false}
  19006. if lhs._importantField11 != rhs._importantField11 {return false}
  19007. if lhs._unimportantField12 != rhs._unimportantField12 {return false}
  19008. if lhs._importantField14 != rhs._importantField14 {return false}
  19009. if lhs._unimportantField15 != rhs._unimportantField15 {return false}
  19010. if lhs.unknownFields != rhs.unknownFields {return false}
  19011. return true
  19012. }
  19013. }
  19014. extension Proto2Unittest_TestMessageForMove_Small: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  19015. static let protoMessageName: String = _protobuf_package + ".TestMessageForMove_Small"
  19016. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  19017. 1: .same(proto: "a"),
  19018. 2: .same(proto: "b"),
  19019. ]
  19020. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  19021. while let fieldNumber = try decoder.nextFieldNumber() {
  19022. // The use of inline closures is to circumvent an issue where the compiler
  19023. // allocates stack space for every case branch when no optimizations are
  19024. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  19025. switch fieldNumber {
  19026. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  19027. case 2: try { try decoder.decodeSingularInt32Field(value: &self._b) }()
  19028. default: break
  19029. }
  19030. }
  19031. }
  19032. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  19033. // The use of inline closures is to circumvent an issue where the compiler
  19034. // allocates stack space for every if/case branch local when no optimizations
  19035. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  19036. // https://github.com/apple/swift-protobuf/issues/1182
  19037. try { if let v = self._a {
  19038. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  19039. } }()
  19040. try { if let v = self._b {
  19041. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  19042. } }()
  19043. try unknownFields.traverse(visitor: &visitor)
  19044. }
  19045. static func ==(lhs: Proto2Unittest_TestMessageForMove_Small, rhs: Proto2Unittest_TestMessageForMove_Small) -> Bool {
  19046. if lhs._a != rhs._a {return false}
  19047. if lhs._b != rhs._b {return false}
  19048. if lhs.unknownFields != rhs.unknownFields {return false}
  19049. return true
  19050. }
  19051. }
  19052. extension Proto2Unittest_TestMessageForMove_Large: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  19053. static let protoMessageName: String = _protobuf_package + ".TestMessageForMove_Large"
  19054. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  19055. 1: .same(proto: "a1"),
  19056. 2: .same(proto: "a2"),
  19057. 3: .same(proto: "a3"),
  19058. 4: .same(proto: "a4"),
  19059. 5: .same(proto: "a5"),
  19060. 6: .same(proto: "a6"),
  19061. 7: .same(proto: "a7"),
  19062. 8: .same(proto: "a8"),
  19063. 9: .same(proto: "a9"),
  19064. 11: .same(proto: "a11"),
  19065. 12: .same(proto: "a12"),
  19066. 13: .same(proto: "a13"),
  19067. 14: .same(proto: "a14"),
  19068. 15: .same(proto: "a15"),
  19069. 16: .same(proto: "a16"),
  19070. 17: .same(proto: "a17"),
  19071. 18: .same(proto: "a18"),
  19072. 19: .same(proto: "a19"),
  19073. 101: .same(proto: "s101"),
  19074. 102: .same(proto: "s102"),
  19075. 103: .same(proto: "s103"),
  19076. 104: .same(proto: "s104"),
  19077. 105: .same(proto: "s105"),
  19078. 106: .same(proto: "s106"),
  19079. 107: .same(proto: "s107"),
  19080. 108: .same(proto: "s108"),
  19081. 109: .same(proto: "s109"),
  19082. 111: .same(proto: "s111"),
  19083. 112: .same(proto: "s112"),
  19084. 113: .same(proto: "s113"),
  19085. 114: .same(proto: "s114"),
  19086. 115: .same(proto: "s115"),
  19087. 116: .same(proto: "s116"),
  19088. 117: .same(proto: "s117"),
  19089. 118: .same(proto: "s118"),
  19090. 119: .same(proto: "s119"),
  19091. ]
  19092. fileprivate class _StorageClass {
  19093. var _a1: Int32? = nil
  19094. var _a2: Int32? = nil
  19095. var _a3: Int32? = nil
  19096. var _a4: Int32? = nil
  19097. var _a5: Int32? = nil
  19098. var _a6: Int32? = nil
  19099. var _a7: Int32? = nil
  19100. var _a8: Int32? = nil
  19101. var _a9: Int32? = nil
  19102. var _a11: [Int32] = []
  19103. var _a12: [Int32] = []
  19104. var _a13: [Int32] = []
  19105. var _a14: [Int32] = []
  19106. var _a15: [Int32] = []
  19107. var _a16: [Int32] = []
  19108. var _a17: [Int32] = []
  19109. var _a18: [Int32] = []
  19110. var _a19: [Int32] = []
  19111. var _s101: String? = nil
  19112. var _s102: String? = nil
  19113. var _s103: String? = nil
  19114. var _s104: String? = nil
  19115. var _s105: String? = nil
  19116. var _s106: String? = nil
  19117. var _s107: String? = nil
  19118. var _s108: String? = nil
  19119. var _s109: String? = nil
  19120. var _s111: [String] = []
  19121. var _s112: [String] = []
  19122. var _s113: [String] = []
  19123. var _s114: [String] = []
  19124. var _s115: [String] = []
  19125. var _s116: [String] = []
  19126. var _s117: [String] = []
  19127. var _s118: [String] = []
  19128. var _s119: [String] = []
  19129. // This property is used as the initial default value for new instances of the type.
  19130. // The type itself is protecting the reference to its storage via CoW semantics.
  19131. // This will force a copy to be made of this reference when the first mutation occurs;
  19132. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  19133. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  19134. private init() {}
  19135. init(copying source: _StorageClass) {
  19136. _a1 = source._a1
  19137. _a2 = source._a2
  19138. _a3 = source._a3
  19139. _a4 = source._a4
  19140. _a5 = source._a5
  19141. _a6 = source._a6
  19142. _a7 = source._a7
  19143. _a8 = source._a8
  19144. _a9 = source._a9
  19145. _a11 = source._a11
  19146. _a12 = source._a12
  19147. _a13 = source._a13
  19148. _a14 = source._a14
  19149. _a15 = source._a15
  19150. _a16 = source._a16
  19151. _a17 = source._a17
  19152. _a18 = source._a18
  19153. _a19 = source._a19
  19154. _s101 = source._s101
  19155. _s102 = source._s102
  19156. _s103 = source._s103
  19157. _s104 = source._s104
  19158. _s105 = source._s105
  19159. _s106 = source._s106
  19160. _s107 = source._s107
  19161. _s108 = source._s108
  19162. _s109 = source._s109
  19163. _s111 = source._s111
  19164. _s112 = source._s112
  19165. _s113 = source._s113
  19166. _s114 = source._s114
  19167. _s115 = source._s115
  19168. _s116 = source._s116
  19169. _s117 = source._s117
  19170. _s118 = source._s118
  19171. _s119 = source._s119
  19172. }
  19173. }
  19174. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  19175. if !isKnownUniquelyReferenced(&_storage) {
  19176. _storage = _StorageClass(copying: _storage)
  19177. }
  19178. return _storage
  19179. }
  19180. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  19181. _ = _uniqueStorage()
  19182. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  19183. while let fieldNumber = try decoder.nextFieldNumber() {
  19184. // The use of inline closures is to circumvent an issue where the compiler
  19185. // allocates stack space for every case branch when no optimizations are
  19186. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  19187. switch fieldNumber {
  19188. case 1: try { try decoder.decodeSingularInt32Field(value: &_storage._a1) }()
  19189. case 2: try { try decoder.decodeSingularInt32Field(value: &_storage._a2) }()
  19190. case 3: try { try decoder.decodeSingularInt32Field(value: &_storage._a3) }()
  19191. case 4: try { try decoder.decodeSingularInt32Field(value: &_storage._a4) }()
  19192. case 5: try { try decoder.decodeSingularInt32Field(value: &_storage._a5) }()
  19193. case 6: try { try decoder.decodeSingularInt32Field(value: &_storage._a6) }()
  19194. case 7: try { try decoder.decodeSingularInt32Field(value: &_storage._a7) }()
  19195. case 8: try { try decoder.decodeSingularInt32Field(value: &_storage._a8) }()
  19196. case 9: try { try decoder.decodeSingularInt32Field(value: &_storage._a9) }()
  19197. case 11: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a11) }()
  19198. case 12: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a12) }()
  19199. case 13: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a13) }()
  19200. case 14: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a14) }()
  19201. case 15: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a15) }()
  19202. case 16: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a16) }()
  19203. case 17: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a17) }()
  19204. case 18: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a18) }()
  19205. case 19: try { try decoder.decodeRepeatedInt32Field(value: &_storage._a19) }()
  19206. case 101: try { try decoder.decodeSingularStringField(value: &_storage._s101) }()
  19207. case 102: try { try decoder.decodeSingularStringField(value: &_storage._s102) }()
  19208. case 103: try { try decoder.decodeSingularStringField(value: &_storage._s103) }()
  19209. case 104: try { try decoder.decodeSingularStringField(value: &_storage._s104) }()
  19210. case 105: try { try decoder.decodeSingularStringField(value: &_storage._s105) }()
  19211. case 106: try { try decoder.decodeSingularStringField(value: &_storage._s106) }()
  19212. case 107: try { try decoder.decodeSingularStringField(value: &_storage._s107) }()
  19213. case 108: try { try decoder.decodeSingularStringField(value: &_storage._s108) }()
  19214. case 109: try { try decoder.decodeSingularStringField(value: &_storage._s109) }()
  19215. case 111: try { try decoder.decodeRepeatedStringField(value: &_storage._s111) }()
  19216. case 112: try { try decoder.decodeRepeatedStringField(value: &_storage._s112) }()
  19217. case 113: try { try decoder.decodeRepeatedStringField(value: &_storage._s113) }()
  19218. case 114: try { try decoder.decodeRepeatedStringField(value: &_storage._s114) }()
  19219. case 115: try { try decoder.decodeRepeatedStringField(value: &_storage._s115) }()
  19220. case 116: try { try decoder.decodeRepeatedStringField(value: &_storage._s116) }()
  19221. case 117: try { try decoder.decodeRepeatedStringField(value: &_storage._s117) }()
  19222. case 118: try { try decoder.decodeRepeatedStringField(value: &_storage._s118) }()
  19223. case 119: try { try decoder.decodeRepeatedStringField(value: &_storage._s119) }()
  19224. default: break
  19225. }
  19226. }
  19227. }
  19228. }
  19229. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  19230. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  19231. // The use of inline closures is to circumvent an issue where the compiler
  19232. // allocates stack space for every if/case branch local when no optimizations
  19233. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  19234. // https://github.com/apple/swift-protobuf/issues/1182
  19235. try { if let v = _storage._a1 {
  19236. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  19237. } }()
  19238. try { if let v = _storage._a2 {
  19239. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  19240. } }()
  19241. try { if let v = _storage._a3 {
  19242. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  19243. } }()
  19244. try { if let v = _storage._a4 {
  19245. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  19246. } }()
  19247. try { if let v = _storage._a5 {
  19248. try visitor.visitSingularInt32Field(value: v, fieldNumber: 5)
  19249. } }()
  19250. try { if let v = _storage._a6 {
  19251. try visitor.visitSingularInt32Field(value: v, fieldNumber: 6)
  19252. } }()
  19253. try { if let v = _storage._a7 {
  19254. try visitor.visitSingularInt32Field(value: v, fieldNumber: 7)
  19255. } }()
  19256. try { if let v = _storage._a8 {
  19257. try visitor.visitSingularInt32Field(value: v, fieldNumber: 8)
  19258. } }()
  19259. try { if let v = _storage._a9 {
  19260. try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
  19261. } }()
  19262. if !_storage._a11.isEmpty {
  19263. try visitor.visitRepeatedInt32Field(value: _storage._a11, fieldNumber: 11)
  19264. }
  19265. if !_storage._a12.isEmpty {
  19266. try visitor.visitRepeatedInt32Field(value: _storage._a12, fieldNumber: 12)
  19267. }
  19268. if !_storage._a13.isEmpty {
  19269. try visitor.visitRepeatedInt32Field(value: _storage._a13, fieldNumber: 13)
  19270. }
  19271. if !_storage._a14.isEmpty {
  19272. try visitor.visitRepeatedInt32Field(value: _storage._a14, fieldNumber: 14)
  19273. }
  19274. if !_storage._a15.isEmpty {
  19275. try visitor.visitRepeatedInt32Field(value: _storage._a15, fieldNumber: 15)
  19276. }
  19277. if !_storage._a16.isEmpty {
  19278. try visitor.visitRepeatedInt32Field(value: _storage._a16, fieldNumber: 16)
  19279. }
  19280. if !_storage._a17.isEmpty {
  19281. try visitor.visitRepeatedInt32Field(value: _storage._a17, fieldNumber: 17)
  19282. }
  19283. if !_storage._a18.isEmpty {
  19284. try visitor.visitRepeatedInt32Field(value: _storage._a18, fieldNumber: 18)
  19285. }
  19286. if !_storage._a19.isEmpty {
  19287. try visitor.visitRepeatedInt32Field(value: _storage._a19, fieldNumber: 19)
  19288. }
  19289. try { if let v = _storage._s101 {
  19290. try visitor.visitSingularStringField(value: v, fieldNumber: 101)
  19291. } }()
  19292. try { if let v = _storage._s102 {
  19293. try visitor.visitSingularStringField(value: v, fieldNumber: 102)
  19294. } }()
  19295. try { if let v = _storage._s103 {
  19296. try visitor.visitSingularStringField(value: v, fieldNumber: 103)
  19297. } }()
  19298. try { if let v = _storage._s104 {
  19299. try visitor.visitSingularStringField(value: v, fieldNumber: 104)
  19300. } }()
  19301. try { if let v = _storage._s105 {
  19302. try visitor.visitSingularStringField(value: v, fieldNumber: 105)
  19303. } }()
  19304. try { if let v = _storage._s106 {
  19305. try visitor.visitSingularStringField(value: v, fieldNumber: 106)
  19306. } }()
  19307. try { if let v = _storage._s107 {
  19308. try visitor.visitSingularStringField(value: v, fieldNumber: 107)
  19309. } }()
  19310. try { if let v = _storage._s108 {
  19311. try visitor.visitSingularStringField(value: v, fieldNumber: 108)
  19312. } }()
  19313. try { if let v = _storage._s109 {
  19314. try visitor.visitSingularStringField(value: v, fieldNumber: 109)
  19315. } }()
  19316. if !_storage._s111.isEmpty {
  19317. try visitor.visitRepeatedStringField(value: _storage._s111, fieldNumber: 111)
  19318. }
  19319. if !_storage._s112.isEmpty {
  19320. try visitor.visitRepeatedStringField(value: _storage._s112, fieldNumber: 112)
  19321. }
  19322. if !_storage._s113.isEmpty {
  19323. try visitor.visitRepeatedStringField(value: _storage._s113, fieldNumber: 113)
  19324. }
  19325. if !_storage._s114.isEmpty {
  19326. try visitor.visitRepeatedStringField(value: _storage._s114, fieldNumber: 114)
  19327. }
  19328. if !_storage._s115.isEmpty {
  19329. try visitor.visitRepeatedStringField(value: _storage._s115, fieldNumber: 115)
  19330. }
  19331. if !_storage._s116.isEmpty {
  19332. try visitor.visitRepeatedStringField(value: _storage._s116, fieldNumber: 116)
  19333. }
  19334. if !_storage._s117.isEmpty {
  19335. try visitor.visitRepeatedStringField(value: _storage._s117, fieldNumber: 117)
  19336. }
  19337. if !_storage._s118.isEmpty {
  19338. try visitor.visitRepeatedStringField(value: _storage._s118, fieldNumber: 118)
  19339. }
  19340. if !_storage._s119.isEmpty {
  19341. try visitor.visitRepeatedStringField(value: _storage._s119, fieldNumber: 119)
  19342. }
  19343. }
  19344. try unknownFields.traverse(visitor: &visitor)
  19345. }
  19346. static func ==(lhs: Proto2Unittest_TestMessageForMove_Large, rhs: Proto2Unittest_TestMessageForMove_Large) -> Bool {
  19347. if lhs._storage !== rhs._storage {
  19348. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  19349. let _storage = _args.0
  19350. let rhs_storage = _args.1
  19351. if _storage._a1 != rhs_storage._a1 {return false}
  19352. if _storage._a2 != rhs_storage._a2 {return false}
  19353. if _storage._a3 != rhs_storage._a3 {return false}
  19354. if _storage._a4 != rhs_storage._a4 {return false}
  19355. if _storage._a5 != rhs_storage._a5 {return false}
  19356. if _storage._a6 != rhs_storage._a6 {return false}
  19357. if _storage._a7 != rhs_storage._a7 {return false}
  19358. if _storage._a8 != rhs_storage._a8 {return false}
  19359. if _storage._a9 != rhs_storage._a9 {return false}
  19360. if _storage._a11 != rhs_storage._a11 {return false}
  19361. if _storage._a12 != rhs_storage._a12 {return false}
  19362. if _storage._a13 != rhs_storage._a13 {return false}
  19363. if _storage._a14 != rhs_storage._a14 {return false}
  19364. if _storage._a15 != rhs_storage._a15 {return false}
  19365. if _storage._a16 != rhs_storage._a16 {return false}
  19366. if _storage._a17 != rhs_storage._a17 {return false}
  19367. if _storage._a18 != rhs_storage._a18 {return false}
  19368. if _storage._a19 != rhs_storage._a19 {return false}
  19369. if _storage._s101 != rhs_storage._s101 {return false}
  19370. if _storage._s102 != rhs_storage._s102 {return false}
  19371. if _storage._s103 != rhs_storage._s103 {return false}
  19372. if _storage._s104 != rhs_storage._s104 {return false}
  19373. if _storage._s105 != rhs_storage._s105 {return false}
  19374. if _storage._s106 != rhs_storage._s106 {return false}
  19375. if _storage._s107 != rhs_storage._s107 {return false}
  19376. if _storage._s108 != rhs_storage._s108 {return false}
  19377. if _storage._s109 != rhs_storage._s109 {return false}
  19378. if _storage._s111 != rhs_storage._s111 {return false}
  19379. if _storage._s112 != rhs_storage._s112 {return false}
  19380. if _storage._s113 != rhs_storage._s113 {return false}
  19381. if _storage._s114 != rhs_storage._s114 {return false}
  19382. if _storage._s115 != rhs_storage._s115 {return false}
  19383. if _storage._s116 != rhs_storage._s116 {return false}
  19384. if _storage._s117 != rhs_storage._s117 {return false}
  19385. if _storage._s118 != rhs_storage._s118 {return false}
  19386. if _storage._s119 != rhs_storage._s119 {return false}
  19387. return true
  19388. }
  19389. if !storagesAreEqual {return false}
  19390. }
  19391. if lhs.unknownFields != rhs.unknownFields {return false}
  19392. return true
  19393. }
  19394. }