| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572 |
- // DO NOT EDIT.
- // swift-format-ignore-file
- // swiftlint:disable all
- //
- // Generated by the Swift generator plugin for the protocol buffer compiler.
- // Source: google/protobuf/descriptor.proto
- //
- // For information on using the generated types, please see the documentation:
- // https://github.com/apple/swift-protobuf/
- // Protocol Buffers - Google's data interchange format
- // Copyright 2008 Google Inc. All rights reserved.
- // https://developers.google.com/protocol-buffers/
- //
- // Redistribution and use in source and binary forms, with or without
- // modification, are permitted provided that the following conditions are
- // met:
- //
- // * Redistributions of source code must retain the above copyright
- // notice, this list of conditions and the following disclaimer.
- // * Redistributions in binary form must reproduce the above
- // copyright notice, this list of conditions and the following disclaimer
- // in the documentation and/or other materials provided with the
- // distribution.
- // * Neither the name of Google Inc. nor the names of its
- // contributors may be used to endorse or promote products derived from
- // this software without specific prior written permission.
- //
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- // Author: kenton@google.com (Kenton Varda)
- // Based on original Protocol Buffers design by
- // Sanjay Ghemawat, Jeff Dean, and others.
- //
- // The messages in this file describe the definitions found in .proto files.
- // A valid .proto file can be translated directly to a FileDescriptorProto
- // without any other information (e.g. without reading its imports).
- import Foundation
- // 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime.
- // If the compiler emits an error on this type, it is because this file
- // was generated by a version of the `protoc` Swift plug-in that is
- // incompatible with the version of SwiftProtobuf to which you are linking.
- // Please ensure that you are building against the same version of the API
- // that was used to generate this file.
- fileprivate struct _GeneratedWithProtocGenSwiftVersion: ProtobufAPIVersionCheck {
- struct _2: ProtobufAPIVersion_2 {}
- typealias Version = _2
- }
- /// The full set of known editions.
- enum Google_Protobuf_Edition: Int, Enum, Swift.CaseIterable {
- /// A placeholder for an unknown edition value.
- case unknown = 0
- /// A placeholder edition for specifying default behaviors *before* a feature
- /// was first introduced. This is effectively an "infinite past".
- case legacy = 900
- /// Legacy syntax "editions". These pre-date editions, but behave much like
- /// distinct editions. These can't be used to specify the edition of proto
- /// files, but feature definitions must supply proto2/proto3 defaults for
- /// backwards compatibility.
- case proto2 = 998
- case proto3 = 999
- /// Editions that have been released. The specific values are arbitrary and
- /// should not be depended on, but they will always be time-ordered for easy
- /// comparison.
- case edition2023 = 1000
- case edition2024 = 1001
- /// Placeholder editions for testing feature resolution. These should not be
- /// used or relied on outside of tests.
- case edition1TestOnly = 1
- case edition2TestOnly = 2
- case edition99997TestOnly = 99997
- case edition99998TestOnly = 99998
- case edition99999TestOnly = 99999
- /// Placeholder for specifying unbounded edition support. This should only
- /// ever be used by plugins that can expect to never require any changes to
- /// support a new edition.
- case max = 2147483647
- init() {
- self = .unknown
- }
- }
- /// Describes the 'visibility' of a symbol with respect to the proto import
- /// system. Symbols can only be imported when the visibility rules do not prevent
- /// it (ex: local symbols cannot be imported). Visibility modifiers can only set
- /// on `message` and `enum` as they are the only types available to be referenced
- /// from other files.
- enum Google_Protobuf_SymbolVisibility: Int, Enum, Swift.CaseIterable {
- case visibilityUnset = 0
- case visibilityLocal = 1
- case visibilityExport = 2
- init() {
- self = .visibilityUnset
- }
- }
- /// The protocol compiler can output a FileDescriptorSet containing the .proto
- /// files it parses.
- struct Google_Protobuf_FileDescriptorSet: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var file: [Google_Protobuf_FileDescriptorProto] = []
- var unknownFields = UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- }
- /// Describes a complete .proto file.
- struct Google_Protobuf_FileDescriptorProto: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// file name, relative to root of source tree
- var name: String {
- get {return _name ?? String()}
- set {_name = newValue}
- }
- /// Returns true if `name` has been explicitly set.
- var hasName: Bool {return self._name != nil}
- /// Clears the value of `name`. Subsequent reads from it will return its default value.
- mutating func clearName() {self._name = nil}
- /// e.g. "foo", "foo.bar", etc.
- var package: String {
- get {return _package ?? String()}
- set {_package = newValue}
- }
- /// Returns true if `package` has been explicitly set.
- var hasPackage: Bool {return self._package != nil}
- /// Clears the value of `package`. Subsequent reads from it will return its default value.
- mutating func clearPackage() {self._package = nil}
- /// Names of files imported by this file.
- var dependency: [String] = []
- /// Indexes of the public imported files in the dependency list above.
- var publicDependency: [Int32] = []
- /// Indexes of the weak imported files in the dependency list.
- /// For Google-internal migration only. Do not use.
- var weakDependency: [Int32] = []
- /// Names of files imported by this file purely for the purpose of providing
- /// option extensions. These are excluded from the dependency list above.
- var optionDependency: [String] = []
- /// All top-level definitions in this file.
- var messageType: [Google_Protobuf_DescriptorProto] = []
- var enumType: [Google_Protobuf_EnumDescriptorProto] = []
- var service: [Google_Protobuf_ServiceDescriptorProto] = []
- var `extension`: [Google_Protobuf_FieldDescriptorProto] = []
- var options: Google_Protobuf_FileOptions {
- get {return _options ?? Google_Protobuf_FileOptions()}
- set {_options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return self._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {self._options = nil}
- /// This field contains optional information about the original source code.
- /// You may safely remove this entire field without harming runtime
- /// functionality of the descriptors -- the information is needed only by
- /// development tools.
- var sourceCodeInfo: Google_Protobuf_SourceCodeInfo {
- get {return _sourceCodeInfo ?? Google_Protobuf_SourceCodeInfo()}
- set {_sourceCodeInfo = newValue}
- }
- /// Returns true if `sourceCodeInfo` has been explicitly set.
- var hasSourceCodeInfo: Bool {return self._sourceCodeInfo != nil}
- /// Clears the value of `sourceCodeInfo`. Subsequent reads from it will return its default value.
- mutating func clearSourceCodeInfo() {self._sourceCodeInfo = nil}
- /// The syntax of the proto file.
- /// The supported values are "proto2", "proto3", and "editions".
- ///
- /// If `edition` is present, this value must be "editions".
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var syntax: String {
- get {return _syntax ?? String()}
- set {_syntax = newValue}
- }
- /// Returns true if `syntax` has been explicitly set.
- var hasSyntax: Bool {return self._syntax != nil}
- /// Clears the value of `syntax`. Subsequent reads from it will return its default value.
- mutating func clearSyntax() {self._syntax = nil}
- /// The edition of the proto file.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var edition: Google_Protobuf_Edition {
- get {return _edition ?? .unknown}
- set {_edition = newValue}
- }
- /// Returns true if `edition` has been explicitly set.
- var hasEdition: Bool {return self._edition != nil}
- /// Clears the value of `edition`. Subsequent reads from it will return its default value.
- mutating func clearEdition() {self._edition = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _name: String? = nil
- fileprivate var _package: String? = nil
- fileprivate var _options: Google_Protobuf_FileOptions? = nil
- fileprivate var _sourceCodeInfo: Google_Protobuf_SourceCodeInfo? = nil
- fileprivate var _syntax: String? = nil
- fileprivate var _edition: Google_Protobuf_Edition? = nil
- }
- /// Describes a message type.
- struct Google_Protobuf_DescriptorProto: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var name: String {
- get {return _storage._name ?? String()}
- set {_uniqueStorage()._name = newValue}
- }
- /// Returns true if `name` has been explicitly set.
- var hasName: Bool {return _storage._name != nil}
- /// Clears the value of `name`. Subsequent reads from it will return its default value.
- mutating func clearName() {_uniqueStorage()._name = nil}
- var field: [Google_Protobuf_FieldDescriptorProto] {
- get {return _storage._field}
- set {_uniqueStorage()._field = newValue}
- }
- var `extension`: [Google_Protobuf_FieldDescriptorProto] {
- get {return _storage._extension}
- set {_uniqueStorage()._extension = newValue}
- }
- var nestedType: [Google_Protobuf_DescriptorProto] {
- get {return _storage._nestedType}
- set {_uniqueStorage()._nestedType = newValue}
- }
- var enumType: [Google_Protobuf_EnumDescriptorProto] {
- get {return _storage._enumType}
- set {_uniqueStorage()._enumType = newValue}
- }
- var extensionRange: [Google_Protobuf_DescriptorProto.ExtensionRange] {
- get {return _storage._extensionRange}
- set {_uniqueStorage()._extensionRange = newValue}
- }
- var oneofDecl: [Google_Protobuf_OneofDescriptorProto] {
- get {return _storage._oneofDecl}
- set {_uniqueStorage()._oneofDecl = newValue}
- }
- var options: Google_Protobuf_MessageOptions {
- get {return _storage._options ?? Google_Protobuf_MessageOptions()}
- set {_uniqueStorage()._options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return _storage._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {_uniqueStorage()._options = nil}
- var reservedRange: [Google_Protobuf_DescriptorProto.ReservedRange] {
- get {return _storage._reservedRange}
- set {_uniqueStorage()._reservedRange = newValue}
- }
- /// Reserved field names, which may not be used by fields in the same message.
- /// A given name may only be reserved once.
- var reservedName: [String] {
- get {return _storage._reservedName}
- set {_uniqueStorage()._reservedName = newValue}
- }
- /// Support for `export` and `local` keywords on enums.
- var visibility: Google_Protobuf_SymbolVisibility {
- get {return _storage._visibility ?? .visibilityUnset}
- set {_uniqueStorage()._visibility = newValue}
- }
- /// Returns true if `visibility` has been explicitly set.
- var hasVisibility: Bool {return _storage._visibility != nil}
- /// Clears the value of `visibility`. Subsequent reads from it will return its default value.
- mutating func clearVisibility() {_uniqueStorage()._visibility = nil}
- var unknownFields = UnknownStorage()
- struct ExtensionRange: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Inclusive.
- var start: Int32 {
- get {return _start ?? 0}
- set {_start = newValue}
- }
- /// Returns true if `start` has been explicitly set.
- var hasStart: Bool {return self._start != nil}
- /// Clears the value of `start`. Subsequent reads from it will return its default value.
- mutating func clearStart() {self._start = nil}
- /// Exclusive.
- var end: Int32 {
- get {return _end ?? 0}
- set {_end = newValue}
- }
- /// Returns true if `end` has been explicitly set.
- var hasEnd: Bool {return self._end != nil}
- /// Clears the value of `end`. Subsequent reads from it will return its default value.
- mutating func clearEnd() {self._end = nil}
- var options: Google_Protobuf_ExtensionRangeOptions {
- get {return _options ?? Google_Protobuf_ExtensionRangeOptions()}
- set {_options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return self._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {self._options = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _start: Int32? = nil
- fileprivate var _end: Int32? = nil
- fileprivate var _options: Google_Protobuf_ExtensionRangeOptions? = nil
- }
- /// Range of reserved tag numbers. Reserved tag numbers may not be used by
- /// fields or extension ranges in the same message. Reserved ranges may
- /// not overlap.
- struct ReservedRange: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Inclusive.
- var start: Int32 {
- get {return _start ?? 0}
- set {_start = newValue}
- }
- /// Returns true if `start` has been explicitly set.
- var hasStart: Bool {return self._start != nil}
- /// Clears the value of `start`. Subsequent reads from it will return its default value.
- mutating func clearStart() {self._start = nil}
- /// Exclusive.
- var end: Int32 {
- get {return _end ?? 0}
- set {_end = newValue}
- }
- /// Returns true if `end` has been explicitly set.
- var hasEnd: Bool {return self._end != nil}
- /// Clears the value of `end`. Subsequent reads from it will return its default value.
- mutating func clearEnd() {self._end = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _start: Int32? = nil
- fileprivate var _end: Int32? = nil
- }
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- struct Google_Protobuf_ExtensionRangeOptions: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// The parser stores options it doesn't recognize here. See above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- /// For external users: DO NOT USE. We are in the process of open sourcing
- /// extension declaration and executing internal cleanups before it can be
- /// used externally.
- var declaration: [Google_Protobuf_ExtensionRangeOptions.Declaration] = []
- /// Any features defined in the specific edition.
- var features: Google_Protobuf_FeatureSet {
- get {return _features ?? Google_Protobuf_FeatureSet()}
- set {_features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return self._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {self._features = nil}
- /// The verification state of the range.
- /// TODO: flip the default to DECLARATION once all empty ranges
- /// are marked as UNVERIFIED.
- var verification: Google_Protobuf_ExtensionRangeOptions.VerificationState {
- get {return _verification ?? .unverified}
- set {_verification = newValue}
- }
- /// Returns true if `verification` has been explicitly set.
- var hasVerification: Bool {return self._verification != nil}
- /// Clears the value of `verification`. Subsequent reads from it will return its default value.
- mutating func clearVerification() {self._verification = nil}
- var unknownFields = UnknownStorage()
- /// The verification state of the extension range.
- enum VerificationState: Int, Enum, Swift.CaseIterable {
- /// All the extensions of the range must be declared.
- case declaration = 0
- case unverified = 1
- init() {
- self = .declaration
- }
- }
- struct Declaration: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// The extension number declared within the extension range.
- var number: Int32 {
- get {return _number ?? 0}
- set {_number = newValue}
- }
- /// Returns true if `number` has been explicitly set.
- var hasNumber: Bool {return self._number != nil}
- /// Clears the value of `number`. Subsequent reads from it will return its default value.
- mutating func clearNumber() {self._number = nil}
- /// The fully-qualified name of the extension field. There must be a leading
- /// dot in front of the full name.
- var fullName: String {
- get {return _fullName ?? String()}
- set {_fullName = newValue}
- }
- /// Returns true if `fullName` has been explicitly set.
- var hasFullName: Bool {return self._fullName != nil}
- /// Clears the value of `fullName`. Subsequent reads from it will return its default value.
- mutating func clearFullName() {self._fullName = nil}
- /// The fully-qualified type name of the extension field. Unlike
- /// Metadata.type, Declaration.type must have a leading dot for messages
- /// and enums.
- var type: String {
- get {return _type ?? String()}
- set {_type = newValue}
- }
- /// Returns true if `type` has been explicitly set.
- var hasType: Bool {return self._type != nil}
- /// Clears the value of `type`. Subsequent reads from it will return its default value.
- mutating func clearType() {self._type = nil}
- /// If true, indicates that the number is reserved in the extension range,
- /// and any extension field with the number will fail to compile. Set this
- /// when a declared extension field is deleted.
- var reserved: Bool {
- get {return _reserved ?? false}
- set {_reserved = newValue}
- }
- /// Returns true if `reserved` has been explicitly set.
- var hasReserved: Bool {return self._reserved != nil}
- /// Clears the value of `reserved`. Subsequent reads from it will return its default value.
- mutating func clearReserved() {self._reserved = nil}
- /// If true, indicates that the extension must be defined as repeated.
- /// Otherwise the extension must be defined as optional.
- var repeated: Bool {
- get {return _repeated ?? false}
- set {_repeated = newValue}
- }
- /// Returns true if `repeated` has been explicitly set.
- var hasRepeated: Bool {return self._repeated != nil}
- /// Clears the value of `repeated`. Subsequent reads from it will return its default value.
- mutating func clearRepeated() {self._repeated = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _number: Int32? = nil
- fileprivate var _fullName: String? = nil
- fileprivate var _type: String? = nil
- fileprivate var _reserved: Bool? = nil
- fileprivate var _repeated: Bool? = nil
- }
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _features: Google_Protobuf_FeatureSet? = nil
- fileprivate var _verification: Google_Protobuf_ExtensionRangeOptions.VerificationState? = nil
- }
- /// Describes a field within a message.
- struct Google_Protobuf_FieldDescriptorProto: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var name: String {
- get {return _name ?? String()}
- set {_name = newValue}
- }
- /// Returns true if `name` has been explicitly set.
- var hasName: Bool {return self._name != nil}
- /// Clears the value of `name`. Subsequent reads from it will return its default value.
- mutating func clearName() {self._name = nil}
- var number: Int32 {
- get {return _number ?? 0}
- set {_number = newValue}
- }
- /// Returns true if `number` has been explicitly set.
- var hasNumber: Bool {return self._number != nil}
- /// Clears the value of `number`. Subsequent reads from it will return its default value.
- mutating func clearNumber() {self._number = nil}
- var label: Google_Protobuf_FieldDescriptorProto.Label {
- get {return _label ?? .optional}
- set {_label = newValue}
- }
- /// Returns true if `label` has been explicitly set.
- var hasLabel: Bool {return self._label != nil}
- /// Clears the value of `label`. Subsequent reads from it will return its default value.
- mutating func clearLabel() {self._label = nil}
- /// If type_name is set, this need not be set. If both this and type_name
- /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
- var type: Google_Protobuf_FieldDescriptorProto.TypeEnum {
- get {return _type ?? .double}
- set {_type = newValue}
- }
- /// Returns true if `type` has been explicitly set.
- var hasType: Bool {return self._type != nil}
- /// Clears the value of `type`. Subsequent reads from it will return its default value.
- mutating func clearType() {self._type = nil}
- /// For message and enum types, this is the name of the type. If the name
- /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
- /// rules are used to find the type (i.e. first the nested types within this
- /// message are searched, then within the parent, on up to the root
- /// namespace).
- var typeName: String {
- get {return _typeName ?? String()}
- set {_typeName = newValue}
- }
- /// Returns true if `typeName` has been explicitly set.
- var hasTypeName: Bool {return self._typeName != nil}
- /// Clears the value of `typeName`. Subsequent reads from it will return its default value.
- mutating func clearTypeName() {self._typeName = nil}
- /// For extensions, this is the name of the type being extended. It is
- /// resolved in the same manner as type_name.
- var extendee: String {
- get {return _extendee ?? String()}
- set {_extendee = newValue}
- }
- /// Returns true if `extendee` has been explicitly set.
- var hasExtendee: Bool {return self._extendee != nil}
- /// Clears the value of `extendee`. Subsequent reads from it will return its default value.
- mutating func clearExtendee() {self._extendee = nil}
- /// For numeric types, contains the original text representation of the value.
- /// For booleans, "true" or "false".
- /// For strings, contains the default text contents (not escaped in any way).
- /// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
- var defaultValue: String {
- get {return _defaultValue ?? String()}
- set {_defaultValue = newValue}
- }
- /// Returns true if `defaultValue` has been explicitly set.
- var hasDefaultValue: Bool {return self._defaultValue != nil}
- /// Clears the value of `defaultValue`. Subsequent reads from it will return its default value.
- mutating func clearDefaultValue() {self._defaultValue = nil}
- /// If set, gives the index of a oneof in the containing type's oneof_decl
- /// list. This field is a member of that oneof.
- var oneofIndex: Int32 {
- get {return _oneofIndex ?? 0}
- set {_oneofIndex = newValue}
- }
- /// Returns true if `oneofIndex` has been explicitly set.
- var hasOneofIndex: Bool {return self._oneofIndex != nil}
- /// Clears the value of `oneofIndex`. Subsequent reads from it will return its default value.
- mutating func clearOneofIndex() {self._oneofIndex = nil}
- /// JSON name of this field. The value is set by protocol compiler. If the
- /// user has set a "json_name" option on this field, that option's value
- /// will be used. Otherwise, it's deduced from the field's name by converting
- /// it to camelCase.
- var jsonName: String {
- get {return _jsonName ?? String()}
- set {_jsonName = newValue}
- }
- /// Returns true if `jsonName` has been explicitly set.
- var hasJsonName: Bool {return self._jsonName != nil}
- /// Clears the value of `jsonName`. Subsequent reads from it will return its default value.
- mutating func clearJsonName() {self._jsonName = nil}
- var options: Google_Protobuf_FieldOptions {
- get {return _options ?? Google_Protobuf_FieldOptions()}
- set {_options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return self._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {self._options = nil}
- /// If true, this is a proto3 "optional". When a proto3 field is optional, it
- /// tracks presence regardless of field type.
- ///
- /// When proto3_optional is true, this field must belong to a oneof to signal
- /// to old proto3 clients that presence is tracked for this field. This oneof
- /// is known as a "synthetic" oneof, and this field must be its sole member
- /// (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
- /// exist in the descriptor only, and do not generate any API. Synthetic oneofs
- /// must be ordered after all "real" oneofs.
- ///
- /// For message fields, proto3_optional doesn't create any semantic change,
- /// since non-repeated message fields always track presence. However it still
- /// indicates the semantic detail of whether the user wrote "optional" or not.
- /// This can be useful for round-tripping the .proto file. For consistency we
- /// give message fields a synthetic oneof also, even though it is not required
- /// to track presence. This is especially important because the parser can't
- /// tell if a field is a message or an enum, so it must always create a
- /// synthetic oneof.
- ///
- /// Proto2 optional fields do not set this flag, because they already indicate
- /// optional with `LABEL_OPTIONAL`.
- var proto3Optional: Bool {
- get {return _proto3Optional ?? false}
- set {_proto3Optional = newValue}
- }
- /// Returns true if `proto3Optional` has been explicitly set.
- var hasProto3Optional: Bool {return self._proto3Optional != nil}
- /// Clears the value of `proto3Optional`. Subsequent reads from it will return its default value.
- mutating func clearProto3Optional() {self._proto3Optional = nil}
- var unknownFields = UnknownStorage()
- enum TypeEnum: Int, Enum, Swift.CaseIterable {
- /// 0 is reserved for errors.
- /// Order is weird for historical reasons.
- case double = 1
- case float = 2
- /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
- /// negative values are likely.
- case int64 = 3
- case uint64 = 4
- /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
- /// negative values are likely.
- case int32 = 5
- case fixed64 = 6
- case fixed32 = 7
- case bool = 8
- case string = 9
- /// Tag-delimited aggregate.
- /// Group type is deprecated and not supported after google.protobuf. However, Proto3
- /// implementations should still be able to parse the group wire format and
- /// treat group fields as unknown fields. In Editions, the group wire format
- /// can be enabled via the `message_encoding` feature.
- case group = 10
- /// Length-delimited aggregate.
- case message = 11
- /// New in version 2.
- case bytes = 12
- case uint32 = 13
- case `enum` = 14
- case sfixed32 = 15
- case sfixed64 = 16
- /// Uses ZigZag encoding.
- case sint32 = 17
- /// Uses ZigZag encoding.
- case sint64 = 18
- init() {
- self = .double
- }
- }
- enum Label: Int, Enum, Swift.CaseIterable {
- /// 0 is reserved for errors
- case `optional` = 1
- case repeated = 3
- /// The required label is only allowed in google.protobuf. In proto3 and Editions
- /// it's explicitly prohibited. In Editions, the `field_presence` feature
- /// can be used to get this behavior.
- case `required` = 2
- init() {
- self = .optional
- }
- }
- init() {}
- fileprivate var _name: String? = nil
- fileprivate var _number: Int32? = nil
- fileprivate var _label: Google_Protobuf_FieldDescriptorProto.Label? = nil
- fileprivate var _type: Google_Protobuf_FieldDescriptorProto.TypeEnum? = nil
- fileprivate var _typeName: String? = nil
- fileprivate var _extendee: String? = nil
- fileprivate var _defaultValue: String? = nil
- fileprivate var _oneofIndex: Int32? = nil
- fileprivate var _jsonName: String? = nil
- fileprivate var _options: Google_Protobuf_FieldOptions? = nil
- fileprivate var _proto3Optional: Bool? = nil
- }
- /// Describes a oneof.
- struct Google_Protobuf_OneofDescriptorProto: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var name: String {
- get {return _name ?? String()}
- set {_name = newValue}
- }
- /// Returns true if `name` has been explicitly set.
- var hasName: Bool {return self._name != nil}
- /// Clears the value of `name`. Subsequent reads from it will return its default value.
- mutating func clearName() {self._name = nil}
- var options: Google_Protobuf_OneofOptions {
- get {return _options ?? Google_Protobuf_OneofOptions()}
- set {_options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return self._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {self._options = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _name: String? = nil
- fileprivate var _options: Google_Protobuf_OneofOptions? = nil
- }
- /// Describes an enum type.
- struct Google_Protobuf_EnumDescriptorProto: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var name: String {
- get {return _storage._name ?? String()}
- set {_uniqueStorage()._name = newValue}
- }
- /// Returns true if `name` has been explicitly set.
- var hasName: Bool {return _storage._name != nil}
- /// Clears the value of `name`. Subsequent reads from it will return its default value.
- mutating func clearName() {_uniqueStorage()._name = nil}
- var value: [Google_Protobuf_EnumValueDescriptorProto] {
- get {return _storage._value}
- set {_uniqueStorage()._value = newValue}
- }
- var options: Google_Protobuf_EnumOptions {
- get {return _storage._options ?? Google_Protobuf_EnumOptions()}
- set {_uniqueStorage()._options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return _storage._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {_uniqueStorage()._options = nil}
- /// Range of reserved numeric values. Reserved numeric values may not be used
- /// by enum values in the same enum declaration. Reserved ranges may not
- /// overlap.
- var reservedRange: [Google_Protobuf_EnumDescriptorProto.EnumReservedRange] {
- get {return _storage._reservedRange}
- set {_uniqueStorage()._reservedRange = newValue}
- }
- /// Reserved enum value names, which may not be reused. A given name may only
- /// be reserved once.
- var reservedName: [String] {
- get {return _storage._reservedName}
- set {_uniqueStorage()._reservedName = newValue}
- }
- /// Support for `export` and `local` keywords on enums.
- var visibility: Google_Protobuf_SymbolVisibility {
- get {return _storage._visibility ?? .visibilityUnset}
- set {_uniqueStorage()._visibility = newValue}
- }
- /// Returns true if `visibility` has been explicitly set.
- var hasVisibility: Bool {return _storage._visibility != nil}
- /// Clears the value of `visibility`. Subsequent reads from it will return its default value.
- mutating func clearVisibility() {_uniqueStorage()._visibility = nil}
- var unknownFields = UnknownStorage()
- /// Range of reserved numeric values. Reserved values may not be used by
- /// entries in the same enum. Reserved ranges may not overlap.
- ///
- /// Note that this is distinct from DescriptorProto.ReservedRange in that it
- /// is inclusive such that it can appropriately represent the entire int32
- /// domain.
- struct EnumReservedRange: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Inclusive.
- var start: Int32 {
- get {return _start ?? 0}
- set {_start = newValue}
- }
- /// Returns true if `start` has been explicitly set.
- var hasStart: Bool {return self._start != nil}
- /// Clears the value of `start`. Subsequent reads from it will return its default value.
- mutating func clearStart() {self._start = nil}
- /// Inclusive.
- var end: Int32 {
- get {return _end ?? 0}
- set {_end = newValue}
- }
- /// Returns true if `end` has been explicitly set.
- var hasEnd: Bool {return self._end != nil}
- /// Clears the value of `end`. Subsequent reads from it will return its default value.
- mutating func clearEnd() {self._end = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _start: Int32? = nil
- fileprivate var _end: Int32? = nil
- }
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- /// Describes a value within an enum.
- struct Google_Protobuf_EnumValueDescriptorProto: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var name: String {
- get {return _storage._name ?? String()}
- set {_uniqueStorage()._name = newValue}
- }
- /// Returns true if `name` has been explicitly set.
- var hasName: Bool {return _storage._name != nil}
- /// Clears the value of `name`. Subsequent reads from it will return its default value.
- mutating func clearName() {_uniqueStorage()._name = nil}
- var number: Int32 {
- get {return _storage._number ?? 0}
- set {_uniqueStorage()._number = newValue}
- }
- /// Returns true if `number` has been explicitly set.
- var hasNumber: Bool {return _storage._number != nil}
- /// Clears the value of `number`. Subsequent reads from it will return its default value.
- mutating func clearNumber() {_uniqueStorage()._number = nil}
- var options: Google_Protobuf_EnumValueOptions {
- get {return _storage._options ?? Google_Protobuf_EnumValueOptions()}
- set {_uniqueStorage()._options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return _storage._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {_uniqueStorage()._options = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- /// Describes a service.
- struct Google_Protobuf_ServiceDescriptorProto: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var name: String {
- get {return _name ?? String()}
- set {_name = newValue}
- }
- /// Returns true if `name` has been explicitly set.
- var hasName: Bool {return self._name != nil}
- /// Clears the value of `name`. Subsequent reads from it will return its default value.
- mutating func clearName() {self._name = nil}
- var method: [Google_Protobuf_MethodDescriptorProto] = []
- var options: Google_Protobuf_ServiceOptions {
- get {return _options ?? Google_Protobuf_ServiceOptions()}
- set {_options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return self._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {self._options = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _name: String? = nil
- fileprivate var _options: Google_Protobuf_ServiceOptions? = nil
- }
- /// Describes a method of a service.
- struct Google_Protobuf_MethodDescriptorProto: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var name: String {
- get {return _name ?? String()}
- set {_name = newValue}
- }
- /// Returns true if `name` has been explicitly set.
- var hasName: Bool {return self._name != nil}
- /// Clears the value of `name`. Subsequent reads from it will return its default value.
- mutating func clearName() {self._name = nil}
- /// Input and output type names. These are resolved in the same way as
- /// FieldDescriptorProto.type_name, but must refer to a message type.
- var inputType: String {
- get {return _inputType ?? String()}
- set {_inputType = newValue}
- }
- /// Returns true if `inputType` has been explicitly set.
- var hasInputType: Bool {return self._inputType != nil}
- /// Clears the value of `inputType`. Subsequent reads from it will return its default value.
- mutating func clearInputType() {self._inputType = nil}
- var outputType: String {
- get {return _outputType ?? String()}
- set {_outputType = newValue}
- }
- /// Returns true if `outputType` has been explicitly set.
- var hasOutputType: Bool {return self._outputType != nil}
- /// Clears the value of `outputType`. Subsequent reads from it will return its default value.
- mutating func clearOutputType() {self._outputType = nil}
- var options: Google_Protobuf_MethodOptions {
- get {return _options ?? Google_Protobuf_MethodOptions()}
- set {_options = newValue}
- }
- /// Returns true if `options` has been explicitly set.
- var hasOptions: Bool {return self._options != nil}
- /// Clears the value of `options`. Subsequent reads from it will return its default value.
- mutating func clearOptions() {self._options = nil}
- /// Identifies if client streams multiple client messages
- var clientStreaming: Bool {
- get {return _clientStreaming ?? false}
- set {_clientStreaming = newValue}
- }
- /// Returns true if `clientStreaming` has been explicitly set.
- var hasClientStreaming: Bool {return self._clientStreaming != nil}
- /// Clears the value of `clientStreaming`. Subsequent reads from it will return its default value.
- mutating func clearClientStreaming() {self._clientStreaming = nil}
- /// Identifies if server streams multiple server messages
- var serverStreaming: Bool {
- get {return _serverStreaming ?? false}
- set {_serverStreaming = newValue}
- }
- /// Returns true if `serverStreaming` has been explicitly set.
- var hasServerStreaming: Bool {return self._serverStreaming != nil}
- /// Clears the value of `serverStreaming`. Subsequent reads from it will return its default value.
- mutating func clearServerStreaming() {self._serverStreaming = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _name: String? = nil
- fileprivate var _inputType: String? = nil
- fileprivate var _outputType: String? = nil
- fileprivate var _options: Google_Protobuf_MethodOptions? = nil
- fileprivate var _clientStreaming: Bool? = nil
- fileprivate var _serverStreaming: Bool? = nil
- }
- struct Google_Protobuf_FileOptions: ExtensibleMessage, @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Sets the Java package where classes generated from this .proto will be
- /// placed. By default, the proto package is used, but this is often
- /// inappropriate because proto packages do not normally start with backwards
- /// domain names.
- var javaPackage: String {
- get {return _storage._javaPackage ?? String()}
- set {_uniqueStorage()._javaPackage = newValue}
- }
- /// Returns true if `javaPackage` has been explicitly set.
- var hasJavaPackage: Bool {return _storage._javaPackage != nil}
- /// Clears the value of `javaPackage`. Subsequent reads from it will return its default value.
- mutating func clearJavaPackage() {_uniqueStorage()._javaPackage = nil}
- /// Controls the name of the wrapper Java class generated for the .proto file.
- /// That class will always contain the .proto file's getDescriptor() method as
- /// well as any top-level extensions defined in the .proto file.
- /// If java_multiple_files is disabled, then all the other classes from the
- /// .proto file will be nested inside the single wrapper outer class.
- var javaOuterClassname: String {
- get {return _storage._javaOuterClassname ?? String()}
- set {_uniqueStorage()._javaOuterClassname = newValue}
- }
- /// Returns true if `javaOuterClassname` has been explicitly set.
- var hasJavaOuterClassname: Bool {return _storage._javaOuterClassname != nil}
- /// Clears the value of `javaOuterClassname`. Subsequent reads from it will return its default value.
- mutating func clearJavaOuterClassname() {_uniqueStorage()._javaOuterClassname = nil}
- /// If enabled, then the Java code generator will generate a separate .java
- /// file for each top-level message, enum, and service defined in the .proto
- /// file. Thus, these types will *not* be nested inside the wrapper class
- /// named by java_outer_classname. However, the wrapper class will still be
- /// generated to contain the file's getDescriptor() method as well as any
- /// top-level extensions defined in the file.
- var javaMultipleFiles: Bool {
- get {return _storage._javaMultipleFiles ?? false}
- set {_uniqueStorage()._javaMultipleFiles = newValue}
- }
- /// Returns true if `javaMultipleFiles` has been explicitly set.
- var hasJavaMultipleFiles: Bool {return _storage._javaMultipleFiles != nil}
- /// Clears the value of `javaMultipleFiles`. Subsequent reads from it will return its default value.
- mutating func clearJavaMultipleFiles() {_uniqueStorage()._javaMultipleFiles = nil}
- /// This option does nothing.
- ///
- /// NOTE: This field was marked as deprecated in the .proto file.
- var javaGenerateEqualsAndHash: Bool {
- get {return _storage._javaGenerateEqualsAndHash ?? false}
- set {_uniqueStorage()._javaGenerateEqualsAndHash = newValue}
- }
- /// Returns true if `javaGenerateEqualsAndHash` has been explicitly set.
- var hasJavaGenerateEqualsAndHash: Bool {return _storage._javaGenerateEqualsAndHash != nil}
- /// Clears the value of `javaGenerateEqualsAndHash`. Subsequent reads from it will return its default value.
- mutating func clearJavaGenerateEqualsAndHash() {_uniqueStorage()._javaGenerateEqualsAndHash = nil}
- /// A proto2 file can set this to true to opt in to UTF-8 checking for Java,
- /// which will throw an exception if invalid UTF-8 is parsed from the wire or
- /// assigned to a string field.
- ///
- /// TODO: clarify exactly what kinds of field types this option
- /// applies to, and update these docs accordingly.
- ///
- /// Proto3 files already perform these checks. Setting the option explicitly to
- /// false has no effect: it cannot be used to opt proto3 files out of UTF-8
- /// checks.
- var javaStringCheckUtf8: Bool {
- get {return _storage._javaStringCheckUtf8 ?? false}
- set {_uniqueStorage()._javaStringCheckUtf8 = newValue}
- }
- /// Returns true if `javaStringCheckUtf8` has been explicitly set.
- var hasJavaStringCheckUtf8: Bool {return _storage._javaStringCheckUtf8 != nil}
- /// Clears the value of `javaStringCheckUtf8`. Subsequent reads from it will return its default value.
- mutating func clearJavaStringCheckUtf8() {_uniqueStorage()._javaStringCheckUtf8 = nil}
- var optimizeFor: Google_Protobuf_FileOptions.OptimizeMode {
- get {return _storage._optimizeFor ?? .speed}
- set {_uniqueStorage()._optimizeFor = newValue}
- }
- /// Returns true if `optimizeFor` has been explicitly set.
- var hasOptimizeFor: Bool {return _storage._optimizeFor != nil}
- /// Clears the value of `optimizeFor`. Subsequent reads from it will return its default value.
- mutating func clearOptimizeFor() {_uniqueStorage()._optimizeFor = nil}
- /// Sets the Go package where structs generated from this .proto will be
- /// placed. If omitted, the Go package will be derived from the following:
- /// - The basename of the package import path, if provided.
- /// - Otherwise, the package statement in the .proto file, if present.
- /// - Otherwise, the basename of the .proto file, without extension.
- var goPackage: String {
- get {return _storage._goPackage ?? String()}
- set {_uniqueStorage()._goPackage = newValue}
- }
- /// Returns true if `goPackage` has been explicitly set.
- var hasGoPackage: Bool {return _storage._goPackage != nil}
- /// Clears the value of `goPackage`. Subsequent reads from it will return its default value.
- mutating func clearGoPackage() {_uniqueStorage()._goPackage = nil}
- /// Should generic services be generated in each language? "Generic" services
- /// are not specific to any particular RPC system. They are generated by the
- /// main code generators in each language (without additional plugins).
- /// Generic services were the only kind of service generation supported by
- /// early versions of google.protobuf.
- ///
- /// Generic services are now considered deprecated in favor of using plugins
- /// that generate code specific to your particular RPC system. Therefore,
- /// these default to false. Old code which depends on generic services should
- /// explicitly set them to true.
- var ccGenericServices: Bool {
- get {return _storage._ccGenericServices ?? false}
- set {_uniqueStorage()._ccGenericServices = newValue}
- }
- /// Returns true if `ccGenericServices` has been explicitly set.
- var hasCcGenericServices: Bool {return _storage._ccGenericServices != nil}
- /// Clears the value of `ccGenericServices`. Subsequent reads from it will return its default value.
- mutating func clearCcGenericServices() {_uniqueStorage()._ccGenericServices = nil}
- var javaGenericServices: Bool {
- get {return _storage._javaGenericServices ?? false}
- set {_uniqueStorage()._javaGenericServices = newValue}
- }
- /// Returns true if `javaGenericServices` has been explicitly set.
- var hasJavaGenericServices: Bool {return _storage._javaGenericServices != nil}
- /// Clears the value of `javaGenericServices`. Subsequent reads from it will return its default value.
- mutating func clearJavaGenericServices() {_uniqueStorage()._javaGenericServices = nil}
- var pyGenericServices: Bool {
- get {return _storage._pyGenericServices ?? false}
- set {_uniqueStorage()._pyGenericServices = newValue}
- }
- /// Returns true if `pyGenericServices` has been explicitly set.
- var hasPyGenericServices: Bool {return _storage._pyGenericServices != nil}
- /// Clears the value of `pyGenericServices`. Subsequent reads from it will return its default value.
- mutating func clearPyGenericServices() {_uniqueStorage()._pyGenericServices = nil}
- /// Is this file deprecated?
- /// Depending on the target platform, this can emit Deprecated annotations
- /// for everything in the file, or it will be completely ignored; in the very
- /// least, this is a formalization for deprecating files.
- var deprecated: Bool {
- get {return _storage._deprecated ?? false}
- set {_uniqueStorage()._deprecated = newValue}
- }
- /// Returns true if `deprecated` has been explicitly set.
- var hasDeprecated: Bool {return _storage._deprecated != nil}
- /// Clears the value of `deprecated`. Subsequent reads from it will return its default value.
- mutating func clearDeprecated() {_uniqueStorage()._deprecated = nil}
- /// Enables the use of arenas for the proto messages in this file. This applies
- /// only to generated classes for C++.
- var ccEnableArenas: Bool {
- get {return _storage._ccEnableArenas ?? true}
- set {_uniqueStorage()._ccEnableArenas = newValue}
- }
- /// Returns true if `ccEnableArenas` has been explicitly set.
- var hasCcEnableArenas: Bool {return _storage._ccEnableArenas != nil}
- /// Clears the value of `ccEnableArenas`. Subsequent reads from it will return its default value.
- mutating func clearCcEnableArenas() {_uniqueStorage()._ccEnableArenas = nil}
- /// Sets the objective c class prefix which is prepended to all objective c
- /// generated classes from this .proto. There is no default.
- var objcClassPrefix: String {
- get {return _storage._objcClassPrefix ?? String()}
- set {_uniqueStorage()._objcClassPrefix = newValue}
- }
- /// Returns true if `objcClassPrefix` has been explicitly set.
- var hasObjcClassPrefix: Bool {return _storage._objcClassPrefix != nil}
- /// Clears the value of `objcClassPrefix`. Subsequent reads from it will return its default value.
- mutating func clearObjcClassPrefix() {_uniqueStorage()._objcClassPrefix = nil}
- /// Namespace for generated classes; defaults to the package.
- var csharpNamespace: String {
- get {return _storage._csharpNamespace ?? String()}
- set {_uniqueStorage()._csharpNamespace = newValue}
- }
- /// Returns true if `csharpNamespace` has been explicitly set.
- var hasCsharpNamespace: Bool {return _storage._csharpNamespace != nil}
- /// Clears the value of `csharpNamespace`. Subsequent reads from it will return its default value.
- mutating func clearCsharpNamespace() {_uniqueStorage()._csharpNamespace = nil}
- /// By default Swift generators will take the proto package and CamelCase it
- /// replacing '.' with underscore and use that to prefix the types/symbols
- /// defined. When this options is provided, they will use this value instead
- /// to prefix the types/symbols defined.
- var swiftPrefix: String {
- get {return _storage._swiftPrefix ?? String()}
- set {_uniqueStorage()._swiftPrefix = newValue}
- }
- /// Returns true if `swiftPrefix` has been explicitly set.
- var hasSwiftPrefix: Bool {return _storage._swiftPrefix != nil}
- /// Clears the value of `swiftPrefix`. Subsequent reads from it will return its default value.
- mutating func clearSwiftPrefix() {_uniqueStorage()._swiftPrefix = nil}
- /// Sets the php class prefix which is prepended to all php generated classes
- /// from this .proto. Default is empty.
- var phpClassPrefix: String {
- get {return _storage._phpClassPrefix ?? String()}
- set {_uniqueStorage()._phpClassPrefix = newValue}
- }
- /// Returns true if `phpClassPrefix` has been explicitly set.
- var hasPhpClassPrefix: Bool {return _storage._phpClassPrefix != nil}
- /// Clears the value of `phpClassPrefix`. Subsequent reads from it will return its default value.
- mutating func clearPhpClassPrefix() {_uniqueStorage()._phpClassPrefix = nil}
- /// Use this option to change the namespace of php generated classes. Default
- /// is empty. When this option is empty, the package name will be used for
- /// determining the namespace.
- var phpNamespace: String {
- get {return _storage._phpNamespace ?? String()}
- set {_uniqueStorage()._phpNamespace = newValue}
- }
- /// Returns true if `phpNamespace` has been explicitly set.
- var hasPhpNamespace: Bool {return _storage._phpNamespace != nil}
- /// Clears the value of `phpNamespace`. Subsequent reads from it will return its default value.
- mutating func clearPhpNamespace() {_uniqueStorage()._phpNamespace = nil}
- /// Use this option to change the namespace of php generated metadata classes.
- /// Default is empty. When this option is empty, the proto file name will be
- /// used for determining the namespace.
- var phpMetadataNamespace: String {
- get {return _storage._phpMetadataNamespace ?? String()}
- set {_uniqueStorage()._phpMetadataNamespace = newValue}
- }
- /// Returns true if `phpMetadataNamespace` has been explicitly set.
- var hasPhpMetadataNamespace: Bool {return _storage._phpMetadataNamespace != nil}
- /// Clears the value of `phpMetadataNamespace`. Subsequent reads from it will return its default value.
- mutating func clearPhpMetadataNamespace() {_uniqueStorage()._phpMetadataNamespace = nil}
- /// Use this option to change the package of ruby generated classes. Default
- /// is empty. When this option is not set, the package name will be used for
- /// determining the ruby package.
- var rubyPackage: String {
- get {return _storage._rubyPackage ?? String()}
- set {_uniqueStorage()._rubyPackage = newValue}
- }
- /// Returns true if `rubyPackage` has been explicitly set.
- var hasRubyPackage: Bool {return _storage._rubyPackage != nil}
- /// Clears the value of `rubyPackage`. Subsequent reads from it will return its default value.
- mutating func clearRubyPackage() {_uniqueStorage()._rubyPackage = nil}
- /// Any features defined in the specific edition.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var features: Google_Protobuf_FeatureSet {
- get {return _storage._features ?? Google_Protobuf_FeatureSet()}
- set {_uniqueStorage()._features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return _storage._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {_uniqueStorage()._features = nil}
- /// The parser stores options it doesn't recognize here.
- /// See the documentation for the "Options" section above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] {
- get {return _storage._uninterpretedOption}
- set {_uniqueStorage()._uninterpretedOption = newValue}
- }
- var unknownFields = UnknownStorage()
- /// Generated classes can be optimized for speed or code size.
- enum OptimizeMode: Int, Enum, Swift.CaseIterable {
- /// Generate complete code for parsing, serialization,
- case speed = 1
- /// etc.
- case codeSize = 2
- /// Generate code using MessageLite and the lite runtime.
- case liteRuntime = 3
- init() {
- self = .speed
- }
- }
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- struct Google_Protobuf_MessageOptions: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Set true to use the old proto1 MessageSet wire format for extensions.
- /// This is provided for backwards-compatibility with the MessageSet wire
- /// format. You should not use this for any other reason: It's less
- /// efficient, has fewer features, and is more complicated.
- ///
- /// The message must be defined exactly as follows:
- /// message Foo {
- /// option message_set_wire_format = true;
- /// extensions 4 to max;
- /// }
- /// Note that the message cannot have any defined fields; MessageSets only
- /// have extensions.
- ///
- /// All extensions of your type must be singular messages; e.g. they cannot
- /// be int32s, enums, or repeated messages.
- ///
- /// Because this is an option, the above two restrictions are not enforced by
- /// the protocol compiler.
- var messageSetWireFormat: Bool {
- get {return _messageSetWireFormat ?? false}
- set {_messageSetWireFormat = newValue}
- }
- /// Returns true if `messageSetWireFormat` has been explicitly set.
- var hasMessageSetWireFormat: Bool {return self._messageSetWireFormat != nil}
- /// Clears the value of `messageSetWireFormat`. Subsequent reads from it will return its default value.
- mutating func clearMessageSetWireFormat() {self._messageSetWireFormat = nil}
- /// Disables the generation of the standard "descriptor()" accessor, which can
- /// conflict with a field of the same name. This is meant to make migration
- /// from proto1 easier; new code should avoid fields named "descriptor".
- var noStandardDescriptorAccessor: Bool {
- get {return _noStandardDescriptorAccessor ?? false}
- set {_noStandardDescriptorAccessor = newValue}
- }
- /// Returns true if `noStandardDescriptorAccessor` has been explicitly set.
- var hasNoStandardDescriptorAccessor: Bool {return self._noStandardDescriptorAccessor != nil}
- /// Clears the value of `noStandardDescriptorAccessor`. Subsequent reads from it will return its default value.
- mutating func clearNoStandardDescriptorAccessor() {self._noStandardDescriptorAccessor = nil}
- /// Is this message deprecated?
- /// Depending on the target platform, this can emit Deprecated annotations
- /// for the message, or it will be completely ignored; in the very least,
- /// this is a formalization for deprecating messages.
- var deprecated: Bool {
- get {return _deprecated ?? false}
- set {_deprecated = newValue}
- }
- /// Returns true if `deprecated` has been explicitly set.
- var hasDeprecated: Bool {return self._deprecated != nil}
- /// Clears the value of `deprecated`. Subsequent reads from it will return its default value.
- mutating func clearDeprecated() {self._deprecated = nil}
- /// Whether the message is an automatically generated map entry type for the
- /// maps field.
- ///
- /// For maps fields:
- /// map<KeyType, ValueType> map_field = 1;
- /// The parsed descriptor looks like:
- /// message MapFieldEntry {
- /// option map_entry = true;
- /// optional KeyType key = 1;
- /// optional ValueType value = 2;
- /// }
- /// repeated MapFieldEntry map_field = 1;
- ///
- /// Implementations may choose not to generate the map_entry=true message, but
- /// use a native map in the target language to hold the keys and values.
- /// The reflection APIs in such implementations still need to work as
- /// if the field is a repeated message field.
- ///
- /// NOTE: Do not set the option in .proto files. Always use the maps syntax
- /// instead. The option should only be implicitly set by the proto compiler
- /// parser.
- var mapEntry: Bool {
- get {return _mapEntry ?? false}
- set {_mapEntry = newValue}
- }
- /// Returns true if `mapEntry` has been explicitly set.
- var hasMapEntry: Bool {return self._mapEntry != nil}
- /// Clears the value of `mapEntry`. Subsequent reads from it will return its default value.
- mutating func clearMapEntry() {self._mapEntry = nil}
- /// Enable the legacy handling of JSON field name conflicts. This lowercases
- /// and strips underscored from the fields before comparison in proto3 only.
- /// The new behavior takes `json_name` into account and applies to proto2 as
- /// well.
- ///
- /// This should only be used as a temporary measure against broken builds due
- /// to the change in behavior for JSON field name conflicts.
- ///
- /// TODO This is legacy behavior we plan to remove once downstream
- /// teams have had time to migrate.
- ///
- /// NOTE: This field was marked as deprecated in the .proto file.
- var deprecatedLegacyJsonFieldConflicts: Bool {
- get {return _deprecatedLegacyJsonFieldConflicts ?? false}
- set {_deprecatedLegacyJsonFieldConflicts = newValue}
- }
- /// Returns true if `deprecatedLegacyJsonFieldConflicts` has been explicitly set.
- var hasDeprecatedLegacyJsonFieldConflicts: Bool {return self._deprecatedLegacyJsonFieldConflicts != nil}
- /// Clears the value of `deprecatedLegacyJsonFieldConflicts`. Subsequent reads from it will return its default value.
- mutating func clearDeprecatedLegacyJsonFieldConflicts() {self._deprecatedLegacyJsonFieldConflicts = nil}
- /// Any features defined in the specific edition.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var features: Google_Protobuf_FeatureSet {
- get {return _features ?? Google_Protobuf_FeatureSet()}
- set {_features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return self._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {self._features = nil}
- /// The parser stores options it doesn't recognize here. See above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- var unknownFields = UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _messageSetWireFormat: Bool? = nil
- fileprivate var _noStandardDescriptorAccessor: Bool? = nil
- fileprivate var _deprecated: Bool? = nil
- fileprivate var _mapEntry: Bool? = nil
- fileprivate var _deprecatedLegacyJsonFieldConflicts: Bool? = nil
- fileprivate var _features: Google_Protobuf_FeatureSet? = nil
- }
- struct Google_Protobuf_FieldOptions: ExtensibleMessage, @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
- /// The ctype option instructs the C++ code generator to use a different
- /// representation of the field than it normally would. See the specific
- /// options below. This option is only implemented to support use of
- /// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
- /// type "bytes" in the open source release.
- /// TODO: make ctype actually deprecated.
- var ctype: Google_Protobuf_FieldOptions.CType {
- get {return _storage._ctype ?? .string}
- set {_uniqueStorage()._ctype = newValue}
- }
- /// Returns true if `ctype` has been explicitly set.
- var hasCtype: Bool {return _storage._ctype != nil}
- /// Clears the value of `ctype`. Subsequent reads from it will return its default value.
- mutating func clearCtype() {_uniqueStorage()._ctype = nil}
- /// The packed option can be enabled for repeated primitive fields to enable
- /// a more efficient representation on the wire. Rather than repeatedly
- /// writing the tag and type for each element, the entire array is encoded as
- /// a single length-delimited blob. In proto3, only explicit setting it to
- /// false will avoid using packed encoding. This option is prohibited in
- /// Editions, but the `repeated_field_encoding` feature can be used to control
- /// the behavior.
- var packed: Bool {
- get {return _storage._packed ?? false}
- set {_uniqueStorage()._packed = newValue}
- }
- /// Returns true if `packed` has been explicitly set.
- var hasPacked: Bool {return _storage._packed != nil}
- /// Clears the value of `packed`. Subsequent reads from it will return its default value.
- mutating func clearPacked() {_uniqueStorage()._packed = nil}
- /// The jstype option determines the JavaScript type used for values of the
- /// field. The option is permitted only for 64 bit integral and fixed types
- /// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
- /// is represented as JavaScript string, which avoids loss of precision that
- /// can happen when a large value is converted to a floating point JavaScript.
- /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
- /// use the JavaScript "number" type. The behavior of the default option
- /// JS_NORMAL is implementation dependent.
- ///
- /// This option is an enum to permit additional types to be added, e.g.
- /// goog.math.Integer.
- var jstype: Google_Protobuf_FieldOptions.JSType {
- get {return _storage._jstype ?? .jsNormal}
- set {_uniqueStorage()._jstype = newValue}
- }
- /// Returns true if `jstype` has been explicitly set.
- var hasJstype: Bool {return _storage._jstype != nil}
- /// Clears the value of `jstype`. Subsequent reads from it will return its default value.
- mutating func clearJstype() {_uniqueStorage()._jstype = nil}
- /// Should this field be parsed lazily? Lazy applies only to message-type
- /// fields. It means that when the outer message is initially parsed, the
- /// inner message's contents will not be parsed but instead stored in encoded
- /// form. The inner message will actually be parsed when it is first accessed.
- ///
- /// This is only a hint. Implementations are free to choose whether to use
- /// eager or lazy parsing regardless of the value of this option. However,
- /// setting this option true suggests that the protocol author believes that
- /// using lazy parsing on this field is worth the additional bookkeeping
- /// overhead typically needed to implement it.
- ///
- /// This option does not affect the public interface of any generated code;
- /// all method signatures remain the same. Furthermore, thread-safety of the
- /// interface is not affected by this option; const methods remain safe to
- /// call from multiple threads concurrently, while non-const methods continue
- /// to require exclusive access.
- ///
- /// Note that lazy message fields are still eagerly verified to check
- /// ill-formed wireformat or missing required fields. Calling IsInitialized()
- /// on the outer message would fail if the inner message has missing required
- /// fields. Failed verification would result in parsing failure (except when
- /// uninitialized messages are acceptable).
- var lazy: Bool {
- get {return _storage._lazy ?? false}
- set {_uniqueStorage()._lazy = newValue}
- }
- /// Returns true if `lazy` has been explicitly set.
- var hasLazy: Bool {return _storage._lazy != nil}
- /// Clears the value of `lazy`. Subsequent reads from it will return its default value.
- mutating func clearLazy() {_uniqueStorage()._lazy = nil}
- /// unverified_lazy does no correctness checks on the byte stream. This should
- /// only be used where lazy with verification is prohibitive for performance
- /// reasons.
- var unverifiedLazy: Bool {
- get {return _storage._unverifiedLazy ?? false}
- set {_uniqueStorage()._unverifiedLazy = newValue}
- }
- /// Returns true if `unverifiedLazy` has been explicitly set.
- var hasUnverifiedLazy: Bool {return _storage._unverifiedLazy != nil}
- /// Clears the value of `unverifiedLazy`. Subsequent reads from it will return its default value.
- mutating func clearUnverifiedLazy() {_uniqueStorage()._unverifiedLazy = nil}
- /// Is this field deprecated?
- /// Depending on the target platform, this can emit Deprecated annotations
- /// for accessors, or it will be completely ignored; in the very least, this
- /// is a formalization for deprecating fields.
- var deprecated: Bool {
- get {return _storage._deprecated ?? false}
- set {_uniqueStorage()._deprecated = newValue}
- }
- /// Returns true if `deprecated` has been explicitly set.
- var hasDeprecated: Bool {return _storage._deprecated != nil}
- /// Clears the value of `deprecated`. Subsequent reads from it will return its default value.
- mutating func clearDeprecated() {_uniqueStorage()._deprecated = nil}
- /// For Google-internal migration only. Do not use.
- var weak: Bool {
- get {return _storage._weak ?? false}
- set {_uniqueStorage()._weak = newValue}
- }
- /// Returns true if `weak` has been explicitly set.
- var hasWeak: Bool {return _storage._weak != nil}
- /// Clears the value of `weak`. Subsequent reads from it will return its default value.
- mutating func clearWeak() {_uniqueStorage()._weak = nil}
- /// Indicate that the field value should not be printed out when using debug
- /// formats, e.g. when the field contains sensitive credentials.
- var debugRedact: Bool {
- get {return _storage._debugRedact ?? false}
- set {_uniqueStorage()._debugRedact = newValue}
- }
- /// Returns true if `debugRedact` has been explicitly set.
- var hasDebugRedact: Bool {return _storage._debugRedact != nil}
- /// Clears the value of `debugRedact`. Subsequent reads from it will return its default value.
- mutating func clearDebugRedact() {_uniqueStorage()._debugRedact = nil}
- var retention: Google_Protobuf_FieldOptions.OptionRetention {
- get {return _storage._retention ?? .retentionUnknown}
- set {_uniqueStorage()._retention = newValue}
- }
- /// Returns true if `retention` has been explicitly set.
- var hasRetention: Bool {return _storage._retention != nil}
- /// Clears the value of `retention`. Subsequent reads from it will return its default value.
- mutating func clearRetention() {_uniqueStorage()._retention = nil}
- var targets: [Google_Protobuf_FieldOptions.OptionTargetType] {
- get {return _storage._targets}
- set {_uniqueStorage()._targets = newValue}
- }
- var editionDefaults: [Google_Protobuf_FieldOptions.EditionDefault] {
- get {return _storage._editionDefaults}
- set {_uniqueStorage()._editionDefaults = newValue}
- }
- /// Any features defined in the specific edition.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var features: Google_Protobuf_FeatureSet {
- get {return _storage._features ?? Google_Protobuf_FeatureSet()}
- set {_uniqueStorage()._features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return _storage._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {_uniqueStorage()._features = nil}
- var featureSupport: Google_Protobuf_FieldOptions.FeatureSupport {
- get {return _storage._featureSupport ?? Google_Protobuf_FieldOptions.FeatureSupport()}
- set {_uniqueStorage()._featureSupport = newValue}
- }
- /// Returns true if `featureSupport` has been explicitly set.
- var hasFeatureSupport: Bool {return _storage._featureSupport != nil}
- /// Clears the value of `featureSupport`. Subsequent reads from it will return its default value.
- mutating func clearFeatureSupport() {_uniqueStorage()._featureSupport = nil}
- /// The parser stores options it doesn't recognize here. See above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] {
- get {return _storage._uninterpretedOption}
- set {_uniqueStorage()._uninterpretedOption = newValue}
- }
- var unknownFields = UnknownStorage()
- enum CType: Int, Enum, Swift.CaseIterable {
- /// Default mode.
- case string = 0
- /// The option [ctype=CORD] may be applied to a non-repeated field of type
- /// "bytes". It indicates that in C++, the data should be stored in a Cord
- /// instead of a string. For very large strings, this may reduce memory
- /// fragmentation. It may also allow better performance when parsing from a
- /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then
- /// alias the original buffer.
- case cord = 1
- case stringPiece = 2
- init() {
- self = .string
- }
- }
- enum JSType: Int, Enum, Swift.CaseIterable {
- /// Use the default type.
- case jsNormal = 0
- /// Use JavaScript strings.
- case jsString = 1
- /// Use JavaScript numbers.
- case jsNumber = 2
- init() {
- self = .jsNormal
- }
- }
- /// If set to RETENTION_SOURCE, the option will be omitted from the binary.
- enum OptionRetention: Int, Enum, Swift.CaseIterable {
- case retentionUnknown = 0
- case retentionRuntime = 1
- case retentionSource = 2
- init() {
- self = .retentionUnknown
- }
- }
- /// This indicates the types of entities that the field may apply to when used
- /// as an option. If it is unset, then the field may be freely used as an
- /// option on any kind of entity.
- enum OptionTargetType: Int, Enum, Swift.CaseIterable {
- case targetTypeUnknown = 0
- case targetTypeFile = 1
- case targetTypeExtensionRange = 2
- case targetTypeMessage = 3
- case targetTypeField = 4
- case targetTypeOneof = 5
- case targetTypeEnum = 6
- case targetTypeEnumEntry = 7
- case targetTypeService = 8
- case targetTypeMethod = 9
- init() {
- self = .targetTypeUnknown
- }
- }
- struct EditionDefault: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var edition: Google_Protobuf_Edition {
- get {return _edition ?? .unknown}
- set {_edition = newValue}
- }
- /// Returns true if `edition` has been explicitly set.
- var hasEdition: Bool {return self._edition != nil}
- /// Clears the value of `edition`. Subsequent reads from it will return its default value.
- mutating func clearEdition() {self._edition = nil}
- /// Textproto value.
- var value: String {
- get {return _value ?? String()}
- set {_value = newValue}
- }
- /// Returns true if `value` has been explicitly set.
- var hasValue: Bool {return self._value != nil}
- /// Clears the value of `value`. Subsequent reads from it will return its default value.
- mutating func clearValue() {self._value = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _edition: Google_Protobuf_Edition? = nil
- fileprivate var _value: String? = nil
- }
- /// Information about the support window of a feature.
- struct FeatureSupport: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// The edition that this feature was first available in. In editions
- /// earlier than this one, the default assigned to EDITION_LEGACY will be
- /// used, and proto files will not be able to override it.
- var editionIntroduced: Google_Protobuf_Edition {
- get {return _editionIntroduced ?? .unknown}
- set {_editionIntroduced = newValue}
- }
- /// Returns true if `editionIntroduced` has been explicitly set.
- var hasEditionIntroduced: Bool {return self._editionIntroduced != nil}
- /// Clears the value of `editionIntroduced`. Subsequent reads from it will return its default value.
- mutating func clearEditionIntroduced() {self._editionIntroduced = nil}
- /// The edition this feature becomes deprecated in. Using this after this
- /// edition may trigger warnings.
- var editionDeprecated: Google_Protobuf_Edition {
- get {return _editionDeprecated ?? .unknown}
- set {_editionDeprecated = newValue}
- }
- /// Returns true if `editionDeprecated` has been explicitly set.
- var hasEditionDeprecated: Bool {return self._editionDeprecated != nil}
- /// Clears the value of `editionDeprecated`. Subsequent reads from it will return its default value.
- mutating func clearEditionDeprecated() {self._editionDeprecated = nil}
- /// The deprecation warning text if this feature is used after the edition it
- /// was marked deprecated in.
- var deprecationWarning: String {
- get {return _deprecationWarning ?? String()}
- set {_deprecationWarning = newValue}
- }
- /// Returns true if `deprecationWarning` has been explicitly set.
- var hasDeprecationWarning: Bool {return self._deprecationWarning != nil}
- /// Clears the value of `deprecationWarning`. Subsequent reads from it will return its default value.
- mutating func clearDeprecationWarning() {self._deprecationWarning = nil}
- /// The edition this feature is no longer available in. In editions after
- /// this one, the last default assigned will be used, and proto files will
- /// not be able to override it.
- var editionRemoved: Google_Protobuf_Edition {
- get {return _editionRemoved ?? .unknown}
- set {_editionRemoved = newValue}
- }
- /// Returns true if `editionRemoved` has been explicitly set.
- var hasEditionRemoved: Bool {return self._editionRemoved != nil}
- /// Clears the value of `editionRemoved`. Subsequent reads from it will return its default value.
- mutating func clearEditionRemoved() {self._editionRemoved = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _editionIntroduced: Google_Protobuf_Edition? = nil
- fileprivate var _editionDeprecated: Google_Protobuf_Edition? = nil
- fileprivate var _deprecationWarning: String? = nil
- fileprivate var _editionRemoved: Google_Protobuf_Edition? = nil
- }
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- struct Google_Protobuf_OneofOptions: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Any features defined in the specific edition.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var features: Google_Protobuf_FeatureSet {
- get {return _features ?? Google_Protobuf_FeatureSet()}
- set {_features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return self._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {self._features = nil}
- /// The parser stores options it doesn't recognize here. See above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- var unknownFields = UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _features: Google_Protobuf_FeatureSet? = nil
- }
- struct Google_Protobuf_EnumOptions: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Set this option to true to allow mapping different tag names to the same
- /// value.
- var allowAlias: Bool {
- get {return _allowAlias ?? false}
- set {_allowAlias = newValue}
- }
- /// Returns true if `allowAlias` has been explicitly set.
- var hasAllowAlias: Bool {return self._allowAlias != nil}
- /// Clears the value of `allowAlias`. Subsequent reads from it will return its default value.
- mutating func clearAllowAlias() {self._allowAlias = nil}
- /// Is this enum deprecated?
- /// Depending on the target platform, this can emit Deprecated annotations
- /// for the enum, or it will be completely ignored; in the very least, this
- /// is a formalization for deprecating enums.
- var deprecated: Bool {
- get {return _deprecated ?? false}
- set {_deprecated = newValue}
- }
- /// Returns true if `deprecated` has been explicitly set.
- var hasDeprecated: Bool {return self._deprecated != nil}
- /// Clears the value of `deprecated`. Subsequent reads from it will return its default value.
- mutating func clearDeprecated() {self._deprecated = nil}
- /// Enable the legacy handling of JSON field name conflicts. This lowercases
- /// and strips underscored from the fields before comparison in proto3 only.
- /// The new behavior takes `json_name` into account and applies to proto2 as
- /// well.
- /// TODO Remove this legacy behavior once downstream teams have
- /// had time to migrate.
- ///
- /// NOTE: This field was marked as deprecated in the .proto file.
- var deprecatedLegacyJsonFieldConflicts: Bool {
- get {return _deprecatedLegacyJsonFieldConflicts ?? false}
- set {_deprecatedLegacyJsonFieldConflicts = newValue}
- }
- /// Returns true if `deprecatedLegacyJsonFieldConflicts` has been explicitly set.
- var hasDeprecatedLegacyJsonFieldConflicts: Bool {return self._deprecatedLegacyJsonFieldConflicts != nil}
- /// Clears the value of `deprecatedLegacyJsonFieldConflicts`. Subsequent reads from it will return its default value.
- mutating func clearDeprecatedLegacyJsonFieldConflicts() {self._deprecatedLegacyJsonFieldConflicts = nil}
- /// Any features defined in the specific edition.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var features: Google_Protobuf_FeatureSet {
- get {return _features ?? Google_Protobuf_FeatureSet()}
- set {_features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return self._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {self._features = nil}
- /// The parser stores options it doesn't recognize here. See above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- var unknownFields = UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _allowAlias: Bool? = nil
- fileprivate var _deprecated: Bool? = nil
- fileprivate var _deprecatedLegacyJsonFieldConflicts: Bool? = nil
- fileprivate var _features: Google_Protobuf_FeatureSet? = nil
- }
- struct Google_Protobuf_EnumValueOptions: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Is this enum value deprecated?
- /// Depending on the target platform, this can emit Deprecated annotations
- /// for the enum value, or it will be completely ignored; in the very least,
- /// this is a formalization for deprecating enum values.
- var deprecated: Bool {
- get {return _deprecated ?? false}
- set {_deprecated = newValue}
- }
- /// Returns true if `deprecated` has been explicitly set.
- var hasDeprecated: Bool {return self._deprecated != nil}
- /// Clears the value of `deprecated`. Subsequent reads from it will return its default value.
- mutating func clearDeprecated() {self._deprecated = nil}
- /// Any features defined in the specific edition.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var features: Google_Protobuf_FeatureSet {
- get {return _features ?? Google_Protobuf_FeatureSet()}
- set {_features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return self._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {self._features = nil}
- /// Indicate that fields annotated with this enum value should not be printed
- /// out when using debug formats, e.g. when the field contains sensitive
- /// credentials.
- var debugRedact: Bool {
- get {return _debugRedact ?? false}
- set {_debugRedact = newValue}
- }
- /// Returns true if `debugRedact` has been explicitly set.
- var hasDebugRedact: Bool {return self._debugRedact != nil}
- /// Clears the value of `debugRedact`. Subsequent reads from it will return its default value.
- mutating func clearDebugRedact() {self._debugRedact = nil}
- /// Information about the support window of a feature value.
- var featureSupport: Google_Protobuf_FieldOptions.FeatureSupport {
- get {return _featureSupport ?? Google_Protobuf_FieldOptions.FeatureSupport()}
- set {_featureSupport = newValue}
- }
- /// Returns true if `featureSupport` has been explicitly set.
- var hasFeatureSupport: Bool {return self._featureSupport != nil}
- /// Clears the value of `featureSupport`. Subsequent reads from it will return its default value.
- mutating func clearFeatureSupport() {self._featureSupport = nil}
- /// The parser stores options it doesn't recognize here. See above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- var unknownFields = UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _deprecated: Bool? = nil
- fileprivate var _features: Google_Protobuf_FeatureSet? = nil
- fileprivate var _debugRedact: Bool? = nil
- fileprivate var _featureSupport: Google_Protobuf_FieldOptions.FeatureSupport? = nil
- }
- struct Google_Protobuf_ServiceOptions: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Any features defined in the specific edition.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var features: Google_Protobuf_FeatureSet {
- get {return _features ?? Google_Protobuf_FeatureSet()}
- set {_features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return self._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {self._features = nil}
- /// Is this service deprecated?
- /// Depending on the target platform, this can emit Deprecated annotations
- /// for the service, or it will be completely ignored; in the very least,
- /// this is a formalization for deprecating services.
- var deprecated: Bool {
- get {return _deprecated ?? false}
- set {_deprecated = newValue}
- }
- /// Returns true if `deprecated` has been explicitly set.
- var hasDeprecated: Bool {return self._deprecated != nil}
- /// Clears the value of `deprecated`. Subsequent reads from it will return its default value.
- mutating func clearDeprecated() {self._deprecated = nil}
- /// The parser stores options it doesn't recognize here. See above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- var unknownFields = UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _features: Google_Protobuf_FeatureSet? = nil
- fileprivate var _deprecated: Bool? = nil
- }
- struct Google_Protobuf_MethodOptions: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Is this method deprecated?
- /// Depending on the target platform, this can emit Deprecated annotations
- /// for the method, or it will be completely ignored; in the very least,
- /// this is a formalization for deprecating methods.
- var deprecated: Bool {
- get {return _deprecated ?? false}
- set {_deprecated = newValue}
- }
- /// Returns true if `deprecated` has been explicitly set.
- var hasDeprecated: Bool {return self._deprecated != nil}
- /// Clears the value of `deprecated`. Subsequent reads from it will return its default value.
- mutating func clearDeprecated() {self._deprecated = nil}
- var idempotencyLevel: Google_Protobuf_MethodOptions.IdempotencyLevel {
- get {return _idempotencyLevel ?? .idempotencyUnknown}
- set {_idempotencyLevel = newValue}
- }
- /// Returns true if `idempotencyLevel` has been explicitly set.
- var hasIdempotencyLevel: Bool {return self._idempotencyLevel != nil}
- /// Clears the value of `idempotencyLevel`. Subsequent reads from it will return its default value.
- mutating func clearIdempotencyLevel() {self._idempotencyLevel = nil}
- /// Any features defined in the specific edition.
- /// WARNING: This field should only be used by protobuf plugins or special
- /// cases like the proto compiler. Other uses are discouraged and
- /// developers should rely on the protoreflect APIs for their client language.
- var features: Google_Protobuf_FeatureSet {
- get {return _features ?? Google_Protobuf_FeatureSet()}
- set {_features = newValue}
- }
- /// Returns true if `features` has been explicitly set.
- var hasFeatures: Bool {return self._features != nil}
- /// Clears the value of `features`. Subsequent reads from it will return its default value.
- mutating func clearFeatures() {self._features = nil}
- /// The parser stores options it doesn't recognize here. See above.
- var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- var unknownFields = UnknownStorage()
- /// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
- /// or neither? HTTP based RPC implementation may choose GET verb for safe
- /// methods, and PUT verb for idempotent methods instead of the default POST.
- enum IdempotencyLevel: Int, Enum, Swift.CaseIterable {
- case idempotencyUnknown = 0
- /// implies idempotent
- case noSideEffects = 1
- /// idempotent, but may have side effects
- case idempotent = 2
- init() {
- self = .idempotencyUnknown
- }
- }
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _deprecated: Bool? = nil
- fileprivate var _idempotencyLevel: Google_Protobuf_MethodOptions.IdempotencyLevel? = nil
- fileprivate var _features: Google_Protobuf_FeatureSet? = nil
- }
- /// A message representing a option the parser does not recognize. This only
- /// appears in options protos created by the compiler::Parser class.
- /// DescriptorPool resolves these when building Descriptor objects. Therefore,
- /// options protos in descriptor objects (e.g. returned by Descriptor::options(),
- /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
- /// in them.
- struct Google_Protobuf_UninterpretedOption: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var name: [Google_Protobuf_UninterpretedOption.NamePart] = []
- /// The value of the uninterpreted option, in whatever type the tokenizer
- /// identified it as during parsing. Exactly one of these should be set.
- var identifierValue: String {
- get {return _identifierValue ?? String()}
- set {_identifierValue = newValue}
- }
- /// Returns true if `identifierValue` has been explicitly set.
- var hasIdentifierValue: Bool {return self._identifierValue != nil}
- /// Clears the value of `identifierValue`. Subsequent reads from it will return its default value.
- mutating func clearIdentifierValue() {self._identifierValue = nil}
- var positiveIntValue: UInt64 {
- get {return _positiveIntValue ?? 0}
- set {_positiveIntValue = newValue}
- }
- /// Returns true if `positiveIntValue` has been explicitly set.
- var hasPositiveIntValue: Bool {return self._positiveIntValue != nil}
- /// Clears the value of `positiveIntValue`. Subsequent reads from it will return its default value.
- mutating func clearPositiveIntValue() {self._positiveIntValue = nil}
- var negativeIntValue: Int64 {
- get {return _negativeIntValue ?? 0}
- set {_negativeIntValue = newValue}
- }
- /// Returns true if `negativeIntValue` has been explicitly set.
- var hasNegativeIntValue: Bool {return self._negativeIntValue != nil}
- /// Clears the value of `negativeIntValue`. Subsequent reads from it will return its default value.
- mutating func clearNegativeIntValue() {self._negativeIntValue = nil}
- var doubleValue: Double {
- get {return _doubleValue ?? 0}
- set {_doubleValue = newValue}
- }
- /// Returns true if `doubleValue` has been explicitly set.
- var hasDoubleValue: Bool {return self._doubleValue != nil}
- /// Clears the value of `doubleValue`. Subsequent reads from it will return its default value.
- mutating func clearDoubleValue() {self._doubleValue = nil}
- var stringValue: Data {
- get {return _stringValue ?? Data()}
- set {_stringValue = newValue}
- }
- /// Returns true if `stringValue` has been explicitly set.
- var hasStringValue: Bool {return self._stringValue != nil}
- /// Clears the value of `stringValue`. Subsequent reads from it will return its default value.
- mutating func clearStringValue() {self._stringValue = nil}
- var aggregateValue: String {
- get {return _aggregateValue ?? String()}
- set {_aggregateValue = newValue}
- }
- /// Returns true if `aggregateValue` has been explicitly set.
- var hasAggregateValue: Bool {return self._aggregateValue != nil}
- /// Clears the value of `aggregateValue`. Subsequent reads from it will return its default value.
- mutating func clearAggregateValue() {self._aggregateValue = nil}
- var unknownFields = UnknownStorage()
- /// The name of the uninterpreted option. Each string represents a segment in
- /// a dot-separated name. is_extension is true iff a segment represents an
- /// extension (denoted with parentheses in options specs in .proto files).
- /// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
- /// "foo.(bar.baz).moo".
- struct NamePart: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var namePart: String {
- get {return _namePart ?? String()}
- set {_namePart = newValue}
- }
- /// Returns true if `namePart` has been explicitly set.
- var hasNamePart: Bool {return self._namePart != nil}
- /// Clears the value of `namePart`. Subsequent reads from it will return its default value.
- mutating func clearNamePart() {self._namePart = nil}
- var isExtension: Bool {
- get {return _isExtension ?? false}
- set {_isExtension = newValue}
- }
- /// Returns true if `isExtension` has been explicitly set.
- var hasIsExtension: Bool {return self._isExtension != nil}
- /// Clears the value of `isExtension`. Subsequent reads from it will return its default value.
- mutating func clearIsExtension() {self._isExtension = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _namePart: String? = nil
- fileprivate var _isExtension: Bool? = nil
- }
- init() {}
- fileprivate var _identifierValue: String? = nil
- fileprivate var _positiveIntValue: UInt64? = nil
- fileprivate var _negativeIntValue: Int64? = nil
- fileprivate var _doubleValue: Double? = nil
- fileprivate var _stringValue: Data? = nil
- fileprivate var _aggregateValue: String? = nil
- }
- /// TODO Enums in C++ gencode (and potentially other languages) are
- /// not well scoped. This means that each of the feature enums below can clash
- /// with each other. The short names we've chosen maximize call-site
- /// readability, but leave us very open to this scenario. A future feature will
- /// be designed and implemented to handle this, hopefully before we ever hit a
- /// conflict here.
- struct Google_Protobuf_FeatureSet: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var fieldPresence: Google_Protobuf_FeatureSet.FieldPresence {
- get {return _fieldPresence ?? .unknown}
- set {_fieldPresence = newValue}
- }
- /// Returns true if `fieldPresence` has been explicitly set.
- var hasFieldPresence: Bool {return self._fieldPresence != nil}
- /// Clears the value of `fieldPresence`. Subsequent reads from it will return its default value.
- mutating func clearFieldPresence() {self._fieldPresence = nil}
- var enumType: Google_Protobuf_FeatureSet.EnumType {
- get {return _enumType ?? .unknown}
- set {_enumType = newValue}
- }
- /// Returns true if `enumType` has been explicitly set.
- var hasEnumType: Bool {return self._enumType != nil}
- /// Clears the value of `enumType`. Subsequent reads from it will return its default value.
- mutating func clearEnumType() {self._enumType = nil}
- var repeatedFieldEncoding: Google_Protobuf_FeatureSet.RepeatedFieldEncoding {
- get {return _repeatedFieldEncoding ?? .unknown}
- set {_repeatedFieldEncoding = newValue}
- }
- /// Returns true if `repeatedFieldEncoding` has been explicitly set.
- var hasRepeatedFieldEncoding: Bool {return self._repeatedFieldEncoding != nil}
- /// Clears the value of `repeatedFieldEncoding`. Subsequent reads from it will return its default value.
- mutating func clearRepeatedFieldEncoding() {self._repeatedFieldEncoding = nil}
- var utf8Validation: Google_Protobuf_FeatureSet.Utf8Validation {
- get {return _utf8Validation ?? .unknown}
- set {_utf8Validation = newValue}
- }
- /// Returns true if `utf8Validation` has been explicitly set.
- var hasUtf8Validation: Bool {return self._utf8Validation != nil}
- /// Clears the value of `utf8Validation`. Subsequent reads from it will return its default value.
- mutating func clearUtf8Validation() {self._utf8Validation = nil}
- var messageEncoding: Google_Protobuf_FeatureSet.MessageEncoding {
- get {return _messageEncoding ?? .unknown}
- set {_messageEncoding = newValue}
- }
- /// Returns true if `messageEncoding` has been explicitly set.
- var hasMessageEncoding: Bool {return self._messageEncoding != nil}
- /// Clears the value of `messageEncoding`. Subsequent reads from it will return its default value.
- mutating func clearMessageEncoding() {self._messageEncoding = nil}
- var jsonFormat: Google_Protobuf_FeatureSet.JsonFormat {
- get {return _jsonFormat ?? .unknown}
- set {_jsonFormat = newValue}
- }
- /// Returns true if `jsonFormat` has been explicitly set.
- var hasJsonFormat: Bool {return self._jsonFormat != nil}
- /// Clears the value of `jsonFormat`. Subsequent reads from it will return its default value.
- mutating func clearJsonFormat() {self._jsonFormat = nil}
- var enforceNamingStyle: Google_Protobuf_FeatureSet.EnforceNamingStyle {
- get {return _enforceNamingStyle ?? .unknown}
- set {_enforceNamingStyle = newValue}
- }
- /// Returns true if `enforceNamingStyle` has been explicitly set.
- var hasEnforceNamingStyle: Bool {return self._enforceNamingStyle != nil}
- /// Clears the value of `enforceNamingStyle`. Subsequent reads from it will return its default value.
- mutating func clearEnforceNamingStyle() {self._enforceNamingStyle = nil}
- var defaultSymbolVisibility: Google_Protobuf_FeatureSet.VisibilityFeature.DefaultSymbolVisibility {
- get {return _defaultSymbolVisibility ?? .unknown}
- set {_defaultSymbolVisibility = newValue}
- }
- /// Returns true if `defaultSymbolVisibility` has been explicitly set.
- var hasDefaultSymbolVisibility: Bool {return self._defaultSymbolVisibility != nil}
- /// Clears the value of `defaultSymbolVisibility`. Subsequent reads from it will return its default value.
- mutating func clearDefaultSymbolVisibility() {self._defaultSymbolVisibility = nil}
- var unknownFields = UnknownStorage()
- enum FieldPresence: Int, Enum, Swift.CaseIterable {
- case unknown = 0
- case explicit = 1
- case implicit = 2
- case legacyRequired = 3
- init() {
- self = .unknown
- }
- }
- enum EnumType: Int, Enum, Swift.CaseIterable {
- case unknown = 0
- case `open` = 1
- case closed = 2
- init() {
- self = .unknown
- }
- }
- enum RepeatedFieldEncoding: Int, Enum, Swift.CaseIterable {
- case unknown = 0
- case packed = 1
- case expanded = 2
- init() {
- self = .unknown
- }
- }
- enum Utf8Validation: Int, Enum, Swift.CaseIterable {
- case unknown = 0
- case verify = 2
- case none = 3
- init() {
- self = .unknown
- }
- }
- enum MessageEncoding: Int, Enum, Swift.CaseIterable {
- case unknown = 0
- case lengthPrefixed = 1
- case delimited = 2
- init() {
- self = .unknown
- }
- }
- enum JsonFormat: Int, Enum, Swift.CaseIterable {
- case unknown = 0
- case allow = 1
- case legacyBestEffort = 2
- init() {
- self = .unknown
- }
- }
- enum EnforceNamingStyle: Int, Enum, Swift.CaseIterable {
- case unknown = 0
- case style2024 = 1
- case styleLegacy = 2
- init() {
- self = .unknown
- }
- }
- struct VisibilityFeature: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var unknownFields = UnknownStorage()
- enum DefaultSymbolVisibility: Int, Enum, Swift.CaseIterable {
- case unknown = 0
- /// Default pre-EDITION_2024, all UNSET visibility are export.
- case exportAll = 1
- /// All top-level symbols default to export, nested default to local.
- case exportTopLevel = 2
- /// All symbols default to local.
- case localAll = 3
- /// All symbols local by default. Nested types cannot be exported.
- /// With special case caveat for message { enum {} reserved 1 to max; }
- /// This is the recommended setting for new protos.
- case strict = 4
- init() {
- self = .unknown
- }
- }
- init() {}
- }
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- fileprivate var _fieldPresence: Google_Protobuf_FeatureSet.FieldPresence? = nil
- fileprivate var _enumType: Google_Protobuf_FeatureSet.EnumType? = nil
- fileprivate var _repeatedFieldEncoding: Google_Protobuf_FeatureSet.RepeatedFieldEncoding? = nil
- fileprivate var _utf8Validation: Google_Protobuf_FeatureSet.Utf8Validation? = nil
- fileprivate var _messageEncoding: Google_Protobuf_FeatureSet.MessageEncoding? = nil
- fileprivate var _jsonFormat: Google_Protobuf_FeatureSet.JsonFormat? = nil
- fileprivate var _enforceNamingStyle: Google_Protobuf_FeatureSet.EnforceNamingStyle? = nil
- fileprivate var _defaultSymbolVisibility: Google_Protobuf_FeatureSet.VisibilityFeature.DefaultSymbolVisibility? = nil
- }
- /// A compiled specification for the defaults of a set of features. These
- /// messages are generated from FeatureSet extensions and can be used to seed
- /// feature resolution. The resolution with this object becomes a simple search
- /// for the closest matching edition, followed by proto merges.
- struct Google_Protobuf_FeatureSetDefaults: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var defaults: [Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault] = []
- /// The minimum supported edition (inclusive) when this was constructed.
- /// Editions before this will not have defaults.
- var minimumEdition: Google_Protobuf_Edition {
- get {return _minimumEdition ?? .unknown}
- set {_minimumEdition = newValue}
- }
- /// Returns true if `minimumEdition` has been explicitly set.
- var hasMinimumEdition: Bool {return self._minimumEdition != nil}
- /// Clears the value of `minimumEdition`. Subsequent reads from it will return its default value.
- mutating func clearMinimumEdition() {self._minimumEdition = nil}
- /// The maximum known edition (inclusive) when this was constructed. Editions
- /// after this will not have reliable defaults.
- var maximumEdition: Google_Protobuf_Edition {
- get {return _maximumEdition ?? .unknown}
- set {_maximumEdition = newValue}
- }
- /// Returns true if `maximumEdition` has been explicitly set.
- var hasMaximumEdition: Bool {return self._maximumEdition != nil}
- /// Clears the value of `maximumEdition`. Subsequent reads from it will return its default value.
- mutating func clearMaximumEdition() {self._maximumEdition = nil}
- var unknownFields = UnknownStorage()
- /// A map from every known edition with a unique set of defaults to its
- /// defaults. Not all editions may be contained here. For a given edition,
- /// the defaults at the closest matching edition ordered at or before it should
- /// be used. This field must be in strict ascending order by edition.
- struct FeatureSetEditionDefault: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- var edition: Google_Protobuf_Edition {
- get {return _storage._edition ?? .unknown}
- set {_uniqueStorage()._edition = newValue}
- }
- /// Returns true if `edition` has been explicitly set.
- var hasEdition: Bool {return _storage._edition != nil}
- /// Clears the value of `edition`. Subsequent reads from it will return its default value.
- mutating func clearEdition() {_uniqueStorage()._edition = nil}
- /// Defaults of features that can be overridden in this edition.
- var overridableFeatures: Google_Protobuf_FeatureSet {
- get {return _storage._overridableFeatures ?? Google_Protobuf_FeatureSet()}
- set {_uniqueStorage()._overridableFeatures = newValue}
- }
- /// Returns true if `overridableFeatures` has been explicitly set.
- var hasOverridableFeatures: Bool {return _storage._overridableFeatures != nil}
- /// Clears the value of `overridableFeatures`. Subsequent reads from it will return its default value.
- mutating func clearOverridableFeatures() {_uniqueStorage()._overridableFeatures = nil}
- /// Defaults of features that can't be overridden in this edition.
- var fixedFeatures: Google_Protobuf_FeatureSet {
- get {return _storage._fixedFeatures ?? Google_Protobuf_FeatureSet()}
- set {_uniqueStorage()._fixedFeatures = newValue}
- }
- /// Returns true if `fixedFeatures` has been explicitly set.
- var hasFixedFeatures: Bool {return _storage._fixedFeatures != nil}
- /// Clears the value of `fixedFeatures`. Subsequent reads from it will return its default value.
- mutating func clearFixedFeatures() {_uniqueStorage()._fixedFeatures = nil}
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- init() {}
- fileprivate var _minimumEdition: Google_Protobuf_Edition? = nil
- fileprivate var _maximumEdition: Google_Protobuf_Edition? = nil
- }
- /// Encapsulates information about the original source file from which a
- /// FileDescriptorProto was generated.
- struct Google_Protobuf_SourceCodeInfo: ExtensibleMessage, Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// A Location identifies a piece of source code in a .proto file which
- /// corresponds to a particular definition. This information is intended
- /// to be useful to IDEs, code indexers, documentation generators, and similar
- /// tools.
- ///
- /// For example, say we have a file like:
- /// message Foo {
- /// optional string foo = 1;
- /// }
- /// Let's look at just the field definition:
- /// optional string foo = 1;
- /// ^ ^^ ^^ ^ ^^^
- /// a bc de f ghi
- /// We have the following locations:
- /// span path represents
- /// [a,i) [ 4, 0, 2, 0 ] The whole field definition.
- /// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
- /// [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
- /// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
- /// [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
- ///
- /// Notes:
- /// - A location may refer to a repeated field itself (i.e. not to any
- /// particular index within it). This is used whenever a set of elements are
- /// logically enclosed in a single code segment. For example, an entire
- /// extend block (possibly containing multiple extension definitions) will
- /// have an outer location whose path refers to the "extensions" repeated
- /// field without an index.
- /// - Multiple locations may have the same path. This happens when a single
- /// logical declaration is spread out across multiple places. The most
- /// obvious example is the "extend" block again -- there may be multiple
- /// extend blocks in the same scope, each of which will have the same path.
- /// - A location's span is not always a subset of its parent's span. For
- /// example, the "extendee" of an extension declaration appears at the
- /// beginning of the "extend" block and is shared by all extensions within
- /// the block.
- /// - Just because a location's span is a subset of some other location's span
- /// does not mean that it is a descendant. For example, a "group" defines
- /// both a type and a field in a single declaration. Thus, the locations
- /// corresponding to the type and field and their components will overlap.
- /// - Code which tries to interpret locations should probably be designed to
- /// ignore those that it doesn't understand, as more types of locations could
- /// be recorded in the future.
- var location: [Google_Protobuf_SourceCodeInfo.Location] = []
- var unknownFields = UnknownStorage()
- struct Location: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Identifies which part of the FileDescriptorProto was defined at this
- /// location.
- ///
- /// Each element is a field number or an index. They form a path from
- /// the root FileDescriptorProto to the place where the definition appears.
- /// For example, this path:
- /// [ 4, 3, 2, 7, 1 ]
- /// refers to:
- /// file.message_type(3) // 4, 3
- /// .field(7) // 2, 7
- /// .name() // 1
- /// This is because FileDescriptorProto.message_type has field number 4:
- /// repeated DescriptorProto message_type = 4;
- /// and DescriptorProto.field has field number 2:
- /// repeated FieldDescriptorProto field = 2;
- /// and FieldDescriptorProto.name has field number 1:
- /// optional string name = 1;
- ///
- /// Thus, the above path gives the location of a field name. If we removed
- /// the last element:
- /// [ 4, 3, 2, 7 ]
- /// this path refers to the whole field declaration (from the beginning
- /// of the label to the terminating semicolon).
- var path: [Int32] = []
- /// Always has exactly three or four elements: start line, start column,
- /// end line (optional, otherwise assumed same as start line), end column.
- /// These are packed into a single field for efficiency. Note that line
- /// and column numbers are zero-based -- typically you will want to add
- /// 1 to each before displaying to a user.
- var span: [Int32] = []
- /// If this SourceCodeInfo represents a complete declaration, these are any
- /// comments appearing before and after the declaration which appear to be
- /// attached to the declaration.
- ///
- /// A series of line comments appearing on consecutive lines, with no other
- /// tokens appearing on those lines, will be treated as a single comment.
- ///
- /// leading_detached_comments will keep paragraphs of comments that appear
- /// before (but not connected to) the current element. Each paragraph,
- /// separated by empty lines, will be one comment element in the repeated
- /// field.
- ///
- /// Only the comment content is provided; comment markers (e.g. //) are
- /// stripped out. For block comments, leading whitespace and an asterisk
- /// will be stripped from the beginning of each line other than the first.
- /// Newlines are included in the output.
- ///
- /// Examples:
- ///
- /// optional int32 foo = 1; // Comment attached to foo.
- /// // Comment attached to bar.
- /// optional int32 bar = 2;
- ///
- /// optional string baz = 3;
- /// // Comment attached to baz.
- /// // Another line attached to baz.
- ///
- /// // Comment attached to moo.
- /// //
- /// // Another line attached to moo.
- /// optional double moo = 4;
- ///
- /// // Detached comment for corge. This is not leading or trailing comments
- /// // to moo or corge because there are blank lines separating it from
- /// // both.
- ///
- /// // Detached comment for corge paragraph 2.
- ///
- /// optional string corge = 5;
- /// /* Block comment attached
- /// * to corge. Leading asterisks
- /// * will be removed. */
- /// /* Block comment attached to
- /// * grault. */
- /// optional int32 grault = 6;
- ///
- /// // ignored detached comments.
- var leadingComments: String {
- get {return _leadingComments ?? String()}
- set {_leadingComments = newValue}
- }
- /// Returns true if `leadingComments` has been explicitly set.
- var hasLeadingComments: Bool {return self._leadingComments != nil}
- /// Clears the value of `leadingComments`. Subsequent reads from it will return its default value.
- mutating func clearLeadingComments() {self._leadingComments = nil}
- var trailingComments: String {
- get {return _trailingComments ?? String()}
- set {_trailingComments = newValue}
- }
- /// Returns true if `trailingComments` has been explicitly set.
- var hasTrailingComments: Bool {return self._trailingComments != nil}
- /// Clears the value of `trailingComments`. Subsequent reads from it will return its default value.
- mutating func clearTrailingComments() {self._trailingComments = nil}
- var leadingDetachedComments: [String] = []
- var unknownFields = UnknownStorage()
- init() {}
- fileprivate var _leadingComments: String? = nil
- fileprivate var _trailingComments: String? = nil
- }
- init() {}
- var _protobuf_extensionFieldValues = ExtensionFieldValueSet()
- }
- /// Describes the relationship between generated code and its original source
- /// file. A GeneratedCodeInfo message is associated with only one generated
- /// source file, but may contain references to different source .proto files.
- struct Google_Protobuf_GeneratedCodeInfo: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// An Annotation connects some span of text in generated code to an element
- /// of its generating .proto file.
- var annotation: [Google_Protobuf_GeneratedCodeInfo.Annotation] = []
- var unknownFields = UnknownStorage()
- struct Annotation: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Identifies the element in the original source .proto file. This field
- /// is formatted the same as SourceCodeInfo.Location.path.
- var path: [Int32] = []
- /// Identifies the filesystem path to the original source .proto.
- var sourceFile: String {
- get {return _sourceFile ?? String()}
- set {_sourceFile = newValue}
- }
- /// Returns true if `sourceFile` has been explicitly set.
- var hasSourceFile: Bool {return self._sourceFile != nil}
- /// Clears the value of `sourceFile`. Subsequent reads from it will return its default value.
- mutating func clearSourceFile() {self._sourceFile = nil}
- /// Identifies the starting offset in bytes in the generated code
- /// that relates to the identified object.
- var begin: Int32 {
- get {return _begin ?? 0}
- set {_begin = newValue}
- }
- /// Returns true if `begin` has been explicitly set.
- var hasBegin: Bool {return self._begin != nil}
- /// Clears the value of `begin`. Subsequent reads from it will return its default value.
- mutating func clearBegin() {self._begin = nil}
- /// Identifies the ending offset in bytes in the generated code that
- /// relates to the identified object. The end offset should be one past
- /// the last relevant byte (so the length of the text = end - begin).
- var end: Int32 {
- get {return _end ?? 0}
- set {_end = newValue}
- }
- /// Returns true if `end` has been explicitly set.
- var hasEnd: Bool {return self._end != nil}
- /// Clears the value of `end`. Subsequent reads from it will return its default value.
- mutating func clearEnd() {self._end = nil}
- var semantic: Google_Protobuf_GeneratedCodeInfo.Annotation.Semantic {
- get {return _semantic ?? .none}
- set {_semantic = newValue}
- }
- /// Returns true if `semantic` has been explicitly set.
- var hasSemantic: Bool {return self._semantic != nil}
- /// Clears the value of `semantic`. Subsequent reads from it will return its default value.
- mutating func clearSemantic() {self._semantic = nil}
- var unknownFields = UnknownStorage()
- /// Represents the identified object's effect on the element in the original
- /// .proto file.
- enum Semantic: Int, Enum, Swift.CaseIterable {
- /// There is no effect or the effect is indescribable.
- case none = 0
- /// The element is set or otherwise mutated.
- case set = 1
- /// An alias to the element is returned.
- case alias = 2
- init() {
- self = .none
- }
- }
- init() {}
- fileprivate var _sourceFile: String? = nil
- fileprivate var _begin: Int32? = nil
- fileprivate var _end: Int32? = nil
- fileprivate var _semantic: Google_Protobuf_GeneratedCodeInfo.Annotation.Semantic? = nil
- }
- init() {}
- }
- // MARK: - Code below here is support for the SwiftProtobuf runtime.
- fileprivate let _protobuf_package = "google.protobuf"
- extension Google_Protobuf_Edition: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "EDITION_UNKNOWN"),
- 1: .same(proto: "EDITION_1_TEST_ONLY"),
- 2: .same(proto: "EDITION_2_TEST_ONLY"),
- 900: .same(proto: "EDITION_LEGACY"),
- 998: .same(proto: "EDITION_PROTO2"),
- 999: .same(proto: "EDITION_PROTO3"),
- 1000: .same(proto: "EDITION_2023"),
- 1001: .same(proto: "EDITION_2024"),
- 99997: .same(proto: "EDITION_99997_TEST_ONLY"),
- 99998: .same(proto: "EDITION_99998_TEST_ONLY"),
- 99999: .same(proto: "EDITION_99999_TEST_ONLY"),
- 2147483647: .same(proto: "EDITION_MAX"),
- ]
- }
- extension Google_Protobuf_SymbolVisibility: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "VISIBILITY_UNSET"),
- 1: .same(proto: "VISIBILITY_LOCAL"),
- 2: .same(proto: "VISIBILITY_EXPORT"),
- ]
- }
- extension Google_Protobuf_FileDescriptorSet: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".FileDescriptorSet"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "file"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- if !Internal.areAllInitialized(self.file) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeRepeatedMessageField(value: &self.file) }()
- case 536000000:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_FileDescriptorSet.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- if !self.file.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.file, fieldNumber: 1)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 536000000, end: 536000001)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FileDescriptorSet, rhs: Google_Protobuf_FileDescriptorSet) -> Bool {
- if lhs.file != rhs.file {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_FileDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".FileDescriptorProto"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "name"),
- 2: .same(proto: "package"),
- 3: .same(proto: "dependency"),
- 10: .standard(proto: "public_dependency"),
- 11: .standard(proto: "weak_dependency"),
- 15: .standard(proto: "option_dependency"),
- 4: .standard(proto: "message_type"),
- 5: .standard(proto: "enum_type"),
- 6: .same(proto: "service"),
- 7: .same(proto: "extension"),
- 8: .same(proto: "options"),
- 9: .standard(proto: "source_code_info"),
- 12: .same(proto: "syntax"),
- 14: .same(proto: "edition"),
- ]
- public var isInitialized: Bool {
- if !Internal.areAllInitialized(self.messageType) {return false}
- if !Internal.areAllInitialized(self.enumType) {return false}
- if !Internal.areAllInitialized(self.service) {return false}
- if !Internal.areAllInitialized(self.`extension`) {return false}
- if let v = self._options, !v.isInitialized {return false}
- if let v = self._sourceCodeInfo, !v.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self._name) }()
- case 2: try { try decoder.decodeSingularStringField(value: &self._package) }()
- case 3: try { try decoder.decodeRepeatedStringField(value: &self.dependency) }()
- case 4: try { try decoder.decodeRepeatedMessageField(value: &self.messageType) }()
- case 5: try { try decoder.decodeRepeatedMessageField(value: &self.enumType) }()
- case 6: try { try decoder.decodeRepeatedMessageField(value: &self.service) }()
- case 7: try { try decoder.decodeRepeatedMessageField(value: &self.`extension`) }()
- case 8: try { try decoder.decodeSingularMessageField(value: &self._options) }()
- case 9: try { try decoder.decodeSingularMessageField(value: &self._sourceCodeInfo) }()
- case 10: try { try decoder.decodeRepeatedInt32Field(value: &self.publicDependency) }()
- case 11: try { try decoder.decodeRepeatedInt32Field(value: &self.weakDependency) }()
- case 12: try { try decoder.decodeSingularStringField(value: &self._syntax) }()
- case 14: try { try decoder.decodeSingularEnumField(value: &self._edition) }()
- case 15: try { try decoder.decodeRepeatedStringField(value: &self.optionDependency) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._name {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._package {
- try visitor.visitSingularStringField(value: v, fieldNumber: 2)
- } }()
- if !self.dependency.isEmpty {
- try visitor.visitRepeatedStringField(value: self.dependency, fieldNumber: 3)
- }
- if !self.messageType.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.messageType, fieldNumber: 4)
- }
- if !self.enumType.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.enumType, fieldNumber: 5)
- }
- if !self.service.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.service, fieldNumber: 6)
- }
- if !self.`extension`.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.`extension`, fieldNumber: 7)
- }
- try { if let v = self._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
- } }()
- try { if let v = self._sourceCodeInfo {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
- } }()
- if !self.publicDependency.isEmpty {
- try visitor.visitRepeatedInt32Field(value: self.publicDependency, fieldNumber: 10)
- }
- if !self.weakDependency.isEmpty {
- try visitor.visitRepeatedInt32Field(value: self.weakDependency, fieldNumber: 11)
- }
- try { if let v = self._syntax {
- try visitor.visitSingularStringField(value: v, fieldNumber: 12)
- } }()
- try { if let v = self._edition {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 14)
- } }()
- if !self.optionDependency.isEmpty {
- try visitor.visitRepeatedStringField(value: self.optionDependency, fieldNumber: 15)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FileDescriptorProto, rhs: Google_Protobuf_FileDescriptorProto) -> Bool {
- if lhs._name != rhs._name {return false}
- if lhs._package != rhs._package {return false}
- if lhs.dependency != rhs.dependency {return false}
- if lhs.publicDependency != rhs.publicDependency {return false}
- if lhs.weakDependency != rhs.weakDependency {return false}
- if lhs.optionDependency != rhs.optionDependency {return false}
- if lhs.messageType != rhs.messageType {return false}
- if lhs.enumType != rhs.enumType {return false}
- if lhs.service != rhs.service {return false}
- if lhs.`extension` != rhs.`extension` {return false}
- if lhs._options != rhs._options {return false}
- if lhs._sourceCodeInfo != rhs._sourceCodeInfo {return false}
- if lhs._syntax != rhs._syntax {return false}
- if lhs._edition != rhs._edition {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_DescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".DescriptorProto"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "name"),
- 2: .same(proto: "field"),
- 6: .same(proto: "extension"),
- 3: .standard(proto: "nested_type"),
- 4: .standard(proto: "enum_type"),
- 5: .standard(proto: "extension_range"),
- 8: .standard(proto: "oneof_decl"),
- 7: .same(proto: "options"),
- 9: .standard(proto: "reserved_range"),
- 10: .standard(proto: "reserved_name"),
- 11: .same(proto: "visibility"),
- ]
- fileprivate class _StorageClass {
- var _name: String? = nil
- var _field: [Google_Protobuf_FieldDescriptorProto] = []
- var _extension: [Google_Protobuf_FieldDescriptorProto] = []
- var _nestedType: [Google_Protobuf_DescriptorProto] = []
- var _enumType: [Google_Protobuf_EnumDescriptorProto] = []
- var _extensionRange: [Google_Protobuf_DescriptorProto.ExtensionRange] = []
- var _oneofDecl: [Google_Protobuf_OneofDescriptorProto] = []
- var _options: Google_Protobuf_MessageOptions? = nil
- var _reservedRange: [Google_Protobuf_DescriptorProto.ReservedRange] = []
- var _reservedName: [String] = []
- var _visibility: Google_Protobuf_SymbolVisibility? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _name = source._name
- _field = source._field
- _extension = source._extension
- _nestedType = source._nestedType
- _enumType = source._enumType
- _extensionRange = source._extensionRange
- _oneofDecl = source._oneofDecl
- _options = source._options
- _reservedRange = source._reservedRange
- _reservedName = source._reservedName
- _visibility = source._visibility
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if !Internal.areAllInitialized(_storage._field) {return false}
- if !Internal.areAllInitialized(_storage._extension) {return false}
- if !Internal.areAllInitialized(_storage._nestedType) {return false}
- if !Internal.areAllInitialized(_storage._enumType) {return false}
- if !Internal.areAllInitialized(_storage._extensionRange) {return false}
- if !Internal.areAllInitialized(_storage._oneofDecl) {return false}
- if let v = _storage._options, !v.isInitialized {return false}
- return true
- }
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &_storage._name) }()
- case 2: try { try decoder.decodeRepeatedMessageField(value: &_storage._field) }()
- case 3: try { try decoder.decodeRepeatedMessageField(value: &_storage._nestedType) }()
- case 4: try { try decoder.decodeRepeatedMessageField(value: &_storage._enumType) }()
- case 5: try { try decoder.decodeRepeatedMessageField(value: &_storage._extensionRange) }()
- case 6: try { try decoder.decodeRepeatedMessageField(value: &_storage._extension) }()
- case 7: try { try decoder.decodeSingularMessageField(value: &_storage._options) }()
- case 8: try { try decoder.decodeRepeatedMessageField(value: &_storage._oneofDecl) }()
- case 9: try { try decoder.decodeRepeatedMessageField(value: &_storage._reservedRange) }()
- case 10: try { try decoder.decodeRepeatedStringField(value: &_storage._reservedName) }()
- case 11: try { try decoder.decodeSingularEnumField(value: &_storage._visibility) }()
- default: break
- }
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._name {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- if !_storage._field.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._field, fieldNumber: 2)
- }
- if !_storage._nestedType.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._nestedType, fieldNumber: 3)
- }
- if !_storage._enumType.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._enumType, fieldNumber: 4)
- }
- if !_storage._extensionRange.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._extensionRange, fieldNumber: 5)
- }
- if !_storage._extension.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._extension, fieldNumber: 6)
- }
- try { if let v = _storage._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
- } }()
- if !_storage._oneofDecl.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._oneofDecl, fieldNumber: 8)
- }
- if !_storage._reservedRange.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._reservedRange, fieldNumber: 9)
- }
- if !_storage._reservedName.isEmpty {
- try visitor.visitRepeatedStringField(value: _storage._reservedName, fieldNumber: 10)
- }
- try { if let v = _storage._visibility {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 11)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_DescriptorProto, rhs: Google_Protobuf_DescriptorProto) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._name != rhs_storage._name {return false}
- if _storage._field != rhs_storage._field {return false}
- if _storage._extension != rhs_storage._extension {return false}
- if _storage._nestedType != rhs_storage._nestedType {return false}
- if _storage._enumType != rhs_storage._enumType {return false}
- if _storage._extensionRange != rhs_storage._extensionRange {return false}
- if _storage._oneofDecl != rhs_storage._oneofDecl {return false}
- if _storage._options != rhs_storage._options {return false}
- if _storage._reservedRange != rhs_storage._reservedRange {return false}
- if _storage._reservedName != rhs_storage._reservedName {return false}
- if _storage._visibility != rhs_storage._visibility {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_DescriptorProto.ExtensionRange: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_DescriptorProto.protoMessageName + ".ExtensionRange"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "start"),
- 2: .same(proto: "end"),
- 3: .same(proto: "options"),
- ]
- public var isInitialized: Bool {
- if let v = self._options, !v.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._start) }()
- case 2: try { try decoder.decodeSingularInt32Field(value: &self._end) }()
- case 3: try { try decoder.decodeSingularMessageField(value: &self._options) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._start {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._end {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_DescriptorProto.ExtensionRange, rhs: Google_Protobuf_DescriptorProto.ExtensionRange) -> Bool {
- if lhs._start != rhs._start {return false}
- if lhs._end != rhs._end {return false}
- if lhs._options != rhs._options {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_DescriptorProto.ReservedRange: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_DescriptorProto.protoMessageName + ".ReservedRange"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "start"),
- 2: .same(proto: "end"),
- ]
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._start) }()
- case 2: try { try decoder.decodeSingularInt32Field(value: &self._end) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._start {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._end {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_DescriptorProto.ReservedRange, rhs: Google_Protobuf_DescriptorProto.ReservedRange) -> Bool {
- if lhs._start != rhs._start {return false}
- if lhs._end != rhs._end {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_ExtensionRangeOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ExtensionRangeOptions"
- static let _protobuf_nameMap: _NameMap = [
- 999: .standard(proto: "uninterpreted_option"),
- 2: .same(proto: "declaration"),
- 50: .same(proto: "features"),
- 3: .same(proto: "verification"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- if !Internal.areAllInitialized(self.uninterpretedOption) {return false}
- if let v = self._features, !v.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 2: try { try decoder.decodeRepeatedMessageField(value: &self.declaration) }()
- case 3: try { try decoder.decodeSingularEnumField(value: &self._verification) }()
- case 50: try { try decoder.decodeSingularMessageField(value: &self._features) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_ExtensionRangeOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.declaration.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.declaration, fieldNumber: 2)
- }
- try { if let v = self._verification {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 50)
- } }()
- if !self.uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_ExtensionRangeOptions, rhs: Google_Protobuf_ExtensionRangeOptions) -> Bool {
- if lhs.uninterpretedOption != rhs.uninterpretedOption {return false}
- if lhs.declaration != rhs.declaration {return false}
- if lhs._features != rhs._features {return false}
- if lhs._verification != rhs._verification {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_ExtensionRangeOptions.VerificationState: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "DECLARATION"),
- 1: .same(proto: "UNVERIFIED"),
- ]
- }
- extension Google_Protobuf_ExtensionRangeOptions.Declaration: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_ExtensionRangeOptions.protoMessageName + ".Declaration"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "number"),
- 2: .standard(proto: "full_name"),
- 3: .same(proto: "type"),
- 5: .same(proto: "reserved"),
- 6: .same(proto: "repeated"),
- ]
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._number) }()
- case 2: try { try decoder.decodeSingularStringField(value: &self._fullName) }()
- case 3: try { try decoder.decodeSingularStringField(value: &self._type) }()
- case 5: try { try decoder.decodeSingularBoolField(value: &self._reserved) }()
- case 6: try { try decoder.decodeSingularBoolField(value: &self._repeated) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._number {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._fullName {
- try visitor.visitSingularStringField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._type {
- try visitor.visitSingularStringField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._reserved {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
- } }()
- try { if let v = self._repeated {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 6)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_ExtensionRangeOptions.Declaration, rhs: Google_Protobuf_ExtensionRangeOptions.Declaration) -> Bool {
- if lhs._number != rhs._number {return false}
- if lhs._fullName != rhs._fullName {return false}
- if lhs._type != rhs._type {return false}
- if lhs._reserved != rhs._reserved {return false}
- if lhs._repeated != rhs._repeated {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_FieldDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".FieldDescriptorProto"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "name"),
- 3: .same(proto: "number"),
- 4: .same(proto: "label"),
- 5: .same(proto: "type"),
- 6: .standard(proto: "type_name"),
- 2: .same(proto: "extendee"),
- 7: .standard(proto: "default_value"),
- 9: .standard(proto: "oneof_index"),
- 10: .standard(proto: "json_name"),
- 8: .same(proto: "options"),
- 17: .standard(proto: "proto3_optional"),
- ]
- public var isInitialized: Bool {
- if let v = self._options, !v.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self._name) }()
- case 2: try { try decoder.decodeSingularStringField(value: &self._extendee) }()
- case 3: try { try decoder.decodeSingularInt32Field(value: &self._number) }()
- case 4: try { try decoder.decodeSingularEnumField(value: &self._label) }()
- case 5: try { try decoder.decodeSingularEnumField(value: &self._type) }()
- case 6: try { try decoder.decodeSingularStringField(value: &self._typeName) }()
- case 7: try { try decoder.decodeSingularStringField(value: &self._defaultValue) }()
- case 8: try { try decoder.decodeSingularMessageField(value: &self._options) }()
- case 9: try { try decoder.decodeSingularInt32Field(value: &self._oneofIndex) }()
- case 10: try { try decoder.decodeSingularStringField(value: &self._jsonName) }()
- case 17: try { try decoder.decodeSingularBoolField(value: &self._proto3Optional) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._name {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._extendee {
- try visitor.visitSingularStringField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._number {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._label {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
- } }()
- try { if let v = self._type {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 5)
- } }()
- try { if let v = self._typeName {
- try visitor.visitSingularStringField(value: v, fieldNumber: 6)
- } }()
- try { if let v = self._defaultValue {
- try visitor.visitSingularStringField(value: v, fieldNumber: 7)
- } }()
- try { if let v = self._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
- } }()
- try { if let v = self._oneofIndex {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
- } }()
- try { if let v = self._jsonName {
- try visitor.visitSingularStringField(value: v, fieldNumber: 10)
- } }()
- try { if let v = self._proto3Optional {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 17)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FieldDescriptorProto, rhs: Google_Protobuf_FieldDescriptorProto) -> Bool {
- if lhs._name != rhs._name {return false}
- if lhs._number != rhs._number {return false}
- if lhs._label != rhs._label {return false}
- if lhs._type != rhs._type {return false}
- if lhs._typeName != rhs._typeName {return false}
- if lhs._extendee != rhs._extendee {return false}
- if lhs._defaultValue != rhs._defaultValue {return false}
- if lhs._oneofIndex != rhs._oneofIndex {return false}
- if lhs._jsonName != rhs._jsonName {return false}
- if lhs._options != rhs._options {return false}
- if lhs._proto3Optional != rhs._proto3Optional {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_FieldDescriptorProto.TypeEnum: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "TYPE_DOUBLE"),
- 2: .same(proto: "TYPE_FLOAT"),
- 3: .same(proto: "TYPE_INT64"),
- 4: .same(proto: "TYPE_UINT64"),
- 5: .same(proto: "TYPE_INT32"),
- 6: .same(proto: "TYPE_FIXED64"),
- 7: .same(proto: "TYPE_FIXED32"),
- 8: .same(proto: "TYPE_BOOL"),
- 9: .same(proto: "TYPE_STRING"),
- 10: .same(proto: "TYPE_GROUP"),
- 11: .same(proto: "TYPE_MESSAGE"),
- 12: .same(proto: "TYPE_BYTES"),
- 13: .same(proto: "TYPE_UINT32"),
- 14: .same(proto: "TYPE_ENUM"),
- 15: .same(proto: "TYPE_SFIXED32"),
- 16: .same(proto: "TYPE_SFIXED64"),
- 17: .same(proto: "TYPE_SINT32"),
- 18: .same(proto: "TYPE_SINT64"),
- ]
- }
- extension Google_Protobuf_FieldDescriptorProto.Label: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "LABEL_OPTIONAL"),
- 2: .same(proto: "LABEL_REQUIRED"),
- 3: .same(proto: "LABEL_REPEATED"),
- ]
- }
- extension Google_Protobuf_OneofDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".OneofDescriptorProto"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "name"),
- 2: .same(proto: "options"),
- ]
- public var isInitialized: Bool {
- if let v = self._options, !v.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self._name) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._options) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._name {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_OneofDescriptorProto, rhs: Google_Protobuf_OneofDescriptorProto) -> Bool {
- if lhs._name != rhs._name {return false}
- if lhs._options != rhs._options {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_EnumDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".EnumDescriptorProto"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "name"),
- 2: .same(proto: "value"),
- 3: .same(proto: "options"),
- 4: .standard(proto: "reserved_range"),
- 5: .standard(proto: "reserved_name"),
- 6: .same(proto: "visibility"),
- ]
- fileprivate class _StorageClass {
- var _name: String? = nil
- var _value: [Google_Protobuf_EnumValueDescriptorProto] = []
- var _options: Google_Protobuf_EnumOptions? = nil
- var _reservedRange: [Google_Protobuf_EnumDescriptorProto.EnumReservedRange] = []
- var _reservedName: [String] = []
- var _visibility: Google_Protobuf_SymbolVisibility? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _name = source._name
- _value = source._value
- _options = source._options
- _reservedRange = source._reservedRange
- _reservedName = source._reservedName
- _visibility = source._visibility
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if !Internal.areAllInitialized(_storage._value) {return false}
- if let v = _storage._options, !v.isInitialized {return false}
- return true
- }
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &_storage._name) }()
- case 2: try { try decoder.decodeRepeatedMessageField(value: &_storage._value) }()
- case 3: try { try decoder.decodeSingularMessageField(value: &_storage._options) }()
- case 4: try { try decoder.decodeRepeatedMessageField(value: &_storage._reservedRange) }()
- case 5: try { try decoder.decodeRepeatedStringField(value: &_storage._reservedName) }()
- case 6: try { try decoder.decodeSingularEnumField(value: &_storage._visibility) }()
- default: break
- }
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._name {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- if !_storage._value.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._value, fieldNumber: 2)
- }
- try { if let v = _storage._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- } }()
- if !_storage._reservedRange.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._reservedRange, fieldNumber: 4)
- }
- if !_storage._reservedName.isEmpty {
- try visitor.visitRepeatedStringField(value: _storage._reservedName, fieldNumber: 5)
- }
- try { if let v = _storage._visibility {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 6)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_EnumDescriptorProto, rhs: Google_Protobuf_EnumDescriptorProto) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._name != rhs_storage._name {return false}
- if _storage._value != rhs_storage._value {return false}
- if _storage._options != rhs_storage._options {return false}
- if _storage._reservedRange != rhs_storage._reservedRange {return false}
- if _storage._reservedName != rhs_storage._reservedName {return false}
- if _storage._visibility != rhs_storage._visibility {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_EnumDescriptorProto.EnumReservedRange: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_EnumDescriptorProto.protoMessageName + ".EnumReservedRange"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "start"),
- 2: .same(proto: "end"),
- ]
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularInt32Field(value: &self._start) }()
- case 2: try { try decoder.decodeSingularInt32Field(value: &self._end) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._start {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._end {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_EnumDescriptorProto.EnumReservedRange, rhs: Google_Protobuf_EnumDescriptorProto.EnumReservedRange) -> Bool {
- if lhs._start != rhs._start {return false}
- if lhs._end != rhs._end {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_EnumValueDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".EnumValueDescriptorProto"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "name"),
- 2: .same(proto: "number"),
- 3: .same(proto: "options"),
- ]
- fileprivate class _StorageClass {
- var _name: String? = nil
- var _number: Int32? = nil
- var _options: Google_Protobuf_EnumValueOptions? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _name = source._name
- _number = source._number
- _options = source._options
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if let v = _storage._options, !v.isInitialized {return false}
- return true
- }
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &_storage._name) }()
- case 2: try { try decoder.decodeSingularInt32Field(value: &_storage._number) }()
- case 3: try { try decoder.decodeSingularMessageField(value: &_storage._options) }()
- default: break
- }
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._name {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- try { if let v = _storage._number {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
- } }()
- try { if let v = _storage._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_EnumValueDescriptorProto, rhs: Google_Protobuf_EnumValueDescriptorProto) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._name != rhs_storage._name {return false}
- if _storage._number != rhs_storage._number {return false}
- if _storage._options != rhs_storage._options {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_ServiceDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ServiceDescriptorProto"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "name"),
- 2: .same(proto: "method"),
- 3: .same(proto: "options"),
- ]
- public var isInitialized: Bool {
- if !Internal.areAllInitialized(self.method) {return false}
- if let v = self._options, !v.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self._name) }()
- case 2: try { try decoder.decodeRepeatedMessageField(value: &self.method) }()
- case 3: try { try decoder.decodeSingularMessageField(value: &self._options) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._name {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- if !self.method.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.method, fieldNumber: 2)
- }
- try { if let v = self._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_ServiceDescriptorProto, rhs: Google_Protobuf_ServiceDescriptorProto) -> Bool {
- if lhs._name != rhs._name {return false}
- if lhs.method != rhs.method {return false}
- if lhs._options != rhs._options {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_MethodDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".MethodDescriptorProto"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "name"),
- 2: .standard(proto: "input_type"),
- 3: .standard(proto: "output_type"),
- 4: .same(proto: "options"),
- 5: .standard(proto: "client_streaming"),
- 6: .standard(proto: "server_streaming"),
- ]
- public var isInitialized: Bool {
- if let v = self._options, !v.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self._name) }()
- case 2: try { try decoder.decodeSingularStringField(value: &self._inputType) }()
- case 3: try { try decoder.decodeSingularStringField(value: &self._outputType) }()
- case 4: try { try decoder.decodeSingularMessageField(value: &self._options) }()
- case 5: try { try decoder.decodeSingularBoolField(value: &self._clientStreaming) }()
- case 6: try { try decoder.decodeSingularBoolField(value: &self._serverStreaming) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._name {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._inputType {
- try visitor.visitSingularStringField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._outputType {
- try visitor.visitSingularStringField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._options {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- } }()
- try { if let v = self._clientStreaming {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
- } }()
- try { if let v = self._serverStreaming {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 6)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_MethodDescriptorProto, rhs: Google_Protobuf_MethodDescriptorProto) -> Bool {
- if lhs._name != rhs._name {return false}
- if lhs._inputType != rhs._inputType {return false}
- if lhs._outputType != rhs._outputType {return false}
- if lhs._options != rhs._options {return false}
- if lhs._clientStreaming != rhs._clientStreaming {return false}
- if lhs._serverStreaming != rhs._serverStreaming {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_FileOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".FileOptions"
- static let _protobuf_nameMap: _NameMap = [
- 1: .standard(proto: "java_package"),
- 8: .standard(proto: "java_outer_classname"),
- 10: .standard(proto: "java_multiple_files"),
- 20: .standard(proto: "java_generate_equals_and_hash"),
- 27: .standard(proto: "java_string_check_utf8"),
- 9: .standard(proto: "optimize_for"),
- 11: .standard(proto: "go_package"),
- 16: .standard(proto: "cc_generic_services"),
- 17: .standard(proto: "java_generic_services"),
- 18: .standard(proto: "py_generic_services"),
- 23: .same(proto: "deprecated"),
- 31: .standard(proto: "cc_enable_arenas"),
- 36: .standard(proto: "objc_class_prefix"),
- 37: .standard(proto: "csharp_namespace"),
- 39: .standard(proto: "swift_prefix"),
- 40: .standard(proto: "php_class_prefix"),
- 41: .standard(proto: "php_namespace"),
- 44: .standard(proto: "php_metadata_namespace"),
- 45: .standard(proto: "ruby_package"),
- 50: .same(proto: "features"),
- 999: .standard(proto: "uninterpreted_option"),
- ]
- fileprivate class _StorageClass {
- var _javaPackage: String? = nil
- var _javaOuterClassname: String? = nil
- var _javaMultipleFiles: Bool? = nil
- var _javaGenerateEqualsAndHash: Bool? = nil
- var _javaStringCheckUtf8: Bool? = nil
- var _optimizeFor: Google_Protobuf_FileOptions.OptimizeMode? = nil
- var _goPackage: String? = nil
- var _ccGenericServices: Bool? = nil
- var _javaGenericServices: Bool? = nil
- var _pyGenericServices: Bool? = nil
- var _deprecated: Bool? = nil
- var _ccEnableArenas: Bool? = nil
- var _objcClassPrefix: String? = nil
- var _csharpNamespace: String? = nil
- var _swiftPrefix: String? = nil
- var _phpClassPrefix: String? = nil
- var _phpNamespace: String? = nil
- var _phpMetadataNamespace: String? = nil
- var _rubyPackage: String? = nil
- var _features: Google_Protobuf_FeatureSet? = nil
- var _uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _javaPackage = source._javaPackage
- _javaOuterClassname = source._javaOuterClassname
- _javaMultipleFiles = source._javaMultipleFiles
- _javaGenerateEqualsAndHash = source._javaGenerateEqualsAndHash
- _javaStringCheckUtf8 = source._javaStringCheckUtf8
- _optimizeFor = source._optimizeFor
- _goPackage = source._goPackage
- _ccGenericServices = source._ccGenericServices
- _javaGenericServices = source._javaGenericServices
- _pyGenericServices = source._pyGenericServices
- _deprecated = source._deprecated
- _ccEnableArenas = source._ccEnableArenas
- _objcClassPrefix = source._objcClassPrefix
- _csharpNamespace = source._csharpNamespace
- _swiftPrefix = source._swiftPrefix
- _phpClassPrefix = source._phpClassPrefix
- _phpNamespace = source._phpNamespace
- _phpMetadataNamespace = source._phpMetadataNamespace
- _rubyPackage = source._rubyPackage
- _features = source._features
- _uninterpretedOption = source._uninterpretedOption
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if let v = _storage._features, !v.isInitialized {return false}
- if !Internal.areAllInitialized(_storage._uninterpretedOption) {return false}
- return true
- }
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &_storage._javaPackage) }()
- case 8: try { try decoder.decodeSingularStringField(value: &_storage._javaOuterClassname) }()
- case 9: try { try decoder.decodeSingularEnumField(value: &_storage._optimizeFor) }()
- case 10: try { try decoder.decodeSingularBoolField(value: &_storage._javaMultipleFiles) }()
- case 11: try { try decoder.decodeSingularStringField(value: &_storage._goPackage) }()
- case 16: try { try decoder.decodeSingularBoolField(value: &_storage._ccGenericServices) }()
- case 17: try { try decoder.decodeSingularBoolField(value: &_storage._javaGenericServices) }()
- case 18: try { try decoder.decodeSingularBoolField(value: &_storage._pyGenericServices) }()
- case 20: try { try decoder.decodeSingularBoolField(value: &_storage._javaGenerateEqualsAndHash) }()
- case 23: try { try decoder.decodeSingularBoolField(value: &_storage._deprecated) }()
- case 27: try { try decoder.decodeSingularBoolField(value: &_storage._javaStringCheckUtf8) }()
- case 31: try { try decoder.decodeSingularBoolField(value: &_storage._ccEnableArenas) }()
- case 36: try { try decoder.decodeSingularStringField(value: &_storage._objcClassPrefix) }()
- case 37: try { try decoder.decodeSingularStringField(value: &_storage._csharpNamespace) }()
- case 39: try { try decoder.decodeSingularStringField(value: &_storage._swiftPrefix) }()
- case 40: try { try decoder.decodeSingularStringField(value: &_storage._phpClassPrefix) }()
- case 41: try { try decoder.decodeSingularStringField(value: &_storage._phpNamespace) }()
- case 44: try { try decoder.decodeSingularStringField(value: &_storage._phpMetadataNamespace) }()
- case 45: try { try decoder.decodeSingularStringField(value: &_storage._rubyPackage) }()
- case 50: try { try decoder.decodeSingularMessageField(value: &_storage._features) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &_storage._uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_FileOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._javaPackage {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- try { if let v = _storage._javaOuterClassname {
- try visitor.visitSingularStringField(value: v, fieldNumber: 8)
- } }()
- try { if let v = _storage._optimizeFor {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 9)
- } }()
- try { if let v = _storage._javaMultipleFiles {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 10)
- } }()
- try { if let v = _storage._goPackage {
- try visitor.visitSingularStringField(value: v, fieldNumber: 11)
- } }()
- try { if let v = _storage._ccGenericServices {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 16)
- } }()
- try { if let v = _storage._javaGenericServices {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 17)
- } }()
- try { if let v = _storage._pyGenericServices {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 18)
- } }()
- try { if let v = _storage._javaGenerateEqualsAndHash {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 20)
- } }()
- try { if let v = _storage._deprecated {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 23)
- } }()
- try { if let v = _storage._javaStringCheckUtf8 {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 27)
- } }()
- try { if let v = _storage._ccEnableArenas {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 31)
- } }()
- try { if let v = _storage._objcClassPrefix {
- try visitor.visitSingularStringField(value: v, fieldNumber: 36)
- } }()
- try { if let v = _storage._csharpNamespace {
- try visitor.visitSingularStringField(value: v, fieldNumber: 37)
- } }()
- try { if let v = _storage._swiftPrefix {
- try visitor.visitSingularStringField(value: v, fieldNumber: 39)
- } }()
- try { if let v = _storage._phpClassPrefix {
- try visitor.visitSingularStringField(value: v, fieldNumber: 40)
- } }()
- try { if let v = _storage._phpNamespace {
- try visitor.visitSingularStringField(value: v, fieldNumber: 41)
- } }()
- try { if let v = _storage._phpMetadataNamespace {
- try visitor.visitSingularStringField(value: v, fieldNumber: 44)
- } }()
- try { if let v = _storage._rubyPackage {
- try visitor.visitSingularStringField(value: v, fieldNumber: 45)
- } }()
- try { if let v = _storage._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 50)
- } }()
- if !_storage._uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FileOptions, rhs: Google_Protobuf_FileOptions) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._javaPackage != rhs_storage._javaPackage {return false}
- if _storage._javaOuterClassname != rhs_storage._javaOuterClassname {return false}
- if _storage._javaMultipleFiles != rhs_storage._javaMultipleFiles {return false}
- if _storage._javaGenerateEqualsAndHash != rhs_storage._javaGenerateEqualsAndHash {return false}
- if _storage._javaStringCheckUtf8 != rhs_storage._javaStringCheckUtf8 {return false}
- if _storage._optimizeFor != rhs_storage._optimizeFor {return false}
- if _storage._goPackage != rhs_storage._goPackage {return false}
- if _storage._ccGenericServices != rhs_storage._ccGenericServices {return false}
- if _storage._javaGenericServices != rhs_storage._javaGenericServices {return false}
- if _storage._pyGenericServices != rhs_storage._pyGenericServices {return false}
- if _storage._deprecated != rhs_storage._deprecated {return false}
- if _storage._ccEnableArenas != rhs_storage._ccEnableArenas {return false}
- if _storage._objcClassPrefix != rhs_storage._objcClassPrefix {return false}
- if _storage._csharpNamespace != rhs_storage._csharpNamespace {return false}
- if _storage._swiftPrefix != rhs_storage._swiftPrefix {return false}
- if _storage._phpClassPrefix != rhs_storage._phpClassPrefix {return false}
- if _storage._phpNamespace != rhs_storage._phpNamespace {return false}
- if _storage._phpMetadataNamespace != rhs_storage._phpMetadataNamespace {return false}
- if _storage._rubyPackage != rhs_storage._rubyPackage {return false}
- if _storage._features != rhs_storage._features {return false}
- if _storage._uninterpretedOption != rhs_storage._uninterpretedOption {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_FileOptions.OptimizeMode: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "SPEED"),
- 2: .same(proto: "CODE_SIZE"),
- 3: .same(proto: "LITE_RUNTIME"),
- ]
- }
- extension Google_Protobuf_MessageOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".MessageOptions"
- static let _protobuf_nameMap: _NameMap = [
- 1: .standard(proto: "message_set_wire_format"),
- 2: .standard(proto: "no_standard_descriptor_accessor"),
- 3: .same(proto: "deprecated"),
- 7: .standard(proto: "map_entry"),
- 11: .standard(proto: "deprecated_legacy_json_field_conflicts"),
- 12: .same(proto: "features"),
- 999: .standard(proto: "uninterpreted_option"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- if let v = self._features, !v.isInitialized {return false}
- if !Internal.areAllInitialized(self.uninterpretedOption) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularBoolField(value: &self._messageSetWireFormat) }()
- case 2: try { try decoder.decodeSingularBoolField(value: &self._noStandardDescriptorAccessor) }()
- case 3: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }()
- case 7: try { try decoder.decodeSingularBoolField(value: &self._mapEntry) }()
- case 11: try { try decoder.decodeSingularBoolField(value: &self._deprecatedLegacyJsonFieldConflicts) }()
- case 12: try { try decoder.decodeSingularMessageField(value: &self._features) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_MessageOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._messageSetWireFormat {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._noStandardDescriptorAccessor {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._deprecated {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._mapEntry {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 7)
- } }()
- try { if let v = self._deprecatedLegacyJsonFieldConflicts {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 11)
- } }()
- try { if let v = self._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 12)
- } }()
- if !self.uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_MessageOptions, rhs: Google_Protobuf_MessageOptions) -> Bool {
- if lhs._messageSetWireFormat != rhs._messageSetWireFormat {return false}
- if lhs._noStandardDescriptorAccessor != rhs._noStandardDescriptorAccessor {return false}
- if lhs._deprecated != rhs._deprecated {return false}
- if lhs._mapEntry != rhs._mapEntry {return false}
- if lhs._deprecatedLegacyJsonFieldConflicts != rhs._deprecatedLegacyJsonFieldConflicts {return false}
- if lhs._features != rhs._features {return false}
- if lhs.uninterpretedOption != rhs.uninterpretedOption {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_FieldOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".FieldOptions"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "ctype"),
- 2: .same(proto: "packed"),
- 6: .same(proto: "jstype"),
- 5: .same(proto: "lazy"),
- 15: .standard(proto: "unverified_lazy"),
- 3: .same(proto: "deprecated"),
- 10: .same(proto: "weak"),
- 16: .standard(proto: "debug_redact"),
- 17: .same(proto: "retention"),
- 19: .same(proto: "targets"),
- 20: .standard(proto: "edition_defaults"),
- 21: .same(proto: "features"),
- 22: .standard(proto: "feature_support"),
- 999: .standard(proto: "uninterpreted_option"),
- ]
- fileprivate class _StorageClass {
- var _ctype: Google_Protobuf_FieldOptions.CType? = nil
- var _packed: Bool? = nil
- var _jstype: Google_Protobuf_FieldOptions.JSType? = nil
- var _lazy: Bool? = nil
- var _unverifiedLazy: Bool? = nil
- var _deprecated: Bool? = nil
- var _weak: Bool? = nil
- var _debugRedact: Bool? = nil
- var _retention: Google_Protobuf_FieldOptions.OptionRetention? = nil
- var _targets: [Google_Protobuf_FieldOptions.OptionTargetType] = []
- var _editionDefaults: [Google_Protobuf_FieldOptions.EditionDefault] = []
- var _features: Google_Protobuf_FeatureSet? = nil
- var _featureSupport: Google_Protobuf_FieldOptions.FeatureSupport? = nil
- var _uninterpretedOption: [Google_Protobuf_UninterpretedOption] = []
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _ctype = source._ctype
- _packed = source._packed
- _jstype = source._jstype
- _lazy = source._lazy
- _unverifiedLazy = source._unverifiedLazy
- _deprecated = source._deprecated
- _weak = source._weak
- _debugRedact = source._debugRedact
- _retention = source._retention
- _targets = source._targets
- _editionDefaults = source._editionDefaults
- _features = source._features
- _featureSupport = source._featureSupport
- _uninterpretedOption = source._uninterpretedOption
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if let v = _storage._features, !v.isInitialized {return false}
- if !Internal.areAllInitialized(_storage._uninterpretedOption) {return false}
- return true
- }
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &_storage._ctype) }()
- case 2: try { try decoder.decodeSingularBoolField(value: &_storage._packed) }()
- case 3: try { try decoder.decodeSingularBoolField(value: &_storage._deprecated) }()
- case 5: try { try decoder.decodeSingularBoolField(value: &_storage._lazy) }()
- case 6: try { try decoder.decodeSingularEnumField(value: &_storage._jstype) }()
- case 10: try { try decoder.decodeSingularBoolField(value: &_storage._weak) }()
- case 15: try { try decoder.decodeSingularBoolField(value: &_storage._unverifiedLazy) }()
- case 16: try { try decoder.decodeSingularBoolField(value: &_storage._debugRedact) }()
- case 17: try { try decoder.decodeSingularEnumField(value: &_storage._retention) }()
- case 19: try { try decoder.decodeRepeatedEnumField(value: &_storage._targets) }()
- case 20: try { try decoder.decodeRepeatedMessageField(value: &_storage._editionDefaults) }()
- case 21: try { try decoder.decodeSingularMessageField(value: &_storage._features) }()
- case 22: try { try decoder.decodeSingularMessageField(value: &_storage._featureSupport) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &_storage._uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_FieldOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._ctype {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
- } }()
- try { if let v = _storage._packed {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
- } }()
- try { if let v = _storage._deprecated {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
- } }()
- try { if let v = _storage._lazy {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
- } }()
- try { if let v = _storage._jstype {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 6)
- } }()
- try { if let v = _storage._weak {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 10)
- } }()
- try { if let v = _storage._unverifiedLazy {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 15)
- } }()
- try { if let v = _storage._debugRedact {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 16)
- } }()
- try { if let v = _storage._retention {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 17)
- } }()
- if !_storage._targets.isEmpty {
- try visitor.visitRepeatedEnumField(value: _storage._targets, fieldNumber: 19)
- }
- if !_storage._editionDefaults.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._editionDefaults, fieldNumber: 20)
- }
- try { if let v = _storage._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 21)
- } }()
- try { if let v = _storage._featureSupport {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 22)
- } }()
- if !_storage._uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FieldOptions, rhs: Google_Protobuf_FieldOptions) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._ctype != rhs_storage._ctype {return false}
- if _storage._packed != rhs_storage._packed {return false}
- if _storage._jstype != rhs_storage._jstype {return false}
- if _storage._lazy != rhs_storage._lazy {return false}
- if _storage._unverifiedLazy != rhs_storage._unverifiedLazy {return false}
- if _storage._deprecated != rhs_storage._deprecated {return false}
- if _storage._weak != rhs_storage._weak {return false}
- if _storage._debugRedact != rhs_storage._debugRedact {return false}
- if _storage._retention != rhs_storage._retention {return false}
- if _storage._targets != rhs_storage._targets {return false}
- if _storage._editionDefaults != rhs_storage._editionDefaults {return false}
- if _storage._features != rhs_storage._features {return false}
- if _storage._featureSupport != rhs_storage._featureSupport {return false}
- if _storage._uninterpretedOption != rhs_storage._uninterpretedOption {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_FieldOptions.CType: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "STRING"),
- 1: .same(proto: "CORD"),
- 2: .same(proto: "STRING_PIECE"),
- ]
- }
- extension Google_Protobuf_FieldOptions.JSType: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "JS_NORMAL"),
- 1: .same(proto: "JS_STRING"),
- 2: .same(proto: "JS_NUMBER"),
- ]
- }
- extension Google_Protobuf_FieldOptions.OptionRetention: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "RETENTION_UNKNOWN"),
- 1: .same(proto: "RETENTION_RUNTIME"),
- 2: .same(proto: "RETENTION_SOURCE"),
- ]
- }
- extension Google_Protobuf_FieldOptions.OptionTargetType: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "TARGET_TYPE_UNKNOWN"),
- 1: .same(proto: "TARGET_TYPE_FILE"),
- 2: .same(proto: "TARGET_TYPE_EXTENSION_RANGE"),
- 3: .same(proto: "TARGET_TYPE_MESSAGE"),
- 4: .same(proto: "TARGET_TYPE_FIELD"),
- 5: .same(proto: "TARGET_TYPE_ONEOF"),
- 6: .same(proto: "TARGET_TYPE_ENUM"),
- 7: .same(proto: "TARGET_TYPE_ENUM_ENTRY"),
- 8: .same(proto: "TARGET_TYPE_SERVICE"),
- 9: .same(proto: "TARGET_TYPE_METHOD"),
- ]
- }
- extension Google_Protobuf_FieldOptions.EditionDefault: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_FieldOptions.protoMessageName + ".EditionDefault"
- static let _protobuf_nameMap: _NameMap = [
- 3: .same(proto: "edition"),
- 2: .same(proto: "value"),
- ]
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 2: try { try decoder.decodeSingularStringField(value: &self._value) }()
- case 3: try { try decoder.decodeSingularEnumField(value: &self._edition) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._value {
- try visitor.visitSingularStringField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._edition {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 3)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FieldOptions.EditionDefault, rhs: Google_Protobuf_FieldOptions.EditionDefault) -> Bool {
- if lhs._edition != rhs._edition {return false}
- if lhs._value != rhs._value {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_FieldOptions.FeatureSupport: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_FieldOptions.protoMessageName + ".FeatureSupport"
- static let _protobuf_nameMap: _NameMap = [
- 1: .standard(proto: "edition_introduced"),
- 2: .standard(proto: "edition_deprecated"),
- 3: .standard(proto: "deprecation_warning"),
- 4: .standard(proto: "edition_removed"),
- ]
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self._editionIntroduced) }()
- case 2: try { try decoder.decodeSingularEnumField(value: &self._editionDeprecated) }()
- case 3: try { try decoder.decodeSingularStringField(value: &self._deprecationWarning) }()
- case 4: try { try decoder.decodeSingularEnumField(value: &self._editionRemoved) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._editionIntroduced {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._editionDeprecated {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._deprecationWarning {
- try visitor.visitSingularStringField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._editionRemoved {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FieldOptions.FeatureSupport, rhs: Google_Protobuf_FieldOptions.FeatureSupport) -> Bool {
- if lhs._editionIntroduced != rhs._editionIntroduced {return false}
- if lhs._editionDeprecated != rhs._editionDeprecated {return false}
- if lhs._deprecationWarning != rhs._deprecationWarning {return false}
- if lhs._editionRemoved != rhs._editionRemoved {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_OneofOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".OneofOptions"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "features"),
- 999: .standard(proto: "uninterpreted_option"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- if let v = self._features, !v.isInitialized {return false}
- if !Internal.areAllInitialized(self.uninterpretedOption) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularMessageField(value: &self._features) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_OneofOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- if !self.uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_OneofOptions, rhs: Google_Protobuf_OneofOptions) -> Bool {
- if lhs._features != rhs._features {return false}
- if lhs.uninterpretedOption != rhs.uninterpretedOption {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_EnumOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".EnumOptions"
- static let _protobuf_nameMap: _NameMap = [
- 2: .standard(proto: "allow_alias"),
- 3: .same(proto: "deprecated"),
- 6: .standard(proto: "deprecated_legacy_json_field_conflicts"),
- 7: .same(proto: "features"),
- 999: .standard(proto: "uninterpreted_option"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- if let v = self._features, !v.isInitialized {return false}
- if !Internal.areAllInitialized(self.uninterpretedOption) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 2: try { try decoder.decodeSingularBoolField(value: &self._allowAlias) }()
- case 3: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }()
- case 6: try { try decoder.decodeSingularBoolField(value: &self._deprecatedLegacyJsonFieldConflicts) }()
- case 7: try { try decoder.decodeSingularMessageField(value: &self._features) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_EnumOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._allowAlias {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._deprecated {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._deprecatedLegacyJsonFieldConflicts {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 6)
- } }()
- try { if let v = self._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
- } }()
- if !self.uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_EnumOptions, rhs: Google_Protobuf_EnumOptions) -> Bool {
- if lhs._allowAlias != rhs._allowAlias {return false}
- if lhs._deprecated != rhs._deprecated {return false}
- if lhs._deprecatedLegacyJsonFieldConflicts != rhs._deprecatedLegacyJsonFieldConflicts {return false}
- if lhs._features != rhs._features {return false}
- if lhs.uninterpretedOption != rhs.uninterpretedOption {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_EnumValueOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".EnumValueOptions"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "deprecated"),
- 2: .same(proto: "features"),
- 3: .standard(proto: "debug_redact"),
- 4: .standard(proto: "feature_support"),
- 999: .standard(proto: "uninterpreted_option"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- if let v = self._features, !v.isInitialized {return false}
- if !Internal.areAllInitialized(self.uninterpretedOption) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._features) }()
- case 3: try { try decoder.decodeSingularBoolField(value: &self._debugRedact) }()
- case 4: try { try decoder.decodeSingularMessageField(value: &self._featureSupport) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_EnumValueOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._deprecated {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._debugRedact {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._featureSupport {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- } }()
- if !self.uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_EnumValueOptions, rhs: Google_Protobuf_EnumValueOptions) -> Bool {
- if lhs._deprecated != rhs._deprecated {return false}
- if lhs._features != rhs._features {return false}
- if lhs._debugRedact != rhs._debugRedact {return false}
- if lhs._featureSupport != rhs._featureSupport {return false}
- if lhs.uninterpretedOption != rhs.uninterpretedOption {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_ServiceOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ServiceOptions"
- static let _protobuf_nameMap: _NameMap = [
- 34: .same(proto: "features"),
- 33: .same(proto: "deprecated"),
- 999: .standard(proto: "uninterpreted_option"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- if let v = self._features, !v.isInitialized {return false}
- if !Internal.areAllInitialized(self.uninterpretedOption) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 33: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }()
- case 34: try { try decoder.decodeSingularMessageField(value: &self._features) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_ServiceOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._deprecated {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 33)
- } }()
- try { if let v = self._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 34)
- } }()
- if !self.uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_ServiceOptions, rhs: Google_Protobuf_ServiceOptions) -> Bool {
- if lhs._features != rhs._features {return false}
- if lhs._deprecated != rhs._deprecated {return false}
- if lhs.uninterpretedOption != rhs.uninterpretedOption {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_MethodOptions: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".MethodOptions"
- static let _protobuf_nameMap: _NameMap = [
- 33: .same(proto: "deprecated"),
- 34: .standard(proto: "idempotency_level"),
- 35: .same(proto: "features"),
- 999: .standard(proto: "uninterpreted_option"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- if let v = self._features, !v.isInitialized {return false}
- if !Internal.areAllInitialized(self.uninterpretedOption) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 33: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }()
- case 34: try { try decoder.decodeSingularEnumField(value: &self._idempotencyLevel) }()
- case 35: try { try decoder.decodeSingularMessageField(value: &self._features) }()
- case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }()
- case 1000..<536870912:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_MethodOptions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._deprecated {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 33)
- } }()
- try { if let v = self._idempotencyLevel {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 34)
- } }()
- try { if let v = self._features {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 35)
- } }()
- if !self.uninterpretedOption.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_MethodOptions, rhs: Google_Protobuf_MethodOptions) -> Bool {
- if lhs._deprecated != rhs._deprecated {return false}
- if lhs._idempotencyLevel != rhs._idempotencyLevel {return false}
- if lhs._features != rhs._features {return false}
- if lhs.uninterpretedOption != rhs.uninterpretedOption {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_MethodOptions.IdempotencyLevel: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "IDEMPOTENCY_UNKNOWN"),
- 1: .same(proto: "NO_SIDE_EFFECTS"),
- 2: .same(proto: "IDEMPOTENT"),
- ]
- }
- extension Google_Protobuf_UninterpretedOption: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".UninterpretedOption"
- static let _protobuf_nameMap: _NameMap = [
- 2: .same(proto: "name"),
- 3: .standard(proto: "identifier_value"),
- 4: .standard(proto: "positive_int_value"),
- 5: .standard(proto: "negative_int_value"),
- 6: .standard(proto: "double_value"),
- 7: .standard(proto: "string_value"),
- 8: .standard(proto: "aggregate_value"),
- ]
- public var isInitialized: Bool {
- if !Internal.areAllInitialized(self.name) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 2: try { try decoder.decodeRepeatedMessageField(value: &self.name) }()
- case 3: try { try decoder.decodeSingularStringField(value: &self._identifierValue) }()
- case 4: try { try decoder.decodeSingularUInt64Field(value: &self._positiveIntValue) }()
- case 5: try { try decoder.decodeSingularInt64Field(value: &self._negativeIntValue) }()
- case 6: try { try decoder.decodeSingularDoubleField(value: &self._doubleValue) }()
- case 7: try { try decoder.decodeSingularBytesField(value: &self._stringValue) }()
- case 8: try { try decoder.decodeSingularStringField(value: &self._aggregateValue) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.name.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.name, fieldNumber: 2)
- }
- try { if let v = self._identifierValue {
- try visitor.visitSingularStringField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._positiveIntValue {
- try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
- } }()
- try { if let v = self._negativeIntValue {
- try visitor.visitSingularInt64Field(value: v, fieldNumber: 5)
- } }()
- try { if let v = self._doubleValue {
- try visitor.visitSingularDoubleField(value: v, fieldNumber: 6)
- } }()
- try { if let v = self._stringValue {
- try visitor.visitSingularBytesField(value: v, fieldNumber: 7)
- } }()
- try { if let v = self._aggregateValue {
- try visitor.visitSingularStringField(value: v, fieldNumber: 8)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_UninterpretedOption, rhs: Google_Protobuf_UninterpretedOption) -> Bool {
- if lhs.name != rhs.name {return false}
- if lhs._identifierValue != rhs._identifierValue {return false}
- if lhs._positiveIntValue != rhs._positiveIntValue {return false}
- if lhs._negativeIntValue != rhs._negativeIntValue {return false}
- if lhs._doubleValue != rhs._doubleValue {return false}
- if lhs._stringValue != rhs._stringValue {return false}
- if lhs._aggregateValue != rhs._aggregateValue {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_UninterpretedOption.NamePart: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_UninterpretedOption.protoMessageName + ".NamePart"
- static let _protobuf_nameMap: _NameMap = [
- 1: .standard(proto: "name_part"),
- 2: .standard(proto: "is_extension"),
- ]
- public var isInitialized: Bool {
- if self._namePart == nil {return false}
- if self._isExtension == nil {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self._namePart) }()
- case 2: try { try decoder.decodeSingularBoolField(value: &self._isExtension) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._namePart {
- try visitor.visitSingularStringField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._isExtension {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_UninterpretedOption.NamePart, rhs: Google_Protobuf_UninterpretedOption.NamePart) -> Bool {
- if lhs._namePart != rhs._namePart {return false}
- if lhs._isExtension != rhs._isExtension {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_FeatureSet: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".FeatureSet"
- static let _protobuf_nameMap: _NameMap = [
- 1: .standard(proto: "field_presence"),
- 2: .standard(proto: "enum_type"),
- 3: .standard(proto: "repeated_field_encoding"),
- 4: .standard(proto: "utf8_validation"),
- 5: .standard(proto: "message_encoding"),
- 6: .standard(proto: "json_format"),
- 7: .standard(proto: "enforce_naming_style"),
- 8: .standard(proto: "default_symbol_visibility"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self._fieldPresence) }()
- case 2: try { try decoder.decodeSingularEnumField(value: &self._enumType) }()
- case 3: try { try decoder.decodeSingularEnumField(value: &self._repeatedFieldEncoding) }()
- case 4: try { try decoder.decodeSingularEnumField(value: &self._utf8Validation) }()
- case 5: try { try decoder.decodeSingularEnumField(value: &self._messageEncoding) }()
- case 6: try { try decoder.decodeSingularEnumField(value: &self._jsonFormat) }()
- case 7: try { try decoder.decodeSingularEnumField(value: &self._enforceNamingStyle) }()
- case 8: try { try decoder.decodeSingularEnumField(value: &self._defaultSymbolVisibility) }()
- case 1000..<10001:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_FeatureSet.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._fieldPresence {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._enumType {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._repeatedFieldEncoding {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._utf8Validation {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
- } }()
- try { if let v = self._messageEncoding {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 5)
- } }()
- try { if let v = self._jsonFormat {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 6)
- } }()
- try { if let v = self._enforceNamingStyle {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 7)
- } }()
- try { if let v = self._defaultSymbolVisibility {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 8)
- } }()
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 10001)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FeatureSet, rhs: Google_Protobuf_FeatureSet) -> Bool {
- if lhs._fieldPresence != rhs._fieldPresence {return false}
- if lhs._enumType != rhs._enumType {return false}
- if lhs._repeatedFieldEncoding != rhs._repeatedFieldEncoding {return false}
- if lhs._utf8Validation != rhs._utf8Validation {return false}
- if lhs._messageEncoding != rhs._messageEncoding {return false}
- if lhs._jsonFormat != rhs._jsonFormat {return false}
- if lhs._enforceNamingStyle != rhs._enforceNamingStyle {return false}
- if lhs._defaultSymbolVisibility != rhs._defaultSymbolVisibility {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_FeatureSet.FieldPresence: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "FIELD_PRESENCE_UNKNOWN"),
- 1: .same(proto: "EXPLICIT"),
- 2: .same(proto: "IMPLICIT"),
- 3: .same(proto: "LEGACY_REQUIRED"),
- ]
- }
- extension Google_Protobuf_FeatureSet.EnumType: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "ENUM_TYPE_UNKNOWN"),
- 1: .same(proto: "OPEN"),
- 2: .same(proto: "CLOSED"),
- ]
- }
- extension Google_Protobuf_FeatureSet.RepeatedFieldEncoding: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "REPEATED_FIELD_ENCODING_UNKNOWN"),
- 1: .same(proto: "PACKED"),
- 2: .same(proto: "EXPANDED"),
- ]
- }
- extension Google_Protobuf_FeatureSet.Utf8Validation: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "UTF8_VALIDATION_UNKNOWN"),
- 2: .same(proto: "VERIFY"),
- 3: .same(proto: "NONE"),
- ]
- }
- extension Google_Protobuf_FeatureSet.MessageEncoding: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "MESSAGE_ENCODING_UNKNOWN"),
- 1: .same(proto: "LENGTH_PREFIXED"),
- 2: .same(proto: "DELIMITED"),
- ]
- }
- extension Google_Protobuf_FeatureSet.JsonFormat: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "JSON_FORMAT_UNKNOWN"),
- 1: .same(proto: "ALLOW"),
- 2: .same(proto: "LEGACY_BEST_EFFORT"),
- ]
- }
- extension Google_Protobuf_FeatureSet.EnforceNamingStyle: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "ENFORCE_NAMING_STYLE_UNKNOWN"),
- 1: .same(proto: "STYLE2024"),
- 2: .same(proto: "STYLE_LEGACY"),
- ]
- }
- extension Google_Protobuf_FeatureSet.VisibilityFeature: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_FeatureSet.protoMessageName + ".VisibilityFeature"
- static let _protobuf_nameMap = _NameMap()
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FeatureSet.VisibilityFeature, rhs: Google_Protobuf_FeatureSet.VisibilityFeature) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_FeatureSet.VisibilityFeature.DefaultSymbolVisibility: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"),
- 1: .same(proto: "EXPORT_ALL"),
- 2: .same(proto: "EXPORT_TOP_LEVEL"),
- 3: .same(proto: "LOCAL_ALL"),
- 4: .same(proto: "STRICT"),
- ]
- }
- extension Google_Protobuf_FeatureSetDefaults: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".FeatureSetDefaults"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "defaults"),
- 4: .standard(proto: "minimum_edition"),
- 5: .standard(proto: "maximum_edition"),
- ]
- public var isInitialized: Bool {
- if !Internal.areAllInitialized(self.defaults) {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeRepeatedMessageField(value: &self.defaults) }()
- case 4: try { try decoder.decodeSingularEnumField(value: &self._minimumEdition) }()
- case 5: try { try decoder.decodeSingularEnumField(value: &self._maximumEdition) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.defaults.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.defaults, fieldNumber: 1)
- }
- try { if let v = self._minimumEdition {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
- } }()
- try { if let v = self._maximumEdition {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 5)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FeatureSetDefaults, rhs: Google_Protobuf_FeatureSetDefaults) -> Bool {
- if lhs.defaults != rhs.defaults {return false}
- if lhs._minimumEdition != rhs._minimumEdition {return false}
- if lhs._maximumEdition != rhs._maximumEdition {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_FeatureSetDefaults.protoMessageName + ".FeatureSetEditionDefault"
- static let _protobuf_nameMap: _NameMap = [
- 3: .same(proto: "edition"),
- 4: .standard(proto: "overridable_features"),
- 5: .standard(proto: "fixed_features"),
- ]
- fileprivate class _StorageClass {
- var _edition: Google_Protobuf_Edition? = nil
- var _overridableFeatures: Google_Protobuf_FeatureSet? = nil
- var _fixedFeatures: Google_Protobuf_FeatureSet? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _edition = source._edition
- _overridableFeatures = source._overridableFeatures
- _fixedFeatures = source._fixedFeatures
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- public var isInitialized: Bool {
- return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- if let v = _storage._overridableFeatures, !v.isInitialized {return false}
- if let v = _storage._fixedFeatures, !v.isInitialized {return false}
- return true
- }
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 3: try { try decoder.decodeSingularEnumField(value: &_storage._edition) }()
- case 4: try { try decoder.decodeSingularMessageField(value: &_storage._overridableFeatures) }()
- case 5: try { try decoder.decodeSingularMessageField(value: &_storage._fixedFeatures) }()
- default: break
- }
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._edition {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 3)
- } }()
- try { if let v = _storage._overridableFeatures {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- } }()
- try { if let v = _storage._fixedFeatures {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault, rhs: Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._edition != rhs_storage._edition {return false}
- if _storage._overridableFeatures != rhs_storage._overridableFeatures {return false}
- if _storage._fixedFeatures != rhs_storage._fixedFeatures {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_SourceCodeInfo: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".SourceCodeInfo"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "location"),
- ]
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return true
- }
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeRepeatedMessageField(value: &self.location) }()
- case 536000000:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_SourceCodeInfo.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- if !self.location.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.location, fieldNumber: 1)
- }
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 536000000, end: 536000001)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_SourceCodeInfo, rhs: Google_Protobuf_SourceCodeInfo) -> Bool {
- if lhs.location != rhs.location {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension Google_Protobuf_SourceCodeInfo.Location: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_SourceCodeInfo.protoMessageName + ".Location"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "path"),
- 2: .same(proto: "span"),
- 3: .standard(proto: "leading_comments"),
- 4: .standard(proto: "trailing_comments"),
- 6: .standard(proto: "leading_detached_comments"),
- ]
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeRepeatedInt32Field(value: &self.path) }()
- case 2: try { try decoder.decodeRepeatedInt32Field(value: &self.span) }()
- case 3: try { try decoder.decodeSingularStringField(value: &self._leadingComments) }()
- case 4: try { try decoder.decodeSingularStringField(value: &self._trailingComments) }()
- case 6: try { try decoder.decodeRepeatedStringField(value: &self.leadingDetachedComments) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.path.isEmpty {
- try visitor.visitPackedInt32Field(value: self.path, fieldNumber: 1)
- }
- if !self.span.isEmpty {
- try visitor.visitPackedInt32Field(value: self.span, fieldNumber: 2)
- }
- try { if let v = self._leadingComments {
- try visitor.visitSingularStringField(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._trailingComments {
- try visitor.visitSingularStringField(value: v, fieldNumber: 4)
- } }()
- if !self.leadingDetachedComments.isEmpty {
- try visitor.visitRepeatedStringField(value: self.leadingDetachedComments, fieldNumber: 6)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_SourceCodeInfo.Location, rhs: Google_Protobuf_SourceCodeInfo.Location) -> Bool {
- if lhs.path != rhs.path {return false}
- if lhs.span != rhs.span {return false}
- if lhs._leadingComments != rhs._leadingComments {return false}
- if lhs._trailingComments != rhs._trailingComments {return false}
- if lhs.leadingDetachedComments != rhs.leadingDetachedComments {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_GeneratedCodeInfo: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".GeneratedCodeInfo"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "annotation"),
- ]
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeRepeatedMessageField(value: &self.annotation) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- if !self.annotation.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.annotation, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_GeneratedCodeInfo, rhs: Google_Protobuf_GeneratedCodeInfo) -> Bool {
- if lhs.annotation != rhs.annotation {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_GeneratedCodeInfo.Annotation: Message, _MessageImplementationBase, _ProtoNameProviding {
- static let protoMessageName: String = Google_Protobuf_GeneratedCodeInfo.protoMessageName + ".Annotation"
- static let _protobuf_nameMap: _NameMap = [
- 1: .same(proto: "path"),
- 2: .standard(proto: "source_file"),
- 3: .same(proto: "begin"),
- 4: .same(proto: "end"),
- 5: .same(proto: "semantic"),
- ]
- mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeRepeatedInt32Field(value: &self.path) }()
- case 2: try { try decoder.decodeSingularStringField(value: &self._sourceFile) }()
- case 3: try { try decoder.decodeSingularInt32Field(value: &self._begin) }()
- case 4: try { try decoder.decodeSingularInt32Field(value: &self._end) }()
- case 5: try { try decoder.decodeSingularEnumField(value: &self._semantic) }()
- default: break
- }
- }
- }
- func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.path.isEmpty {
- try visitor.visitPackedInt32Field(value: self.path, fieldNumber: 1)
- }
- try { if let v = self._sourceFile {
- try visitor.visitSingularStringField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._begin {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
- } }()
- try { if let v = self._end {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
- } }()
- try { if let v = self._semantic {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 5)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Google_Protobuf_GeneratedCodeInfo.Annotation, rhs: Google_Protobuf_GeneratedCodeInfo.Annotation) -> Bool {
- if lhs.path != rhs.path {return false}
- if lhs._sourceFile != rhs._sourceFile {return false}
- if lhs._begin != rhs._begin {return false}
- if lhs._end != rhs._end {return false}
- if lhs._semantic != rhs._semantic {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_GeneratedCodeInfo.Annotation.Semantic: _ProtoNameProviding {
- static let _protobuf_nameMap: _NameMap = [
- 0: .same(proto: "NONE"),
- 1: .same(proto: "SET"),
- 2: .same(proto: "ALIAS"),
- ]
- }
|