firestore.pb.cc 504 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748
  1. /*
  2. * Copyright 2018 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: google/firestore/v1/firestore.proto
  18. #include "google/firestore/v1/firestore.pb.h"
  19. #include <algorithm>
  20. #include <google/protobuf/stubs/common.h>
  21. #include <google/protobuf/io/coded_stream.h>
  22. #include <google/protobuf/extension_set.h>
  23. #include <google/protobuf/wire_format_lite.h>
  24. #include <google/protobuf/descriptor.h>
  25. #include <google/protobuf/generated_message_reflection.h>
  26. #include <google/protobuf/reflection_ops.h>
  27. #include <google/protobuf/wire_format.h>
  28. // @@protoc_insertion_point(includes)
  29. #include <google/protobuf/port_def.inc>
  30. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto;
  31. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto;
  32. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto;
  33. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fcommon_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto;
  34. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto;
  35. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto;
  36. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto;
  37. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fcommon_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto;
  38. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto;
  39. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto;
  40. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto;
  41. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto;
  42. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto;
  43. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fcommon_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto;
  44. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto;
  45. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto;
  46. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto;
  47. extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto;
  48. extern PROTOBUF_INTERNAL_EXPORT_google_2frpc_2fstatus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Status_google_2frpc_2fstatus_2eproto;
  49. namespace google {
  50. namespace firestore {
  51. namespace v1 {
  52. class GetDocumentRequestDefaultTypeInternal {
  53. public:
  54. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<GetDocumentRequest> _instance;
  55. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  56. const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
  57. } _GetDocumentRequest_default_instance_;
  58. class ListDocumentsRequestDefaultTypeInternal {
  59. public:
  60. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListDocumentsRequest> _instance;
  61. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  62. const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
  63. } _ListDocumentsRequest_default_instance_;
  64. class ListDocumentsResponseDefaultTypeInternal {
  65. public:
  66. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListDocumentsResponse> _instance;
  67. } _ListDocumentsResponse_default_instance_;
  68. class CreateDocumentRequestDefaultTypeInternal {
  69. public:
  70. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CreateDocumentRequest> _instance;
  71. } _CreateDocumentRequest_default_instance_;
  72. class UpdateDocumentRequestDefaultTypeInternal {
  73. public:
  74. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<UpdateDocumentRequest> _instance;
  75. } _UpdateDocumentRequest_default_instance_;
  76. class DeleteDocumentRequestDefaultTypeInternal {
  77. public:
  78. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DeleteDocumentRequest> _instance;
  79. } _DeleteDocumentRequest_default_instance_;
  80. class BatchGetDocumentsRequestDefaultTypeInternal {
  81. public:
  82. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BatchGetDocumentsRequest> _instance;
  83. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  84. const ::google::firestore::v1::TransactionOptions* new_transaction_;
  85. const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
  86. } _BatchGetDocumentsRequest_default_instance_;
  87. class BatchGetDocumentsResponseDefaultTypeInternal {
  88. public:
  89. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BatchGetDocumentsResponse> _instance;
  90. const ::google::firestore::v1::Document* found_;
  91. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr missing_;
  92. } _BatchGetDocumentsResponse_default_instance_;
  93. class BeginTransactionRequestDefaultTypeInternal {
  94. public:
  95. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BeginTransactionRequest> _instance;
  96. } _BeginTransactionRequest_default_instance_;
  97. class BeginTransactionResponseDefaultTypeInternal {
  98. public:
  99. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BeginTransactionResponse> _instance;
  100. } _BeginTransactionResponse_default_instance_;
  101. class CommitRequestDefaultTypeInternal {
  102. public:
  103. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CommitRequest> _instance;
  104. } _CommitRequest_default_instance_;
  105. class CommitResponseDefaultTypeInternal {
  106. public:
  107. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CommitResponse> _instance;
  108. } _CommitResponse_default_instance_;
  109. class RollbackRequestDefaultTypeInternal {
  110. public:
  111. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RollbackRequest> _instance;
  112. } _RollbackRequest_default_instance_;
  113. class RunQueryRequestDefaultTypeInternal {
  114. public:
  115. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RunQueryRequest> _instance;
  116. const ::google::firestore::v1::StructuredQuery* structured_query_;
  117. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  118. const ::google::firestore::v1::TransactionOptions* new_transaction_;
  119. const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
  120. } _RunQueryRequest_default_instance_;
  121. class RunQueryResponseDefaultTypeInternal {
  122. public:
  123. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RunQueryResponse> _instance;
  124. } _RunQueryResponse_default_instance_;
  125. class WriteRequest_LabelsEntry_DoNotUseDefaultTypeInternal {
  126. public:
  127. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WriteRequest_LabelsEntry_DoNotUse> _instance;
  128. } _WriteRequest_LabelsEntry_DoNotUse_default_instance_;
  129. class WriteRequestDefaultTypeInternal {
  130. public:
  131. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WriteRequest> _instance;
  132. } _WriteRequest_default_instance_;
  133. class WriteResponseDefaultTypeInternal {
  134. public:
  135. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WriteResponse> _instance;
  136. } _WriteResponse_default_instance_;
  137. class ListenRequest_LabelsEntry_DoNotUseDefaultTypeInternal {
  138. public:
  139. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListenRequest_LabelsEntry_DoNotUse> _instance;
  140. } _ListenRequest_LabelsEntry_DoNotUse_default_instance_;
  141. class ListenRequestDefaultTypeInternal {
  142. public:
  143. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListenRequest> _instance;
  144. const ::google::firestore::v1::Target* add_target_;
  145. ::PROTOBUF_NAMESPACE_ID::int32 remove_target_;
  146. } _ListenRequest_default_instance_;
  147. class ListenResponseDefaultTypeInternal {
  148. public:
  149. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListenResponse> _instance;
  150. const ::google::firestore::v1::TargetChange* target_change_;
  151. const ::google::firestore::v1::DocumentChange* document_change_;
  152. const ::google::firestore::v1::DocumentDelete* document_delete_;
  153. const ::google::firestore::v1::DocumentRemove* document_remove_;
  154. const ::google::firestore::v1::ExistenceFilter* filter_;
  155. } _ListenResponse_default_instance_;
  156. class Target_DocumentsTargetDefaultTypeInternal {
  157. public:
  158. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Target_DocumentsTarget> _instance;
  159. } _Target_DocumentsTarget_default_instance_;
  160. class Target_QueryTargetDefaultTypeInternal {
  161. public:
  162. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Target_QueryTarget> _instance;
  163. const ::google::firestore::v1::StructuredQuery* structured_query_;
  164. } _Target_QueryTarget_default_instance_;
  165. class TargetDefaultTypeInternal {
  166. public:
  167. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Target> _instance;
  168. const ::google::firestore::v1::Target_QueryTarget* query_;
  169. const ::google::firestore::v1::Target_DocumentsTarget* documents_;
  170. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr resume_token_;
  171. const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
  172. } _Target_default_instance_;
  173. class TargetChangeDefaultTypeInternal {
  174. public:
  175. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TargetChange> _instance;
  176. } _TargetChange_default_instance_;
  177. class ListCollectionIdsRequestDefaultTypeInternal {
  178. public:
  179. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListCollectionIdsRequest> _instance;
  180. } _ListCollectionIdsRequest_default_instance_;
  181. class ListCollectionIdsResponseDefaultTypeInternal {
  182. public:
  183. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListCollectionIdsResponse> _instance;
  184. } _ListCollectionIdsResponse_default_instance_;
  185. } // namespace v1
  186. } // namespace firestore
  187. } // namespace google
  188. static void InitDefaultsscc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  189. GOOGLE_PROTOBUF_VERIFY_VERSION;
  190. {
  191. void* ptr = &::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_;
  192. new (ptr) ::google::firestore::v1::BatchGetDocumentsRequest();
  193. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  194. }
  195. ::google::firestore::v1::BatchGetDocumentsRequest::InitAsDefaultInstance();
  196. }
  197. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  198. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  199. &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
  200. &scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto.base,
  201. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  202. static void InitDefaultsscc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  203. GOOGLE_PROTOBUF_VERIFY_VERSION;
  204. {
  205. void* ptr = &::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_;
  206. new (ptr) ::google::firestore::v1::BatchGetDocumentsResponse();
  207. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  208. }
  209. ::google::firestore::v1::BatchGetDocumentsResponse::InitAsDefaultInstance();
  210. }
  211. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  212. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  213. &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
  214. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  215. static void InitDefaultsscc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  216. GOOGLE_PROTOBUF_VERIFY_VERSION;
  217. {
  218. void* ptr = &::google::firestore::v1::_BeginTransactionRequest_default_instance_;
  219. new (ptr) ::google::firestore::v1::BeginTransactionRequest();
  220. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  221. }
  222. ::google::firestore::v1::BeginTransactionRequest::InitAsDefaultInstance();
  223. }
  224. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  225. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  226. &scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};
  227. static void InitDefaultsscc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  228. GOOGLE_PROTOBUF_VERIFY_VERSION;
  229. {
  230. void* ptr = &::google::firestore::v1::_BeginTransactionResponse_default_instance_;
  231. new (ptr) ::google::firestore::v1::BeginTransactionResponse();
  232. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  233. }
  234. ::google::firestore::v1::BeginTransactionResponse::InitAsDefaultInstance();
  235. }
  236. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  237. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};
  238. static void InitDefaultsscc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  239. GOOGLE_PROTOBUF_VERIFY_VERSION;
  240. {
  241. void* ptr = &::google::firestore::v1::_CommitRequest_default_instance_;
  242. new (ptr) ::google::firestore::v1::CommitRequest();
  243. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  244. }
  245. ::google::firestore::v1::CommitRequest::InitAsDefaultInstance();
  246. }
  247. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  248. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  249. &scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto.base,}};
  250. static void InitDefaultsscc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  251. GOOGLE_PROTOBUF_VERIFY_VERSION;
  252. {
  253. void* ptr = &::google::firestore::v1::_CommitResponse_default_instance_;
  254. new (ptr) ::google::firestore::v1::CommitResponse();
  255. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  256. }
  257. ::google::firestore::v1::CommitResponse::InitAsDefaultInstance();
  258. }
  259. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  260. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  261. &scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  262. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  263. static void InitDefaultsscc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  264. GOOGLE_PROTOBUF_VERIFY_VERSION;
  265. {
  266. void* ptr = &::google::firestore::v1::_CreateDocumentRequest_default_instance_;
  267. new (ptr) ::google::firestore::v1::CreateDocumentRequest();
  268. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  269. }
  270. ::google::firestore::v1::CreateDocumentRequest::InitAsDefaultInstance();
  271. }
  272. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  273. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  274. &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
  275. &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};
  276. static void InitDefaultsscc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  277. GOOGLE_PROTOBUF_VERIFY_VERSION;
  278. {
  279. void* ptr = &::google::firestore::v1::_DeleteDocumentRequest_default_instance_;
  280. new (ptr) ::google::firestore::v1::DeleteDocumentRequest();
  281. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  282. }
  283. ::google::firestore::v1::DeleteDocumentRequest::InitAsDefaultInstance();
  284. }
  285. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  286. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  287. &scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};
  288. static void InitDefaultsscc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  289. GOOGLE_PROTOBUF_VERIFY_VERSION;
  290. {
  291. void* ptr = &::google::firestore::v1::_GetDocumentRequest_default_instance_;
  292. new (ptr) ::google::firestore::v1::GetDocumentRequest();
  293. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  294. }
  295. ::google::firestore::v1::GetDocumentRequest::InitAsDefaultInstance();
  296. }
  297. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  298. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  299. &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
  300. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  301. static void InitDefaultsscc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  302. GOOGLE_PROTOBUF_VERIFY_VERSION;
  303. {
  304. void* ptr = &::google::firestore::v1::_ListCollectionIdsRequest_default_instance_;
  305. new (ptr) ::google::firestore::v1::ListCollectionIdsRequest();
  306. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  307. }
  308. ::google::firestore::v1::ListCollectionIdsRequest::InitAsDefaultInstance();
  309. }
  310. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  311. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};
  312. static void InitDefaultsscc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  313. GOOGLE_PROTOBUF_VERIFY_VERSION;
  314. {
  315. void* ptr = &::google::firestore::v1::_ListCollectionIdsResponse_default_instance_;
  316. new (ptr) ::google::firestore::v1::ListCollectionIdsResponse();
  317. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  318. }
  319. ::google::firestore::v1::ListCollectionIdsResponse::InitAsDefaultInstance();
  320. }
  321. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  322. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};
  323. static void InitDefaultsscc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  324. GOOGLE_PROTOBUF_VERIFY_VERSION;
  325. {
  326. void* ptr = &::google::firestore::v1::_ListDocumentsRequest_default_instance_;
  327. new (ptr) ::google::firestore::v1::ListDocumentsRequest();
  328. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  329. }
  330. ::google::firestore::v1::ListDocumentsRequest::InitAsDefaultInstance();
  331. }
  332. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  333. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  334. &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
  335. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  336. static void InitDefaultsscc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  337. GOOGLE_PROTOBUF_VERIFY_VERSION;
  338. {
  339. void* ptr = &::google::firestore::v1::_ListDocumentsResponse_default_instance_;
  340. new (ptr) ::google::firestore::v1::ListDocumentsResponse();
  341. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  342. }
  343. ::google::firestore::v1::ListDocumentsResponse::InitAsDefaultInstance();
  344. }
  345. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  346. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  347. &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,}};
  348. static void InitDefaultsscc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  349. GOOGLE_PROTOBUF_VERIFY_VERSION;
  350. {
  351. void* ptr = &::google::firestore::v1::_ListenRequest_default_instance_;
  352. new (ptr) ::google::firestore::v1::ListenRequest();
  353. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  354. }
  355. ::google::firestore::v1::ListenRequest::InitAsDefaultInstance();
  356. }
  357. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  358. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  359. &scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  360. &scc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,}};
  361. static void InitDefaultsscc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  362. GOOGLE_PROTOBUF_VERIFY_VERSION;
  363. {
  364. void* ptr = &::google::firestore::v1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_;
  365. new (ptr) ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse();
  366. }
  367. ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance();
  368. }
  369. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  370. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};
  371. static void InitDefaultsscc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  372. GOOGLE_PROTOBUF_VERIFY_VERSION;
  373. {
  374. void* ptr = &::google::firestore::v1::_ListenResponse_default_instance_;
  375. new (ptr) ::google::firestore::v1::ListenResponse();
  376. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  377. }
  378. ::google::firestore::v1::ListenResponse::InitAsDefaultInstance();
  379. }
  380. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  381. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, InitDefaultsscc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  382. &scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  383. &scc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  384. &scc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  385. &scc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  386. &scc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto.base,}};
  387. static void InitDefaultsscc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  388. GOOGLE_PROTOBUF_VERIFY_VERSION;
  389. {
  390. void* ptr = &::google::firestore::v1::_RollbackRequest_default_instance_;
  391. new (ptr) ::google::firestore::v1::RollbackRequest();
  392. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  393. }
  394. ::google::firestore::v1::RollbackRequest::InitAsDefaultInstance();
  395. }
  396. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  397. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};
  398. static void InitDefaultsscc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  399. GOOGLE_PROTOBUF_VERIFY_VERSION;
  400. {
  401. void* ptr = &::google::firestore::v1::_RunQueryRequest_default_instance_;
  402. new (ptr) ::google::firestore::v1::RunQueryRequest();
  403. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  404. }
  405. ::google::firestore::v1::RunQueryRequest::InitAsDefaultInstance();
  406. }
  407. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  408. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  409. &scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto.base,
  410. &scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto.base,
  411. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  412. static void InitDefaultsscc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  413. GOOGLE_PROTOBUF_VERIFY_VERSION;
  414. {
  415. void* ptr = &::google::firestore::v1::_RunQueryResponse_default_instance_;
  416. new (ptr) ::google::firestore::v1::RunQueryResponse();
  417. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  418. }
  419. ::google::firestore::v1::RunQueryResponse::InitAsDefaultInstance();
  420. }
  421. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  422. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  423. &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
  424. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  425. static void InitDefaultsscc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  426. GOOGLE_PROTOBUF_VERIFY_VERSION;
  427. {
  428. void* ptr = &::google::firestore::v1::_Target_default_instance_;
  429. new (ptr) ::google::firestore::v1::Target();
  430. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  431. }
  432. ::google::firestore::v1::Target::InitAsDefaultInstance();
  433. }
  434. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto =
  435. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  436. &scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  437. &scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  438. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  439. static void InitDefaultsscc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  440. GOOGLE_PROTOBUF_VERIFY_VERSION;
  441. {
  442. void* ptr = &::google::firestore::v1::_Target_DocumentsTarget_default_instance_;
  443. new (ptr) ::google::firestore::v1::Target_DocumentsTarget();
  444. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  445. }
  446. ::google::firestore::v1::Target_DocumentsTarget::InitAsDefaultInstance();
  447. }
  448. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto =
  449. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};
  450. static void InitDefaultsscc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  451. GOOGLE_PROTOBUF_VERIFY_VERSION;
  452. {
  453. void* ptr = &::google::firestore::v1::_Target_QueryTarget_default_instance_;
  454. new (ptr) ::google::firestore::v1::Target_QueryTarget();
  455. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  456. }
  457. ::google::firestore::v1::Target_QueryTarget::InitAsDefaultInstance();
  458. }
  459. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto =
  460. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  461. &scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto.base,}};
  462. static void InitDefaultsscc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  463. GOOGLE_PROTOBUF_VERIFY_VERSION;
  464. {
  465. void* ptr = &::google::firestore::v1::_TargetChange_default_instance_;
  466. new (ptr) ::google::firestore::v1::TargetChange();
  467. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  468. }
  469. ::google::firestore::v1::TargetChange::InitAsDefaultInstance();
  470. }
  471. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto =
  472. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  473. &scc_info_Status_google_2frpc_2fstatus_2eproto.base,
  474. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  475. static void InitDefaultsscc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  476. GOOGLE_PROTOBUF_VERIFY_VERSION;
  477. {
  478. void* ptr = &::google::firestore::v1::_UpdateDocumentRequest_default_instance_;
  479. new (ptr) ::google::firestore::v1::UpdateDocumentRequest();
  480. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  481. }
  482. ::google::firestore::v1::UpdateDocumentRequest::InitAsDefaultInstance();
  483. }
  484. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  485. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  486. &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
  487. &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
  488. &scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};
  489. static void InitDefaultsscc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  490. GOOGLE_PROTOBUF_VERIFY_VERSION;
  491. {
  492. void* ptr = &::google::firestore::v1::_WriteRequest_default_instance_;
  493. new (ptr) ::google::firestore::v1::WriteRequest();
  494. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  495. }
  496. ::google::firestore::v1::WriteRequest::InitAsDefaultInstance();
  497. }
  498. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
  499. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  500. &scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  501. &scc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,}};
  502. static void InitDefaultsscc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  503. GOOGLE_PROTOBUF_VERIFY_VERSION;
  504. {
  505. void* ptr = &::google::firestore::v1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_;
  506. new (ptr) ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse();
  507. }
  508. ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance();
  509. }
  510. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  511. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};
  512. static void InitDefaultsscc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  513. GOOGLE_PROTOBUF_VERIFY_VERSION;
  514. {
  515. void* ptr = &::google::firestore::v1::_WriteResponse_default_instance_;
  516. new (ptr) ::google::firestore::v1::WriteResponse();
  517. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  518. }
  519. ::google::firestore::v1::WriteResponse::InitAsDefaultInstance();
  520. }
  521. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
  522. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
  523. &scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  524. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  525. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2ffirestore_2fv1_2ffirestore_2eproto[27];
  526. static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto[1];
  527. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto = nullptr;
  528. const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2ffirestore_2fv1_2ffirestore_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  529. ~0u, // no _has_bits_
  530. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, _internal_metadata_),
  531. ~0u, // no _extensions_
  532. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, _oneof_case_[0]),
  533. ~0u, // no _weak_field_map_
  534. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, name_),
  535. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, mask_),
  536. offsetof(::google::firestore::v1::GetDocumentRequestDefaultTypeInternal, transaction_),
  537. offsetof(::google::firestore::v1::GetDocumentRequestDefaultTypeInternal, read_time_),
  538. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, consistency_selector_),
  539. ~0u, // no _has_bits_
  540. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, _internal_metadata_),
  541. ~0u, // no _extensions_
  542. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, _oneof_case_[0]),
  543. ~0u, // no _weak_field_map_
  544. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, parent_),
  545. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, collection_id_),
  546. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, page_size_),
  547. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, page_token_),
  548. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, order_by_),
  549. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, mask_),
  550. offsetof(::google::firestore::v1::ListDocumentsRequestDefaultTypeInternal, transaction_),
  551. offsetof(::google::firestore::v1::ListDocumentsRequestDefaultTypeInternal, read_time_),
  552. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, show_missing_),
  553. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, consistency_selector_),
  554. ~0u, // no _has_bits_
  555. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, _internal_metadata_),
  556. ~0u, // no _extensions_
  557. ~0u, // no _oneof_case_
  558. ~0u, // no _weak_field_map_
  559. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, documents_),
  560. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, next_page_token_),
  561. ~0u, // no _has_bits_
  562. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, _internal_metadata_),
  563. ~0u, // no _extensions_
  564. ~0u, // no _oneof_case_
  565. ~0u, // no _weak_field_map_
  566. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, parent_),
  567. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, collection_id_),
  568. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, document_id_),
  569. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, document_),
  570. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, mask_),
  571. ~0u, // no _has_bits_
  572. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, _internal_metadata_),
  573. ~0u, // no _extensions_
  574. ~0u, // no _oneof_case_
  575. ~0u, // no _weak_field_map_
  576. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, document_),
  577. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, update_mask_),
  578. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, mask_),
  579. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, current_document_),
  580. ~0u, // no _has_bits_
  581. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, _internal_metadata_),
  582. ~0u, // no _extensions_
  583. ~0u, // no _oneof_case_
  584. ~0u, // no _weak_field_map_
  585. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, name_),
  586. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, current_document_),
  587. ~0u, // no _has_bits_
  588. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, _internal_metadata_),
  589. ~0u, // no _extensions_
  590. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, _oneof_case_[0]),
  591. ~0u, // no _weak_field_map_
  592. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, database_),
  593. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, documents_),
  594. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, mask_),
  595. offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, transaction_),
  596. offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, new_transaction_),
  597. offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, read_time_),
  598. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, consistency_selector_),
  599. ~0u, // no _has_bits_
  600. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, _internal_metadata_),
  601. ~0u, // no _extensions_
  602. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, _oneof_case_[0]),
  603. ~0u, // no _weak_field_map_
  604. offsetof(::google::firestore::v1::BatchGetDocumentsResponseDefaultTypeInternal, found_),
  605. offsetof(::google::firestore::v1::BatchGetDocumentsResponseDefaultTypeInternal, missing_),
  606. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, transaction_),
  607. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, read_time_),
  608. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, result_),
  609. ~0u, // no _has_bits_
  610. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, _internal_metadata_),
  611. ~0u, // no _extensions_
  612. ~0u, // no _oneof_case_
  613. ~0u, // no _weak_field_map_
  614. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, database_),
  615. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, options_),
  616. ~0u, // no _has_bits_
  617. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionResponse, _internal_metadata_),
  618. ~0u, // no _extensions_
  619. ~0u, // no _oneof_case_
  620. ~0u, // no _weak_field_map_
  621. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionResponse, transaction_),
  622. ~0u, // no _has_bits_
  623. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitRequest, _internal_metadata_),
  624. ~0u, // no _extensions_
  625. ~0u, // no _oneof_case_
  626. ~0u, // no _weak_field_map_
  627. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitRequest, database_),
  628. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitRequest, writes_),
  629. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitRequest, transaction_),
  630. ~0u, // no _has_bits_
  631. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitResponse, _internal_metadata_),
  632. ~0u, // no _extensions_
  633. ~0u, // no _oneof_case_
  634. ~0u, // no _weak_field_map_
  635. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitResponse, write_results_),
  636. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitResponse, commit_time_),
  637. ~0u, // no _has_bits_
  638. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, _internal_metadata_),
  639. ~0u, // no _extensions_
  640. ~0u, // no _oneof_case_
  641. ~0u, // no _weak_field_map_
  642. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, database_),
  643. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, transaction_),
  644. ~0u, // no _has_bits_
  645. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, _internal_metadata_),
  646. ~0u, // no _extensions_
  647. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, _oneof_case_[0]),
  648. ~0u, // no _weak_field_map_
  649. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, parent_),
  650. offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, structured_query_),
  651. offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, transaction_),
  652. offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, new_transaction_),
  653. offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, read_time_),
  654. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, query_type_),
  655. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, consistency_selector_),
  656. ~0u, // no _has_bits_
  657. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, _internal_metadata_),
  658. ~0u, // no _extensions_
  659. ~0u, // no _oneof_case_
  660. ~0u, // no _weak_field_map_
  661. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, transaction_),
  662. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, document_),
  663. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, read_time_),
  664. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, skipped_results_),
  665. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, _has_bits_),
  666. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, _internal_metadata_),
  667. ~0u, // no _extensions_
  668. ~0u, // no _oneof_case_
  669. ~0u, // no _weak_field_map_
  670. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, key_),
  671. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, value_),
  672. 0,
  673. 1,
  674. ~0u, // no _has_bits_
  675. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, _internal_metadata_),
  676. ~0u, // no _extensions_
  677. ~0u, // no _oneof_case_
  678. ~0u, // no _weak_field_map_
  679. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, database_),
  680. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, stream_id_),
  681. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, writes_),
  682. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, stream_token_),
  683. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, labels_),
  684. ~0u, // no _has_bits_
  685. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, _internal_metadata_),
  686. ~0u, // no _extensions_
  687. ~0u, // no _oneof_case_
  688. ~0u, // no _weak_field_map_
  689. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, stream_id_),
  690. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, stream_token_),
  691. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, write_results_),
  692. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, commit_time_),
  693. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, _has_bits_),
  694. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, _internal_metadata_),
  695. ~0u, // no _extensions_
  696. ~0u, // no _oneof_case_
  697. ~0u, // no _weak_field_map_
  698. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, key_),
  699. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, value_),
  700. 0,
  701. 1,
  702. ~0u, // no _has_bits_
  703. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, _internal_metadata_),
  704. ~0u, // no _extensions_
  705. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, _oneof_case_[0]),
  706. ~0u, // no _weak_field_map_
  707. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, database_),
  708. offsetof(::google::firestore::v1::ListenRequestDefaultTypeInternal, add_target_),
  709. offsetof(::google::firestore::v1::ListenRequestDefaultTypeInternal, remove_target_),
  710. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, labels_),
  711. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, target_change_),
  712. ~0u, // no _has_bits_
  713. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenResponse, _internal_metadata_),
  714. ~0u, // no _extensions_
  715. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenResponse, _oneof_case_[0]),
  716. ~0u, // no _weak_field_map_
  717. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, target_change_),
  718. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_change_),
  719. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_delete_),
  720. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_remove_),
  721. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, filter_),
  722. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenResponse, response_type_),
  723. ~0u, // no _has_bits_
  724. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_DocumentsTarget, _internal_metadata_),
  725. ~0u, // no _extensions_
  726. ~0u, // no _oneof_case_
  727. ~0u, // no _weak_field_map_
  728. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_DocumentsTarget, documents_),
  729. ~0u, // no _has_bits_
  730. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, _internal_metadata_),
  731. ~0u, // no _extensions_
  732. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, _oneof_case_[0]),
  733. ~0u, // no _weak_field_map_
  734. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, parent_),
  735. offsetof(::google::firestore::v1::Target_QueryTargetDefaultTypeInternal, structured_query_),
  736. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, query_type_),
  737. ~0u, // no _has_bits_
  738. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, _internal_metadata_),
  739. ~0u, // no _extensions_
  740. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, _oneof_case_[0]),
  741. ~0u, // no _weak_field_map_
  742. offsetof(::google::firestore::v1::TargetDefaultTypeInternal, query_),
  743. offsetof(::google::firestore::v1::TargetDefaultTypeInternal, documents_),
  744. offsetof(::google::firestore::v1::TargetDefaultTypeInternal, resume_token_),
  745. offsetof(::google::firestore::v1::TargetDefaultTypeInternal, read_time_),
  746. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, target_id_),
  747. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, once_),
  748. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, target_type_),
  749. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, resume_type_),
  750. ~0u, // no _has_bits_
  751. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, _internal_metadata_),
  752. ~0u, // no _extensions_
  753. ~0u, // no _oneof_case_
  754. ~0u, // no _weak_field_map_
  755. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, target_change_type_),
  756. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, target_ids_),
  757. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, cause_),
  758. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, resume_token_),
  759. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, read_time_),
  760. ~0u, // no _has_bits_
  761. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, _internal_metadata_),
  762. ~0u, // no _extensions_
  763. ~0u, // no _oneof_case_
  764. ~0u, // no _weak_field_map_
  765. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, parent_),
  766. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, page_size_),
  767. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, page_token_),
  768. ~0u, // no _has_bits_
  769. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, _internal_metadata_),
  770. ~0u, // no _extensions_
  771. ~0u, // no _oneof_case_
  772. ~0u, // no _weak_field_map_
  773. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, collection_ids_),
  774. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, next_page_token_),
  775. };
  776. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  777. { 0, -1, sizeof(::google::firestore::v1::GetDocumentRequest)},
  778. { 10, -1, sizeof(::google::firestore::v1::ListDocumentsRequest)},
  779. { 25, -1, sizeof(::google::firestore::v1::ListDocumentsResponse)},
  780. { 32, -1, sizeof(::google::firestore::v1::CreateDocumentRequest)},
  781. { 42, -1, sizeof(::google::firestore::v1::UpdateDocumentRequest)},
  782. { 51, -1, sizeof(::google::firestore::v1::DeleteDocumentRequest)},
  783. { 58, -1, sizeof(::google::firestore::v1::BatchGetDocumentsRequest)},
  784. { 70, -1, sizeof(::google::firestore::v1::BatchGetDocumentsResponse)},
  785. { 80, -1, sizeof(::google::firestore::v1::BeginTransactionRequest)},
  786. { 87, -1, sizeof(::google::firestore::v1::BeginTransactionResponse)},
  787. { 93, -1, sizeof(::google::firestore::v1::CommitRequest)},
  788. { 101, -1, sizeof(::google::firestore::v1::CommitResponse)},
  789. { 108, -1, sizeof(::google::firestore::v1::RollbackRequest)},
  790. { 115, -1, sizeof(::google::firestore::v1::RunQueryRequest)},
  791. { 127, -1, sizeof(::google::firestore::v1::RunQueryResponse)},
  792. { 136, 143, sizeof(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse)},
  793. { 145, -1, sizeof(::google::firestore::v1::WriteRequest)},
  794. { 155, -1, sizeof(::google::firestore::v1::WriteResponse)},
  795. { 164, 171, sizeof(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse)},
  796. { 173, -1, sizeof(::google::firestore::v1::ListenRequest)},
  797. { 183, -1, sizeof(::google::firestore::v1::ListenResponse)},
  798. { 194, -1, sizeof(::google::firestore::v1::Target_DocumentsTarget)},
  799. { 200, -1, sizeof(::google::firestore::v1::Target_QueryTarget)},
  800. { 208, -1, sizeof(::google::firestore::v1::Target)},
  801. { 221, -1, sizeof(::google::firestore::v1::TargetChange)},
  802. { 231, -1, sizeof(::google::firestore::v1::ListCollectionIdsRequest)},
  803. { 239, -1, sizeof(::google::firestore::v1::ListCollectionIdsResponse)},
  804. };
  805. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  806. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_GetDocumentRequest_default_instance_),
  807. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListDocumentsRequest_default_instance_),
  808. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListDocumentsResponse_default_instance_),
  809. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_CreateDocumentRequest_default_instance_),
  810. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_UpdateDocumentRequest_default_instance_),
  811. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_DeleteDocumentRequest_default_instance_),
  812. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_),
  813. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_),
  814. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_BeginTransactionRequest_default_instance_),
  815. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_BeginTransactionResponse_default_instance_),
  816. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_CommitRequest_default_instance_),
  817. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_CommitResponse_default_instance_),
  818. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_RollbackRequest_default_instance_),
  819. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_RunQueryRequest_default_instance_),
  820. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_RunQueryResponse_default_instance_),
  821. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_),
  822. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_WriteRequest_default_instance_),
  823. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_WriteResponse_default_instance_),
  824. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_),
  825. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListenRequest_default_instance_),
  826. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListenResponse_default_instance_),
  827. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_Target_DocumentsTarget_default_instance_),
  828. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_Target_QueryTarget_default_instance_),
  829. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_Target_default_instance_),
  830. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_TargetChange_default_instance_),
  831. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListCollectionIdsRequest_default_instance_),
  832. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListCollectionIdsResponse_default_instance_),
  833. };
  834. const char descriptor_table_protodef_google_2ffirestore_2fv1_2ffirestore_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  835. "\n#google/firestore/v1/firestore.proto\022\023g"
  836. "oogle.firestore.v1\032\034google/api/annotatio"
  837. "ns.proto\032 google/firestore/v1/common.pro"
  838. "to\032\"google/firestore/v1/document.proto\032\037"
  839. "google/firestore/v1/query.proto\032\037google/"
  840. "firestore/v1/write.proto\032\033google/protobu"
  841. "f/empty.proto\032\037google/protobuf/timestamp"
  842. ".proto\032\027google/rpc/status.proto\"\263\001\n\022GetD"
  843. "ocumentRequest\022\014\n\004name\030\001 \001(\t\022/\n\004mask\030\002 \001"
  844. "(\0132!.google.firestore.v1.DocumentMask\022\025\n"
  845. "\013transaction\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132"
  846. "\032.google.protobuf.TimestampH\000B\026\n\024consist"
  847. "ency_selector\"\235\002\n\024ListDocumentsRequest\022\016"
  848. "\n\006parent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\021\n"
  849. "\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020\n\010"
  850. "order_by\030\006 \001(\t\022/\n\004mask\030\007 \001(\0132!.google.fi"
  851. "restore.v1.DocumentMask\022\025\n\013transaction\030\010"
  852. " \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032.google.proto"
  853. "buf.TimestampH\000\022\024\n\014show_missing\030\014 \001(\010B\026\n"
  854. "\024consistency_selector\"b\n\025ListDocumentsRe"
  855. "sponse\0220\n\tdocuments\030\001 \003(\0132\035.google.fires"
  856. "tore.v1.Document\022\027\n\017next_page_token\030\002 \001("
  857. "\t\"\265\001\n\025CreateDocumentRequest\022\016\n\006parent\030\001 "
  858. "\001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013document_i"
  859. "d\030\003 \001(\t\022/\n\010document\030\004 \001(\0132\035.google.fires"
  860. "tore.v1.Document\022/\n\004mask\030\005 \001(\0132!.google."
  861. "firestore.v1.DocumentMask\"\356\001\n\025UpdateDocu"
  862. "mentRequest\022/\n\010document\030\001 \001(\0132\035.google.f"
  863. "irestore.v1.Document\0226\n\013update_mask\030\002 \001("
  864. "\0132!.google.firestore.v1.DocumentMask\022/\n\004"
  865. "mask\030\003 \001(\0132!.google.firestore.v1.Documen"
  866. "tMask\022;\n\020current_document\030\004 \001(\0132!.google"
  867. ".firestore.v1.Precondition\"b\n\025DeleteDocu"
  868. "mentRequest\022\014\n\004name\030\001 \001(\t\022;\n\020current_doc"
  869. "ument\030\002 \001(\0132!.google.firestore.v1.Precon"
  870. "dition\"\224\002\n\030BatchGetDocumentsRequest\022\020\n\010d"
  871. "atabase\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\022/\n\004mask"
  872. "\030\003 \001(\0132!.google.firestore.v1.DocumentMas"
  873. "k\022\025\n\013transaction\030\004 \001(\014H\000\022B\n\017new_transact"
  874. "ion\030\005 \001(\0132\'.google.firestore.v1.Transact"
  875. "ionOptionsH\000\022/\n\tread_time\030\007 \001(\0132\032.google"
  876. ".protobuf.TimestampH\000B\026\n\024consistency_sel"
  877. "ector\"\254\001\n\031BatchGetDocumentsResponse\022.\n\005f"
  878. "ound\030\001 \001(\0132\035.google.firestore.v1.Documen"
  879. "tH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n\013transaction\030\003 "
  880. "\001(\014\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf"
  881. ".TimestampB\010\n\006result\"e\n\027BeginTransaction"
  882. "Request\022\020\n\010database\030\001 \001(\t\0228\n\007options\030\002 \001"
  883. "(\0132\'.google.firestore.v1.TransactionOpti"
  884. "ons\"/\n\030BeginTransactionResponse\022\023\n\013trans"
  885. "action\030\001 \001(\014\"b\n\rCommitRequest\022\020\n\010databas"
  886. "e\030\001 \001(\t\022*\n\006writes\030\002 \003(\0132\032.google.firesto"
  887. "re.v1.Write\022\023\n\013transaction\030\003 \001(\014\"z\n\016Comm"
  888. "itResponse\0227\n\rwrite_results\030\001 \003(\0132 .goog"
  889. "le.firestore.v1.WriteResult\022/\n\013commit_ti"
  890. "me\030\002 \001(\0132\032.google.protobuf.Timestamp\"8\n\017"
  891. "RollbackRequest\022\020\n\010database\030\001 \001(\t\022\023\n\013tra"
  892. "nsaction\030\002 \001(\014\"\225\002\n\017RunQueryRequest\022\016\n\006pa"
  893. "rent\030\001 \001(\t\022@\n\020structured_query\030\002 \001(\0132$.g"
  894. "oogle.firestore.v1.StructuredQueryH\000\022\025\n\013"
  895. "transaction\030\005 \001(\014H\001\022B\n\017new_transaction\030\006"
  896. " \001(\0132\'.google.firestore.v1.TransactionOp"
  897. "tionsH\001\022/\n\tread_time\030\007 \001(\0132\032.google.prot"
  898. "obuf.TimestampH\001B\014\n\nquery_typeB\026\n\024consis"
  899. "tency_selector\"\240\001\n\020RunQueryResponse\022\023\n\013t"
  900. "ransaction\030\002 \001(\014\022/\n\010document\030\001 \001(\0132\035.goo"
  901. "gle.firestore.v1.Document\022-\n\tread_time\030\003"
  902. " \001(\0132\032.google.protobuf.Timestamp\022\027\n\017skip"
  903. "ped_results\030\004 \001(\005\"\343\001\n\014WriteRequest\022\020\n\010da"
  904. "tabase\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022*\n\006write"
  905. "s\030\003 \003(\0132\032.google.firestore.v1.Write\022\024\n\014s"
  906. "tream_token\030\004 \001(\014\022=\n\006labels\030\005 \003(\0132-.goog"
  907. "le.firestore.v1.WriteRequest.LabelsEntry"
  908. "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 "
  909. "\001(\t:\0028\001\"\242\001\n\rWriteResponse\022\021\n\tstream_id\030\001"
  910. " \001(\t\022\024\n\014stream_token\030\002 \001(\014\0227\n\rwrite_resu"
  911. "lts\030\003 \003(\0132 .google.firestore.v1.WriteRes"
  912. "ult\022/\n\013commit_time\030\004 \001(\0132\032.google.protob"
  913. "uf.Timestamp\"\355\001\n\rListenRequest\022\020\n\010databa"
  914. "se\030\001 \001(\t\0221\n\nadd_target\030\002 \001(\0132\033.google.fi"
  915. "restore.v1.TargetH\000\022\027\n\rremove_target\030\003 \001"
  916. "(\005H\000\022>\n\006labels\030\004 \003(\0132..google.firestore."
  917. "v1.ListenRequest.LabelsEntry\032-\n\013LabelsEn"
  918. "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rt"
  919. "arget_change\"\325\002\n\016ListenResponse\022:\n\rtarge"
  920. "t_change\030\002 \001(\0132!.google.firestore.v1.Tar"
  921. "getChangeH\000\022>\n\017document_change\030\003 \001(\0132#.g"
  922. "oogle.firestore.v1.DocumentChangeH\000\022>\n\017d"
  923. "ocument_delete\030\004 \001(\0132#.google.firestore."
  924. "v1.DocumentDeleteH\000\022>\n\017document_remove\030\006"
  925. " \001(\0132#.google.firestore.v1.DocumentRemov"
  926. "eH\000\0226\n\006filter\030\005 \001(\0132$.google.firestore.v"
  927. "1.ExistenceFilterH\000B\017\n\rresponse_type\"\241\003\n"
  928. "\006Target\0228\n\005query\030\002 \001(\0132\'.google.firestor"
  929. "e.v1.Target.QueryTargetH\000\022@\n\tdocuments\030\003"
  930. " \001(\0132+.google.firestore.v1.Target.Docume"
  931. "ntsTargetH\000\022\026\n\014resume_token\030\004 \001(\014H\001\022/\n\tr"
  932. "ead_time\030\013 \001(\0132\032.google.protobuf.Timesta"
  933. "mpH\001\022\021\n\ttarget_id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n"
  934. "\017DocumentsTarget\022\021\n\tdocuments\030\002 \003(\t\032m\n\013Q"
  935. "ueryTarget\022\016\n\006parent\030\001 \001(\t\022@\n\020structured"
  936. "_query\030\002 \001(\0132$.google.firestore.v1.Struc"
  937. "turedQueryH\000B\014\n\nquery_typeB\r\n\013target_typ"
  938. "eB\r\n\013resume_type\"\252\002\n\014TargetChange\022N\n\022tar"
  939. "get_change_type\030\001 \001(\01622.google.firestore"
  940. ".v1.TargetChange.TargetChangeType\022\022\n\ntar"
  941. "get_ids\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rp"
  942. "c.Status\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_t"
  943. "ime\030\006 \001(\0132\032.google.protobuf.Timestamp\"N\n"
  944. "\020TargetChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020"
  945. "\001\022\n\n\006REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n"
  946. "\030ListCollectionIdsRequest\022\016\n\006parent\030\001 \001("
  947. "\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t"
  948. "\"L\n\031ListCollectionIdsResponse\022\026\n\016collect"
  949. "ion_ids\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\204"
  950. "\022\n\tFirestore\022\217\001\n\013GetDocument\022\'.google.fi"
  951. "restore.v1.GetDocumentRequest\032\035.google.f"
  952. "irestore.v1.Document\"8\202\323\344\223\0022\0220/v1/{name="
  953. "projects/*/databases/*/documents/*/**}\022\262"
  954. "\001\n\rListDocuments\022).google.firestore.v1.L"
  955. "istDocumentsRequest\032*.google.firestore.v"
  956. "1.ListDocumentsResponse\"J\202\323\344\223\002D\022B/v1/{pa"
  957. "rent=projects/*/databases/*/documents/*/"
  958. "**}/{collection_id}\022\257\001\n\016CreateDocument\022*"
  959. ".google.firestore.v1.CreateDocumentReque"
  960. "st\032\035.google.firestore.v1.Document\"R\202\323\344\223\002"
  961. "L\"@/v1/{parent=projects/*/databases/*/do"
  962. "cuments/**}/{collection_id}:\010document\022\250\001"
  963. "\n\016UpdateDocument\022*.google.firestore.v1.U"
  964. "pdateDocumentRequest\032\035.google.firestore."
  965. "v1.Document\"K\202\323\344\223\002E29/v1/{document.name="
  966. "projects/*/databases/*/documents/*/**}:\010"
  967. "document\022\216\001\n\016DeleteDocument\022*.google.fir"
  968. "estore.v1.DeleteDocumentRequest\032\026.google"
  969. ".protobuf.Empty\"8\202\323\344\223\0022*0/v1/{name=proje"
  970. "cts/*/databases/*/documents/*/**}\022\271\001\n\021Ba"
  971. "tchGetDocuments\022-.google.firestore.v1.Ba"
  972. "tchGetDocumentsRequest\032..google.firestor"
  973. "e.v1.BatchGetDocumentsResponse\"C\202\323\344\223\002=\"8"
  974. "/v1/{database=projects/*/databases/*}/do"
  975. "cuments:batchGet:\001*0\001\022\274\001\n\020BeginTransacti"
  976. "on\022,.google.firestore.v1.BeginTransactio"
  977. "nRequest\032-.google.firestore.v1.BeginTran"
  978. "sactionResponse\"K\202\323\344\223\002E\"@/v1/{database=p"
  979. "rojects/*/databases/*}/documents:beginTr"
  980. "ansaction:\001*\022\224\001\n\006Commit\022\".google.firesto"
  981. "re.v1.CommitRequest\032#.google.firestore.v"
  982. "1.CommitResponse\"A\202\323\344\223\002;\"6/v1/{database="
  983. "projects/*/databases/*}/documents:commit"
  984. ":\001*\022\215\001\n\010Rollback\022$.google.firestore.v1.R"
  985. "ollbackRequest\032\026.google.protobuf.Empty\"C"
  986. "\202\323\344\223\002=\"8/v1/{database=projects/*/databas"
  987. "es/*}/documents:rollback:\001*\022\337\001\n\010RunQuery"
  988. "\022$.google.firestore.v1.RunQueryRequest\032%"
  989. ".google.firestore.v1.RunQueryResponse\"\203\001"
  990. "\202\323\344\223\002}\"6/v1/{parent=projects/*/databases"
  991. "/*/documents}:runQuery:\001*Z@\";/v1/{parent"
  992. "=projects/*/databases/*/documents/*/**}:"
  993. "runQuery:\001*0\001\022\224\001\n\005Write\022!.google.firesto"
  994. "re.v1.WriteRequest\032\".google.firestore.v1"
  995. ".WriteResponse\"@\202\323\344\223\002:\"5/v1/{database=pr"
  996. "ojects/*/databases/*}/documents:write:\001*"
  997. "(\0010\001\022\230\001\n\006Listen\022\".google.firestore.v1.Li"
  998. "stenRequest\032#.google.firestore.v1.Listen"
  999. "Response\"A\202\323\344\223\002;\"6/v1/{database=projects"
  1000. "/*/databases/*}/documents:listen:\001*(\0010\001\022"
  1001. "\213\002\n\021ListCollectionIds\022-.google.firestore"
  1002. ".v1.ListCollectionIdsRequest\032..google.fi"
  1003. "restore.v1.ListCollectionIdsResponse\"\226\001\202"
  1004. "\323\344\223\002\217\001\"\?/v1/{parent=projects/*/databases"
  1005. "/*/documents}:listCollectionIds:\001*ZI\"D/v"
  1006. "1/{parent=projects/*/databases/*/documen"
  1007. "ts/*/**}:listCollectionIds:\001*B\262\001\n\027com.go"
  1008. "ogle.firestore.v1B\016FirestoreProtoP\001Z<goo"
  1009. "gle.golang.org/genproto/googleapis/fires"
  1010. "tore/v1;firestore\242\002\004GCFS\252\002\036Google.Cloud."
  1011. "Firestore.V1Beta1\312\002\036Google\\Cloud\\Firesto"
  1012. "re\\V1beta1b\006proto3"
  1013. ;
  1014. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_deps[8] = {
  1015. &::descriptor_table_google_2fapi_2fannotations_2eproto,
  1016. &::descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto,
  1017. &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
  1018. &::descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto,
  1019. &::descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto,
  1020. &::descriptor_table_google_2fprotobuf_2fempty_2eproto,
  1021. &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  1022. &::descriptor_table_google_2frpc_2fstatus_2eproto,
  1023. };
  1024. static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_sccs[27] = {
  1025. &scc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1026. &scc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1027. &scc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1028. &scc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1029. &scc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1030. &scc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1031. &scc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1032. &scc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1033. &scc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1034. &scc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1035. &scc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1036. &scc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1037. &scc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1038. &scc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1039. &scc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1040. &scc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1041. &scc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1042. &scc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1043. &scc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1044. &scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1045. &scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1046. &scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1047. &scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1048. &scc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1049. &scc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1050. &scc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1051. &scc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  1052. };
  1053. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_once;
  1054. static bool descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_initialized = false;
  1055. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto = {
  1056. &descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_initialized, descriptor_table_protodef_google_2ffirestore_2fv1_2ffirestore_2eproto, "google/firestore/v1/firestore.proto", 7098,
  1057. &descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_once, descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_sccs, descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_deps, 27, 8,
  1058. schemas, file_default_instances, TableStruct_google_2ffirestore_2fv1_2ffirestore_2eproto::offsets,
  1059. file_level_metadata_google_2ffirestore_2fv1_2ffirestore_2eproto, 27, file_level_enum_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto, file_level_service_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto,
  1060. };
  1061. // Force running AddDescriptors() at dynamic initialization time.
  1062. static bool dynamic_init_dummy_google_2ffirestore_2fv1_2ffirestore_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto), true);
  1063. namespace google {
  1064. namespace firestore {
  1065. namespace v1 {
  1066. const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TargetChange_TargetChangeType_descriptor() {
  1067. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto);
  1068. return file_level_enum_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto[0];
  1069. }
  1070. bool TargetChange_TargetChangeType_IsValid(int value) {
  1071. switch (value) {
  1072. case 0:
  1073. case 1:
  1074. case 2:
  1075. case 3:
  1076. case 4:
  1077. return true;
  1078. default:
  1079. return false;
  1080. }
  1081. }
  1082. #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  1083. constexpr TargetChange_TargetChangeType TargetChange::NO_CHANGE;
  1084. constexpr TargetChange_TargetChangeType TargetChange::ADD;
  1085. constexpr TargetChange_TargetChangeType TargetChange::REMOVE;
  1086. constexpr TargetChange_TargetChangeType TargetChange::CURRENT;
  1087. constexpr TargetChange_TargetChangeType TargetChange::RESET;
  1088. constexpr TargetChange_TargetChangeType TargetChange::TargetChangeType_MIN;
  1089. constexpr TargetChange_TargetChangeType TargetChange::TargetChangeType_MAX;
  1090. constexpr int TargetChange::TargetChangeType_ARRAYSIZE;
  1091. #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  1092. // ===================================================================
  1093. void GetDocumentRequest::InitAsDefaultInstance() {
  1094. ::google::firestore::v1::_GetDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  1095. ::google::firestore::v1::DocumentMask::internal_default_instance());
  1096. ::google::firestore::v1::_GetDocumentRequest_default_instance_.transaction_.UnsafeSetDefault(
  1097. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1098. ::google::firestore::v1::_GetDocumentRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  1099. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  1100. }
  1101. class GetDocumentRequest::_Internal {
  1102. public:
  1103. static const ::google::firestore::v1::DocumentMask& mask(const GetDocumentRequest* msg);
  1104. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const GetDocumentRequest* msg);
  1105. };
  1106. const ::google::firestore::v1::DocumentMask&
  1107. GetDocumentRequest::_Internal::mask(const GetDocumentRequest* msg) {
  1108. return *msg->mask_;
  1109. }
  1110. const PROTOBUF_NAMESPACE_ID::Timestamp&
  1111. GetDocumentRequest::_Internal::read_time(const GetDocumentRequest* msg) {
  1112. return *msg->consistency_selector_.read_time_;
  1113. }
  1114. void GetDocumentRequest::clear_mask() {
  1115. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  1116. delete mask_;
  1117. }
  1118. mask_ = nullptr;
  1119. }
  1120. void GetDocumentRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  1121. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  1122. clear_consistency_selector();
  1123. if (read_time) {
  1124. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  1125. reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
  1126. if (message_arena != submessage_arena) {
  1127. read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  1128. message_arena, read_time, submessage_arena);
  1129. }
  1130. set_has_read_time();
  1131. consistency_selector_.read_time_ = read_time;
  1132. }
  1133. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.GetDocumentRequest.read_time)
  1134. }
  1135. void GetDocumentRequest::clear_read_time() {
  1136. if (has_read_time()) {
  1137. delete consistency_selector_.read_time_;
  1138. clear_has_consistency_selector();
  1139. }
  1140. }
  1141. GetDocumentRequest::GetDocumentRequest()
  1142. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  1143. SharedCtor();
  1144. // @@protoc_insertion_point(constructor:google.firestore.v1.GetDocumentRequest)
  1145. }
  1146. GetDocumentRequest::GetDocumentRequest(const GetDocumentRequest& from)
  1147. : ::PROTOBUF_NAMESPACE_ID::Message(),
  1148. _internal_metadata_(nullptr) {
  1149. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1150. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1151. if (!from.name().empty()) {
  1152. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  1153. }
  1154. if (from.has_mask()) {
  1155. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  1156. } else {
  1157. mask_ = nullptr;
  1158. }
  1159. clear_has_consistency_selector();
  1160. switch (from.consistency_selector_case()) {
  1161. case kTransaction: {
  1162. set_transaction(from.transaction());
  1163. break;
  1164. }
  1165. case kReadTime: {
  1166. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  1167. break;
  1168. }
  1169. case CONSISTENCY_SELECTOR_NOT_SET: {
  1170. break;
  1171. }
  1172. }
  1173. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.GetDocumentRequest)
  1174. }
  1175. void GetDocumentRequest::SharedCtor() {
  1176. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  1177. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1178. mask_ = nullptr;
  1179. clear_has_consistency_selector();
  1180. }
  1181. GetDocumentRequest::~GetDocumentRequest() {
  1182. // @@protoc_insertion_point(destructor:google.firestore.v1.GetDocumentRequest)
  1183. SharedDtor();
  1184. }
  1185. void GetDocumentRequest::SharedDtor() {
  1186. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1187. if (this != internal_default_instance()) delete mask_;
  1188. if (has_consistency_selector()) {
  1189. clear_consistency_selector();
  1190. }
  1191. }
  1192. void GetDocumentRequest::SetCachedSize(int size) const {
  1193. _cached_size_.Set(size);
  1194. }
  1195. const GetDocumentRequest& GetDocumentRequest::default_instance() {
  1196. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  1197. return *internal_default_instance();
  1198. }
  1199. void GetDocumentRequest::clear_consistency_selector() {
  1200. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.GetDocumentRequest)
  1201. switch (consistency_selector_case()) {
  1202. case kTransaction: {
  1203. consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1204. break;
  1205. }
  1206. case kReadTime: {
  1207. delete consistency_selector_.read_time_;
  1208. break;
  1209. }
  1210. case CONSISTENCY_SELECTOR_NOT_SET: {
  1211. break;
  1212. }
  1213. }
  1214. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  1215. }
  1216. void GetDocumentRequest::Clear() {
  1217. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.GetDocumentRequest)
  1218. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1219. // Prevent compiler warnings about cached_has_bits being unused
  1220. (void) cached_has_bits;
  1221. name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1222. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  1223. delete mask_;
  1224. }
  1225. mask_ = nullptr;
  1226. clear_consistency_selector();
  1227. _internal_metadata_.Clear();
  1228. }
  1229. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  1230. const char* GetDocumentRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1231. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1232. while (!ctx->Done(&ptr)) {
  1233. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  1234. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1235. CHK_(ptr);
  1236. switch (tag >> 3) {
  1237. // string name = 1;
  1238. case 1:
  1239. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  1240. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.firestore.v1.GetDocumentRequest.name");
  1241. CHK_(ptr);
  1242. } else goto handle_unusual;
  1243. continue;
  1244. // .google.firestore.v1.DocumentMask mask = 2;
  1245. case 2:
  1246. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  1247. ptr = ctx->ParseMessage(mutable_mask(), ptr);
  1248. CHK_(ptr);
  1249. } else goto handle_unusual;
  1250. continue;
  1251. // bytes transaction = 3;
  1252. case 3:
  1253. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  1254. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  1255. CHK_(ptr);
  1256. } else goto handle_unusual;
  1257. continue;
  1258. // .google.protobuf.Timestamp read_time = 5;
  1259. case 5:
  1260. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
  1261. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  1262. CHK_(ptr);
  1263. } else goto handle_unusual;
  1264. continue;
  1265. default: {
  1266. handle_unusual:
  1267. if ((tag & 7) == 4 || tag == 0) {
  1268. ctx->SetLastTag(tag);
  1269. goto success;
  1270. }
  1271. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  1272. CHK_(ptr != nullptr);
  1273. continue;
  1274. }
  1275. } // switch
  1276. } // while
  1277. success:
  1278. return ptr;
  1279. failure:
  1280. ptr = nullptr;
  1281. goto success;
  1282. #undef CHK_
  1283. }
  1284. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  1285. bool GetDocumentRequest::MergePartialFromCodedStream(
  1286. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  1287. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  1288. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  1289. // @@protoc_insertion_point(parse_start:google.firestore.v1.GetDocumentRequest)
  1290. for (;;) {
  1291. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1292. tag = p.first;
  1293. if (!p.second) goto handle_unusual;
  1294. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1295. // string name = 1;
  1296. case 1: {
  1297. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  1298. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  1299. input, this->mutable_name()));
  1300. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1301. this->name().data(), static_cast<int>(this->name().length()),
  1302. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  1303. "google.firestore.v1.GetDocumentRequest.name"));
  1304. } else {
  1305. goto handle_unusual;
  1306. }
  1307. break;
  1308. }
  1309. // .google.firestore.v1.DocumentMask mask = 2;
  1310. case 2: {
  1311. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  1312. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  1313. input, mutable_mask()));
  1314. } else {
  1315. goto handle_unusual;
  1316. }
  1317. break;
  1318. }
  1319. // bytes transaction = 3;
  1320. case 3: {
  1321. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  1322. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  1323. input, this->mutable_transaction()));
  1324. } else {
  1325. goto handle_unusual;
  1326. }
  1327. break;
  1328. }
  1329. // .google.protobuf.Timestamp read_time = 5;
  1330. case 5: {
  1331. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
  1332. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  1333. input, mutable_read_time()));
  1334. } else {
  1335. goto handle_unusual;
  1336. }
  1337. break;
  1338. }
  1339. default: {
  1340. handle_unusual:
  1341. if (tag == 0) {
  1342. goto success;
  1343. }
  1344. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  1345. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1346. break;
  1347. }
  1348. }
  1349. }
  1350. success:
  1351. // @@protoc_insertion_point(parse_success:google.firestore.v1.GetDocumentRequest)
  1352. return true;
  1353. failure:
  1354. // @@protoc_insertion_point(parse_failure:google.firestore.v1.GetDocumentRequest)
  1355. return false;
  1356. #undef DO_
  1357. }
  1358. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  1359. void GetDocumentRequest::SerializeWithCachedSizes(
  1360. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  1361. // @@protoc_insertion_point(serialize_start:google.firestore.v1.GetDocumentRequest)
  1362. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1363. (void) cached_has_bits;
  1364. // string name = 1;
  1365. if (this->name().size() > 0) {
  1366. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1367. this->name().data(), static_cast<int>(this->name().length()),
  1368. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1369. "google.firestore.v1.GetDocumentRequest.name");
  1370. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  1371. 1, this->name(), output);
  1372. }
  1373. // .google.firestore.v1.DocumentMask mask = 2;
  1374. if (this->has_mask()) {
  1375. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  1376. 2, _Internal::mask(this), output);
  1377. }
  1378. // bytes transaction = 3;
  1379. if (has_transaction()) {
  1380. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  1381. 3, this->transaction(), output);
  1382. }
  1383. // .google.protobuf.Timestamp read_time = 5;
  1384. if (has_read_time()) {
  1385. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  1386. 5, _Internal::read_time(this), output);
  1387. }
  1388. if (_internal_metadata_.have_unknown_fields()) {
  1389. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  1390. _internal_metadata_.unknown_fields(), output);
  1391. }
  1392. // @@protoc_insertion_point(serialize_end:google.firestore.v1.GetDocumentRequest)
  1393. }
  1394. ::PROTOBUF_NAMESPACE_ID::uint8* GetDocumentRequest::InternalSerializeWithCachedSizesToArray(
  1395. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  1396. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.GetDocumentRequest)
  1397. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1398. (void) cached_has_bits;
  1399. // string name = 1;
  1400. if (this->name().size() > 0) {
  1401. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1402. this->name().data(), static_cast<int>(this->name().length()),
  1403. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1404. "google.firestore.v1.GetDocumentRequest.name");
  1405. target =
  1406. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  1407. 1, this->name(), target);
  1408. }
  1409. // .google.firestore.v1.DocumentMask mask = 2;
  1410. if (this->has_mask()) {
  1411. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1412. InternalWriteMessageToArray(
  1413. 2, _Internal::mask(this), target);
  1414. }
  1415. // bytes transaction = 3;
  1416. if (has_transaction()) {
  1417. target =
  1418. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  1419. 3, this->transaction(), target);
  1420. }
  1421. // .google.protobuf.Timestamp read_time = 5;
  1422. if (has_read_time()) {
  1423. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1424. InternalWriteMessageToArray(
  1425. 5, _Internal::read_time(this), target);
  1426. }
  1427. if (_internal_metadata_.have_unknown_fields()) {
  1428. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  1429. _internal_metadata_.unknown_fields(), target);
  1430. }
  1431. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.GetDocumentRequest)
  1432. return target;
  1433. }
  1434. size_t GetDocumentRequest::ByteSizeLong() const {
  1435. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.GetDocumentRequest)
  1436. size_t total_size = 0;
  1437. if (_internal_metadata_.have_unknown_fields()) {
  1438. total_size +=
  1439. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  1440. _internal_metadata_.unknown_fields());
  1441. }
  1442. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1443. // Prevent compiler warnings about cached_has_bits being unused
  1444. (void) cached_has_bits;
  1445. // string name = 1;
  1446. if (this->name().size() > 0) {
  1447. total_size += 1 +
  1448. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1449. this->name());
  1450. }
  1451. // .google.firestore.v1.DocumentMask mask = 2;
  1452. if (this->has_mask()) {
  1453. total_size += 1 +
  1454. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1455. *mask_);
  1456. }
  1457. switch (consistency_selector_case()) {
  1458. // bytes transaction = 3;
  1459. case kTransaction: {
  1460. total_size += 1 +
  1461. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  1462. this->transaction());
  1463. break;
  1464. }
  1465. // .google.protobuf.Timestamp read_time = 5;
  1466. case kReadTime: {
  1467. total_size += 1 +
  1468. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1469. *consistency_selector_.read_time_);
  1470. break;
  1471. }
  1472. case CONSISTENCY_SELECTOR_NOT_SET: {
  1473. break;
  1474. }
  1475. }
  1476. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  1477. SetCachedSize(cached_size);
  1478. return total_size;
  1479. }
  1480. void GetDocumentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1481. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.GetDocumentRequest)
  1482. GOOGLE_DCHECK_NE(&from, this);
  1483. const GetDocumentRequest* source =
  1484. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<GetDocumentRequest>(
  1485. &from);
  1486. if (source == nullptr) {
  1487. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.GetDocumentRequest)
  1488. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  1489. } else {
  1490. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.GetDocumentRequest)
  1491. MergeFrom(*source);
  1492. }
  1493. }
  1494. void GetDocumentRequest::MergeFrom(const GetDocumentRequest& from) {
  1495. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.GetDocumentRequest)
  1496. GOOGLE_DCHECK_NE(&from, this);
  1497. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1498. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1499. (void) cached_has_bits;
  1500. if (from.name().size() > 0) {
  1501. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  1502. }
  1503. if (from.has_mask()) {
  1504. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  1505. }
  1506. switch (from.consistency_selector_case()) {
  1507. case kTransaction: {
  1508. set_transaction(from.transaction());
  1509. break;
  1510. }
  1511. case kReadTime: {
  1512. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  1513. break;
  1514. }
  1515. case CONSISTENCY_SELECTOR_NOT_SET: {
  1516. break;
  1517. }
  1518. }
  1519. }
  1520. void GetDocumentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1521. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.GetDocumentRequest)
  1522. if (&from == this) return;
  1523. Clear();
  1524. MergeFrom(from);
  1525. }
  1526. void GetDocumentRequest::CopyFrom(const GetDocumentRequest& from) {
  1527. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.GetDocumentRequest)
  1528. if (&from == this) return;
  1529. Clear();
  1530. MergeFrom(from);
  1531. }
  1532. bool GetDocumentRequest::IsInitialized() const {
  1533. return true;
  1534. }
  1535. void GetDocumentRequest::InternalSwap(GetDocumentRequest* other) {
  1536. using std::swap;
  1537. _internal_metadata_.Swap(&other->_internal_metadata_);
  1538. name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1539. GetArenaNoVirtual());
  1540. swap(mask_, other->mask_);
  1541. swap(consistency_selector_, other->consistency_selector_);
  1542. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1543. }
  1544. ::PROTOBUF_NAMESPACE_ID::Metadata GetDocumentRequest::GetMetadata() const {
  1545. return GetMetadataStatic();
  1546. }
  1547. // ===================================================================
  1548. void ListDocumentsRequest::InitAsDefaultInstance() {
  1549. ::google::firestore::v1::_ListDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  1550. ::google::firestore::v1::DocumentMask::internal_default_instance());
  1551. ::google::firestore::v1::_ListDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
  1552. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1553. ::google::firestore::v1::_ListDocumentsRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  1554. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  1555. }
  1556. class ListDocumentsRequest::_Internal {
  1557. public:
  1558. static const ::google::firestore::v1::DocumentMask& mask(const ListDocumentsRequest* msg);
  1559. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const ListDocumentsRequest* msg);
  1560. };
  1561. const ::google::firestore::v1::DocumentMask&
  1562. ListDocumentsRequest::_Internal::mask(const ListDocumentsRequest* msg) {
  1563. return *msg->mask_;
  1564. }
  1565. const PROTOBUF_NAMESPACE_ID::Timestamp&
  1566. ListDocumentsRequest::_Internal::read_time(const ListDocumentsRequest* msg) {
  1567. return *msg->consistency_selector_.read_time_;
  1568. }
  1569. void ListDocumentsRequest::clear_mask() {
  1570. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  1571. delete mask_;
  1572. }
  1573. mask_ = nullptr;
  1574. }
  1575. void ListDocumentsRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  1576. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  1577. clear_consistency_selector();
  1578. if (read_time) {
  1579. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  1580. reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
  1581. if (message_arena != submessage_arena) {
  1582. read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  1583. message_arena, read_time, submessage_arena);
  1584. }
  1585. set_has_read_time();
  1586. consistency_selector_.read_time_ = read_time;
  1587. }
  1588. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.read_time)
  1589. }
  1590. void ListDocumentsRequest::clear_read_time() {
  1591. if (has_read_time()) {
  1592. delete consistency_selector_.read_time_;
  1593. clear_has_consistency_selector();
  1594. }
  1595. }
  1596. ListDocumentsRequest::ListDocumentsRequest()
  1597. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  1598. SharedCtor();
  1599. // @@protoc_insertion_point(constructor:google.firestore.v1.ListDocumentsRequest)
  1600. }
  1601. ListDocumentsRequest::ListDocumentsRequest(const ListDocumentsRequest& from)
  1602. : ::PROTOBUF_NAMESPACE_ID::Message(),
  1603. _internal_metadata_(nullptr) {
  1604. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1605. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1606. if (!from.parent().empty()) {
  1607. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  1608. }
  1609. collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1610. if (!from.collection_id().empty()) {
  1611. collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  1612. }
  1613. page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1614. if (!from.page_token().empty()) {
  1615. page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  1616. }
  1617. order_by_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1618. if (!from.order_by().empty()) {
  1619. order_by_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  1620. }
  1621. if (from.has_mask()) {
  1622. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  1623. } else {
  1624. mask_ = nullptr;
  1625. }
  1626. ::memcpy(&page_size_, &from.page_size_,
  1627. static_cast<size_t>(reinterpret_cast<char*>(&show_missing_) -
  1628. reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  1629. clear_has_consistency_selector();
  1630. switch (from.consistency_selector_case()) {
  1631. case kTransaction: {
  1632. set_transaction(from.transaction());
  1633. break;
  1634. }
  1635. case kReadTime: {
  1636. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  1637. break;
  1638. }
  1639. case CONSISTENCY_SELECTOR_NOT_SET: {
  1640. break;
  1641. }
  1642. }
  1643. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListDocumentsRequest)
  1644. }
  1645. void ListDocumentsRequest::SharedCtor() {
  1646. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  1647. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1648. collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1649. page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1650. order_by_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1651. ::memset(&mask_, 0, static_cast<size_t>(
  1652. reinterpret_cast<char*>(&show_missing_) -
  1653. reinterpret_cast<char*>(&mask_)) + sizeof(show_missing_));
  1654. clear_has_consistency_selector();
  1655. }
  1656. ListDocumentsRequest::~ListDocumentsRequest() {
  1657. // @@protoc_insertion_point(destructor:google.firestore.v1.ListDocumentsRequest)
  1658. SharedDtor();
  1659. }
  1660. void ListDocumentsRequest::SharedDtor() {
  1661. parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1662. collection_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1663. page_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1664. order_by_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1665. if (this != internal_default_instance()) delete mask_;
  1666. if (has_consistency_selector()) {
  1667. clear_consistency_selector();
  1668. }
  1669. }
  1670. void ListDocumentsRequest::SetCachedSize(int size) const {
  1671. _cached_size_.Set(size);
  1672. }
  1673. const ListDocumentsRequest& ListDocumentsRequest::default_instance() {
  1674. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  1675. return *internal_default_instance();
  1676. }
  1677. void ListDocumentsRequest::clear_consistency_selector() {
  1678. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListDocumentsRequest)
  1679. switch (consistency_selector_case()) {
  1680. case kTransaction: {
  1681. consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1682. break;
  1683. }
  1684. case kReadTime: {
  1685. delete consistency_selector_.read_time_;
  1686. break;
  1687. }
  1688. case CONSISTENCY_SELECTOR_NOT_SET: {
  1689. break;
  1690. }
  1691. }
  1692. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  1693. }
  1694. void ListDocumentsRequest::Clear() {
  1695. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListDocumentsRequest)
  1696. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1697. // Prevent compiler warnings about cached_has_bits being unused
  1698. (void) cached_has_bits;
  1699. parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1700. collection_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1701. page_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1702. order_by_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1703. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  1704. delete mask_;
  1705. }
  1706. mask_ = nullptr;
  1707. ::memset(&page_size_, 0, static_cast<size_t>(
  1708. reinterpret_cast<char*>(&show_missing_) -
  1709. reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  1710. clear_consistency_selector();
  1711. _internal_metadata_.Clear();
  1712. }
  1713. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  1714. const char* ListDocumentsRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1715. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1716. while (!ctx->Done(&ptr)) {
  1717. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  1718. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1719. CHK_(ptr);
  1720. switch (tag >> 3) {
  1721. // string parent = 1;
  1722. case 1:
  1723. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  1724. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_parent(), ptr, ctx, "google.firestore.v1.ListDocumentsRequest.parent");
  1725. CHK_(ptr);
  1726. } else goto handle_unusual;
  1727. continue;
  1728. // string collection_id = 2;
  1729. case 2:
  1730. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  1731. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_id(), ptr, ctx, "google.firestore.v1.ListDocumentsRequest.collection_id");
  1732. CHK_(ptr);
  1733. } else goto handle_unusual;
  1734. continue;
  1735. // int32 page_size = 3;
  1736. case 3:
  1737. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  1738. page_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  1739. CHK_(ptr);
  1740. } else goto handle_unusual;
  1741. continue;
  1742. // string page_token = 4;
  1743. case 4:
  1744. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  1745. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_page_token(), ptr, ctx, "google.firestore.v1.ListDocumentsRequest.page_token");
  1746. CHK_(ptr);
  1747. } else goto handle_unusual;
  1748. continue;
  1749. // string order_by = 6;
  1750. case 6:
  1751. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
  1752. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_order_by(), ptr, ctx, "google.firestore.v1.ListDocumentsRequest.order_by");
  1753. CHK_(ptr);
  1754. } else goto handle_unusual;
  1755. continue;
  1756. // .google.firestore.v1.DocumentMask mask = 7;
  1757. case 7:
  1758. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
  1759. ptr = ctx->ParseMessage(mutable_mask(), ptr);
  1760. CHK_(ptr);
  1761. } else goto handle_unusual;
  1762. continue;
  1763. // bytes transaction = 8;
  1764. case 8:
  1765. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
  1766. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  1767. CHK_(ptr);
  1768. } else goto handle_unusual;
  1769. continue;
  1770. // .google.protobuf.Timestamp read_time = 10;
  1771. case 10:
  1772. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
  1773. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  1774. CHK_(ptr);
  1775. } else goto handle_unusual;
  1776. continue;
  1777. // bool show_missing = 12;
  1778. case 12:
  1779. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) {
  1780. show_missing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  1781. CHK_(ptr);
  1782. } else goto handle_unusual;
  1783. continue;
  1784. default: {
  1785. handle_unusual:
  1786. if ((tag & 7) == 4 || tag == 0) {
  1787. ctx->SetLastTag(tag);
  1788. goto success;
  1789. }
  1790. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  1791. CHK_(ptr != nullptr);
  1792. continue;
  1793. }
  1794. } // switch
  1795. } // while
  1796. success:
  1797. return ptr;
  1798. failure:
  1799. ptr = nullptr;
  1800. goto success;
  1801. #undef CHK_
  1802. }
  1803. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  1804. bool ListDocumentsRequest::MergePartialFromCodedStream(
  1805. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  1806. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  1807. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  1808. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListDocumentsRequest)
  1809. for (;;) {
  1810. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1811. tag = p.first;
  1812. if (!p.second) goto handle_unusual;
  1813. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1814. // string parent = 1;
  1815. case 1: {
  1816. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  1817. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  1818. input, this->mutable_parent()));
  1819. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1820. this->parent().data(), static_cast<int>(this->parent().length()),
  1821. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  1822. "google.firestore.v1.ListDocumentsRequest.parent"));
  1823. } else {
  1824. goto handle_unusual;
  1825. }
  1826. break;
  1827. }
  1828. // string collection_id = 2;
  1829. case 2: {
  1830. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  1831. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  1832. input, this->mutable_collection_id()));
  1833. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1834. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  1835. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  1836. "google.firestore.v1.ListDocumentsRequest.collection_id"));
  1837. } else {
  1838. goto handle_unusual;
  1839. }
  1840. break;
  1841. }
  1842. // int32 page_size = 3;
  1843. case 3: {
  1844. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
  1845. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  1846. ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
  1847. input, &page_size_)));
  1848. } else {
  1849. goto handle_unusual;
  1850. }
  1851. break;
  1852. }
  1853. // string page_token = 4;
  1854. case 4: {
  1855. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  1856. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  1857. input, this->mutable_page_token()));
  1858. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1859. this->page_token().data(), static_cast<int>(this->page_token().length()),
  1860. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  1861. "google.firestore.v1.ListDocumentsRequest.page_token"));
  1862. } else {
  1863. goto handle_unusual;
  1864. }
  1865. break;
  1866. }
  1867. // string order_by = 6;
  1868. case 6: {
  1869. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
  1870. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  1871. input, this->mutable_order_by()));
  1872. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1873. this->order_by().data(), static_cast<int>(this->order_by().length()),
  1874. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  1875. "google.firestore.v1.ListDocumentsRequest.order_by"));
  1876. } else {
  1877. goto handle_unusual;
  1878. }
  1879. break;
  1880. }
  1881. // .google.firestore.v1.DocumentMask mask = 7;
  1882. case 7: {
  1883. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
  1884. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  1885. input, mutable_mask()));
  1886. } else {
  1887. goto handle_unusual;
  1888. }
  1889. break;
  1890. }
  1891. // bytes transaction = 8;
  1892. case 8: {
  1893. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) {
  1894. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  1895. input, this->mutable_transaction()));
  1896. } else {
  1897. goto handle_unusual;
  1898. }
  1899. break;
  1900. }
  1901. // .google.protobuf.Timestamp read_time = 10;
  1902. case 10: {
  1903. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) {
  1904. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  1905. input, mutable_read_time()));
  1906. } else {
  1907. goto handle_unusual;
  1908. }
  1909. break;
  1910. }
  1911. // bool show_missing = 12;
  1912. case 12: {
  1913. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (96 & 0xFF)) {
  1914. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  1915. bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
  1916. input, &show_missing_)));
  1917. } else {
  1918. goto handle_unusual;
  1919. }
  1920. break;
  1921. }
  1922. default: {
  1923. handle_unusual:
  1924. if (tag == 0) {
  1925. goto success;
  1926. }
  1927. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  1928. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1929. break;
  1930. }
  1931. }
  1932. }
  1933. success:
  1934. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListDocumentsRequest)
  1935. return true;
  1936. failure:
  1937. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListDocumentsRequest)
  1938. return false;
  1939. #undef DO_
  1940. }
  1941. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  1942. void ListDocumentsRequest::SerializeWithCachedSizes(
  1943. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  1944. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListDocumentsRequest)
  1945. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1946. (void) cached_has_bits;
  1947. // string parent = 1;
  1948. if (this->parent().size() > 0) {
  1949. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1950. this->parent().data(), static_cast<int>(this->parent().length()),
  1951. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1952. "google.firestore.v1.ListDocumentsRequest.parent");
  1953. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  1954. 1, this->parent(), output);
  1955. }
  1956. // string collection_id = 2;
  1957. if (this->collection_id().size() > 0) {
  1958. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1959. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  1960. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1961. "google.firestore.v1.ListDocumentsRequest.collection_id");
  1962. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  1963. 2, this->collection_id(), output);
  1964. }
  1965. // int32 page_size = 3;
  1966. if (this->page_size() != 0) {
  1967. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->page_size(), output);
  1968. }
  1969. // string page_token = 4;
  1970. if (this->page_token().size() > 0) {
  1971. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1972. this->page_token().data(), static_cast<int>(this->page_token().length()),
  1973. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1974. "google.firestore.v1.ListDocumentsRequest.page_token");
  1975. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  1976. 4, this->page_token(), output);
  1977. }
  1978. // string order_by = 6;
  1979. if (this->order_by().size() > 0) {
  1980. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1981. this->order_by().data(), static_cast<int>(this->order_by().length()),
  1982. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1983. "google.firestore.v1.ListDocumentsRequest.order_by");
  1984. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  1985. 6, this->order_by(), output);
  1986. }
  1987. // .google.firestore.v1.DocumentMask mask = 7;
  1988. if (this->has_mask()) {
  1989. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  1990. 7, _Internal::mask(this), output);
  1991. }
  1992. // bytes transaction = 8;
  1993. if (has_transaction()) {
  1994. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  1995. 8, this->transaction(), output);
  1996. }
  1997. // .google.protobuf.Timestamp read_time = 10;
  1998. if (has_read_time()) {
  1999. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  2000. 10, _Internal::read_time(this), output);
  2001. }
  2002. // bool show_missing = 12;
  2003. if (this->show_missing() != 0) {
  2004. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(12, this->show_missing(), output);
  2005. }
  2006. if (_internal_metadata_.have_unknown_fields()) {
  2007. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  2008. _internal_metadata_.unknown_fields(), output);
  2009. }
  2010. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListDocumentsRequest)
  2011. }
  2012. ::PROTOBUF_NAMESPACE_ID::uint8* ListDocumentsRequest::InternalSerializeWithCachedSizesToArray(
  2013. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  2014. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListDocumentsRequest)
  2015. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2016. (void) cached_has_bits;
  2017. // string parent = 1;
  2018. if (this->parent().size() > 0) {
  2019. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2020. this->parent().data(), static_cast<int>(this->parent().length()),
  2021. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2022. "google.firestore.v1.ListDocumentsRequest.parent");
  2023. target =
  2024. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  2025. 1, this->parent(), target);
  2026. }
  2027. // string collection_id = 2;
  2028. if (this->collection_id().size() > 0) {
  2029. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2030. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2031. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2032. "google.firestore.v1.ListDocumentsRequest.collection_id");
  2033. target =
  2034. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  2035. 2, this->collection_id(), target);
  2036. }
  2037. // int32 page_size = 3;
  2038. if (this->page_size() != 0) {
  2039. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->page_size(), target);
  2040. }
  2041. // string page_token = 4;
  2042. if (this->page_token().size() > 0) {
  2043. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2044. this->page_token().data(), static_cast<int>(this->page_token().length()),
  2045. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2046. "google.firestore.v1.ListDocumentsRequest.page_token");
  2047. target =
  2048. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  2049. 4, this->page_token(), target);
  2050. }
  2051. // string order_by = 6;
  2052. if (this->order_by().size() > 0) {
  2053. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2054. this->order_by().data(), static_cast<int>(this->order_by().length()),
  2055. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2056. "google.firestore.v1.ListDocumentsRequest.order_by");
  2057. target =
  2058. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  2059. 6, this->order_by(), target);
  2060. }
  2061. // .google.firestore.v1.DocumentMask mask = 7;
  2062. if (this->has_mask()) {
  2063. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  2064. InternalWriteMessageToArray(
  2065. 7, _Internal::mask(this), target);
  2066. }
  2067. // bytes transaction = 8;
  2068. if (has_transaction()) {
  2069. target =
  2070. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  2071. 8, this->transaction(), target);
  2072. }
  2073. // .google.protobuf.Timestamp read_time = 10;
  2074. if (has_read_time()) {
  2075. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  2076. InternalWriteMessageToArray(
  2077. 10, _Internal::read_time(this), target);
  2078. }
  2079. // bool show_missing = 12;
  2080. if (this->show_missing() != 0) {
  2081. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->show_missing(), target);
  2082. }
  2083. if (_internal_metadata_.have_unknown_fields()) {
  2084. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  2085. _internal_metadata_.unknown_fields(), target);
  2086. }
  2087. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListDocumentsRequest)
  2088. return target;
  2089. }
  2090. size_t ListDocumentsRequest::ByteSizeLong() const {
  2091. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListDocumentsRequest)
  2092. size_t total_size = 0;
  2093. if (_internal_metadata_.have_unknown_fields()) {
  2094. total_size +=
  2095. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  2096. _internal_metadata_.unknown_fields());
  2097. }
  2098. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2099. // Prevent compiler warnings about cached_has_bits being unused
  2100. (void) cached_has_bits;
  2101. // string parent = 1;
  2102. if (this->parent().size() > 0) {
  2103. total_size += 1 +
  2104. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2105. this->parent());
  2106. }
  2107. // string collection_id = 2;
  2108. if (this->collection_id().size() > 0) {
  2109. total_size += 1 +
  2110. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2111. this->collection_id());
  2112. }
  2113. // string page_token = 4;
  2114. if (this->page_token().size() > 0) {
  2115. total_size += 1 +
  2116. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2117. this->page_token());
  2118. }
  2119. // string order_by = 6;
  2120. if (this->order_by().size() > 0) {
  2121. total_size += 1 +
  2122. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2123. this->order_by());
  2124. }
  2125. // .google.firestore.v1.DocumentMask mask = 7;
  2126. if (this->has_mask()) {
  2127. total_size += 1 +
  2128. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  2129. *mask_);
  2130. }
  2131. // int32 page_size = 3;
  2132. if (this->page_size() != 0) {
  2133. total_size += 1 +
  2134. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  2135. this->page_size());
  2136. }
  2137. // bool show_missing = 12;
  2138. if (this->show_missing() != 0) {
  2139. total_size += 1 + 1;
  2140. }
  2141. switch (consistency_selector_case()) {
  2142. // bytes transaction = 8;
  2143. case kTransaction: {
  2144. total_size += 1 +
  2145. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  2146. this->transaction());
  2147. break;
  2148. }
  2149. // .google.protobuf.Timestamp read_time = 10;
  2150. case kReadTime: {
  2151. total_size += 1 +
  2152. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  2153. *consistency_selector_.read_time_);
  2154. break;
  2155. }
  2156. case CONSISTENCY_SELECTOR_NOT_SET: {
  2157. break;
  2158. }
  2159. }
  2160. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  2161. SetCachedSize(cached_size);
  2162. return total_size;
  2163. }
  2164. void ListDocumentsRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2165. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListDocumentsRequest)
  2166. GOOGLE_DCHECK_NE(&from, this);
  2167. const ListDocumentsRequest* source =
  2168. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListDocumentsRequest>(
  2169. &from);
  2170. if (source == nullptr) {
  2171. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListDocumentsRequest)
  2172. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  2173. } else {
  2174. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListDocumentsRequest)
  2175. MergeFrom(*source);
  2176. }
  2177. }
  2178. void ListDocumentsRequest::MergeFrom(const ListDocumentsRequest& from) {
  2179. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListDocumentsRequest)
  2180. GOOGLE_DCHECK_NE(&from, this);
  2181. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2182. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2183. (void) cached_has_bits;
  2184. if (from.parent().size() > 0) {
  2185. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  2186. }
  2187. if (from.collection_id().size() > 0) {
  2188. collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  2189. }
  2190. if (from.page_token().size() > 0) {
  2191. page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  2192. }
  2193. if (from.order_by().size() > 0) {
  2194. order_by_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  2195. }
  2196. if (from.has_mask()) {
  2197. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  2198. }
  2199. if (from.page_size() != 0) {
  2200. set_page_size(from.page_size());
  2201. }
  2202. if (from.show_missing() != 0) {
  2203. set_show_missing(from.show_missing());
  2204. }
  2205. switch (from.consistency_selector_case()) {
  2206. case kTransaction: {
  2207. set_transaction(from.transaction());
  2208. break;
  2209. }
  2210. case kReadTime: {
  2211. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  2212. break;
  2213. }
  2214. case CONSISTENCY_SELECTOR_NOT_SET: {
  2215. break;
  2216. }
  2217. }
  2218. }
  2219. void ListDocumentsRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2220. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListDocumentsRequest)
  2221. if (&from == this) return;
  2222. Clear();
  2223. MergeFrom(from);
  2224. }
  2225. void ListDocumentsRequest::CopyFrom(const ListDocumentsRequest& from) {
  2226. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListDocumentsRequest)
  2227. if (&from == this) return;
  2228. Clear();
  2229. MergeFrom(from);
  2230. }
  2231. bool ListDocumentsRequest::IsInitialized() const {
  2232. return true;
  2233. }
  2234. void ListDocumentsRequest::InternalSwap(ListDocumentsRequest* other) {
  2235. using std::swap;
  2236. _internal_metadata_.Swap(&other->_internal_metadata_);
  2237. parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2238. GetArenaNoVirtual());
  2239. collection_id_.Swap(&other->collection_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2240. GetArenaNoVirtual());
  2241. page_token_.Swap(&other->page_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2242. GetArenaNoVirtual());
  2243. order_by_.Swap(&other->order_by_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2244. GetArenaNoVirtual());
  2245. swap(mask_, other->mask_);
  2246. swap(page_size_, other->page_size_);
  2247. swap(show_missing_, other->show_missing_);
  2248. swap(consistency_selector_, other->consistency_selector_);
  2249. swap(_oneof_case_[0], other->_oneof_case_[0]);
  2250. }
  2251. ::PROTOBUF_NAMESPACE_ID::Metadata ListDocumentsRequest::GetMetadata() const {
  2252. return GetMetadataStatic();
  2253. }
  2254. // ===================================================================
  2255. void ListDocumentsResponse::InitAsDefaultInstance() {
  2256. }
  2257. class ListDocumentsResponse::_Internal {
  2258. public:
  2259. };
  2260. void ListDocumentsResponse::clear_documents() {
  2261. documents_.Clear();
  2262. }
  2263. ListDocumentsResponse::ListDocumentsResponse()
  2264. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  2265. SharedCtor();
  2266. // @@protoc_insertion_point(constructor:google.firestore.v1.ListDocumentsResponse)
  2267. }
  2268. ListDocumentsResponse::ListDocumentsResponse(const ListDocumentsResponse& from)
  2269. : ::PROTOBUF_NAMESPACE_ID::Message(),
  2270. _internal_metadata_(nullptr),
  2271. documents_(from.documents_) {
  2272. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2273. next_page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2274. if (!from.next_page_token().empty()) {
  2275. next_page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  2276. }
  2277. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListDocumentsResponse)
  2278. }
  2279. void ListDocumentsResponse::SharedCtor() {
  2280. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  2281. next_page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2282. }
  2283. ListDocumentsResponse::~ListDocumentsResponse() {
  2284. // @@protoc_insertion_point(destructor:google.firestore.v1.ListDocumentsResponse)
  2285. SharedDtor();
  2286. }
  2287. void ListDocumentsResponse::SharedDtor() {
  2288. next_page_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2289. }
  2290. void ListDocumentsResponse::SetCachedSize(int size) const {
  2291. _cached_size_.Set(size);
  2292. }
  2293. const ListDocumentsResponse& ListDocumentsResponse::default_instance() {
  2294. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  2295. return *internal_default_instance();
  2296. }
  2297. void ListDocumentsResponse::Clear() {
  2298. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListDocumentsResponse)
  2299. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2300. // Prevent compiler warnings about cached_has_bits being unused
  2301. (void) cached_has_bits;
  2302. documents_.Clear();
  2303. next_page_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2304. _internal_metadata_.Clear();
  2305. }
  2306. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  2307. const char* ListDocumentsResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  2308. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  2309. while (!ctx->Done(&ptr)) {
  2310. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  2311. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  2312. CHK_(ptr);
  2313. switch (tag >> 3) {
  2314. // repeated .google.firestore.v1.Document documents = 1;
  2315. case 1:
  2316. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  2317. ptr -= 1;
  2318. do {
  2319. ptr += 1;
  2320. ptr = ctx->ParseMessage(add_documents(), ptr);
  2321. CHK_(ptr);
  2322. if (!ctx->DataAvailable(ptr)) break;
  2323. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
  2324. } else goto handle_unusual;
  2325. continue;
  2326. // string next_page_token = 2;
  2327. case 2:
  2328. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  2329. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_next_page_token(), ptr, ctx, "google.firestore.v1.ListDocumentsResponse.next_page_token");
  2330. CHK_(ptr);
  2331. } else goto handle_unusual;
  2332. continue;
  2333. default: {
  2334. handle_unusual:
  2335. if ((tag & 7) == 4 || tag == 0) {
  2336. ctx->SetLastTag(tag);
  2337. goto success;
  2338. }
  2339. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  2340. CHK_(ptr != nullptr);
  2341. continue;
  2342. }
  2343. } // switch
  2344. } // while
  2345. success:
  2346. return ptr;
  2347. failure:
  2348. ptr = nullptr;
  2349. goto success;
  2350. #undef CHK_
  2351. }
  2352. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  2353. bool ListDocumentsResponse::MergePartialFromCodedStream(
  2354. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  2355. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  2356. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  2357. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListDocumentsResponse)
  2358. for (;;) {
  2359. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2360. tag = p.first;
  2361. if (!p.second) goto handle_unusual;
  2362. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2363. // repeated .google.firestore.v1.Document documents = 1;
  2364. case 1: {
  2365. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  2366. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  2367. input, add_documents()));
  2368. } else {
  2369. goto handle_unusual;
  2370. }
  2371. break;
  2372. }
  2373. // string next_page_token = 2;
  2374. case 2: {
  2375. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  2376. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  2377. input, this->mutable_next_page_token()));
  2378. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2379. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2380. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  2381. "google.firestore.v1.ListDocumentsResponse.next_page_token"));
  2382. } else {
  2383. goto handle_unusual;
  2384. }
  2385. break;
  2386. }
  2387. default: {
  2388. handle_unusual:
  2389. if (tag == 0) {
  2390. goto success;
  2391. }
  2392. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  2393. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2394. break;
  2395. }
  2396. }
  2397. }
  2398. success:
  2399. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListDocumentsResponse)
  2400. return true;
  2401. failure:
  2402. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListDocumentsResponse)
  2403. return false;
  2404. #undef DO_
  2405. }
  2406. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  2407. void ListDocumentsResponse::SerializeWithCachedSizes(
  2408. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  2409. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListDocumentsResponse)
  2410. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2411. (void) cached_has_bits;
  2412. // repeated .google.firestore.v1.Document documents = 1;
  2413. for (unsigned int i = 0,
  2414. n = static_cast<unsigned int>(this->documents_size()); i < n; i++) {
  2415. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  2416. 1,
  2417. this->documents(static_cast<int>(i)),
  2418. output);
  2419. }
  2420. // string next_page_token = 2;
  2421. if (this->next_page_token().size() > 0) {
  2422. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2423. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2424. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2425. "google.firestore.v1.ListDocumentsResponse.next_page_token");
  2426. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  2427. 2, this->next_page_token(), output);
  2428. }
  2429. if (_internal_metadata_.have_unknown_fields()) {
  2430. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  2431. _internal_metadata_.unknown_fields(), output);
  2432. }
  2433. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListDocumentsResponse)
  2434. }
  2435. ::PROTOBUF_NAMESPACE_ID::uint8* ListDocumentsResponse::InternalSerializeWithCachedSizesToArray(
  2436. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  2437. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListDocumentsResponse)
  2438. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2439. (void) cached_has_bits;
  2440. // repeated .google.firestore.v1.Document documents = 1;
  2441. for (unsigned int i = 0,
  2442. n = static_cast<unsigned int>(this->documents_size()); i < n; i++) {
  2443. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  2444. InternalWriteMessageToArray(
  2445. 1, this->documents(static_cast<int>(i)), target);
  2446. }
  2447. // string next_page_token = 2;
  2448. if (this->next_page_token().size() > 0) {
  2449. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2450. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2451. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2452. "google.firestore.v1.ListDocumentsResponse.next_page_token");
  2453. target =
  2454. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  2455. 2, this->next_page_token(), target);
  2456. }
  2457. if (_internal_metadata_.have_unknown_fields()) {
  2458. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  2459. _internal_metadata_.unknown_fields(), target);
  2460. }
  2461. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListDocumentsResponse)
  2462. return target;
  2463. }
  2464. size_t ListDocumentsResponse::ByteSizeLong() const {
  2465. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListDocumentsResponse)
  2466. size_t total_size = 0;
  2467. if (_internal_metadata_.have_unknown_fields()) {
  2468. total_size +=
  2469. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  2470. _internal_metadata_.unknown_fields());
  2471. }
  2472. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2473. // Prevent compiler warnings about cached_has_bits being unused
  2474. (void) cached_has_bits;
  2475. // repeated .google.firestore.v1.Document documents = 1;
  2476. {
  2477. unsigned int count = static_cast<unsigned int>(this->documents_size());
  2478. total_size += 1UL * count;
  2479. for (unsigned int i = 0; i < count; i++) {
  2480. total_size +=
  2481. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  2482. this->documents(static_cast<int>(i)));
  2483. }
  2484. }
  2485. // string next_page_token = 2;
  2486. if (this->next_page_token().size() > 0) {
  2487. total_size += 1 +
  2488. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2489. this->next_page_token());
  2490. }
  2491. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  2492. SetCachedSize(cached_size);
  2493. return total_size;
  2494. }
  2495. void ListDocumentsResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2496. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListDocumentsResponse)
  2497. GOOGLE_DCHECK_NE(&from, this);
  2498. const ListDocumentsResponse* source =
  2499. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListDocumentsResponse>(
  2500. &from);
  2501. if (source == nullptr) {
  2502. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListDocumentsResponse)
  2503. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  2504. } else {
  2505. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListDocumentsResponse)
  2506. MergeFrom(*source);
  2507. }
  2508. }
  2509. void ListDocumentsResponse::MergeFrom(const ListDocumentsResponse& from) {
  2510. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListDocumentsResponse)
  2511. GOOGLE_DCHECK_NE(&from, this);
  2512. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2513. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2514. (void) cached_has_bits;
  2515. documents_.MergeFrom(from.documents_);
  2516. if (from.next_page_token().size() > 0) {
  2517. next_page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  2518. }
  2519. }
  2520. void ListDocumentsResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2521. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListDocumentsResponse)
  2522. if (&from == this) return;
  2523. Clear();
  2524. MergeFrom(from);
  2525. }
  2526. void ListDocumentsResponse::CopyFrom(const ListDocumentsResponse& from) {
  2527. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListDocumentsResponse)
  2528. if (&from == this) return;
  2529. Clear();
  2530. MergeFrom(from);
  2531. }
  2532. bool ListDocumentsResponse::IsInitialized() const {
  2533. return true;
  2534. }
  2535. void ListDocumentsResponse::InternalSwap(ListDocumentsResponse* other) {
  2536. using std::swap;
  2537. _internal_metadata_.Swap(&other->_internal_metadata_);
  2538. CastToBase(&documents_)->InternalSwap(CastToBase(&other->documents_));
  2539. next_page_token_.Swap(&other->next_page_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2540. GetArenaNoVirtual());
  2541. }
  2542. ::PROTOBUF_NAMESPACE_ID::Metadata ListDocumentsResponse::GetMetadata() const {
  2543. return GetMetadataStatic();
  2544. }
  2545. // ===================================================================
  2546. void CreateDocumentRequest::InitAsDefaultInstance() {
  2547. ::google::firestore::v1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
  2548. ::google::firestore::v1::Document::internal_default_instance());
  2549. ::google::firestore::v1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  2550. ::google::firestore::v1::DocumentMask::internal_default_instance());
  2551. }
  2552. class CreateDocumentRequest::_Internal {
  2553. public:
  2554. static const ::google::firestore::v1::Document& document(const CreateDocumentRequest* msg);
  2555. static const ::google::firestore::v1::DocumentMask& mask(const CreateDocumentRequest* msg);
  2556. };
  2557. const ::google::firestore::v1::Document&
  2558. CreateDocumentRequest::_Internal::document(const CreateDocumentRequest* msg) {
  2559. return *msg->document_;
  2560. }
  2561. const ::google::firestore::v1::DocumentMask&
  2562. CreateDocumentRequest::_Internal::mask(const CreateDocumentRequest* msg) {
  2563. return *msg->mask_;
  2564. }
  2565. void CreateDocumentRequest::clear_document() {
  2566. if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
  2567. delete document_;
  2568. }
  2569. document_ = nullptr;
  2570. }
  2571. void CreateDocumentRequest::clear_mask() {
  2572. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  2573. delete mask_;
  2574. }
  2575. mask_ = nullptr;
  2576. }
  2577. CreateDocumentRequest::CreateDocumentRequest()
  2578. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  2579. SharedCtor();
  2580. // @@protoc_insertion_point(constructor:google.firestore.v1.CreateDocumentRequest)
  2581. }
  2582. CreateDocumentRequest::CreateDocumentRequest(const CreateDocumentRequest& from)
  2583. : ::PROTOBUF_NAMESPACE_ID::Message(),
  2584. _internal_metadata_(nullptr) {
  2585. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2586. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2587. if (!from.parent().empty()) {
  2588. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  2589. }
  2590. collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2591. if (!from.collection_id().empty()) {
  2592. collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  2593. }
  2594. document_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2595. if (!from.document_id().empty()) {
  2596. document_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  2597. }
  2598. if (from.has_document()) {
  2599. document_ = new ::google::firestore::v1::Document(*from.document_);
  2600. } else {
  2601. document_ = nullptr;
  2602. }
  2603. if (from.has_mask()) {
  2604. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  2605. } else {
  2606. mask_ = nullptr;
  2607. }
  2608. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CreateDocumentRequest)
  2609. }
  2610. void CreateDocumentRequest::SharedCtor() {
  2611. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  2612. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2613. collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2614. document_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2615. ::memset(&document_, 0, static_cast<size_t>(
  2616. reinterpret_cast<char*>(&mask_) -
  2617. reinterpret_cast<char*>(&document_)) + sizeof(mask_));
  2618. }
  2619. CreateDocumentRequest::~CreateDocumentRequest() {
  2620. // @@protoc_insertion_point(destructor:google.firestore.v1.CreateDocumentRequest)
  2621. SharedDtor();
  2622. }
  2623. void CreateDocumentRequest::SharedDtor() {
  2624. parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2625. collection_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2626. document_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2627. if (this != internal_default_instance()) delete document_;
  2628. if (this != internal_default_instance()) delete mask_;
  2629. }
  2630. void CreateDocumentRequest::SetCachedSize(int size) const {
  2631. _cached_size_.Set(size);
  2632. }
  2633. const CreateDocumentRequest& CreateDocumentRequest::default_instance() {
  2634. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  2635. return *internal_default_instance();
  2636. }
  2637. void CreateDocumentRequest::Clear() {
  2638. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.CreateDocumentRequest)
  2639. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2640. // Prevent compiler warnings about cached_has_bits being unused
  2641. (void) cached_has_bits;
  2642. parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2643. collection_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2644. document_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2645. if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
  2646. delete document_;
  2647. }
  2648. document_ = nullptr;
  2649. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  2650. delete mask_;
  2651. }
  2652. mask_ = nullptr;
  2653. _internal_metadata_.Clear();
  2654. }
  2655. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  2656. const char* CreateDocumentRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  2657. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  2658. while (!ctx->Done(&ptr)) {
  2659. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  2660. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  2661. CHK_(ptr);
  2662. switch (tag >> 3) {
  2663. // string parent = 1;
  2664. case 1:
  2665. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  2666. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_parent(), ptr, ctx, "google.firestore.v1.CreateDocumentRequest.parent");
  2667. CHK_(ptr);
  2668. } else goto handle_unusual;
  2669. continue;
  2670. // string collection_id = 2;
  2671. case 2:
  2672. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  2673. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_id(), ptr, ctx, "google.firestore.v1.CreateDocumentRequest.collection_id");
  2674. CHK_(ptr);
  2675. } else goto handle_unusual;
  2676. continue;
  2677. // string document_id = 3;
  2678. case 3:
  2679. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  2680. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_document_id(), ptr, ctx, "google.firestore.v1.CreateDocumentRequest.document_id");
  2681. CHK_(ptr);
  2682. } else goto handle_unusual;
  2683. continue;
  2684. // .google.firestore.v1.Document document = 4;
  2685. case 4:
  2686. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  2687. ptr = ctx->ParseMessage(mutable_document(), ptr);
  2688. CHK_(ptr);
  2689. } else goto handle_unusual;
  2690. continue;
  2691. // .google.firestore.v1.DocumentMask mask = 5;
  2692. case 5:
  2693. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
  2694. ptr = ctx->ParseMessage(mutable_mask(), ptr);
  2695. CHK_(ptr);
  2696. } else goto handle_unusual;
  2697. continue;
  2698. default: {
  2699. handle_unusual:
  2700. if ((tag & 7) == 4 || tag == 0) {
  2701. ctx->SetLastTag(tag);
  2702. goto success;
  2703. }
  2704. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  2705. CHK_(ptr != nullptr);
  2706. continue;
  2707. }
  2708. } // switch
  2709. } // while
  2710. success:
  2711. return ptr;
  2712. failure:
  2713. ptr = nullptr;
  2714. goto success;
  2715. #undef CHK_
  2716. }
  2717. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  2718. bool CreateDocumentRequest::MergePartialFromCodedStream(
  2719. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  2720. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  2721. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  2722. // @@protoc_insertion_point(parse_start:google.firestore.v1.CreateDocumentRequest)
  2723. for (;;) {
  2724. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2725. tag = p.first;
  2726. if (!p.second) goto handle_unusual;
  2727. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2728. // string parent = 1;
  2729. case 1: {
  2730. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  2731. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  2732. input, this->mutable_parent()));
  2733. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2734. this->parent().data(), static_cast<int>(this->parent().length()),
  2735. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  2736. "google.firestore.v1.CreateDocumentRequest.parent"));
  2737. } else {
  2738. goto handle_unusual;
  2739. }
  2740. break;
  2741. }
  2742. // string collection_id = 2;
  2743. case 2: {
  2744. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  2745. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  2746. input, this->mutable_collection_id()));
  2747. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2748. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2749. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  2750. "google.firestore.v1.CreateDocumentRequest.collection_id"));
  2751. } else {
  2752. goto handle_unusual;
  2753. }
  2754. break;
  2755. }
  2756. // string document_id = 3;
  2757. case 3: {
  2758. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  2759. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  2760. input, this->mutable_document_id()));
  2761. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2762. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2763. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  2764. "google.firestore.v1.CreateDocumentRequest.document_id"));
  2765. } else {
  2766. goto handle_unusual;
  2767. }
  2768. break;
  2769. }
  2770. // .google.firestore.v1.Document document = 4;
  2771. case 4: {
  2772. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  2773. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  2774. input, mutable_document()));
  2775. } else {
  2776. goto handle_unusual;
  2777. }
  2778. break;
  2779. }
  2780. // .google.firestore.v1.DocumentMask mask = 5;
  2781. case 5: {
  2782. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
  2783. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  2784. input, mutable_mask()));
  2785. } else {
  2786. goto handle_unusual;
  2787. }
  2788. break;
  2789. }
  2790. default: {
  2791. handle_unusual:
  2792. if (tag == 0) {
  2793. goto success;
  2794. }
  2795. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  2796. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2797. break;
  2798. }
  2799. }
  2800. }
  2801. success:
  2802. // @@protoc_insertion_point(parse_success:google.firestore.v1.CreateDocumentRequest)
  2803. return true;
  2804. failure:
  2805. // @@protoc_insertion_point(parse_failure:google.firestore.v1.CreateDocumentRequest)
  2806. return false;
  2807. #undef DO_
  2808. }
  2809. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  2810. void CreateDocumentRequest::SerializeWithCachedSizes(
  2811. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  2812. // @@protoc_insertion_point(serialize_start:google.firestore.v1.CreateDocumentRequest)
  2813. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2814. (void) cached_has_bits;
  2815. // string parent = 1;
  2816. if (this->parent().size() > 0) {
  2817. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2818. this->parent().data(), static_cast<int>(this->parent().length()),
  2819. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2820. "google.firestore.v1.CreateDocumentRequest.parent");
  2821. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  2822. 1, this->parent(), output);
  2823. }
  2824. // string collection_id = 2;
  2825. if (this->collection_id().size() > 0) {
  2826. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2827. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2828. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2829. "google.firestore.v1.CreateDocumentRequest.collection_id");
  2830. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  2831. 2, this->collection_id(), output);
  2832. }
  2833. // string document_id = 3;
  2834. if (this->document_id().size() > 0) {
  2835. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2836. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2837. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2838. "google.firestore.v1.CreateDocumentRequest.document_id");
  2839. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  2840. 3, this->document_id(), output);
  2841. }
  2842. // .google.firestore.v1.Document document = 4;
  2843. if (this->has_document()) {
  2844. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  2845. 4, _Internal::document(this), output);
  2846. }
  2847. // .google.firestore.v1.DocumentMask mask = 5;
  2848. if (this->has_mask()) {
  2849. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  2850. 5, _Internal::mask(this), output);
  2851. }
  2852. if (_internal_metadata_.have_unknown_fields()) {
  2853. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  2854. _internal_metadata_.unknown_fields(), output);
  2855. }
  2856. // @@protoc_insertion_point(serialize_end:google.firestore.v1.CreateDocumentRequest)
  2857. }
  2858. ::PROTOBUF_NAMESPACE_ID::uint8* CreateDocumentRequest::InternalSerializeWithCachedSizesToArray(
  2859. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  2860. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CreateDocumentRequest)
  2861. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2862. (void) cached_has_bits;
  2863. // string parent = 1;
  2864. if (this->parent().size() > 0) {
  2865. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2866. this->parent().data(), static_cast<int>(this->parent().length()),
  2867. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2868. "google.firestore.v1.CreateDocumentRequest.parent");
  2869. target =
  2870. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  2871. 1, this->parent(), target);
  2872. }
  2873. // string collection_id = 2;
  2874. if (this->collection_id().size() > 0) {
  2875. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2876. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2877. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2878. "google.firestore.v1.CreateDocumentRequest.collection_id");
  2879. target =
  2880. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  2881. 2, this->collection_id(), target);
  2882. }
  2883. // string document_id = 3;
  2884. if (this->document_id().size() > 0) {
  2885. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  2886. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2887. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  2888. "google.firestore.v1.CreateDocumentRequest.document_id");
  2889. target =
  2890. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  2891. 3, this->document_id(), target);
  2892. }
  2893. // .google.firestore.v1.Document document = 4;
  2894. if (this->has_document()) {
  2895. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  2896. InternalWriteMessageToArray(
  2897. 4, _Internal::document(this), target);
  2898. }
  2899. // .google.firestore.v1.DocumentMask mask = 5;
  2900. if (this->has_mask()) {
  2901. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  2902. InternalWriteMessageToArray(
  2903. 5, _Internal::mask(this), target);
  2904. }
  2905. if (_internal_metadata_.have_unknown_fields()) {
  2906. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  2907. _internal_metadata_.unknown_fields(), target);
  2908. }
  2909. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CreateDocumentRequest)
  2910. return target;
  2911. }
  2912. size_t CreateDocumentRequest::ByteSizeLong() const {
  2913. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CreateDocumentRequest)
  2914. size_t total_size = 0;
  2915. if (_internal_metadata_.have_unknown_fields()) {
  2916. total_size +=
  2917. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  2918. _internal_metadata_.unknown_fields());
  2919. }
  2920. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2921. // Prevent compiler warnings about cached_has_bits being unused
  2922. (void) cached_has_bits;
  2923. // string parent = 1;
  2924. if (this->parent().size() > 0) {
  2925. total_size += 1 +
  2926. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2927. this->parent());
  2928. }
  2929. // string collection_id = 2;
  2930. if (this->collection_id().size() > 0) {
  2931. total_size += 1 +
  2932. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2933. this->collection_id());
  2934. }
  2935. // string document_id = 3;
  2936. if (this->document_id().size() > 0) {
  2937. total_size += 1 +
  2938. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2939. this->document_id());
  2940. }
  2941. // .google.firestore.v1.Document document = 4;
  2942. if (this->has_document()) {
  2943. total_size += 1 +
  2944. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  2945. *document_);
  2946. }
  2947. // .google.firestore.v1.DocumentMask mask = 5;
  2948. if (this->has_mask()) {
  2949. total_size += 1 +
  2950. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  2951. *mask_);
  2952. }
  2953. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  2954. SetCachedSize(cached_size);
  2955. return total_size;
  2956. }
  2957. void CreateDocumentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2958. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CreateDocumentRequest)
  2959. GOOGLE_DCHECK_NE(&from, this);
  2960. const CreateDocumentRequest* source =
  2961. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CreateDocumentRequest>(
  2962. &from);
  2963. if (source == nullptr) {
  2964. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CreateDocumentRequest)
  2965. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  2966. } else {
  2967. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CreateDocumentRequest)
  2968. MergeFrom(*source);
  2969. }
  2970. }
  2971. void CreateDocumentRequest::MergeFrom(const CreateDocumentRequest& from) {
  2972. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CreateDocumentRequest)
  2973. GOOGLE_DCHECK_NE(&from, this);
  2974. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2975. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  2976. (void) cached_has_bits;
  2977. if (from.parent().size() > 0) {
  2978. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  2979. }
  2980. if (from.collection_id().size() > 0) {
  2981. collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  2982. }
  2983. if (from.document_id().size() > 0) {
  2984. document_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  2985. }
  2986. if (from.has_document()) {
  2987. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  2988. }
  2989. if (from.has_mask()) {
  2990. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  2991. }
  2992. }
  2993. void CreateDocumentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2994. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CreateDocumentRequest)
  2995. if (&from == this) return;
  2996. Clear();
  2997. MergeFrom(from);
  2998. }
  2999. void CreateDocumentRequest::CopyFrom(const CreateDocumentRequest& from) {
  3000. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CreateDocumentRequest)
  3001. if (&from == this) return;
  3002. Clear();
  3003. MergeFrom(from);
  3004. }
  3005. bool CreateDocumentRequest::IsInitialized() const {
  3006. return true;
  3007. }
  3008. void CreateDocumentRequest::InternalSwap(CreateDocumentRequest* other) {
  3009. using std::swap;
  3010. _internal_metadata_.Swap(&other->_internal_metadata_);
  3011. parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  3012. GetArenaNoVirtual());
  3013. collection_id_.Swap(&other->collection_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  3014. GetArenaNoVirtual());
  3015. document_id_.Swap(&other->document_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  3016. GetArenaNoVirtual());
  3017. swap(document_, other->document_);
  3018. swap(mask_, other->mask_);
  3019. }
  3020. ::PROTOBUF_NAMESPACE_ID::Metadata CreateDocumentRequest::GetMetadata() const {
  3021. return GetMetadataStatic();
  3022. }
  3023. // ===================================================================
  3024. void UpdateDocumentRequest::InitAsDefaultInstance() {
  3025. ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
  3026. ::google::firestore::v1::Document::internal_default_instance());
  3027. ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  3028. ::google::firestore::v1::DocumentMask::internal_default_instance());
  3029. ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  3030. ::google::firestore::v1::DocumentMask::internal_default_instance());
  3031. ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>(
  3032. ::google::firestore::v1::Precondition::internal_default_instance());
  3033. }
  3034. class UpdateDocumentRequest::_Internal {
  3035. public:
  3036. static const ::google::firestore::v1::Document& document(const UpdateDocumentRequest* msg);
  3037. static const ::google::firestore::v1::DocumentMask& update_mask(const UpdateDocumentRequest* msg);
  3038. static const ::google::firestore::v1::DocumentMask& mask(const UpdateDocumentRequest* msg);
  3039. static const ::google::firestore::v1::Precondition& current_document(const UpdateDocumentRequest* msg);
  3040. };
  3041. const ::google::firestore::v1::Document&
  3042. UpdateDocumentRequest::_Internal::document(const UpdateDocumentRequest* msg) {
  3043. return *msg->document_;
  3044. }
  3045. const ::google::firestore::v1::DocumentMask&
  3046. UpdateDocumentRequest::_Internal::update_mask(const UpdateDocumentRequest* msg) {
  3047. return *msg->update_mask_;
  3048. }
  3049. const ::google::firestore::v1::DocumentMask&
  3050. UpdateDocumentRequest::_Internal::mask(const UpdateDocumentRequest* msg) {
  3051. return *msg->mask_;
  3052. }
  3053. const ::google::firestore::v1::Precondition&
  3054. UpdateDocumentRequest::_Internal::current_document(const UpdateDocumentRequest* msg) {
  3055. return *msg->current_document_;
  3056. }
  3057. void UpdateDocumentRequest::clear_document() {
  3058. if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
  3059. delete document_;
  3060. }
  3061. document_ = nullptr;
  3062. }
  3063. void UpdateDocumentRequest::clear_update_mask() {
  3064. if (GetArenaNoVirtual() == nullptr && update_mask_ != nullptr) {
  3065. delete update_mask_;
  3066. }
  3067. update_mask_ = nullptr;
  3068. }
  3069. void UpdateDocumentRequest::clear_mask() {
  3070. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  3071. delete mask_;
  3072. }
  3073. mask_ = nullptr;
  3074. }
  3075. void UpdateDocumentRequest::clear_current_document() {
  3076. if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
  3077. delete current_document_;
  3078. }
  3079. current_document_ = nullptr;
  3080. }
  3081. UpdateDocumentRequest::UpdateDocumentRequest()
  3082. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  3083. SharedCtor();
  3084. // @@protoc_insertion_point(constructor:google.firestore.v1.UpdateDocumentRequest)
  3085. }
  3086. UpdateDocumentRequest::UpdateDocumentRequest(const UpdateDocumentRequest& from)
  3087. : ::PROTOBUF_NAMESPACE_ID::Message(),
  3088. _internal_metadata_(nullptr) {
  3089. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3090. if (from.has_document()) {
  3091. document_ = new ::google::firestore::v1::Document(*from.document_);
  3092. } else {
  3093. document_ = nullptr;
  3094. }
  3095. if (from.has_update_mask()) {
  3096. update_mask_ = new ::google::firestore::v1::DocumentMask(*from.update_mask_);
  3097. } else {
  3098. update_mask_ = nullptr;
  3099. }
  3100. if (from.has_mask()) {
  3101. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  3102. } else {
  3103. mask_ = nullptr;
  3104. }
  3105. if (from.has_current_document()) {
  3106. current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_);
  3107. } else {
  3108. current_document_ = nullptr;
  3109. }
  3110. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.UpdateDocumentRequest)
  3111. }
  3112. void UpdateDocumentRequest::SharedCtor() {
  3113. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  3114. ::memset(&document_, 0, static_cast<size_t>(
  3115. reinterpret_cast<char*>(&current_document_) -
  3116. reinterpret_cast<char*>(&document_)) + sizeof(current_document_));
  3117. }
  3118. UpdateDocumentRequest::~UpdateDocumentRequest() {
  3119. // @@protoc_insertion_point(destructor:google.firestore.v1.UpdateDocumentRequest)
  3120. SharedDtor();
  3121. }
  3122. void UpdateDocumentRequest::SharedDtor() {
  3123. if (this != internal_default_instance()) delete document_;
  3124. if (this != internal_default_instance()) delete update_mask_;
  3125. if (this != internal_default_instance()) delete mask_;
  3126. if (this != internal_default_instance()) delete current_document_;
  3127. }
  3128. void UpdateDocumentRequest::SetCachedSize(int size) const {
  3129. _cached_size_.Set(size);
  3130. }
  3131. const UpdateDocumentRequest& UpdateDocumentRequest::default_instance() {
  3132. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  3133. return *internal_default_instance();
  3134. }
  3135. void UpdateDocumentRequest::Clear() {
  3136. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.UpdateDocumentRequest)
  3137. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3138. // Prevent compiler warnings about cached_has_bits being unused
  3139. (void) cached_has_bits;
  3140. if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
  3141. delete document_;
  3142. }
  3143. document_ = nullptr;
  3144. if (GetArenaNoVirtual() == nullptr && update_mask_ != nullptr) {
  3145. delete update_mask_;
  3146. }
  3147. update_mask_ = nullptr;
  3148. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  3149. delete mask_;
  3150. }
  3151. mask_ = nullptr;
  3152. if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
  3153. delete current_document_;
  3154. }
  3155. current_document_ = nullptr;
  3156. _internal_metadata_.Clear();
  3157. }
  3158. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  3159. const char* UpdateDocumentRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  3160. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  3161. while (!ctx->Done(&ptr)) {
  3162. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  3163. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  3164. CHK_(ptr);
  3165. switch (tag >> 3) {
  3166. // .google.firestore.v1.Document document = 1;
  3167. case 1:
  3168. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  3169. ptr = ctx->ParseMessage(mutable_document(), ptr);
  3170. CHK_(ptr);
  3171. } else goto handle_unusual;
  3172. continue;
  3173. // .google.firestore.v1.DocumentMask update_mask = 2;
  3174. case 2:
  3175. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  3176. ptr = ctx->ParseMessage(mutable_update_mask(), ptr);
  3177. CHK_(ptr);
  3178. } else goto handle_unusual;
  3179. continue;
  3180. // .google.firestore.v1.DocumentMask mask = 3;
  3181. case 3:
  3182. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  3183. ptr = ctx->ParseMessage(mutable_mask(), ptr);
  3184. CHK_(ptr);
  3185. } else goto handle_unusual;
  3186. continue;
  3187. // .google.firestore.v1.Precondition current_document = 4;
  3188. case 4:
  3189. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  3190. ptr = ctx->ParseMessage(mutable_current_document(), ptr);
  3191. CHK_(ptr);
  3192. } else goto handle_unusual;
  3193. continue;
  3194. default: {
  3195. handle_unusual:
  3196. if ((tag & 7) == 4 || tag == 0) {
  3197. ctx->SetLastTag(tag);
  3198. goto success;
  3199. }
  3200. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  3201. CHK_(ptr != nullptr);
  3202. continue;
  3203. }
  3204. } // switch
  3205. } // while
  3206. success:
  3207. return ptr;
  3208. failure:
  3209. ptr = nullptr;
  3210. goto success;
  3211. #undef CHK_
  3212. }
  3213. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  3214. bool UpdateDocumentRequest::MergePartialFromCodedStream(
  3215. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  3216. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  3217. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  3218. // @@protoc_insertion_point(parse_start:google.firestore.v1.UpdateDocumentRequest)
  3219. for (;;) {
  3220. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3221. tag = p.first;
  3222. if (!p.second) goto handle_unusual;
  3223. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3224. // .google.firestore.v1.Document document = 1;
  3225. case 1: {
  3226. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  3227. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  3228. input, mutable_document()));
  3229. } else {
  3230. goto handle_unusual;
  3231. }
  3232. break;
  3233. }
  3234. // .google.firestore.v1.DocumentMask update_mask = 2;
  3235. case 2: {
  3236. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  3237. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  3238. input, mutable_update_mask()));
  3239. } else {
  3240. goto handle_unusual;
  3241. }
  3242. break;
  3243. }
  3244. // .google.firestore.v1.DocumentMask mask = 3;
  3245. case 3: {
  3246. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  3247. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  3248. input, mutable_mask()));
  3249. } else {
  3250. goto handle_unusual;
  3251. }
  3252. break;
  3253. }
  3254. // .google.firestore.v1.Precondition current_document = 4;
  3255. case 4: {
  3256. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  3257. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  3258. input, mutable_current_document()));
  3259. } else {
  3260. goto handle_unusual;
  3261. }
  3262. break;
  3263. }
  3264. default: {
  3265. handle_unusual:
  3266. if (tag == 0) {
  3267. goto success;
  3268. }
  3269. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  3270. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3271. break;
  3272. }
  3273. }
  3274. }
  3275. success:
  3276. // @@protoc_insertion_point(parse_success:google.firestore.v1.UpdateDocumentRequest)
  3277. return true;
  3278. failure:
  3279. // @@protoc_insertion_point(parse_failure:google.firestore.v1.UpdateDocumentRequest)
  3280. return false;
  3281. #undef DO_
  3282. }
  3283. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  3284. void UpdateDocumentRequest::SerializeWithCachedSizes(
  3285. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  3286. // @@protoc_insertion_point(serialize_start:google.firestore.v1.UpdateDocumentRequest)
  3287. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3288. (void) cached_has_bits;
  3289. // .google.firestore.v1.Document document = 1;
  3290. if (this->has_document()) {
  3291. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  3292. 1, _Internal::document(this), output);
  3293. }
  3294. // .google.firestore.v1.DocumentMask update_mask = 2;
  3295. if (this->has_update_mask()) {
  3296. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  3297. 2, _Internal::update_mask(this), output);
  3298. }
  3299. // .google.firestore.v1.DocumentMask mask = 3;
  3300. if (this->has_mask()) {
  3301. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  3302. 3, _Internal::mask(this), output);
  3303. }
  3304. // .google.firestore.v1.Precondition current_document = 4;
  3305. if (this->has_current_document()) {
  3306. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  3307. 4, _Internal::current_document(this), output);
  3308. }
  3309. if (_internal_metadata_.have_unknown_fields()) {
  3310. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  3311. _internal_metadata_.unknown_fields(), output);
  3312. }
  3313. // @@protoc_insertion_point(serialize_end:google.firestore.v1.UpdateDocumentRequest)
  3314. }
  3315. ::PROTOBUF_NAMESPACE_ID::uint8* UpdateDocumentRequest::InternalSerializeWithCachedSizesToArray(
  3316. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  3317. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.UpdateDocumentRequest)
  3318. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3319. (void) cached_has_bits;
  3320. // .google.firestore.v1.Document document = 1;
  3321. if (this->has_document()) {
  3322. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3323. InternalWriteMessageToArray(
  3324. 1, _Internal::document(this), target);
  3325. }
  3326. // .google.firestore.v1.DocumentMask update_mask = 2;
  3327. if (this->has_update_mask()) {
  3328. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3329. InternalWriteMessageToArray(
  3330. 2, _Internal::update_mask(this), target);
  3331. }
  3332. // .google.firestore.v1.DocumentMask mask = 3;
  3333. if (this->has_mask()) {
  3334. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3335. InternalWriteMessageToArray(
  3336. 3, _Internal::mask(this), target);
  3337. }
  3338. // .google.firestore.v1.Precondition current_document = 4;
  3339. if (this->has_current_document()) {
  3340. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3341. InternalWriteMessageToArray(
  3342. 4, _Internal::current_document(this), target);
  3343. }
  3344. if (_internal_metadata_.have_unknown_fields()) {
  3345. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  3346. _internal_metadata_.unknown_fields(), target);
  3347. }
  3348. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.UpdateDocumentRequest)
  3349. return target;
  3350. }
  3351. size_t UpdateDocumentRequest::ByteSizeLong() const {
  3352. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.UpdateDocumentRequest)
  3353. size_t total_size = 0;
  3354. if (_internal_metadata_.have_unknown_fields()) {
  3355. total_size +=
  3356. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  3357. _internal_metadata_.unknown_fields());
  3358. }
  3359. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3360. // Prevent compiler warnings about cached_has_bits being unused
  3361. (void) cached_has_bits;
  3362. // .google.firestore.v1.Document document = 1;
  3363. if (this->has_document()) {
  3364. total_size += 1 +
  3365. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  3366. *document_);
  3367. }
  3368. // .google.firestore.v1.DocumentMask update_mask = 2;
  3369. if (this->has_update_mask()) {
  3370. total_size += 1 +
  3371. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  3372. *update_mask_);
  3373. }
  3374. // .google.firestore.v1.DocumentMask mask = 3;
  3375. if (this->has_mask()) {
  3376. total_size += 1 +
  3377. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  3378. *mask_);
  3379. }
  3380. // .google.firestore.v1.Precondition current_document = 4;
  3381. if (this->has_current_document()) {
  3382. total_size += 1 +
  3383. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  3384. *current_document_);
  3385. }
  3386. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  3387. SetCachedSize(cached_size);
  3388. return total_size;
  3389. }
  3390. void UpdateDocumentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  3391. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.UpdateDocumentRequest)
  3392. GOOGLE_DCHECK_NE(&from, this);
  3393. const UpdateDocumentRequest* source =
  3394. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<UpdateDocumentRequest>(
  3395. &from);
  3396. if (source == nullptr) {
  3397. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.UpdateDocumentRequest)
  3398. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  3399. } else {
  3400. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.UpdateDocumentRequest)
  3401. MergeFrom(*source);
  3402. }
  3403. }
  3404. void UpdateDocumentRequest::MergeFrom(const UpdateDocumentRequest& from) {
  3405. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.UpdateDocumentRequest)
  3406. GOOGLE_DCHECK_NE(&from, this);
  3407. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3408. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3409. (void) cached_has_bits;
  3410. if (from.has_document()) {
  3411. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  3412. }
  3413. if (from.has_update_mask()) {
  3414. mutable_update_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.update_mask());
  3415. }
  3416. if (from.has_mask()) {
  3417. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  3418. }
  3419. if (from.has_current_document()) {
  3420. mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from.current_document());
  3421. }
  3422. }
  3423. void UpdateDocumentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  3424. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.UpdateDocumentRequest)
  3425. if (&from == this) return;
  3426. Clear();
  3427. MergeFrom(from);
  3428. }
  3429. void UpdateDocumentRequest::CopyFrom(const UpdateDocumentRequest& from) {
  3430. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.UpdateDocumentRequest)
  3431. if (&from == this) return;
  3432. Clear();
  3433. MergeFrom(from);
  3434. }
  3435. bool UpdateDocumentRequest::IsInitialized() const {
  3436. return true;
  3437. }
  3438. void UpdateDocumentRequest::InternalSwap(UpdateDocumentRequest* other) {
  3439. using std::swap;
  3440. _internal_metadata_.Swap(&other->_internal_metadata_);
  3441. swap(document_, other->document_);
  3442. swap(update_mask_, other->update_mask_);
  3443. swap(mask_, other->mask_);
  3444. swap(current_document_, other->current_document_);
  3445. }
  3446. ::PROTOBUF_NAMESPACE_ID::Metadata UpdateDocumentRequest::GetMetadata() const {
  3447. return GetMetadataStatic();
  3448. }
  3449. // ===================================================================
  3450. void DeleteDocumentRequest::InitAsDefaultInstance() {
  3451. ::google::firestore::v1::_DeleteDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>(
  3452. ::google::firestore::v1::Precondition::internal_default_instance());
  3453. }
  3454. class DeleteDocumentRequest::_Internal {
  3455. public:
  3456. static const ::google::firestore::v1::Precondition& current_document(const DeleteDocumentRequest* msg);
  3457. };
  3458. const ::google::firestore::v1::Precondition&
  3459. DeleteDocumentRequest::_Internal::current_document(const DeleteDocumentRequest* msg) {
  3460. return *msg->current_document_;
  3461. }
  3462. void DeleteDocumentRequest::clear_current_document() {
  3463. if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
  3464. delete current_document_;
  3465. }
  3466. current_document_ = nullptr;
  3467. }
  3468. DeleteDocumentRequest::DeleteDocumentRequest()
  3469. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  3470. SharedCtor();
  3471. // @@protoc_insertion_point(constructor:google.firestore.v1.DeleteDocumentRequest)
  3472. }
  3473. DeleteDocumentRequest::DeleteDocumentRequest(const DeleteDocumentRequest& from)
  3474. : ::PROTOBUF_NAMESPACE_ID::Message(),
  3475. _internal_metadata_(nullptr) {
  3476. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3477. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3478. if (!from.name().empty()) {
  3479. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  3480. }
  3481. if (from.has_current_document()) {
  3482. current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_);
  3483. } else {
  3484. current_document_ = nullptr;
  3485. }
  3486. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DeleteDocumentRequest)
  3487. }
  3488. void DeleteDocumentRequest::SharedCtor() {
  3489. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  3490. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3491. current_document_ = nullptr;
  3492. }
  3493. DeleteDocumentRequest::~DeleteDocumentRequest() {
  3494. // @@protoc_insertion_point(destructor:google.firestore.v1.DeleteDocumentRequest)
  3495. SharedDtor();
  3496. }
  3497. void DeleteDocumentRequest::SharedDtor() {
  3498. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3499. if (this != internal_default_instance()) delete current_document_;
  3500. }
  3501. void DeleteDocumentRequest::SetCachedSize(int size) const {
  3502. _cached_size_.Set(size);
  3503. }
  3504. const DeleteDocumentRequest& DeleteDocumentRequest::default_instance() {
  3505. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  3506. return *internal_default_instance();
  3507. }
  3508. void DeleteDocumentRequest::Clear() {
  3509. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DeleteDocumentRequest)
  3510. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3511. // Prevent compiler warnings about cached_has_bits being unused
  3512. (void) cached_has_bits;
  3513. name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3514. if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
  3515. delete current_document_;
  3516. }
  3517. current_document_ = nullptr;
  3518. _internal_metadata_.Clear();
  3519. }
  3520. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  3521. const char* DeleteDocumentRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  3522. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  3523. while (!ctx->Done(&ptr)) {
  3524. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  3525. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  3526. CHK_(ptr);
  3527. switch (tag >> 3) {
  3528. // string name = 1;
  3529. case 1:
  3530. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  3531. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.firestore.v1.DeleteDocumentRequest.name");
  3532. CHK_(ptr);
  3533. } else goto handle_unusual;
  3534. continue;
  3535. // .google.firestore.v1.Precondition current_document = 2;
  3536. case 2:
  3537. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  3538. ptr = ctx->ParseMessage(mutable_current_document(), ptr);
  3539. CHK_(ptr);
  3540. } else goto handle_unusual;
  3541. continue;
  3542. default: {
  3543. handle_unusual:
  3544. if ((tag & 7) == 4 || tag == 0) {
  3545. ctx->SetLastTag(tag);
  3546. goto success;
  3547. }
  3548. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  3549. CHK_(ptr != nullptr);
  3550. continue;
  3551. }
  3552. } // switch
  3553. } // while
  3554. success:
  3555. return ptr;
  3556. failure:
  3557. ptr = nullptr;
  3558. goto success;
  3559. #undef CHK_
  3560. }
  3561. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  3562. bool DeleteDocumentRequest::MergePartialFromCodedStream(
  3563. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  3564. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  3565. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  3566. // @@protoc_insertion_point(parse_start:google.firestore.v1.DeleteDocumentRequest)
  3567. for (;;) {
  3568. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3569. tag = p.first;
  3570. if (!p.second) goto handle_unusual;
  3571. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3572. // string name = 1;
  3573. case 1: {
  3574. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  3575. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  3576. input, this->mutable_name()));
  3577. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  3578. this->name().data(), static_cast<int>(this->name().length()),
  3579. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  3580. "google.firestore.v1.DeleteDocumentRequest.name"));
  3581. } else {
  3582. goto handle_unusual;
  3583. }
  3584. break;
  3585. }
  3586. // .google.firestore.v1.Precondition current_document = 2;
  3587. case 2: {
  3588. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  3589. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  3590. input, mutable_current_document()));
  3591. } else {
  3592. goto handle_unusual;
  3593. }
  3594. break;
  3595. }
  3596. default: {
  3597. handle_unusual:
  3598. if (tag == 0) {
  3599. goto success;
  3600. }
  3601. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  3602. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3603. break;
  3604. }
  3605. }
  3606. }
  3607. success:
  3608. // @@protoc_insertion_point(parse_success:google.firestore.v1.DeleteDocumentRequest)
  3609. return true;
  3610. failure:
  3611. // @@protoc_insertion_point(parse_failure:google.firestore.v1.DeleteDocumentRequest)
  3612. return false;
  3613. #undef DO_
  3614. }
  3615. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  3616. void DeleteDocumentRequest::SerializeWithCachedSizes(
  3617. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  3618. // @@protoc_insertion_point(serialize_start:google.firestore.v1.DeleteDocumentRequest)
  3619. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3620. (void) cached_has_bits;
  3621. // string name = 1;
  3622. if (this->name().size() > 0) {
  3623. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  3624. this->name().data(), static_cast<int>(this->name().length()),
  3625. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  3626. "google.firestore.v1.DeleteDocumentRequest.name");
  3627. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  3628. 1, this->name(), output);
  3629. }
  3630. // .google.firestore.v1.Precondition current_document = 2;
  3631. if (this->has_current_document()) {
  3632. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  3633. 2, _Internal::current_document(this), output);
  3634. }
  3635. if (_internal_metadata_.have_unknown_fields()) {
  3636. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  3637. _internal_metadata_.unknown_fields(), output);
  3638. }
  3639. // @@protoc_insertion_point(serialize_end:google.firestore.v1.DeleteDocumentRequest)
  3640. }
  3641. ::PROTOBUF_NAMESPACE_ID::uint8* DeleteDocumentRequest::InternalSerializeWithCachedSizesToArray(
  3642. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  3643. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DeleteDocumentRequest)
  3644. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3645. (void) cached_has_bits;
  3646. // string name = 1;
  3647. if (this->name().size() > 0) {
  3648. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  3649. this->name().data(), static_cast<int>(this->name().length()),
  3650. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  3651. "google.firestore.v1.DeleteDocumentRequest.name");
  3652. target =
  3653. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  3654. 1, this->name(), target);
  3655. }
  3656. // .google.firestore.v1.Precondition current_document = 2;
  3657. if (this->has_current_document()) {
  3658. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3659. InternalWriteMessageToArray(
  3660. 2, _Internal::current_document(this), target);
  3661. }
  3662. if (_internal_metadata_.have_unknown_fields()) {
  3663. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  3664. _internal_metadata_.unknown_fields(), target);
  3665. }
  3666. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DeleteDocumentRequest)
  3667. return target;
  3668. }
  3669. size_t DeleteDocumentRequest::ByteSizeLong() const {
  3670. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DeleteDocumentRequest)
  3671. size_t total_size = 0;
  3672. if (_internal_metadata_.have_unknown_fields()) {
  3673. total_size +=
  3674. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  3675. _internal_metadata_.unknown_fields());
  3676. }
  3677. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3678. // Prevent compiler warnings about cached_has_bits being unused
  3679. (void) cached_has_bits;
  3680. // string name = 1;
  3681. if (this->name().size() > 0) {
  3682. total_size += 1 +
  3683. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  3684. this->name());
  3685. }
  3686. // .google.firestore.v1.Precondition current_document = 2;
  3687. if (this->has_current_document()) {
  3688. total_size += 1 +
  3689. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  3690. *current_document_);
  3691. }
  3692. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  3693. SetCachedSize(cached_size);
  3694. return total_size;
  3695. }
  3696. void DeleteDocumentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  3697. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DeleteDocumentRequest)
  3698. GOOGLE_DCHECK_NE(&from, this);
  3699. const DeleteDocumentRequest* source =
  3700. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DeleteDocumentRequest>(
  3701. &from);
  3702. if (source == nullptr) {
  3703. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DeleteDocumentRequest)
  3704. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  3705. } else {
  3706. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DeleteDocumentRequest)
  3707. MergeFrom(*source);
  3708. }
  3709. }
  3710. void DeleteDocumentRequest::MergeFrom(const DeleteDocumentRequest& from) {
  3711. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DeleteDocumentRequest)
  3712. GOOGLE_DCHECK_NE(&from, this);
  3713. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3714. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3715. (void) cached_has_bits;
  3716. if (from.name().size() > 0) {
  3717. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  3718. }
  3719. if (from.has_current_document()) {
  3720. mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from.current_document());
  3721. }
  3722. }
  3723. void DeleteDocumentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  3724. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DeleteDocumentRequest)
  3725. if (&from == this) return;
  3726. Clear();
  3727. MergeFrom(from);
  3728. }
  3729. void DeleteDocumentRequest::CopyFrom(const DeleteDocumentRequest& from) {
  3730. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DeleteDocumentRequest)
  3731. if (&from == this) return;
  3732. Clear();
  3733. MergeFrom(from);
  3734. }
  3735. bool DeleteDocumentRequest::IsInitialized() const {
  3736. return true;
  3737. }
  3738. void DeleteDocumentRequest::InternalSwap(DeleteDocumentRequest* other) {
  3739. using std::swap;
  3740. _internal_metadata_.Swap(&other->_internal_metadata_);
  3741. name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  3742. GetArenaNoVirtual());
  3743. swap(current_document_, other->current_document_);
  3744. }
  3745. ::PROTOBUF_NAMESPACE_ID::Metadata DeleteDocumentRequest::GetMetadata() const {
  3746. return GetMetadataStatic();
  3747. }
  3748. // ===================================================================
  3749. void BatchGetDocumentsRequest::InitAsDefaultInstance() {
  3750. ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  3751. ::google::firestore::v1::DocumentMask::internal_default_instance());
  3752. ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
  3753. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3754. ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
  3755. ::google::firestore::v1::TransactionOptions::internal_default_instance());
  3756. ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  3757. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  3758. }
  3759. class BatchGetDocumentsRequest::_Internal {
  3760. public:
  3761. static const ::google::firestore::v1::DocumentMask& mask(const BatchGetDocumentsRequest* msg);
  3762. static const ::google::firestore::v1::TransactionOptions& new_transaction(const BatchGetDocumentsRequest* msg);
  3763. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const BatchGetDocumentsRequest* msg);
  3764. };
  3765. const ::google::firestore::v1::DocumentMask&
  3766. BatchGetDocumentsRequest::_Internal::mask(const BatchGetDocumentsRequest* msg) {
  3767. return *msg->mask_;
  3768. }
  3769. const ::google::firestore::v1::TransactionOptions&
  3770. BatchGetDocumentsRequest::_Internal::new_transaction(const BatchGetDocumentsRequest* msg) {
  3771. return *msg->consistency_selector_.new_transaction_;
  3772. }
  3773. const PROTOBUF_NAMESPACE_ID::Timestamp&
  3774. BatchGetDocumentsRequest::_Internal::read_time(const BatchGetDocumentsRequest* msg) {
  3775. return *msg->consistency_selector_.read_time_;
  3776. }
  3777. void BatchGetDocumentsRequest::clear_mask() {
  3778. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  3779. delete mask_;
  3780. }
  3781. mask_ = nullptr;
  3782. }
  3783. void BatchGetDocumentsRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) {
  3784. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  3785. clear_consistency_selector();
  3786. if (new_transaction) {
  3787. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  3788. if (message_arena != submessage_arena) {
  3789. new_transaction = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  3790. message_arena, new_transaction, submessage_arena);
  3791. }
  3792. set_has_new_transaction();
  3793. consistency_selector_.new_transaction_ = new_transaction;
  3794. }
  3795. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.new_transaction)
  3796. }
  3797. void BatchGetDocumentsRequest::clear_new_transaction() {
  3798. if (has_new_transaction()) {
  3799. delete consistency_selector_.new_transaction_;
  3800. clear_has_consistency_selector();
  3801. }
  3802. }
  3803. void BatchGetDocumentsRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  3804. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  3805. clear_consistency_selector();
  3806. if (read_time) {
  3807. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  3808. reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
  3809. if (message_arena != submessage_arena) {
  3810. read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  3811. message_arena, read_time, submessage_arena);
  3812. }
  3813. set_has_read_time();
  3814. consistency_selector_.read_time_ = read_time;
  3815. }
  3816. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.read_time)
  3817. }
  3818. void BatchGetDocumentsRequest::clear_read_time() {
  3819. if (has_read_time()) {
  3820. delete consistency_selector_.read_time_;
  3821. clear_has_consistency_selector();
  3822. }
  3823. }
  3824. BatchGetDocumentsRequest::BatchGetDocumentsRequest()
  3825. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  3826. SharedCtor();
  3827. // @@protoc_insertion_point(constructor:google.firestore.v1.BatchGetDocumentsRequest)
  3828. }
  3829. BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsRequest& from)
  3830. : ::PROTOBUF_NAMESPACE_ID::Message(),
  3831. _internal_metadata_(nullptr),
  3832. documents_(from.documents_) {
  3833. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3834. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3835. if (!from.database().empty()) {
  3836. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  3837. }
  3838. if (from.has_mask()) {
  3839. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  3840. } else {
  3841. mask_ = nullptr;
  3842. }
  3843. clear_has_consistency_selector();
  3844. switch (from.consistency_selector_case()) {
  3845. case kTransaction: {
  3846. set_transaction(from.transaction());
  3847. break;
  3848. }
  3849. case kNewTransaction: {
  3850. mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction());
  3851. break;
  3852. }
  3853. case kReadTime: {
  3854. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  3855. break;
  3856. }
  3857. case CONSISTENCY_SELECTOR_NOT_SET: {
  3858. break;
  3859. }
  3860. }
  3861. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BatchGetDocumentsRequest)
  3862. }
  3863. void BatchGetDocumentsRequest::SharedCtor() {
  3864. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  3865. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3866. mask_ = nullptr;
  3867. clear_has_consistency_selector();
  3868. }
  3869. BatchGetDocumentsRequest::~BatchGetDocumentsRequest() {
  3870. // @@protoc_insertion_point(destructor:google.firestore.v1.BatchGetDocumentsRequest)
  3871. SharedDtor();
  3872. }
  3873. void BatchGetDocumentsRequest::SharedDtor() {
  3874. database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3875. if (this != internal_default_instance()) delete mask_;
  3876. if (has_consistency_selector()) {
  3877. clear_consistency_selector();
  3878. }
  3879. }
  3880. void BatchGetDocumentsRequest::SetCachedSize(int size) const {
  3881. _cached_size_.Set(size);
  3882. }
  3883. const BatchGetDocumentsRequest& BatchGetDocumentsRequest::default_instance() {
  3884. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  3885. return *internal_default_instance();
  3886. }
  3887. void BatchGetDocumentsRequest::clear_consistency_selector() {
  3888. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.BatchGetDocumentsRequest)
  3889. switch (consistency_selector_case()) {
  3890. case kTransaction: {
  3891. consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3892. break;
  3893. }
  3894. case kNewTransaction: {
  3895. delete consistency_selector_.new_transaction_;
  3896. break;
  3897. }
  3898. case kReadTime: {
  3899. delete consistency_selector_.read_time_;
  3900. break;
  3901. }
  3902. case CONSISTENCY_SELECTOR_NOT_SET: {
  3903. break;
  3904. }
  3905. }
  3906. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  3907. }
  3908. void BatchGetDocumentsRequest::Clear() {
  3909. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.BatchGetDocumentsRequest)
  3910. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  3911. // Prevent compiler warnings about cached_has_bits being unused
  3912. (void) cached_has_bits;
  3913. documents_.Clear();
  3914. database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3915. if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
  3916. delete mask_;
  3917. }
  3918. mask_ = nullptr;
  3919. clear_consistency_selector();
  3920. _internal_metadata_.Clear();
  3921. }
  3922. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  3923. const char* BatchGetDocumentsRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  3924. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  3925. while (!ctx->Done(&ptr)) {
  3926. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  3927. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  3928. CHK_(ptr);
  3929. switch (tag >> 3) {
  3930. // string database = 1;
  3931. case 1:
  3932. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  3933. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_database(), ptr, ctx, "google.firestore.v1.BatchGetDocumentsRequest.database");
  3934. CHK_(ptr);
  3935. } else goto handle_unusual;
  3936. continue;
  3937. // repeated string documents = 2;
  3938. case 2:
  3939. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  3940. ptr -= 1;
  3941. do {
  3942. ptr += 1;
  3943. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_documents(), ptr, ctx, "google.firestore.v1.BatchGetDocumentsRequest.documents");
  3944. CHK_(ptr);
  3945. if (!ctx->DataAvailable(ptr)) break;
  3946. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
  3947. } else goto handle_unusual;
  3948. continue;
  3949. // .google.firestore.v1.DocumentMask mask = 3;
  3950. case 3:
  3951. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  3952. ptr = ctx->ParseMessage(mutable_mask(), ptr);
  3953. CHK_(ptr);
  3954. } else goto handle_unusual;
  3955. continue;
  3956. // bytes transaction = 4;
  3957. case 4:
  3958. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  3959. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  3960. CHK_(ptr);
  3961. } else goto handle_unusual;
  3962. continue;
  3963. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  3964. case 5:
  3965. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
  3966. ptr = ctx->ParseMessage(mutable_new_transaction(), ptr);
  3967. CHK_(ptr);
  3968. } else goto handle_unusual;
  3969. continue;
  3970. // .google.protobuf.Timestamp read_time = 7;
  3971. case 7:
  3972. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
  3973. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  3974. CHK_(ptr);
  3975. } else goto handle_unusual;
  3976. continue;
  3977. default: {
  3978. handle_unusual:
  3979. if ((tag & 7) == 4 || tag == 0) {
  3980. ctx->SetLastTag(tag);
  3981. goto success;
  3982. }
  3983. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  3984. CHK_(ptr != nullptr);
  3985. continue;
  3986. }
  3987. } // switch
  3988. } // while
  3989. success:
  3990. return ptr;
  3991. failure:
  3992. ptr = nullptr;
  3993. goto success;
  3994. #undef CHK_
  3995. }
  3996. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  3997. bool BatchGetDocumentsRequest::MergePartialFromCodedStream(
  3998. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  3999. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  4000. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  4001. // @@protoc_insertion_point(parse_start:google.firestore.v1.BatchGetDocumentsRequest)
  4002. for (;;) {
  4003. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4004. tag = p.first;
  4005. if (!p.second) goto handle_unusual;
  4006. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4007. // string database = 1;
  4008. case 1: {
  4009. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  4010. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  4011. input, this->mutable_database()));
  4012. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4013. this->database().data(), static_cast<int>(this->database().length()),
  4014. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  4015. "google.firestore.v1.BatchGetDocumentsRequest.database"));
  4016. } else {
  4017. goto handle_unusual;
  4018. }
  4019. break;
  4020. }
  4021. // repeated string documents = 2;
  4022. case 2: {
  4023. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  4024. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  4025. input, this->add_documents()));
  4026. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4027. this->documents(this->documents_size() - 1).data(),
  4028. static_cast<int>(this->documents(this->documents_size() - 1).length()),
  4029. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  4030. "google.firestore.v1.BatchGetDocumentsRequest.documents"));
  4031. } else {
  4032. goto handle_unusual;
  4033. }
  4034. break;
  4035. }
  4036. // .google.firestore.v1.DocumentMask mask = 3;
  4037. case 3: {
  4038. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  4039. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  4040. input, mutable_mask()));
  4041. } else {
  4042. goto handle_unusual;
  4043. }
  4044. break;
  4045. }
  4046. // bytes transaction = 4;
  4047. case 4: {
  4048. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  4049. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  4050. input, this->mutable_transaction()));
  4051. } else {
  4052. goto handle_unusual;
  4053. }
  4054. break;
  4055. }
  4056. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  4057. case 5: {
  4058. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
  4059. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  4060. input, mutable_new_transaction()));
  4061. } else {
  4062. goto handle_unusual;
  4063. }
  4064. break;
  4065. }
  4066. // .google.protobuf.Timestamp read_time = 7;
  4067. case 7: {
  4068. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
  4069. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  4070. input, mutable_read_time()));
  4071. } else {
  4072. goto handle_unusual;
  4073. }
  4074. break;
  4075. }
  4076. default: {
  4077. handle_unusual:
  4078. if (tag == 0) {
  4079. goto success;
  4080. }
  4081. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  4082. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4083. break;
  4084. }
  4085. }
  4086. }
  4087. success:
  4088. // @@protoc_insertion_point(parse_success:google.firestore.v1.BatchGetDocumentsRequest)
  4089. return true;
  4090. failure:
  4091. // @@protoc_insertion_point(parse_failure:google.firestore.v1.BatchGetDocumentsRequest)
  4092. return false;
  4093. #undef DO_
  4094. }
  4095. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  4096. void BatchGetDocumentsRequest::SerializeWithCachedSizes(
  4097. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  4098. // @@protoc_insertion_point(serialize_start:google.firestore.v1.BatchGetDocumentsRequest)
  4099. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4100. (void) cached_has_bits;
  4101. // string database = 1;
  4102. if (this->database().size() > 0) {
  4103. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4104. this->database().data(), static_cast<int>(this->database().length()),
  4105. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  4106. "google.firestore.v1.BatchGetDocumentsRequest.database");
  4107. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  4108. 1, this->database(), output);
  4109. }
  4110. // repeated string documents = 2;
  4111. for (int i = 0, n = this->documents_size(); i < n; i++) {
  4112. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4113. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  4114. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  4115. "google.firestore.v1.BatchGetDocumentsRequest.documents");
  4116. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
  4117. 2, this->documents(i), output);
  4118. }
  4119. // .google.firestore.v1.DocumentMask mask = 3;
  4120. if (this->has_mask()) {
  4121. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  4122. 3, _Internal::mask(this), output);
  4123. }
  4124. // bytes transaction = 4;
  4125. if (has_transaction()) {
  4126. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  4127. 4, this->transaction(), output);
  4128. }
  4129. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  4130. if (has_new_transaction()) {
  4131. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  4132. 5, _Internal::new_transaction(this), output);
  4133. }
  4134. // .google.protobuf.Timestamp read_time = 7;
  4135. if (has_read_time()) {
  4136. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  4137. 7, _Internal::read_time(this), output);
  4138. }
  4139. if (_internal_metadata_.have_unknown_fields()) {
  4140. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  4141. _internal_metadata_.unknown_fields(), output);
  4142. }
  4143. // @@protoc_insertion_point(serialize_end:google.firestore.v1.BatchGetDocumentsRequest)
  4144. }
  4145. ::PROTOBUF_NAMESPACE_ID::uint8* BatchGetDocumentsRequest::InternalSerializeWithCachedSizesToArray(
  4146. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  4147. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BatchGetDocumentsRequest)
  4148. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4149. (void) cached_has_bits;
  4150. // string database = 1;
  4151. if (this->database().size() > 0) {
  4152. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4153. this->database().data(), static_cast<int>(this->database().length()),
  4154. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  4155. "google.firestore.v1.BatchGetDocumentsRequest.database");
  4156. target =
  4157. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  4158. 1, this->database(), target);
  4159. }
  4160. // repeated string documents = 2;
  4161. for (int i = 0, n = this->documents_size(); i < n; i++) {
  4162. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4163. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  4164. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  4165. "google.firestore.v1.BatchGetDocumentsRequest.documents");
  4166. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4167. WriteStringToArray(2, this->documents(i), target);
  4168. }
  4169. // .google.firestore.v1.DocumentMask mask = 3;
  4170. if (this->has_mask()) {
  4171. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4172. InternalWriteMessageToArray(
  4173. 3, _Internal::mask(this), target);
  4174. }
  4175. // bytes transaction = 4;
  4176. if (has_transaction()) {
  4177. target =
  4178. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  4179. 4, this->transaction(), target);
  4180. }
  4181. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  4182. if (has_new_transaction()) {
  4183. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4184. InternalWriteMessageToArray(
  4185. 5, _Internal::new_transaction(this), target);
  4186. }
  4187. // .google.protobuf.Timestamp read_time = 7;
  4188. if (has_read_time()) {
  4189. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4190. InternalWriteMessageToArray(
  4191. 7, _Internal::read_time(this), target);
  4192. }
  4193. if (_internal_metadata_.have_unknown_fields()) {
  4194. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  4195. _internal_metadata_.unknown_fields(), target);
  4196. }
  4197. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BatchGetDocumentsRequest)
  4198. return target;
  4199. }
  4200. size_t BatchGetDocumentsRequest::ByteSizeLong() const {
  4201. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BatchGetDocumentsRequest)
  4202. size_t total_size = 0;
  4203. if (_internal_metadata_.have_unknown_fields()) {
  4204. total_size +=
  4205. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  4206. _internal_metadata_.unknown_fields());
  4207. }
  4208. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4209. // Prevent compiler warnings about cached_has_bits being unused
  4210. (void) cached_has_bits;
  4211. // repeated string documents = 2;
  4212. total_size += 1 *
  4213. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->documents_size());
  4214. for (int i = 0, n = this->documents_size(); i < n; i++) {
  4215. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  4216. this->documents(i));
  4217. }
  4218. // string database = 1;
  4219. if (this->database().size() > 0) {
  4220. total_size += 1 +
  4221. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  4222. this->database());
  4223. }
  4224. // .google.firestore.v1.DocumentMask mask = 3;
  4225. if (this->has_mask()) {
  4226. total_size += 1 +
  4227. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  4228. *mask_);
  4229. }
  4230. switch (consistency_selector_case()) {
  4231. // bytes transaction = 4;
  4232. case kTransaction: {
  4233. total_size += 1 +
  4234. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  4235. this->transaction());
  4236. break;
  4237. }
  4238. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  4239. case kNewTransaction: {
  4240. total_size += 1 +
  4241. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  4242. *consistency_selector_.new_transaction_);
  4243. break;
  4244. }
  4245. // .google.protobuf.Timestamp read_time = 7;
  4246. case kReadTime: {
  4247. total_size += 1 +
  4248. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  4249. *consistency_selector_.read_time_);
  4250. break;
  4251. }
  4252. case CONSISTENCY_SELECTOR_NOT_SET: {
  4253. break;
  4254. }
  4255. }
  4256. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  4257. SetCachedSize(cached_size);
  4258. return total_size;
  4259. }
  4260. void BatchGetDocumentsRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  4261. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  4262. GOOGLE_DCHECK_NE(&from, this);
  4263. const BatchGetDocumentsRequest* source =
  4264. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BatchGetDocumentsRequest>(
  4265. &from);
  4266. if (source == nullptr) {
  4267. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BatchGetDocumentsRequest)
  4268. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  4269. } else {
  4270. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BatchGetDocumentsRequest)
  4271. MergeFrom(*source);
  4272. }
  4273. }
  4274. void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) {
  4275. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  4276. GOOGLE_DCHECK_NE(&from, this);
  4277. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4278. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4279. (void) cached_has_bits;
  4280. documents_.MergeFrom(from.documents_);
  4281. if (from.database().size() > 0) {
  4282. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  4283. }
  4284. if (from.has_mask()) {
  4285. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  4286. }
  4287. switch (from.consistency_selector_case()) {
  4288. case kTransaction: {
  4289. set_transaction(from.transaction());
  4290. break;
  4291. }
  4292. case kNewTransaction: {
  4293. mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction());
  4294. break;
  4295. }
  4296. case kReadTime: {
  4297. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  4298. break;
  4299. }
  4300. case CONSISTENCY_SELECTOR_NOT_SET: {
  4301. break;
  4302. }
  4303. }
  4304. }
  4305. void BatchGetDocumentsRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  4306. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  4307. if (&from == this) return;
  4308. Clear();
  4309. MergeFrom(from);
  4310. }
  4311. void BatchGetDocumentsRequest::CopyFrom(const BatchGetDocumentsRequest& from) {
  4312. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  4313. if (&from == this) return;
  4314. Clear();
  4315. MergeFrom(from);
  4316. }
  4317. bool BatchGetDocumentsRequest::IsInitialized() const {
  4318. return true;
  4319. }
  4320. void BatchGetDocumentsRequest::InternalSwap(BatchGetDocumentsRequest* other) {
  4321. using std::swap;
  4322. _internal_metadata_.Swap(&other->_internal_metadata_);
  4323. documents_.InternalSwap(CastToBase(&other->documents_));
  4324. database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  4325. GetArenaNoVirtual());
  4326. swap(mask_, other->mask_);
  4327. swap(consistency_selector_, other->consistency_selector_);
  4328. swap(_oneof_case_[0], other->_oneof_case_[0]);
  4329. }
  4330. ::PROTOBUF_NAMESPACE_ID::Metadata BatchGetDocumentsRequest::GetMetadata() const {
  4331. return GetMetadataStatic();
  4332. }
  4333. // ===================================================================
  4334. void BatchGetDocumentsResponse::InitAsDefaultInstance() {
  4335. ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_.found_ = const_cast< ::google::firestore::v1::Document*>(
  4336. ::google::firestore::v1::Document::internal_default_instance());
  4337. ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_.missing_.UnsafeSetDefault(
  4338. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4339. ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  4340. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  4341. }
  4342. class BatchGetDocumentsResponse::_Internal {
  4343. public:
  4344. static const ::google::firestore::v1::Document& found(const BatchGetDocumentsResponse* msg);
  4345. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const BatchGetDocumentsResponse* msg);
  4346. };
  4347. const ::google::firestore::v1::Document&
  4348. BatchGetDocumentsResponse::_Internal::found(const BatchGetDocumentsResponse* msg) {
  4349. return *msg->result_.found_;
  4350. }
  4351. const PROTOBUF_NAMESPACE_ID::Timestamp&
  4352. BatchGetDocumentsResponse::_Internal::read_time(const BatchGetDocumentsResponse* msg) {
  4353. return *msg->read_time_;
  4354. }
  4355. void BatchGetDocumentsResponse::set_allocated_found(::google::firestore::v1::Document* found) {
  4356. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  4357. clear_result();
  4358. if (found) {
  4359. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  4360. if (message_arena != submessage_arena) {
  4361. found = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  4362. message_arena, found, submessage_arena);
  4363. }
  4364. set_has_found();
  4365. result_.found_ = found;
  4366. }
  4367. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsResponse.found)
  4368. }
  4369. void BatchGetDocumentsResponse::clear_found() {
  4370. if (has_found()) {
  4371. delete result_.found_;
  4372. clear_has_result();
  4373. }
  4374. }
  4375. void BatchGetDocumentsResponse::clear_read_time() {
  4376. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  4377. delete read_time_;
  4378. }
  4379. read_time_ = nullptr;
  4380. }
  4381. BatchGetDocumentsResponse::BatchGetDocumentsResponse()
  4382. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  4383. SharedCtor();
  4384. // @@protoc_insertion_point(constructor:google.firestore.v1.BatchGetDocumentsResponse)
  4385. }
  4386. BatchGetDocumentsResponse::BatchGetDocumentsResponse(const BatchGetDocumentsResponse& from)
  4387. : ::PROTOBUF_NAMESPACE_ID::Message(),
  4388. _internal_metadata_(nullptr) {
  4389. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4390. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4391. if (!from.transaction().empty()) {
  4392. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  4393. }
  4394. if (from.has_read_time()) {
  4395. read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  4396. } else {
  4397. read_time_ = nullptr;
  4398. }
  4399. clear_has_result();
  4400. switch (from.result_case()) {
  4401. case kFound: {
  4402. mutable_found()->::google::firestore::v1::Document::MergeFrom(from.found());
  4403. break;
  4404. }
  4405. case kMissing: {
  4406. set_missing(from.missing());
  4407. break;
  4408. }
  4409. case RESULT_NOT_SET: {
  4410. break;
  4411. }
  4412. }
  4413. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BatchGetDocumentsResponse)
  4414. }
  4415. void BatchGetDocumentsResponse::SharedCtor() {
  4416. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  4417. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4418. read_time_ = nullptr;
  4419. clear_has_result();
  4420. }
  4421. BatchGetDocumentsResponse::~BatchGetDocumentsResponse() {
  4422. // @@protoc_insertion_point(destructor:google.firestore.v1.BatchGetDocumentsResponse)
  4423. SharedDtor();
  4424. }
  4425. void BatchGetDocumentsResponse::SharedDtor() {
  4426. transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4427. if (this != internal_default_instance()) delete read_time_;
  4428. if (has_result()) {
  4429. clear_result();
  4430. }
  4431. }
  4432. void BatchGetDocumentsResponse::SetCachedSize(int size) const {
  4433. _cached_size_.Set(size);
  4434. }
  4435. const BatchGetDocumentsResponse& BatchGetDocumentsResponse::default_instance() {
  4436. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  4437. return *internal_default_instance();
  4438. }
  4439. void BatchGetDocumentsResponse::clear_result() {
  4440. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.BatchGetDocumentsResponse)
  4441. switch (result_case()) {
  4442. case kFound: {
  4443. delete result_.found_;
  4444. break;
  4445. }
  4446. case kMissing: {
  4447. result_.missing_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4448. break;
  4449. }
  4450. case RESULT_NOT_SET: {
  4451. break;
  4452. }
  4453. }
  4454. _oneof_case_[0] = RESULT_NOT_SET;
  4455. }
  4456. void BatchGetDocumentsResponse::Clear() {
  4457. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.BatchGetDocumentsResponse)
  4458. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4459. // Prevent compiler warnings about cached_has_bits being unused
  4460. (void) cached_has_bits;
  4461. transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4462. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  4463. delete read_time_;
  4464. }
  4465. read_time_ = nullptr;
  4466. clear_result();
  4467. _internal_metadata_.Clear();
  4468. }
  4469. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  4470. const char* BatchGetDocumentsResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  4471. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  4472. while (!ctx->Done(&ptr)) {
  4473. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  4474. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  4475. CHK_(ptr);
  4476. switch (tag >> 3) {
  4477. // .google.firestore.v1.Document found = 1;
  4478. case 1:
  4479. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  4480. ptr = ctx->ParseMessage(mutable_found(), ptr);
  4481. CHK_(ptr);
  4482. } else goto handle_unusual;
  4483. continue;
  4484. // string missing = 2;
  4485. case 2:
  4486. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  4487. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_missing(), ptr, ctx, "google.firestore.v1.BatchGetDocumentsResponse.missing");
  4488. CHK_(ptr);
  4489. } else goto handle_unusual;
  4490. continue;
  4491. // bytes transaction = 3;
  4492. case 3:
  4493. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  4494. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  4495. CHK_(ptr);
  4496. } else goto handle_unusual;
  4497. continue;
  4498. // .google.protobuf.Timestamp read_time = 4;
  4499. case 4:
  4500. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  4501. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  4502. CHK_(ptr);
  4503. } else goto handle_unusual;
  4504. continue;
  4505. default: {
  4506. handle_unusual:
  4507. if ((tag & 7) == 4 || tag == 0) {
  4508. ctx->SetLastTag(tag);
  4509. goto success;
  4510. }
  4511. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  4512. CHK_(ptr != nullptr);
  4513. continue;
  4514. }
  4515. } // switch
  4516. } // while
  4517. success:
  4518. return ptr;
  4519. failure:
  4520. ptr = nullptr;
  4521. goto success;
  4522. #undef CHK_
  4523. }
  4524. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  4525. bool BatchGetDocumentsResponse::MergePartialFromCodedStream(
  4526. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  4527. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  4528. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  4529. // @@protoc_insertion_point(parse_start:google.firestore.v1.BatchGetDocumentsResponse)
  4530. for (;;) {
  4531. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4532. tag = p.first;
  4533. if (!p.second) goto handle_unusual;
  4534. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4535. // .google.firestore.v1.Document found = 1;
  4536. case 1: {
  4537. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  4538. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  4539. input, mutable_found()));
  4540. } else {
  4541. goto handle_unusual;
  4542. }
  4543. break;
  4544. }
  4545. // string missing = 2;
  4546. case 2: {
  4547. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  4548. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  4549. input, this->mutable_missing()));
  4550. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4551. this->missing().data(), static_cast<int>(this->missing().length()),
  4552. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  4553. "google.firestore.v1.BatchGetDocumentsResponse.missing"));
  4554. } else {
  4555. goto handle_unusual;
  4556. }
  4557. break;
  4558. }
  4559. // bytes transaction = 3;
  4560. case 3: {
  4561. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  4562. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  4563. input, this->mutable_transaction()));
  4564. } else {
  4565. goto handle_unusual;
  4566. }
  4567. break;
  4568. }
  4569. // .google.protobuf.Timestamp read_time = 4;
  4570. case 4: {
  4571. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  4572. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  4573. input, mutable_read_time()));
  4574. } else {
  4575. goto handle_unusual;
  4576. }
  4577. break;
  4578. }
  4579. default: {
  4580. handle_unusual:
  4581. if (tag == 0) {
  4582. goto success;
  4583. }
  4584. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  4585. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4586. break;
  4587. }
  4588. }
  4589. }
  4590. success:
  4591. // @@protoc_insertion_point(parse_success:google.firestore.v1.BatchGetDocumentsResponse)
  4592. return true;
  4593. failure:
  4594. // @@protoc_insertion_point(parse_failure:google.firestore.v1.BatchGetDocumentsResponse)
  4595. return false;
  4596. #undef DO_
  4597. }
  4598. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  4599. void BatchGetDocumentsResponse::SerializeWithCachedSizes(
  4600. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  4601. // @@protoc_insertion_point(serialize_start:google.firestore.v1.BatchGetDocumentsResponse)
  4602. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4603. (void) cached_has_bits;
  4604. // .google.firestore.v1.Document found = 1;
  4605. if (has_found()) {
  4606. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  4607. 1, _Internal::found(this), output);
  4608. }
  4609. // string missing = 2;
  4610. if (has_missing()) {
  4611. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4612. this->missing().data(), static_cast<int>(this->missing().length()),
  4613. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  4614. "google.firestore.v1.BatchGetDocumentsResponse.missing");
  4615. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  4616. 2, this->missing(), output);
  4617. }
  4618. // bytes transaction = 3;
  4619. if (this->transaction().size() > 0) {
  4620. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  4621. 3, this->transaction(), output);
  4622. }
  4623. // .google.protobuf.Timestamp read_time = 4;
  4624. if (this->has_read_time()) {
  4625. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  4626. 4, _Internal::read_time(this), output);
  4627. }
  4628. if (_internal_metadata_.have_unknown_fields()) {
  4629. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  4630. _internal_metadata_.unknown_fields(), output);
  4631. }
  4632. // @@protoc_insertion_point(serialize_end:google.firestore.v1.BatchGetDocumentsResponse)
  4633. }
  4634. ::PROTOBUF_NAMESPACE_ID::uint8* BatchGetDocumentsResponse::InternalSerializeWithCachedSizesToArray(
  4635. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  4636. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BatchGetDocumentsResponse)
  4637. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4638. (void) cached_has_bits;
  4639. // .google.firestore.v1.Document found = 1;
  4640. if (has_found()) {
  4641. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4642. InternalWriteMessageToArray(
  4643. 1, _Internal::found(this), target);
  4644. }
  4645. // string missing = 2;
  4646. if (has_missing()) {
  4647. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4648. this->missing().data(), static_cast<int>(this->missing().length()),
  4649. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  4650. "google.firestore.v1.BatchGetDocumentsResponse.missing");
  4651. target =
  4652. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  4653. 2, this->missing(), target);
  4654. }
  4655. // bytes transaction = 3;
  4656. if (this->transaction().size() > 0) {
  4657. target =
  4658. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  4659. 3, this->transaction(), target);
  4660. }
  4661. // .google.protobuf.Timestamp read_time = 4;
  4662. if (this->has_read_time()) {
  4663. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4664. InternalWriteMessageToArray(
  4665. 4, _Internal::read_time(this), target);
  4666. }
  4667. if (_internal_metadata_.have_unknown_fields()) {
  4668. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  4669. _internal_metadata_.unknown_fields(), target);
  4670. }
  4671. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BatchGetDocumentsResponse)
  4672. return target;
  4673. }
  4674. size_t BatchGetDocumentsResponse::ByteSizeLong() const {
  4675. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BatchGetDocumentsResponse)
  4676. size_t total_size = 0;
  4677. if (_internal_metadata_.have_unknown_fields()) {
  4678. total_size +=
  4679. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  4680. _internal_metadata_.unknown_fields());
  4681. }
  4682. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4683. // Prevent compiler warnings about cached_has_bits being unused
  4684. (void) cached_has_bits;
  4685. // bytes transaction = 3;
  4686. if (this->transaction().size() > 0) {
  4687. total_size += 1 +
  4688. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  4689. this->transaction());
  4690. }
  4691. // .google.protobuf.Timestamp read_time = 4;
  4692. if (this->has_read_time()) {
  4693. total_size += 1 +
  4694. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  4695. *read_time_);
  4696. }
  4697. switch (result_case()) {
  4698. // .google.firestore.v1.Document found = 1;
  4699. case kFound: {
  4700. total_size += 1 +
  4701. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  4702. *result_.found_);
  4703. break;
  4704. }
  4705. // string missing = 2;
  4706. case kMissing: {
  4707. total_size += 1 +
  4708. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  4709. this->missing());
  4710. break;
  4711. }
  4712. case RESULT_NOT_SET: {
  4713. break;
  4714. }
  4715. }
  4716. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  4717. SetCachedSize(cached_size);
  4718. return total_size;
  4719. }
  4720. void BatchGetDocumentsResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  4721. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  4722. GOOGLE_DCHECK_NE(&from, this);
  4723. const BatchGetDocumentsResponse* source =
  4724. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BatchGetDocumentsResponse>(
  4725. &from);
  4726. if (source == nullptr) {
  4727. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BatchGetDocumentsResponse)
  4728. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  4729. } else {
  4730. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BatchGetDocumentsResponse)
  4731. MergeFrom(*source);
  4732. }
  4733. }
  4734. void BatchGetDocumentsResponse::MergeFrom(const BatchGetDocumentsResponse& from) {
  4735. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  4736. GOOGLE_DCHECK_NE(&from, this);
  4737. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4738. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4739. (void) cached_has_bits;
  4740. if (from.transaction().size() > 0) {
  4741. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  4742. }
  4743. if (from.has_read_time()) {
  4744. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  4745. }
  4746. switch (from.result_case()) {
  4747. case kFound: {
  4748. mutable_found()->::google::firestore::v1::Document::MergeFrom(from.found());
  4749. break;
  4750. }
  4751. case kMissing: {
  4752. set_missing(from.missing());
  4753. break;
  4754. }
  4755. case RESULT_NOT_SET: {
  4756. break;
  4757. }
  4758. }
  4759. }
  4760. void BatchGetDocumentsResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  4761. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  4762. if (&from == this) return;
  4763. Clear();
  4764. MergeFrom(from);
  4765. }
  4766. void BatchGetDocumentsResponse::CopyFrom(const BatchGetDocumentsResponse& from) {
  4767. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  4768. if (&from == this) return;
  4769. Clear();
  4770. MergeFrom(from);
  4771. }
  4772. bool BatchGetDocumentsResponse::IsInitialized() const {
  4773. return true;
  4774. }
  4775. void BatchGetDocumentsResponse::InternalSwap(BatchGetDocumentsResponse* other) {
  4776. using std::swap;
  4777. _internal_metadata_.Swap(&other->_internal_metadata_);
  4778. transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  4779. GetArenaNoVirtual());
  4780. swap(read_time_, other->read_time_);
  4781. swap(result_, other->result_);
  4782. swap(_oneof_case_[0], other->_oneof_case_[0]);
  4783. }
  4784. ::PROTOBUF_NAMESPACE_ID::Metadata BatchGetDocumentsResponse::GetMetadata() const {
  4785. return GetMetadataStatic();
  4786. }
  4787. // ===================================================================
  4788. void BeginTransactionRequest::InitAsDefaultInstance() {
  4789. ::google::firestore::v1::_BeginTransactionRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
  4790. ::google::firestore::v1::TransactionOptions::internal_default_instance());
  4791. }
  4792. class BeginTransactionRequest::_Internal {
  4793. public:
  4794. static const ::google::firestore::v1::TransactionOptions& options(const BeginTransactionRequest* msg);
  4795. };
  4796. const ::google::firestore::v1::TransactionOptions&
  4797. BeginTransactionRequest::_Internal::options(const BeginTransactionRequest* msg) {
  4798. return *msg->options_;
  4799. }
  4800. void BeginTransactionRequest::clear_options() {
  4801. if (GetArenaNoVirtual() == nullptr && options_ != nullptr) {
  4802. delete options_;
  4803. }
  4804. options_ = nullptr;
  4805. }
  4806. BeginTransactionRequest::BeginTransactionRequest()
  4807. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  4808. SharedCtor();
  4809. // @@protoc_insertion_point(constructor:google.firestore.v1.BeginTransactionRequest)
  4810. }
  4811. BeginTransactionRequest::BeginTransactionRequest(const BeginTransactionRequest& from)
  4812. : ::PROTOBUF_NAMESPACE_ID::Message(),
  4813. _internal_metadata_(nullptr) {
  4814. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4815. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4816. if (!from.database().empty()) {
  4817. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  4818. }
  4819. if (from.has_options()) {
  4820. options_ = new ::google::firestore::v1::TransactionOptions(*from.options_);
  4821. } else {
  4822. options_ = nullptr;
  4823. }
  4824. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BeginTransactionRequest)
  4825. }
  4826. void BeginTransactionRequest::SharedCtor() {
  4827. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  4828. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4829. options_ = nullptr;
  4830. }
  4831. BeginTransactionRequest::~BeginTransactionRequest() {
  4832. // @@protoc_insertion_point(destructor:google.firestore.v1.BeginTransactionRequest)
  4833. SharedDtor();
  4834. }
  4835. void BeginTransactionRequest::SharedDtor() {
  4836. database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4837. if (this != internal_default_instance()) delete options_;
  4838. }
  4839. void BeginTransactionRequest::SetCachedSize(int size) const {
  4840. _cached_size_.Set(size);
  4841. }
  4842. const BeginTransactionRequest& BeginTransactionRequest::default_instance() {
  4843. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  4844. return *internal_default_instance();
  4845. }
  4846. void BeginTransactionRequest::Clear() {
  4847. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.BeginTransactionRequest)
  4848. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4849. // Prevent compiler warnings about cached_has_bits being unused
  4850. (void) cached_has_bits;
  4851. database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4852. if (GetArenaNoVirtual() == nullptr && options_ != nullptr) {
  4853. delete options_;
  4854. }
  4855. options_ = nullptr;
  4856. _internal_metadata_.Clear();
  4857. }
  4858. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  4859. const char* BeginTransactionRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  4860. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  4861. while (!ctx->Done(&ptr)) {
  4862. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  4863. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  4864. CHK_(ptr);
  4865. switch (tag >> 3) {
  4866. // string database = 1;
  4867. case 1:
  4868. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  4869. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_database(), ptr, ctx, "google.firestore.v1.BeginTransactionRequest.database");
  4870. CHK_(ptr);
  4871. } else goto handle_unusual;
  4872. continue;
  4873. // .google.firestore.v1.TransactionOptions options = 2;
  4874. case 2:
  4875. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  4876. ptr = ctx->ParseMessage(mutable_options(), ptr);
  4877. CHK_(ptr);
  4878. } else goto handle_unusual;
  4879. continue;
  4880. default: {
  4881. handle_unusual:
  4882. if ((tag & 7) == 4 || tag == 0) {
  4883. ctx->SetLastTag(tag);
  4884. goto success;
  4885. }
  4886. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  4887. CHK_(ptr != nullptr);
  4888. continue;
  4889. }
  4890. } // switch
  4891. } // while
  4892. success:
  4893. return ptr;
  4894. failure:
  4895. ptr = nullptr;
  4896. goto success;
  4897. #undef CHK_
  4898. }
  4899. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  4900. bool BeginTransactionRequest::MergePartialFromCodedStream(
  4901. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  4902. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  4903. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  4904. // @@protoc_insertion_point(parse_start:google.firestore.v1.BeginTransactionRequest)
  4905. for (;;) {
  4906. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4907. tag = p.first;
  4908. if (!p.second) goto handle_unusual;
  4909. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4910. // string database = 1;
  4911. case 1: {
  4912. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  4913. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  4914. input, this->mutable_database()));
  4915. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4916. this->database().data(), static_cast<int>(this->database().length()),
  4917. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  4918. "google.firestore.v1.BeginTransactionRequest.database"));
  4919. } else {
  4920. goto handle_unusual;
  4921. }
  4922. break;
  4923. }
  4924. // .google.firestore.v1.TransactionOptions options = 2;
  4925. case 2: {
  4926. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  4927. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  4928. input, mutable_options()));
  4929. } else {
  4930. goto handle_unusual;
  4931. }
  4932. break;
  4933. }
  4934. default: {
  4935. handle_unusual:
  4936. if (tag == 0) {
  4937. goto success;
  4938. }
  4939. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  4940. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4941. break;
  4942. }
  4943. }
  4944. }
  4945. success:
  4946. // @@protoc_insertion_point(parse_success:google.firestore.v1.BeginTransactionRequest)
  4947. return true;
  4948. failure:
  4949. // @@protoc_insertion_point(parse_failure:google.firestore.v1.BeginTransactionRequest)
  4950. return false;
  4951. #undef DO_
  4952. }
  4953. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  4954. void BeginTransactionRequest::SerializeWithCachedSizes(
  4955. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  4956. // @@protoc_insertion_point(serialize_start:google.firestore.v1.BeginTransactionRequest)
  4957. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4958. (void) cached_has_bits;
  4959. // string database = 1;
  4960. if (this->database().size() > 0) {
  4961. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4962. this->database().data(), static_cast<int>(this->database().length()),
  4963. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  4964. "google.firestore.v1.BeginTransactionRequest.database");
  4965. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  4966. 1, this->database(), output);
  4967. }
  4968. // .google.firestore.v1.TransactionOptions options = 2;
  4969. if (this->has_options()) {
  4970. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  4971. 2, _Internal::options(this), output);
  4972. }
  4973. if (_internal_metadata_.have_unknown_fields()) {
  4974. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  4975. _internal_metadata_.unknown_fields(), output);
  4976. }
  4977. // @@protoc_insertion_point(serialize_end:google.firestore.v1.BeginTransactionRequest)
  4978. }
  4979. ::PROTOBUF_NAMESPACE_ID::uint8* BeginTransactionRequest::InternalSerializeWithCachedSizesToArray(
  4980. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  4981. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BeginTransactionRequest)
  4982. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  4983. (void) cached_has_bits;
  4984. // string database = 1;
  4985. if (this->database().size() > 0) {
  4986. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  4987. this->database().data(), static_cast<int>(this->database().length()),
  4988. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  4989. "google.firestore.v1.BeginTransactionRequest.database");
  4990. target =
  4991. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  4992. 1, this->database(), target);
  4993. }
  4994. // .google.firestore.v1.TransactionOptions options = 2;
  4995. if (this->has_options()) {
  4996. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4997. InternalWriteMessageToArray(
  4998. 2, _Internal::options(this), target);
  4999. }
  5000. if (_internal_metadata_.have_unknown_fields()) {
  5001. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  5002. _internal_metadata_.unknown_fields(), target);
  5003. }
  5004. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BeginTransactionRequest)
  5005. return target;
  5006. }
  5007. size_t BeginTransactionRequest::ByteSizeLong() const {
  5008. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BeginTransactionRequest)
  5009. size_t total_size = 0;
  5010. if (_internal_metadata_.have_unknown_fields()) {
  5011. total_size +=
  5012. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  5013. _internal_metadata_.unknown_fields());
  5014. }
  5015. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5016. // Prevent compiler warnings about cached_has_bits being unused
  5017. (void) cached_has_bits;
  5018. // string database = 1;
  5019. if (this->database().size() > 0) {
  5020. total_size += 1 +
  5021. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  5022. this->database());
  5023. }
  5024. // .google.firestore.v1.TransactionOptions options = 2;
  5025. if (this->has_options()) {
  5026. total_size += 1 +
  5027. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  5028. *options_);
  5029. }
  5030. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  5031. SetCachedSize(cached_size);
  5032. return total_size;
  5033. }
  5034. void BeginTransactionRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5035. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BeginTransactionRequest)
  5036. GOOGLE_DCHECK_NE(&from, this);
  5037. const BeginTransactionRequest* source =
  5038. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BeginTransactionRequest>(
  5039. &from);
  5040. if (source == nullptr) {
  5041. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BeginTransactionRequest)
  5042. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  5043. } else {
  5044. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BeginTransactionRequest)
  5045. MergeFrom(*source);
  5046. }
  5047. }
  5048. void BeginTransactionRequest::MergeFrom(const BeginTransactionRequest& from) {
  5049. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BeginTransactionRequest)
  5050. GOOGLE_DCHECK_NE(&from, this);
  5051. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5052. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5053. (void) cached_has_bits;
  5054. if (from.database().size() > 0) {
  5055. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  5056. }
  5057. if (from.has_options()) {
  5058. mutable_options()->::google::firestore::v1::TransactionOptions::MergeFrom(from.options());
  5059. }
  5060. }
  5061. void BeginTransactionRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5062. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BeginTransactionRequest)
  5063. if (&from == this) return;
  5064. Clear();
  5065. MergeFrom(from);
  5066. }
  5067. void BeginTransactionRequest::CopyFrom(const BeginTransactionRequest& from) {
  5068. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BeginTransactionRequest)
  5069. if (&from == this) return;
  5070. Clear();
  5071. MergeFrom(from);
  5072. }
  5073. bool BeginTransactionRequest::IsInitialized() const {
  5074. return true;
  5075. }
  5076. void BeginTransactionRequest::InternalSwap(BeginTransactionRequest* other) {
  5077. using std::swap;
  5078. _internal_metadata_.Swap(&other->_internal_metadata_);
  5079. database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  5080. GetArenaNoVirtual());
  5081. swap(options_, other->options_);
  5082. }
  5083. ::PROTOBUF_NAMESPACE_ID::Metadata BeginTransactionRequest::GetMetadata() const {
  5084. return GetMetadataStatic();
  5085. }
  5086. // ===================================================================
  5087. void BeginTransactionResponse::InitAsDefaultInstance() {
  5088. }
  5089. class BeginTransactionResponse::_Internal {
  5090. public:
  5091. };
  5092. BeginTransactionResponse::BeginTransactionResponse()
  5093. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  5094. SharedCtor();
  5095. // @@protoc_insertion_point(constructor:google.firestore.v1.BeginTransactionResponse)
  5096. }
  5097. BeginTransactionResponse::BeginTransactionResponse(const BeginTransactionResponse& from)
  5098. : ::PROTOBUF_NAMESPACE_ID::Message(),
  5099. _internal_metadata_(nullptr) {
  5100. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5101. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5102. if (!from.transaction().empty()) {
  5103. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5104. }
  5105. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BeginTransactionResponse)
  5106. }
  5107. void BeginTransactionResponse::SharedCtor() {
  5108. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  5109. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5110. }
  5111. BeginTransactionResponse::~BeginTransactionResponse() {
  5112. // @@protoc_insertion_point(destructor:google.firestore.v1.BeginTransactionResponse)
  5113. SharedDtor();
  5114. }
  5115. void BeginTransactionResponse::SharedDtor() {
  5116. transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5117. }
  5118. void BeginTransactionResponse::SetCachedSize(int size) const {
  5119. _cached_size_.Set(size);
  5120. }
  5121. const BeginTransactionResponse& BeginTransactionResponse::default_instance() {
  5122. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  5123. return *internal_default_instance();
  5124. }
  5125. void BeginTransactionResponse::Clear() {
  5126. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.BeginTransactionResponse)
  5127. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5128. // Prevent compiler warnings about cached_has_bits being unused
  5129. (void) cached_has_bits;
  5130. transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5131. _internal_metadata_.Clear();
  5132. }
  5133. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5134. const char* BeginTransactionResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  5135. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  5136. while (!ctx->Done(&ptr)) {
  5137. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  5138. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  5139. CHK_(ptr);
  5140. switch (tag >> 3) {
  5141. // bytes transaction = 1;
  5142. case 1:
  5143. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  5144. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  5145. CHK_(ptr);
  5146. } else goto handle_unusual;
  5147. continue;
  5148. default: {
  5149. handle_unusual:
  5150. if ((tag & 7) == 4 || tag == 0) {
  5151. ctx->SetLastTag(tag);
  5152. goto success;
  5153. }
  5154. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  5155. CHK_(ptr != nullptr);
  5156. continue;
  5157. }
  5158. } // switch
  5159. } // while
  5160. success:
  5161. return ptr;
  5162. failure:
  5163. ptr = nullptr;
  5164. goto success;
  5165. #undef CHK_
  5166. }
  5167. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5168. bool BeginTransactionResponse::MergePartialFromCodedStream(
  5169. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  5170. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  5171. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  5172. // @@protoc_insertion_point(parse_start:google.firestore.v1.BeginTransactionResponse)
  5173. for (;;) {
  5174. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5175. tag = p.first;
  5176. if (!p.second) goto handle_unusual;
  5177. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5178. // bytes transaction = 1;
  5179. case 1: {
  5180. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  5181. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  5182. input, this->mutable_transaction()));
  5183. } else {
  5184. goto handle_unusual;
  5185. }
  5186. break;
  5187. }
  5188. default: {
  5189. handle_unusual:
  5190. if (tag == 0) {
  5191. goto success;
  5192. }
  5193. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  5194. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5195. break;
  5196. }
  5197. }
  5198. }
  5199. success:
  5200. // @@protoc_insertion_point(parse_success:google.firestore.v1.BeginTransactionResponse)
  5201. return true;
  5202. failure:
  5203. // @@protoc_insertion_point(parse_failure:google.firestore.v1.BeginTransactionResponse)
  5204. return false;
  5205. #undef DO_
  5206. }
  5207. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5208. void BeginTransactionResponse::SerializeWithCachedSizes(
  5209. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  5210. // @@protoc_insertion_point(serialize_start:google.firestore.v1.BeginTransactionResponse)
  5211. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5212. (void) cached_has_bits;
  5213. // bytes transaction = 1;
  5214. if (this->transaction().size() > 0) {
  5215. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  5216. 1, this->transaction(), output);
  5217. }
  5218. if (_internal_metadata_.have_unknown_fields()) {
  5219. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  5220. _internal_metadata_.unknown_fields(), output);
  5221. }
  5222. // @@protoc_insertion_point(serialize_end:google.firestore.v1.BeginTransactionResponse)
  5223. }
  5224. ::PROTOBUF_NAMESPACE_ID::uint8* BeginTransactionResponse::InternalSerializeWithCachedSizesToArray(
  5225. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  5226. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BeginTransactionResponse)
  5227. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5228. (void) cached_has_bits;
  5229. // bytes transaction = 1;
  5230. if (this->transaction().size() > 0) {
  5231. target =
  5232. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  5233. 1, this->transaction(), target);
  5234. }
  5235. if (_internal_metadata_.have_unknown_fields()) {
  5236. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  5237. _internal_metadata_.unknown_fields(), target);
  5238. }
  5239. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BeginTransactionResponse)
  5240. return target;
  5241. }
  5242. size_t BeginTransactionResponse::ByteSizeLong() const {
  5243. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BeginTransactionResponse)
  5244. size_t total_size = 0;
  5245. if (_internal_metadata_.have_unknown_fields()) {
  5246. total_size +=
  5247. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  5248. _internal_metadata_.unknown_fields());
  5249. }
  5250. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5251. // Prevent compiler warnings about cached_has_bits being unused
  5252. (void) cached_has_bits;
  5253. // bytes transaction = 1;
  5254. if (this->transaction().size() > 0) {
  5255. total_size += 1 +
  5256. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  5257. this->transaction());
  5258. }
  5259. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  5260. SetCachedSize(cached_size);
  5261. return total_size;
  5262. }
  5263. void BeginTransactionResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5264. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BeginTransactionResponse)
  5265. GOOGLE_DCHECK_NE(&from, this);
  5266. const BeginTransactionResponse* source =
  5267. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BeginTransactionResponse>(
  5268. &from);
  5269. if (source == nullptr) {
  5270. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BeginTransactionResponse)
  5271. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  5272. } else {
  5273. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BeginTransactionResponse)
  5274. MergeFrom(*source);
  5275. }
  5276. }
  5277. void BeginTransactionResponse::MergeFrom(const BeginTransactionResponse& from) {
  5278. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BeginTransactionResponse)
  5279. GOOGLE_DCHECK_NE(&from, this);
  5280. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5281. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5282. (void) cached_has_bits;
  5283. if (from.transaction().size() > 0) {
  5284. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5285. }
  5286. }
  5287. void BeginTransactionResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5288. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BeginTransactionResponse)
  5289. if (&from == this) return;
  5290. Clear();
  5291. MergeFrom(from);
  5292. }
  5293. void BeginTransactionResponse::CopyFrom(const BeginTransactionResponse& from) {
  5294. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BeginTransactionResponse)
  5295. if (&from == this) return;
  5296. Clear();
  5297. MergeFrom(from);
  5298. }
  5299. bool BeginTransactionResponse::IsInitialized() const {
  5300. return true;
  5301. }
  5302. void BeginTransactionResponse::InternalSwap(BeginTransactionResponse* other) {
  5303. using std::swap;
  5304. _internal_metadata_.Swap(&other->_internal_metadata_);
  5305. transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  5306. GetArenaNoVirtual());
  5307. }
  5308. ::PROTOBUF_NAMESPACE_ID::Metadata BeginTransactionResponse::GetMetadata() const {
  5309. return GetMetadataStatic();
  5310. }
  5311. // ===================================================================
  5312. void CommitRequest::InitAsDefaultInstance() {
  5313. }
  5314. class CommitRequest::_Internal {
  5315. public:
  5316. };
  5317. void CommitRequest::clear_writes() {
  5318. writes_.Clear();
  5319. }
  5320. CommitRequest::CommitRequest()
  5321. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  5322. SharedCtor();
  5323. // @@protoc_insertion_point(constructor:google.firestore.v1.CommitRequest)
  5324. }
  5325. CommitRequest::CommitRequest(const CommitRequest& from)
  5326. : ::PROTOBUF_NAMESPACE_ID::Message(),
  5327. _internal_metadata_(nullptr),
  5328. writes_(from.writes_) {
  5329. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5330. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5331. if (!from.database().empty()) {
  5332. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  5333. }
  5334. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5335. if (!from.transaction().empty()) {
  5336. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5337. }
  5338. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CommitRequest)
  5339. }
  5340. void CommitRequest::SharedCtor() {
  5341. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  5342. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5343. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5344. }
  5345. CommitRequest::~CommitRequest() {
  5346. // @@protoc_insertion_point(destructor:google.firestore.v1.CommitRequest)
  5347. SharedDtor();
  5348. }
  5349. void CommitRequest::SharedDtor() {
  5350. database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5351. transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5352. }
  5353. void CommitRequest::SetCachedSize(int size) const {
  5354. _cached_size_.Set(size);
  5355. }
  5356. const CommitRequest& CommitRequest::default_instance() {
  5357. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  5358. return *internal_default_instance();
  5359. }
  5360. void CommitRequest::Clear() {
  5361. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.CommitRequest)
  5362. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5363. // Prevent compiler warnings about cached_has_bits being unused
  5364. (void) cached_has_bits;
  5365. writes_.Clear();
  5366. database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5367. transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5368. _internal_metadata_.Clear();
  5369. }
  5370. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5371. const char* CommitRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  5372. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  5373. while (!ctx->Done(&ptr)) {
  5374. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  5375. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  5376. CHK_(ptr);
  5377. switch (tag >> 3) {
  5378. // string database = 1;
  5379. case 1:
  5380. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  5381. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_database(), ptr, ctx, "google.firestore.v1.CommitRequest.database");
  5382. CHK_(ptr);
  5383. } else goto handle_unusual;
  5384. continue;
  5385. // repeated .google.firestore.v1.Write writes = 2;
  5386. case 2:
  5387. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  5388. ptr -= 1;
  5389. do {
  5390. ptr += 1;
  5391. ptr = ctx->ParseMessage(add_writes(), ptr);
  5392. CHK_(ptr);
  5393. if (!ctx->DataAvailable(ptr)) break;
  5394. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
  5395. } else goto handle_unusual;
  5396. continue;
  5397. // bytes transaction = 3;
  5398. case 3:
  5399. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  5400. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  5401. CHK_(ptr);
  5402. } else goto handle_unusual;
  5403. continue;
  5404. default: {
  5405. handle_unusual:
  5406. if ((tag & 7) == 4 || tag == 0) {
  5407. ctx->SetLastTag(tag);
  5408. goto success;
  5409. }
  5410. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  5411. CHK_(ptr != nullptr);
  5412. continue;
  5413. }
  5414. } // switch
  5415. } // while
  5416. success:
  5417. return ptr;
  5418. failure:
  5419. ptr = nullptr;
  5420. goto success;
  5421. #undef CHK_
  5422. }
  5423. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5424. bool CommitRequest::MergePartialFromCodedStream(
  5425. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  5426. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  5427. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  5428. // @@protoc_insertion_point(parse_start:google.firestore.v1.CommitRequest)
  5429. for (;;) {
  5430. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5431. tag = p.first;
  5432. if (!p.second) goto handle_unusual;
  5433. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5434. // string database = 1;
  5435. case 1: {
  5436. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  5437. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  5438. input, this->mutable_database()));
  5439. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  5440. this->database().data(), static_cast<int>(this->database().length()),
  5441. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  5442. "google.firestore.v1.CommitRequest.database"));
  5443. } else {
  5444. goto handle_unusual;
  5445. }
  5446. break;
  5447. }
  5448. // repeated .google.firestore.v1.Write writes = 2;
  5449. case 2: {
  5450. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  5451. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  5452. input, add_writes()));
  5453. } else {
  5454. goto handle_unusual;
  5455. }
  5456. break;
  5457. }
  5458. // bytes transaction = 3;
  5459. case 3: {
  5460. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  5461. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  5462. input, this->mutable_transaction()));
  5463. } else {
  5464. goto handle_unusual;
  5465. }
  5466. break;
  5467. }
  5468. default: {
  5469. handle_unusual:
  5470. if (tag == 0) {
  5471. goto success;
  5472. }
  5473. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  5474. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5475. break;
  5476. }
  5477. }
  5478. }
  5479. success:
  5480. // @@protoc_insertion_point(parse_success:google.firestore.v1.CommitRequest)
  5481. return true;
  5482. failure:
  5483. // @@protoc_insertion_point(parse_failure:google.firestore.v1.CommitRequest)
  5484. return false;
  5485. #undef DO_
  5486. }
  5487. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5488. void CommitRequest::SerializeWithCachedSizes(
  5489. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  5490. // @@protoc_insertion_point(serialize_start:google.firestore.v1.CommitRequest)
  5491. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5492. (void) cached_has_bits;
  5493. // string database = 1;
  5494. if (this->database().size() > 0) {
  5495. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  5496. this->database().data(), static_cast<int>(this->database().length()),
  5497. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  5498. "google.firestore.v1.CommitRequest.database");
  5499. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  5500. 1, this->database(), output);
  5501. }
  5502. // repeated .google.firestore.v1.Write writes = 2;
  5503. for (unsigned int i = 0,
  5504. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  5505. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  5506. 2,
  5507. this->writes(static_cast<int>(i)),
  5508. output);
  5509. }
  5510. // bytes transaction = 3;
  5511. if (this->transaction().size() > 0) {
  5512. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  5513. 3, this->transaction(), output);
  5514. }
  5515. if (_internal_metadata_.have_unknown_fields()) {
  5516. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  5517. _internal_metadata_.unknown_fields(), output);
  5518. }
  5519. // @@protoc_insertion_point(serialize_end:google.firestore.v1.CommitRequest)
  5520. }
  5521. ::PROTOBUF_NAMESPACE_ID::uint8* CommitRequest::InternalSerializeWithCachedSizesToArray(
  5522. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  5523. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CommitRequest)
  5524. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5525. (void) cached_has_bits;
  5526. // string database = 1;
  5527. if (this->database().size() > 0) {
  5528. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  5529. this->database().data(), static_cast<int>(this->database().length()),
  5530. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  5531. "google.firestore.v1.CommitRequest.database");
  5532. target =
  5533. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  5534. 1, this->database(), target);
  5535. }
  5536. // repeated .google.firestore.v1.Write writes = 2;
  5537. for (unsigned int i = 0,
  5538. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  5539. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  5540. InternalWriteMessageToArray(
  5541. 2, this->writes(static_cast<int>(i)), target);
  5542. }
  5543. // bytes transaction = 3;
  5544. if (this->transaction().size() > 0) {
  5545. target =
  5546. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  5547. 3, this->transaction(), target);
  5548. }
  5549. if (_internal_metadata_.have_unknown_fields()) {
  5550. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  5551. _internal_metadata_.unknown_fields(), target);
  5552. }
  5553. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CommitRequest)
  5554. return target;
  5555. }
  5556. size_t CommitRequest::ByteSizeLong() const {
  5557. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CommitRequest)
  5558. size_t total_size = 0;
  5559. if (_internal_metadata_.have_unknown_fields()) {
  5560. total_size +=
  5561. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  5562. _internal_metadata_.unknown_fields());
  5563. }
  5564. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5565. // Prevent compiler warnings about cached_has_bits being unused
  5566. (void) cached_has_bits;
  5567. // repeated .google.firestore.v1.Write writes = 2;
  5568. {
  5569. unsigned int count = static_cast<unsigned int>(this->writes_size());
  5570. total_size += 1UL * count;
  5571. for (unsigned int i = 0; i < count; i++) {
  5572. total_size +=
  5573. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  5574. this->writes(static_cast<int>(i)));
  5575. }
  5576. }
  5577. // string database = 1;
  5578. if (this->database().size() > 0) {
  5579. total_size += 1 +
  5580. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  5581. this->database());
  5582. }
  5583. // bytes transaction = 3;
  5584. if (this->transaction().size() > 0) {
  5585. total_size += 1 +
  5586. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  5587. this->transaction());
  5588. }
  5589. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  5590. SetCachedSize(cached_size);
  5591. return total_size;
  5592. }
  5593. void CommitRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5594. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CommitRequest)
  5595. GOOGLE_DCHECK_NE(&from, this);
  5596. const CommitRequest* source =
  5597. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CommitRequest>(
  5598. &from);
  5599. if (source == nullptr) {
  5600. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CommitRequest)
  5601. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  5602. } else {
  5603. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CommitRequest)
  5604. MergeFrom(*source);
  5605. }
  5606. }
  5607. void CommitRequest::MergeFrom(const CommitRequest& from) {
  5608. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CommitRequest)
  5609. GOOGLE_DCHECK_NE(&from, this);
  5610. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5611. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5612. (void) cached_has_bits;
  5613. writes_.MergeFrom(from.writes_);
  5614. if (from.database().size() > 0) {
  5615. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  5616. }
  5617. if (from.transaction().size() > 0) {
  5618. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5619. }
  5620. }
  5621. void CommitRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5622. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CommitRequest)
  5623. if (&from == this) return;
  5624. Clear();
  5625. MergeFrom(from);
  5626. }
  5627. void CommitRequest::CopyFrom(const CommitRequest& from) {
  5628. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CommitRequest)
  5629. if (&from == this) return;
  5630. Clear();
  5631. MergeFrom(from);
  5632. }
  5633. bool CommitRequest::IsInitialized() const {
  5634. return true;
  5635. }
  5636. void CommitRequest::InternalSwap(CommitRequest* other) {
  5637. using std::swap;
  5638. _internal_metadata_.Swap(&other->_internal_metadata_);
  5639. CastToBase(&writes_)->InternalSwap(CastToBase(&other->writes_));
  5640. database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  5641. GetArenaNoVirtual());
  5642. transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  5643. GetArenaNoVirtual());
  5644. }
  5645. ::PROTOBUF_NAMESPACE_ID::Metadata CommitRequest::GetMetadata() const {
  5646. return GetMetadataStatic();
  5647. }
  5648. // ===================================================================
  5649. void CommitResponse::InitAsDefaultInstance() {
  5650. ::google::firestore::v1::_CommitResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  5651. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  5652. }
  5653. class CommitResponse::_Internal {
  5654. public:
  5655. static const PROTOBUF_NAMESPACE_ID::Timestamp& commit_time(const CommitResponse* msg);
  5656. };
  5657. const PROTOBUF_NAMESPACE_ID::Timestamp&
  5658. CommitResponse::_Internal::commit_time(const CommitResponse* msg) {
  5659. return *msg->commit_time_;
  5660. }
  5661. void CommitResponse::clear_write_results() {
  5662. write_results_.Clear();
  5663. }
  5664. void CommitResponse::clear_commit_time() {
  5665. if (GetArenaNoVirtual() == nullptr && commit_time_ != nullptr) {
  5666. delete commit_time_;
  5667. }
  5668. commit_time_ = nullptr;
  5669. }
  5670. CommitResponse::CommitResponse()
  5671. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  5672. SharedCtor();
  5673. // @@protoc_insertion_point(constructor:google.firestore.v1.CommitResponse)
  5674. }
  5675. CommitResponse::CommitResponse(const CommitResponse& from)
  5676. : ::PROTOBUF_NAMESPACE_ID::Message(),
  5677. _internal_metadata_(nullptr),
  5678. write_results_(from.write_results_) {
  5679. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5680. if (from.has_commit_time()) {
  5681. commit_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.commit_time_);
  5682. } else {
  5683. commit_time_ = nullptr;
  5684. }
  5685. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CommitResponse)
  5686. }
  5687. void CommitResponse::SharedCtor() {
  5688. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  5689. commit_time_ = nullptr;
  5690. }
  5691. CommitResponse::~CommitResponse() {
  5692. // @@protoc_insertion_point(destructor:google.firestore.v1.CommitResponse)
  5693. SharedDtor();
  5694. }
  5695. void CommitResponse::SharedDtor() {
  5696. if (this != internal_default_instance()) delete commit_time_;
  5697. }
  5698. void CommitResponse::SetCachedSize(int size) const {
  5699. _cached_size_.Set(size);
  5700. }
  5701. const CommitResponse& CommitResponse::default_instance() {
  5702. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  5703. return *internal_default_instance();
  5704. }
  5705. void CommitResponse::Clear() {
  5706. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.CommitResponse)
  5707. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5708. // Prevent compiler warnings about cached_has_bits being unused
  5709. (void) cached_has_bits;
  5710. write_results_.Clear();
  5711. if (GetArenaNoVirtual() == nullptr && commit_time_ != nullptr) {
  5712. delete commit_time_;
  5713. }
  5714. commit_time_ = nullptr;
  5715. _internal_metadata_.Clear();
  5716. }
  5717. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5718. const char* CommitResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  5719. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  5720. while (!ctx->Done(&ptr)) {
  5721. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  5722. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  5723. CHK_(ptr);
  5724. switch (tag >> 3) {
  5725. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5726. case 1:
  5727. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  5728. ptr -= 1;
  5729. do {
  5730. ptr += 1;
  5731. ptr = ctx->ParseMessage(add_write_results(), ptr);
  5732. CHK_(ptr);
  5733. if (!ctx->DataAvailable(ptr)) break;
  5734. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
  5735. } else goto handle_unusual;
  5736. continue;
  5737. // .google.protobuf.Timestamp commit_time = 2;
  5738. case 2:
  5739. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  5740. ptr = ctx->ParseMessage(mutable_commit_time(), ptr);
  5741. CHK_(ptr);
  5742. } else goto handle_unusual;
  5743. continue;
  5744. default: {
  5745. handle_unusual:
  5746. if ((tag & 7) == 4 || tag == 0) {
  5747. ctx->SetLastTag(tag);
  5748. goto success;
  5749. }
  5750. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  5751. CHK_(ptr != nullptr);
  5752. continue;
  5753. }
  5754. } // switch
  5755. } // while
  5756. success:
  5757. return ptr;
  5758. failure:
  5759. ptr = nullptr;
  5760. goto success;
  5761. #undef CHK_
  5762. }
  5763. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5764. bool CommitResponse::MergePartialFromCodedStream(
  5765. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  5766. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  5767. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  5768. // @@protoc_insertion_point(parse_start:google.firestore.v1.CommitResponse)
  5769. for (;;) {
  5770. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5771. tag = p.first;
  5772. if (!p.second) goto handle_unusual;
  5773. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5774. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5775. case 1: {
  5776. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  5777. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  5778. input, add_write_results()));
  5779. } else {
  5780. goto handle_unusual;
  5781. }
  5782. break;
  5783. }
  5784. // .google.protobuf.Timestamp commit_time = 2;
  5785. case 2: {
  5786. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  5787. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  5788. input, mutable_commit_time()));
  5789. } else {
  5790. goto handle_unusual;
  5791. }
  5792. break;
  5793. }
  5794. default: {
  5795. handle_unusual:
  5796. if (tag == 0) {
  5797. goto success;
  5798. }
  5799. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  5800. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5801. break;
  5802. }
  5803. }
  5804. }
  5805. success:
  5806. // @@protoc_insertion_point(parse_success:google.firestore.v1.CommitResponse)
  5807. return true;
  5808. failure:
  5809. // @@protoc_insertion_point(parse_failure:google.firestore.v1.CommitResponse)
  5810. return false;
  5811. #undef DO_
  5812. }
  5813. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5814. void CommitResponse::SerializeWithCachedSizes(
  5815. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  5816. // @@protoc_insertion_point(serialize_start:google.firestore.v1.CommitResponse)
  5817. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5818. (void) cached_has_bits;
  5819. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5820. for (unsigned int i = 0,
  5821. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  5822. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  5823. 1,
  5824. this->write_results(static_cast<int>(i)),
  5825. output);
  5826. }
  5827. // .google.protobuf.Timestamp commit_time = 2;
  5828. if (this->has_commit_time()) {
  5829. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  5830. 2, _Internal::commit_time(this), output);
  5831. }
  5832. if (_internal_metadata_.have_unknown_fields()) {
  5833. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  5834. _internal_metadata_.unknown_fields(), output);
  5835. }
  5836. // @@protoc_insertion_point(serialize_end:google.firestore.v1.CommitResponse)
  5837. }
  5838. ::PROTOBUF_NAMESPACE_ID::uint8* CommitResponse::InternalSerializeWithCachedSizesToArray(
  5839. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  5840. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CommitResponse)
  5841. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5842. (void) cached_has_bits;
  5843. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5844. for (unsigned int i = 0,
  5845. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  5846. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  5847. InternalWriteMessageToArray(
  5848. 1, this->write_results(static_cast<int>(i)), target);
  5849. }
  5850. // .google.protobuf.Timestamp commit_time = 2;
  5851. if (this->has_commit_time()) {
  5852. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  5853. InternalWriteMessageToArray(
  5854. 2, _Internal::commit_time(this), target);
  5855. }
  5856. if (_internal_metadata_.have_unknown_fields()) {
  5857. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  5858. _internal_metadata_.unknown_fields(), target);
  5859. }
  5860. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CommitResponse)
  5861. return target;
  5862. }
  5863. size_t CommitResponse::ByteSizeLong() const {
  5864. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CommitResponse)
  5865. size_t total_size = 0;
  5866. if (_internal_metadata_.have_unknown_fields()) {
  5867. total_size +=
  5868. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  5869. _internal_metadata_.unknown_fields());
  5870. }
  5871. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5872. // Prevent compiler warnings about cached_has_bits being unused
  5873. (void) cached_has_bits;
  5874. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5875. {
  5876. unsigned int count = static_cast<unsigned int>(this->write_results_size());
  5877. total_size += 1UL * count;
  5878. for (unsigned int i = 0; i < count; i++) {
  5879. total_size +=
  5880. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  5881. this->write_results(static_cast<int>(i)));
  5882. }
  5883. }
  5884. // .google.protobuf.Timestamp commit_time = 2;
  5885. if (this->has_commit_time()) {
  5886. total_size += 1 +
  5887. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  5888. *commit_time_);
  5889. }
  5890. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  5891. SetCachedSize(cached_size);
  5892. return total_size;
  5893. }
  5894. void CommitResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5895. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CommitResponse)
  5896. GOOGLE_DCHECK_NE(&from, this);
  5897. const CommitResponse* source =
  5898. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CommitResponse>(
  5899. &from);
  5900. if (source == nullptr) {
  5901. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CommitResponse)
  5902. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  5903. } else {
  5904. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CommitResponse)
  5905. MergeFrom(*source);
  5906. }
  5907. }
  5908. void CommitResponse::MergeFrom(const CommitResponse& from) {
  5909. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CommitResponse)
  5910. GOOGLE_DCHECK_NE(&from, this);
  5911. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5912. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5913. (void) cached_has_bits;
  5914. write_results_.MergeFrom(from.write_results_);
  5915. if (from.has_commit_time()) {
  5916. mutable_commit_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.commit_time());
  5917. }
  5918. }
  5919. void CommitResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5920. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CommitResponse)
  5921. if (&from == this) return;
  5922. Clear();
  5923. MergeFrom(from);
  5924. }
  5925. void CommitResponse::CopyFrom(const CommitResponse& from) {
  5926. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CommitResponse)
  5927. if (&from == this) return;
  5928. Clear();
  5929. MergeFrom(from);
  5930. }
  5931. bool CommitResponse::IsInitialized() const {
  5932. return true;
  5933. }
  5934. void CommitResponse::InternalSwap(CommitResponse* other) {
  5935. using std::swap;
  5936. _internal_metadata_.Swap(&other->_internal_metadata_);
  5937. CastToBase(&write_results_)->InternalSwap(CastToBase(&other->write_results_));
  5938. swap(commit_time_, other->commit_time_);
  5939. }
  5940. ::PROTOBUF_NAMESPACE_ID::Metadata CommitResponse::GetMetadata() const {
  5941. return GetMetadataStatic();
  5942. }
  5943. // ===================================================================
  5944. void RollbackRequest::InitAsDefaultInstance() {
  5945. }
  5946. class RollbackRequest::_Internal {
  5947. public:
  5948. };
  5949. RollbackRequest::RollbackRequest()
  5950. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  5951. SharedCtor();
  5952. // @@protoc_insertion_point(constructor:google.firestore.v1.RollbackRequest)
  5953. }
  5954. RollbackRequest::RollbackRequest(const RollbackRequest& from)
  5955. : ::PROTOBUF_NAMESPACE_ID::Message(),
  5956. _internal_metadata_(nullptr) {
  5957. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5958. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5959. if (!from.database().empty()) {
  5960. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  5961. }
  5962. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5963. if (!from.transaction().empty()) {
  5964. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5965. }
  5966. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RollbackRequest)
  5967. }
  5968. void RollbackRequest::SharedCtor() {
  5969. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  5970. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5971. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5972. }
  5973. RollbackRequest::~RollbackRequest() {
  5974. // @@protoc_insertion_point(destructor:google.firestore.v1.RollbackRequest)
  5975. SharedDtor();
  5976. }
  5977. void RollbackRequest::SharedDtor() {
  5978. database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5979. transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5980. }
  5981. void RollbackRequest::SetCachedSize(int size) const {
  5982. _cached_size_.Set(size);
  5983. }
  5984. const RollbackRequest& RollbackRequest::default_instance() {
  5985. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  5986. return *internal_default_instance();
  5987. }
  5988. void RollbackRequest::Clear() {
  5989. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.RollbackRequest)
  5990. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  5991. // Prevent compiler warnings about cached_has_bits being unused
  5992. (void) cached_has_bits;
  5993. database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5994. transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5995. _internal_metadata_.Clear();
  5996. }
  5997. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  5998. const char* RollbackRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  5999. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  6000. while (!ctx->Done(&ptr)) {
  6001. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  6002. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  6003. CHK_(ptr);
  6004. switch (tag >> 3) {
  6005. // string database = 1;
  6006. case 1:
  6007. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  6008. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_database(), ptr, ctx, "google.firestore.v1.RollbackRequest.database");
  6009. CHK_(ptr);
  6010. } else goto handle_unusual;
  6011. continue;
  6012. // bytes transaction = 2;
  6013. case 2:
  6014. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  6015. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  6016. CHK_(ptr);
  6017. } else goto handle_unusual;
  6018. continue;
  6019. default: {
  6020. handle_unusual:
  6021. if ((tag & 7) == 4 || tag == 0) {
  6022. ctx->SetLastTag(tag);
  6023. goto success;
  6024. }
  6025. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  6026. CHK_(ptr != nullptr);
  6027. continue;
  6028. }
  6029. } // switch
  6030. } // while
  6031. success:
  6032. return ptr;
  6033. failure:
  6034. ptr = nullptr;
  6035. goto success;
  6036. #undef CHK_
  6037. }
  6038. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  6039. bool RollbackRequest::MergePartialFromCodedStream(
  6040. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  6041. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  6042. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  6043. // @@protoc_insertion_point(parse_start:google.firestore.v1.RollbackRequest)
  6044. for (;;) {
  6045. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6046. tag = p.first;
  6047. if (!p.second) goto handle_unusual;
  6048. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6049. // string database = 1;
  6050. case 1: {
  6051. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  6052. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  6053. input, this->mutable_database()));
  6054. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  6055. this->database().data(), static_cast<int>(this->database().length()),
  6056. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  6057. "google.firestore.v1.RollbackRequest.database"));
  6058. } else {
  6059. goto handle_unusual;
  6060. }
  6061. break;
  6062. }
  6063. // bytes transaction = 2;
  6064. case 2: {
  6065. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  6066. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  6067. input, this->mutable_transaction()));
  6068. } else {
  6069. goto handle_unusual;
  6070. }
  6071. break;
  6072. }
  6073. default: {
  6074. handle_unusual:
  6075. if (tag == 0) {
  6076. goto success;
  6077. }
  6078. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  6079. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6080. break;
  6081. }
  6082. }
  6083. }
  6084. success:
  6085. // @@protoc_insertion_point(parse_success:google.firestore.v1.RollbackRequest)
  6086. return true;
  6087. failure:
  6088. // @@protoc_insertion_point(parse_failure:google.firestore.v1.RollbackRequest)
  6089. return false;
  6090. #undef DO_
  6091. }
  6092. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  6093. void RollbackRequest::SerializeWithCachedSizes(
  6094. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  6095. // @@protoc_insertion_point(serialize_start:google.firestore.v1.RollbackRequest)
  6096. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6097. (void) cached_has_bits;
  6098. // string database = 1;
  6099. if (this->database().size() > 0) {
  6100. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  6101. this->database().data(), static_cast<int>(this->database().length()),
  6102. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  6103. "google.firestore.v1.RollbackRequest.database");
  6104. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  6105. 1, this->database(), output);
  6106. }
  6107. // bytes transaction = 2;
  6108. if (this->transaction().size() > 0) {
  6109. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  6110. 2, this->transaction(), output);
  6111. }
  6112. if (_internal_metadata_.have_unknown_fields()) {
  6113. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  6114. _internal_metadata_.unknown_fields(), output);
  6115. }
  6116. // @@protoc_insertion_point(serialize_end:google.firestore.v1.RollbackRequest)
  6117. }
  6118. ::PROTOBUF_NAMESPACE_ID::uint8* RollbackRequest::InternalSerializeWithCachedSizesToArray(
  6119. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  6120. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RollbackRequest)
  6121. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6122. (void) cached_has_bits;
  6123. // string database = 1;
  6124. if (this->database().size() > 0) {
  6125. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  6126. this->database().data(), static_cast<int>(this->database().length()),
  6127. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  6128. "google.firestore.v1.RollbackRequest.database");
  6129. target =
  6130. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  6131. 1, this->database(), target);
  6132. }
  6133. // bytes transaction = 2;
  6134. if (this->transaction().size() > 0) {
  6135. target =
  6136. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  6137. 2, this->transaction(), target);
  6138. }
  6139. if (_internal_metadata_.have_unknown_fields()) {
  6140. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  6141. _internal_metadata_.unknown_fields(), target);
  6142. }
  6143. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RollbackRequest)
  6144. return target;
  6145. }
  6146. size_t RollbackRequest::ByteSizeLong() const {
  6147. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RollbackRequest)
  6148. size_t total_size = 0;
  6149. if (_internal_metadata_.have_unknown_fields()) {
  6150. total_size +=
  6151. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  6152. _internal_metadata_.unknown_fields());
  6153. }
  6154. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6155. // Prevent compiler warnings about cached_has_bits being unused
  6156. (void) cached_has_bits;
  6157. // string database = 1;
  6158. if (this->database().size() > 0) {
  6159. total_size += 1 +
  6160. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  6161. this->database());
  6162. }
  6163. // bytes transaction = 2;
  6164. if (this->transaction().size() > 0) {
  6165. total_size += 1 +
  6166. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  6167. this->transaction());
  6168. }
  6169. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  6170. SetCachedSize(cached_size);
  6171. return total_size;
  6172. }
  6173. void RollbackRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  6174. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RollbackRequest)
  6175. GOOGLE_DCHECK_NE(&from, this);
  6176. const RollbackRequest* source =
  6177. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RollbackRequest>(
  6178. &from);
  6179. if (source == nullptr) {
  6180. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RollbackRequest)
  6181. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  6182. } else {
  6183. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RollbackRequest)
  6184. MergeFrom(*source);
  6185. }
  6186. }
  6187. void RollbackRequest::MergeFrom(const RollbackRequest& from) {
  6188. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RollbackRequest)
  6189. GOOGLE_DCHECK_NE(&from, this);
  6190. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6191. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6192. (void) cached_has_bits;
  6193. if (from.database().size() > 0) {
  6194. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  6195. }
  6196. if (from.transaction().size() > 0) {
  6197. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  6198. }
  6199. }
  6200. void RollbackRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  6201. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RollbackRequest)
  6202. if (&from == this) return;
  6203. Clear();
  6204. MergeFrom(from);
  6205. }
  6206. void RollbackRequest::CopyFrom(const RollbackRequest& from) {
  6207. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RollbackRequest)
  6208. if (&from == this) return;
  6209. Clear();
  6210. MergeFrom(from);
  6211. }
  6212. bool RollbackRequest::IsInitialized() const {
  6213. return true;
  6214. }
  6215. void RollbackRequest::InternalSwap(RollbackRequest* other) {
  6216. using std::swap;
  6217. _internal_metadata_.Swap(&other->_internal_metadata_);
  6218. database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  6219. GetArenaNoVirtual());
  6220. transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  6221. GetArenaNoVirtual());
  6222. }
  6223. ::PROTOBUF_NAMESPACE_ID::Metadata RollbackRequest::GetMetadata() const {
  6224. return GetMetadataStatic();
  6225. }
  6226. // ===================================================================
  6227. void RunQueryRequest::InitAsDefaultInstance() {
  6228. ::google::firestore::v1::_RunQueryRequest_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>(
  6229. ::google::firestore::v1::StructuredQuery::internal_default_instance());
  6230. ::google::firestore::v1::_RunQueryRequest_default_instance_.transaction_.UnsafeSetDefault(
  6231. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6232. ::google::firestore::v1::_RunQueryRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
  6233. ::google::firestore::v1::TransactionOptions::internal_default_instance());
  6234. ::google::firestore::v1::_RunQueryRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  6235. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  6236. }
  6237. class RunQueryRequest::_Internal {
  6238. public:
  6239. static const ::google::firestore::v1::StructuredQuery& structured_query(const RunQueryRequest* msg);
  6240. static const ::google::firestore::v1::TransactionOptions& new_transaction(const RunQueryRequest* msg);
  6241. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const RunQueryRequest* msg);
  6242. };
  6243. const ::google::firestore::v1::StructuredQuery&
  6244. RunQueryRequest::_Internal::structured_query(const RunQueryRequest* msg) {
  6245. return *msg->query_type_.structured_query_;
  6246. }
  6247. const ::google::firestore::v1::TransactionOptions&
  6248. RunQueryRequest::_Internal::new_transaction(const RunQueryRequest* msg) {
  6249. return *msg->consistency_selector_.new_transaction_;
  6250. }
  6251. const PROTOBUF_NAMESPACE_ID::Timestamp&
  6252. RunQueryRequest::_Internal::read_time(const RunQueryRequest* msg) {
  6253. return *msg->consistency_selector_.read_time_;
  6254. }
  6255. void RunQueryRequest::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) {
  6256. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  6257. clear_query_type();
  6258. if (structured_query) {
  6259. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  6260. if (message_arena != submessage_arena) {
  6261. structured_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  6262. message_arena, structured_query, submessage_arena);
  6263. }
  6264. set_has_structured_query();
  6265. query_type_.structured_query_ = structured_query;
  6266. }
  6267. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.structured_query)
  6268. }
  6269. void RunQueryRequest::clear_structured_query() {
  6270. if (has_structured_query()) {
  6271. delete query_type_.structured_query_;
  6272. clear_has_query_type();
  6273. }
  6274. }
  6275. void RunQueryRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) {
  6276. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  6277. clear_consistency_selector();
  6278. if (new_transaction) {
  6279. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  6280. if (message_arena != submessage_arena) {
  6281. new_transaction = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  6282. message_arena, new_transaction, submessage_arena);
  6283. }
  6284. set_has_new_transaction();
  6285. consistency_selector_.new_transaction_ = new_transaction;
  6286. }
  6287. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.new_transaction)
  6288. }
  6289. void RunQueryRequest::clear_new_transaction() {
  6290. if (has_new_transaction()) {
  6291. delete consistency_selector_.new_transaction_;
  6292. clear_has_consistency_selector();
  6293. }
  6294. }
  6295. void RunQueryRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  6296. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  6297. clear_consistency_selector();
  6298. if (read_time) {
  6299. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  6300. reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
  6301. if (message_arena != submessage_arena) {
  6302. read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  6303. message_arena, read_time, submessage_arena);
  6304. }
  6305. set_has_read_time();
  6306. consistency_selector_.read_time_ = read_time;
  6307. }
  6308. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.read_time)
  6309. }
  6310. void RunQueryRequest::clear_read_time() {
  6311. if (has_read_time()) {
  6312. delete consistency_selector_.read_time_;
  6313. clear_has_consistency_selector();
  6314. }
  6315. }
  6316. RunQueryRequest::RunQueryRequest()
  6317. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  6318. SharedCtor();
  6319. // @@protoc_insertion_point(constructor:google.firestore.v1.RunQueryRequest)
  6320. }
  6321. RunQueryRequest::RunQueryRequest(const RunQueryRequest& from)
  6322. : ::PROTOBUF_NAMESPACE_ID::Message(),
  6323. _internal_metadata_(nullptr) {
  6324. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6325. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6326. if (!from.parent().empty()) {
  6327. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  6328. }
  6329. clear_has_query_type();
  6330. switch (from.query_type_case()) {
  6331. case kStructuredQuery: {
  6332. mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query());
  6333. break;
  6334. }
  6335. case QUERY_TYPE_NOT_SET: {
  6336. break;
  6337. }
  6338. }
  6339. clear_has_consistency_selector();
  6340. switch (from.consistency_selector_case()) {
  6341. case kTransaction: {
  6342. set_transaction(from.transaction());
  6343. break;
  6344. }
  6345. case kNewTransaction: {
  6346. mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction());
  6347. break;
  6348. }
  6349. case kReadTime: {
  6350. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  6351. break;
  6352. }
  6353. case CONSISTENCY_SELECTOR_NOT_SET: {
  6354. break;
  6355. }
  6356. }
  6357. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunQueryRequest)
  6358. }
  6359. void RunQueryRequest::SharedCtor() {
  6360. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  6361. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6362. clear_has_query_type();
  6363. clear_has_consistency_selector();
  6364. }
  6365. RunQueryRequest::~RunQueryRequest() {
  6366. // @@protoc_insertion_point(destructor:google.firestore.v1.RunQueryRequest)
  6367. SharedDtor();
  6368. }
  6369. void RunQueryRequest::SharedDtor() {
  6370. parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6371. if (has_query_type()) {
  6372. clear_query_type();
  6373. }
  6374. if (has_consistency_selector()) {
  6375. clear_consistency_selector();
  6376. }
  6377. }
  6378. void RunQueryRequest::SetCachedSize(int size) const {
  6379. _cached_size_.Set(size);
  6380. }
  6381. const RunQueryRequest& RunQueryRequest::default_instance() {
  6382. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  6383. return *internal_default_instance();
  6384. }
  6385. void RunQueryRequest::clear_query_type() {
  6386. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunQueryRequest)
  6387. switch (query_type_case()) {
  6388. case kStructuredQuery: {
  6389. delete query_type_.structured_query_;
  6390. break;
  6391. }
  6392. case QUERY_TYPE_NOT_SET: {
  6393. break;
  6394. }
  6395. }
  6396. _oneof_case_[0] = QUERY_TYPE_NOT_SET;
  6397. }
  6398. void RunQueryRequest::clear_consistency_selector() {
  6399. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunQueryRequest)
  6400. switch (consistency_selector_case()) {
  6401. case kTransaction: {
  6402. consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6403. break;
  6404. }
  6405. case kNewTransaction: {
  6406. delete consistency_selector_.new_transaction_;
  6407. break;
  6408. }
  6409. case kReadTime: {
  6410. delete consistency_selector_.read_time_;
  6411. break;
  6412. }
  6413. case CONSISTENCY_SELECTOR_NOT_SET: {
  6414. break;
  6415. }
  6416. }
  6417. _oneof_case_[1] = CONSISTENCY_SELECTOR_NOT_SET;
  6418. }
  6419. void RunQueryRequest::Clear() {
  6420. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunQueryRequest)
  6421. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6422. // Prevent compiler warnings about cached_has_bits being unused
  6423. (void) cached_has_bits;
  6424. parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6425. clear_query_type();
  6426. clear_consistency_selector();
  6427. _internal_metadata_.Clear();
  6428. }
  6429. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  6430. const char* RunQueryRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  6431. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  6432. while (!ctx->Done(&ptr)) {
  6433. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  6434. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  6435. CHK_(ptr);
  6436. switch (tag >> 3) {
  6437. // string parent = 1;
  6438. case 1:
  6439. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  6440. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_parent(), ptr, ctx, "google.firestore.v1.RunQueryRequest.parent");
  6441. CHK_(ptr);
  6442. } else goto handle_unusual;
  6443. continue;
  6444. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6445. case 2:
  6446. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  6447. ptr = ctx->ParseMessage(mutable_structured_query(), ptr);
  6448. CHK_(ptr);
  6449. } else goto handle_unusual;
  6450. continue;
  6451. // bytes transaction = 5;
  6452. case 5:
  6453. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
  6454. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  6455. CHK_(ptr);
  6456. } else goto handle_unusual;
  6457. continue;
  6458. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6459. case 6:
  6460. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
  6461. ptr = ctx->ParseMessage(mutable_new_transaction(), ptr);
  6462. CHK_(ptr);
  6463. } else goto handle_unusual;
  6464. continue;
  6465. // .google.protobuf.Timestamp read_time = 7;
  6466. case 7:
  6467. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
  6468. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  6469. CHK_(ptr);
  6470. } else goto handle_unusual;
  6471. continue;
  6472. default: {
  6473. handle_unusual:
  6474. if ((tag & 7) == 4 || tag == 0) {
  6475. ctx->SetLastTag(tag);
  6476. goto success;
  6477. }
  6478. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  6479. CHK_(ptr != nullptr);
  6480. continue;
  6481. }
  6482. } // switch
  6483. } // while
  6484. success:
  6485. return ptr;
  6486. failure:
  6487. ptr = nullptr;
  6488. goto success;
  6489. #undef CHK_
  6490. }
  6491. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  6492. bool RunQueryRequest::MergePartialFromCodedStream(
  6493. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  6494. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  6495. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  6496. // @@protoc_insertion_point(parse_start:google.firestore.v1.RunQueryRequest)
  6497. for (;;) {
  6498. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6499. tag = p.first;
  6500. if (!p.second) goto handle_unusual;
  6501. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6502. // string parent = 1;
  6503. case 1: {
  6504. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  6505. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  6506. input, this->mutable_parent()));
  6507. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  6508. this->parent().data(), static_cast<int>(this->parent().length()),
  6509. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  6510. "google.firestore.v1.RunQueryRequest.parent"));
  6511. } else {
  6512. goto handle_unusual;
  6513. }
  6514. break;
  6515. }
  6516. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6517. case 2: {
  6518. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  6519. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  6520. input, mutable_structured_query()));
  6521. } else {
  6522. goto handle_unusual;
  6523. }
  6524. break;
  6525. }
  6526. // bytes transaction = 5;
  6527. case 5: {
  6528. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
  6529. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  6530. input, this->mutable_transaction()));
  6531. } else {
  6532. goto handle_unusual;
  6533. }
  6534. break;
  6535. }
  6536. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6537. case 6: {
  6538. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
  6539. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  6540. input, mutable_new_transaction()));
  6541. } else {
  6542. goto handle_unusual;
  6543. }
  6544. break;
  6545. }
  6546. // .google.protobuf.Timestamp read_time = 7;
  6547. case 7: {
  6548. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
  6549. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  6550. input, mutable_read_time()));
  6551. } else {
  6552. goto handle_unusual;
  6553. }
  6554. break;
  6555. }
  6556. default: {
  6557. handle_unusual:
  6558. if (tag == 0) {
  6559. goto success;
  6560. }
  6561. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  6562. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6563. break;
  6564. }
  6565. }
  6566. }
  6567. success:
  6568. // @@protoc_insertion_point(parse_success:google.firestore.v1.RunQueryRequest)
  6569. return true;
  6570. failure:
  6571. // @@protoc_insertion_point(parse_failure:google.firestore.v1.RunQueryRequest)
  6572. return false;
  6573. #undef DO_
  6574. }
  6575. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  6576. void RunQueryRequest::SerializeWithCachedSizes(
  6577. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  6578. // @@protoc_insertion_point(serialize_start:google.firestore.v1.RunQueryRequest)
  6579. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6580. (void) cached_has_bits;
  6581. // string parent = 1;
  6582. if (this->parent().size() > 0) {
  6583. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  6584. this->parent().data(), static_cast<int>(this->parent().length()),
  6585. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  6586. "google.firestore.v1.RunQueryRequest.parent");
  6587. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  6588. 1, this->parent(), output);
  6589. }
  6590. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6591. if (has_structured_query()) {
  6592. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  6593. 2, _Internal::structured_query(this), output);
  6594. }
  6595. // bytes transaction = 5;
  6596. if (has_transaction()) {
  6597. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  6598. 5, this->transaction(), output);
  6599. }
  6600. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6601. if (has_new_transaction()) {
  6602. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  6603. 6, _Internal::new_transaction(this), output);
  6604. }
  6605. // .google.protobuf.Timestamp read_time = 7;
  6606. if (has_read_time()) {
  6607. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  6608. 7, _Internal::read_time(this), output);
  6609. }
  6610. if (_internal_metadata_.have_unknown_fields()) {
  6611. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  6612. _internal_metadata_.unknown_fields(), output);
  6613. }
  6614. // @@protoc_insertion_point(serialize_end:google.firestore.v1.RunQueryRequest)
  6615. }
  6616. ::PROTOBUF_NAMESPACE_ID::uint8* RunQueryRequest::InternalSerializeWithCachedSizesToArray(
  6617. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  6618. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunQueryRequest)
  6619. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6620. (void) cached_has_bits;
  6621. // string parent = 1;
  6622. if (this->parent().size() > 0) {
  6623. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  6624. this->parent().data(), static_cast<int>(this->parent().length()),
  6625. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  6626. "google.firestore.v1.RunQueryRequest.parent");
  6627. target =
  6628. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  6629. 1, this->parent(), target);
  6630. }
  6631. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6632. if (has_structured_query()) {
  6633. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  6634. InternalWriteMessageToArray(
  6635. 2, _Internal::structured_query(this), target);
  6636. }
  6637. // bytes transaction = 5;
  6638. if (has_transaction()) {
  6639. target =
  6640. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  6641. 5, this->transaction(), target);
  6642. }
  6643. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6644. if (has_new_transaction()) {
  6645. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  6646. InternalWriteMessageToArray(
  6647. 6, _Internal::new_transaction(this), target);
  6648. }
  6649. // .google.protobuf.Timestamp read_time = 7;
  6650. if (has_read_time()) {
  6651. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  6652. InternalWriteMessageToArray(
  6653. 7, _Internal::read_time(this), target);
  6654. }
  6655. if (_internal_metadata_.have_unknown_fields()) {
  6656. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  6657. _internal_metadata_.unknown_fields(), target);
  6658. }
  6659. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunQueryRequest)
  6660. return target;
  6661. }
  6662. size_t RunQueryRequest::ByteSizeLong() const {
  6663. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunQueryRequest)
  6664. size_t total_size = 0;
  6665. if (_internal_metadata_.have_unknown_fields()) {
  6666. total_size +=
  6667. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  6668. _internal_metadata_.unknown_fields());
  6669. }
  6670. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6671. // Prevent compiler warnings about cached_has_bits being unused
  6672. (void) cached_has_bits;
  6673. // string parent = 1;
  6674. if (this->parent().size() > 0) {
  6675. total_size += 1 +
  6676. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  6677. this->parent());
  6678. }
  6679. switch (query_type_case()) {
  6680. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6681. case kStructuredQuery: {
  6682. total_size += 1 +
  6683. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  6684. *query_type_.structured_query_);
  6685. break;
  6686. }
  6687. case QUERY_TYPE_NOT_SET: {
  6688. break;
  6689. }
  6690. }
  6691. switch (consistency_selector_case()) {
  6692. // bytes transaction = 5;
  6693. case kTransaction: {
  6694. total_size += 1 +
  6695. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  6696. this->transaction());
  6697. break;
  6698. }
  6699. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6700. case kNewTransaction: {
  6701. total_size += 1 +
  6702. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  6703. *consistency_selector_.new_transaction_);
  6704. break;
  6705. }
  6706. // .google.protobuf.Timestamp read_time = 7;
  6707. case kReadTime: {
  6708. total_size += 1 +
  6709. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  6710. *consistency_selector_.read_time_);
  6711. break;
  6712. }
  6713. case CONSISTENCY_SELECTOR_NOT_SET: {
  6714. break;
  6715. }
  6716. }
  6717. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  6718. SetCachedSize(cached_size);
  6719. return total_size;
  6720. }
  6721. void RunQueryRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  6722. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunQueryRequest)
  6723. GOOGLE_DCHECK_NE(&from, this);
  6724. const RunQueryRequest* source =
  6725. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RunQueryRequest>(
  6726. &from);
  6727. if (source == nullptr) {
  6728. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunQueryRequest)
  6729. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  6730. } else {
  6731. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunQueryRequest)
  6732. MergeFrom(*source);
  6733. }
  6734. }
  6735. void RunQueryRequest::MergeFrom(const RunQueryRequest& from) {
  6736. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunQueryRequest)
  6737. GOOGLE_DCHECK_NE(&from, this);
  6738. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6739. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6740. (void) cached_has_bits;
  6741. if (from.parent().size() > 0) {
  6742. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  6743. }
  6744. switch (from.query_type_case()) {
  6745. case kStructuredQuery: {
  6746. mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query());
  6747. break;
  6748. }
  6749. case QUERY_TYPE_NOT_SET: {
  6750. break;
  6751. }
  6752. }
  6753. switch (from.consistency_selector_case()) {
  6754. case kTransaction: {
  6755. set_transaction(from.transaction());
  6756. break;
  6757. }
  6758. case kNewTransaction: {
  6759. mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction());
  6760. break;
  6761. }
  6762. case kReadTime: {
  6763. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  6764. break;
  6765. }
  6766. case CONSISTENCY_SELECTOR_NOT_SET: {
  6767. break;
  6768. }
  6769. }
  6770. }
  6771. void RunQueryRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  6772. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunQueryRequest)
  6773. if (&from == this) return;
  6774. Clear();
  6775. MergeFrom(from);
  6776. }
  6777. void RunQueryRequest::CopyFrom(const RunQueryRequest& from) {
  6778. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunQueryRequest)
  6779. if (&from == this) return;
  6780. Clear();
  6781. MergeFrom(from);
  6782. }
  6783. bool RunQueryRequest::IsInitialized() const {
  6784. return true;
  6785. }
  6786. void RunQueryRequest::InternalSwap(RunQueryRequest* other) {
  6787. using std::swap;
  6788. _internal_metadata_.Swap(&other->_internal_metadata_);
  6789. parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  6790. GetArenaNoVirtual());
  6791. swap(query_type_, other->query_type_);
  6792. swap(consistency_selector_, other->consistency_selector_);
  6793. swap(_oneof_case_[0], other->_oneof_case_[0]);
  6794. swap(_oneof_case_[1], other->_oneof_case_[1]);
  6795. }
  6796. ::PROTOBUF_NAMESPACE_ID::Metadata RunQueryRequest::GetMetadata() const {
  6797. return GetMetadataStatic();
  6798. }
  6799. // ===================================================================
  6800. void RunQueryResponse::InitAsDefaultInstance() {
  6801. ::google::firestore::v1::_RunQueryResponse_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
  6802. ::google::firestore::v1::Document::internal_default_instance());
  6803. ::google::firestore::v1::_RunQueryResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  6804. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  6805. }
  6806. class RunQueryResponse::_Internal {
  6807. public:
  6808. static const ::google::firestore::v1::Document& document(const RunQueryResponse* msg);
  6809. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const RunQueryResponse* msg);
  6810. };
  6811. const ::google::firestore::v1::Document&
  6812. RunQueryResponse::_Internal::document(const RunQueryResponse* msg) {
  6813. return *msg->document_;
  6814. }
  6815. const PROTOBUF_NAMESPACE_ID::Timestamp&
  6816. RunQueryResponse::_Internal::read_time(const RunQueryResponse* msg) {
  6817. return *msg->read_time_;
  6818. }
  6819. void RunQueryResponse::clear_document() {
  6820. if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
  6821. delete document_;
  6822. }
  6823. document_ = nullptr;
  6824. }
  6825. void RunQueryResponse::clear_read_time() {
  6826. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  6827. delete read_time_;
  6828. }
  6829. read_time_ = nullptr;
  6830. }
  6831. RunQueryResponse::RunQueryResponse()
  6832. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  6833. SharedCtor();
  6834. // @@protoc_insertion_point(constructor:google.firestore.v1.RunQueryResponse)
  6835. }
  6836. RunQueryResponse::RunQueryResponse(const RunQueryResponse& from)
  6837. : ::PROTOBUF_NAMESPACE_ID::Message(),
  6838. _internal_metadata_(nullptr) {
  6839. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6840. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6841. if (!from.transaction().empty()) {
  6842. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  6843. }
  6844. if (from.has_document()) {
  6845. document_ = new ::google::firestore::v1::Document(*from.document_);
  6846. } else {
  6847. document_ = nullptr;
  6848. }
  6849. if (from.has_read_time()) {
  6850. read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  6851. } else {
  6852. read_time_ = nullptr;
  6853. }
  6854. skipped_results_ = from.skipped_results_;
  6855. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunQueryResponse)
  6856. }
  6857. void RunQueryResponse::SharedCtor() {
  6858. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  6859. transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6860. ::memset(&document_, 0, static_cast<size_t>(
  6861. reinterpret_cast<char*>(&skipped_results_) -
  6862. reinterpret_cast<char*>(&document_)) + sizeof(skipped_results_));
  6863. }
  6864. RunQueryResponse::~RunQueryResponse() {
  6865. // @@protoc_insertion_point(destructor:google.firestore.v1.RunQueryResponse)
  6866. SharedDtor();
  6867. }
  6868. void RunQueryResponse::SharedDtor() {
  6869. transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6870. if (this != internal_default_instance()) delete document_;
  6871. if (this != internal_default_instance()) delete read_time_;
  6872. }
  6873. void RunQueryResponse::SetCachedSize(int size) const {
  6874. _cached_size_.Set(size);
  6875. }
  6876. const RunQueryResponse& RunQueryResponse::default_instance() {
  6877. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  6878. return *internal_default_instance();
  6879. }
  6880. void RunQueryResponse::Clear() {
  6881. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunQueryResponse)
  6882. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  6883. // Prevent compiler warnings about cached_has_bits being unused
  6884. (void) cached_has_bits;
  6885. transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  6886. if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
  6887. delete document_;
  6888. }
  6889. document_ = nullptr;
  6890. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  6891. delete read_time_;
  6892. }
  6893. read_time_ = nullptr;
  6894. skipped_results_ = 0;
  6895. _internal_metadata_.Clear();
  6896. }
  6897. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  6898. const char* RunQueryResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  6899. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  6900. while (!ctx->Done(&ptr)) {
  6901. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  6902. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  6903. CHK_(ptr);
  6904. switch (tag >> 3) {
  6905. // .google.firestore.v1.Document document = 1;
  6906. case 1:
  6907. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  6908. ptr = ctx->ParseMessage(mutable_document(), ptr);
  6909. CHK_(ptr);
  6910. } else goto handle_unusual;
  6911. continue;
  6912. // bytes transaction = 2;
  6913. case 2:
  6914. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  6915. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_transaction(), ptr, ctx);
  6916. CHK_(ptr);
  6917. } else goto handle_unusual;
  6918. continue;
  6919. // .google.protobuf.Timestamp read_time = 3;
  6920. case 3:
  6921. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  6922. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  6923. CHK_(ptr);
  6924. } else goto handle_unusual;
  6925. continue;
  6926. // int32 skipped_results = 4;
  6927. case 4:
  6928. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  6929. skipped_results_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  6930. CHK_(ptr);
  6931. } else goto handle_unusual;
  6932. continue;
  6933. default: {
  6934. handle_unusual:
  6935. if ((tag & 7) == 4 || tag == 0) {
  6936. ctx->SetLastTag(tag);
  6937. goto success;
  6938. }
  6939. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  6940. CHK_(ptr != nullptr);
  6941. continue;
  6942. }
  6943. } // switch
  6944. } // while
  6945. success:
  6946. return ptr;
  6947. failure:
  6948. ptr = nullptr;
  6949. goto success;
  6950. #undef CHK_
  6951. }
  6952. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  6953. bool RunQueryResponse::MergePartialFromCodedStream(
  6954. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  6955. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  6956. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  6957. // @@protoc_insertion_point(parse_start:google.firestore.v1.RunQueryResponse)
  6958. for (;;) {
  6959. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6960. tag = p.first;
  6961. if (!p.second) goto handle_unusual;
  6962. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6963. // .google.firestore.v1.Document document = 1;
  6964. case 1: {
  6965. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  6966. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  6967. input, mutable_document()));
  6968. } else {
  6969. goto handle_unusual;
  6970. }
  6971. break;
  6972. }
  6973. // bytes transaction = 2;
  6974. case 2: {
  6975. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  6976. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  6977. input, this->mutable_transaction()));
  6978. } else {
  6979. goto handle_unusual;
  6980. }
  6981. break;
  6982. }
  6983. // .google.protobuf.Timestamp read_time = 3;
  6984. case 3: {
  6985. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  6986. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  6987. input, mutable_read_time()));
  6988. } else {
  6989. goto handle_unusual;
  6990. }
  6991. break;
  6992. }
  6993. // int32 skipped_results = 4;
  6994. case 4: {
  6995. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
  6996. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  6997. ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
  6998. input, &skipped_results_)));
  6999. } else {
  7000. goto handle_unusual;
  7001. }
  7002. break;
  7003. }
  7004. default: {
  7005. handle_unusual:
  7006. if (tag == 0) {
  7007. goto success;
  7008. }
  7009. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  7010. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7011. break;
  7012. }
  7013. }
  7014. }
  7015. success:
  7016. // @@protoc_insertion_point(parse_success:google.firestore.v1.RunQueryResponse)
  7017. return true;
  7018. failure:
  7019. // @@protoc_insertion_point(parse_failure:google.firestore.v1.RunQueryResponse)
  7020. return false;
  7021. #undef DO_
  7022. }
  7023. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  7024. void RunQueryResponse::SerializeWithCachedSizes(
  7025. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  7026. // @@protoc_insertion_point(serialize_start:google.firestore.v1.RunQueryResponse)
  7027. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7028. (void) cached_has_bits;
  7029. // .google.firestore.v1.Document document = 1;
  7030. if (this->has_document()) {
  7031. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  7032. 1, _Internal::document(this), output);
  7033. }
  7034. // bytes transaction = 2;
  7035. if (this->transaction().size() > 0) {
  7036. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  7037. 2, this->transaction(), output);
  7038. }
  7039. // .google.protobuf.Timestamp read_time = 3;
  7040. if (this->has_read_time()) {
  7041. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  7042. 3, _Internal::read_time(this), output);
  7043. }
  7044. // int32 skipped_results = 4;
  7045. if (this->skipped_results() != 0) {
  7046. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->skipped_results(), output);
  7047. }
  7048. if (_internal_metadata_.have_unknown_fields()) {
  7049. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  7050. _internal_metadata_.unknown_fields(), output);
  7051. }
  7052. // @@protoc_insertion_point(serialize_end:google.firestore.v1.RunQueryResponse)
  7053. }
  7054. ::PROTOBUF_NAMESPACE_ID::uint8* RunQueryResponse::InternalSerializeWithCachedSizesToArray(
  7055. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  7056. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunQueryResponse)
  7057. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7058. (void) cached_has_bits;
  7059. // .google.firestore.v1.Document document = 1;
  7060. if (this->has_document()) {
  7061. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  7062. InternalWriteMessageToArray(
  7063. 1, _Internal::document(this), target);
  7064. }
  7065. // bytes transaction = 2;
  7066. if (this->transaction().size() > 0) {
  7067. target =
  7068. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  7069. 2, this->transaction(), target);
  7070. }
  7071. // .google.protobuf.Timestamp read_time = 3;
  7072. if (this->has_read_time()) {
  7073. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  7074. InternalWriteMessageToArray(
  7075. 3, _Internal::read_time(this), target);
  7076. }
  7077. // int32 skipped_results = 4;
  7078. if (this->skipped_results() != 0) {
  7079. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->skipped_results(), target);
  7080. }
  7081. if (_internal_metadata_.have_unknown_fields()) {
  7082. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  7083. _internal_metadata_.unknown_fields(), target);
  7084. }
  7085. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunQueryResponse)
  7086. return target;
  7087. }
  7088. size_t RunQueryResponse::ByteSizeLong() const {
  7089. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunQueryResponse)
  7090. size_t total_size = 0;
  7091. if (_internal_metadata_.have_unknown_fields()) {
  7092. total_size +=
  7093. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  7094. _internal_metadata_.unknown_fields());
  7095. }
  7096. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7097. // Prevent compiler warnings about cached_has_bits being unused
  7098. (void) cached_has_bits;
  7099. // bytes transaction = 2;
  7100. if (this->transaction().size() > 0) {
  7101. total_size += 1 +
  7102. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  7103. this->transaction());
  7104. }
  7105. // .google.firestore.v1.Document document = 1;
  7106. if (this->has_document()) {
  7107. total_size += 1 +
  7108. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  7109. *document_);
  7110. }
  7111. // .google.protobuf.Timestamp read_time = 3;
  7112. if (this->has_read_time()) {
  7113. total_size += 1 +
  7114. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  7115. *read_time_);
  7116. }
  7117. // int32 skipped_results = 4;
  7118. if (this->skipped_results() != 0) {
  7119. total_size += 1 +
  7120. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  7121. this->skipped_results());
  7122. }
  7123. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  7124. SetCachedSize(cached_size);
  7125. return total_size;
  7126. }
  7127. void RunQueryResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  7128. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunQueryResponse)
  7129. GOOGLE_DCHECK_NE(&from, this);
  7130. const RunQueryResponse* source =
  7131. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RunQueryResponse>(
  7132. &from);
  7133. if (source == nullptr) {
  7134. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunQueryResponse)
  7135. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  7136. } else {
  7137. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunQueryResponse)
  7138. MergeFrom(*source);
  7139. }
  7140. }
  7141. void RunQueryResponse::MergeFrom(const RunQueryResponse& from) {
  7142. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunQueryResponse)
  7143. GOOGLE_DCHECK_NE(&from, this);
  7144. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7145. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7146. (void) cached_has_bits;
  7147. if (from.transaction().size() > 0) {
  7148. transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  7149. }
  7150. if (from.has_document()) {
  7151. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  7152. }
  7153. if (from.has_read_time()) {
  7154. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  7155. }
  7156. if (from.skipped_results() != 0) {
  7157. set_skipped_results(from.skipped_results());
  7158. }
  7159. }
  7160. void RunQueryResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  7161. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunQueryResponse)
  7162. if (&from == this) return;
  7163. Clear();
  7164. MergeFrom(from);
  7165. }
  7166. void RunQueryResponse::CopyFrom(const RunQueryResponse& from) {
  7167. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunQueryResponse)
  7168. if (&from == this) return;
  7169. Clear();
  7170. MergeFrom(from);
  7171. }
  7172. bool RunQueryResponse::IsInitialized() const {
  7173. return true;
  7174. }
  7175. void RunQueryResponse::InternalSwap(RunQueryResponse* other) {
  7176. using std::swap;
  7177. _internal_metadata_.Swap(&other->_internal_metadata_);
  7178. transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  7179. GetArenaNoVirtual());
  7180. swap(document_, other->document_);
  7181. swap(read_time_, other->read_time_);
  7182. swap(skipped_results_, other->skipped_results_);
  7183. }
  7184. ::PROTOBUF_NAMESPACE_ID::Metadata RunQueryResponse::GetMetadata() const {
  7185. return GetMetadataStatic();
  7186. }
  7187. // ===================================================================
  7188. WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse() {}
  7189. WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  7190. : SuperType(arena) {}
  7191. void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(const WriteRequest_LabelsEntry_DoNotUse& other) {
  7192. MergeFromInternal(other);
  7193. }
  7194. ::PROTOBUF_NAMESPACE_ID::Metadata WriteRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  7195. return GetMetadataStatic();
  7196. }
  7197. void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(
  7198. const ::PROTOBUF_NAMESPACE_ID::Message& other) {
  7199. ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other);
  7200. }
  7201. // ===================================================================
  7202. void WriteRequest::InitAsDefaultInstance() {
  7203. }
  7204. class WriteRequest::_Internal {
  7205. public:
  7206. };
  7207. void WriteRequest::clear_writes() {
  7208. writes_.Clear();
  7209. }
  7210. WriteRequest::WriteRequest()
  7211. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  7212. SharedCtor();
  7213. // @@protoc_insertion_point(constructor:google.firestore.v1.WriteRequest)
  7214. }
  7215. WriteRequest::WriteRequest(const WriteRequest& from)
  7216. : ::PROTOBUF_NAMESPACE_ID::Message(),
  7217. _internal_metadata_(nullptr),
  7218. writes_(from.writes_) {
  7219. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7220. labels_.MergeFrom(from.labels_);
  7221. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7222. if (!from.database().empty()) {
  7223. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  7224. }
  7225. stream_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7226. if (!from.stream_id().empty()) {
  7227. stream_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7228. }
  7229. stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7230. if (!from.stream_token().empty()) {
  7231. stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7232. }
  7233. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteRequest)
  7234. }
  7235. void WriteRequest::SharedCtor() {
  7236. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  7237. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7238. stream_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7239. stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7240. }
  7241. WriteRequest::~WriteRequest() {
  7242. // @@protoc_insertion_point(destructor:google.firestore.v1.WriteRequest)
  7243. SharedDtor();
  7244. }
  7245. void WriteRequest::SharedDtor() {
  7246. database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7247. stream_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7248. stream_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7249. }
  7250. void WriteRequest::SetCachedSize(int size) const {
  7251. _cached_size_.Set(size);
  7252. }
  7253. const WriteRequest& WriteRequest::default_instance() {
  7254. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  7255. return *internal_default_instance();
  7256. }
  7257. void WriteRequest::Clear() {
  7258. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteRequest)
  7259. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7260. // Prevent compiler warnings about cached_has_bits being unused
  7261. (void) cached_has_bits;
  7262. writes_.Clear();
  7263. labels_.Clear();
  7264. database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7265. stream_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7266. stream_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7267. _internal_metadata_.Clear();
  7268. }
  7269. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  7270. const char* WriteRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  7271. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  7272. while (!ctx->Done(&ptr)) {
  7273. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  7274. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  7275. CHK_(ptr);
  7276. switch (tag >> 3) {
  7277. // string database = 1;
  7278. case 1:
  7279. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  7280. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_database(), ptr, ctx, "google.firestore.v1.WriteRequest.database");
  7281. CHK_(ptr);
  7282. } else goto handle_unusual;
  7283. continue;
  7284. // string stream_id = 2;
  7285. case 2:
  7286. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  7287. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_stream_id(), ptr, ctx, "google.firestore.v1.WriteRequest.stream_id");
  7288. CHK_(ptr);
  7289. } else goto handle_unusual;
  7290. continue;
  7291. // repeated .google.firestore.v1.Write writes = 3;
  7292. case 3:
  7293. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  7294. ptr -= 1;
  7295. do {
  7296. ptr += 1;
  7297. ptr = ctx->ParseMessage(add_writes(), ptr);
  7298. CHK_(ptr);
  7299. if (!ctx->DataAvailable(ptr)) break;
  7300. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
  7301. } else goto handle_unusual;
  7302. continue;
  7303. // bytes stream_token = 4;
  7304. case 4:
  7305. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  7306. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_stream_token(), ptr, ctx);
  7307. CHK_(ptr);
  7308. } else goto handle_unusual;
  7309. continue;
  7310. // map<string, string> labels = 5;
  7311. case 5:
  7312. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
  7313. ptr -= 1;
  7314. do {
  7315. ptr += 1;
  7316. ptr = ctx->ParseMessage(&labels_, ptr);
  7317. CHK_(ptr);
  7318. if (!ctx->DataAvailable(ptr)) break;
  7319. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42);
  7320. } else goto handle_unusual;
  7321. continue;
  7322. default: {
  7323. handle_unusual:
  7324. if ((tag & 7) == 4 || tag == 0) {
  7325. ctx->SetLastTag(tag);
  7326. goto success;
  7327. }
  7328. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  7329. CHK_(ptr != nullptr);
  7330. continue;
  7331. }
  7332. } // switch
  7333. } // while
  7334. success:
  7335. return ptr;
  7336. failure:
  7337. ptr = nullptr;
  7338. goto success;
  7339. #undef CHK_
  7340. }
  7341. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  7342. bool WriteRequest::MergePartialFromCodedStream(
  7343. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  7344. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  7345. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  7346. // @@protoc_insertion_point(parse_start:google.firestore.v1.WriteRequest)
  7347. for (;;) {
  7348. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7349. tag = p.first;
  7350. if (!p.second) goto handle_unusual;
  7351. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7352. // string database = 1;
  7353. case 1: {
  7354. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  7355. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  7356. input, this->mutable_database()));
  7357. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7358. this->database().data(), static_cast<int>(this->database().length()),
  7359. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  7360. "google.firestore.v1.WriteRequest.database"));
  7361. } else {
  7362. goto handle_unusual;
  7363. }
  7364. break;
  7365. }
  7366. // string stream_id = 2;
  7367. case 2: {
  7368. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  7369. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  7370. input, this->mutable_stream_id()));
  7371. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7372. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7373. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  7374. "google.firestore.v1.WriteRequest.stream_id"));
  7375. } else {
  7376. goto handle_unusual;
  7377. }
  7378. break;
  7379. }
  7380. // repeated .google.firestore.v1.Write writes = 3;
  7381. case 3: {
  7382. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  7383. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  7384. input, add_writes()));
  7385. } else {
  7386. goto handle_unusual;
  7387. }
  7388. break;
  7389. }
  7390. // bytes stream_token = 4;
  7391. case 4: {
  7392. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  7393. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  7394. input, this->mutable_stream_token()));
  7395. } else {
  7396. goto handle_unusual;
  7397. }
  7398. break;
  7399. }
  7400. // map<string, string> labels = 5;
  7401. case 5: {
  7402. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
  7403. WriteRequest_LabelsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField<
  7404. WriteRequest_LabelsEntry_DoNotUse,
  7405. std::string, std::string,
  7406. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
  7407. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
  7408. 0 >,
  7409. ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string > > parser(&labels_);
  7410. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual(
  7411. input, &parser));
  7412. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7413. parser.key().data(), static_cast<int>(parser.key().length()),
  7414. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  7415. "google.firestore.v1.WriteRequest.LabelsEntry.key"));
  7416. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7417. parser.value().data(), static_cast<int>(parser.value().length()),
  7418. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  7419. "google.firestore.v1.WriteRequest.LabelsEntry.value"));
  7420. } else {
  7421. goto handle_unusual;
  7422. }
  7423. break;
  7424. }
  7425. default: {
  7426. handle_unusual:
  7427. if (tag == 0) {
  7428. goto success;
  7429. }
  7430. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  7431. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7432. break;
  7433. }
  7434. }
  7435. }
  7436. success:
  7437. // @@protoc_insertion_point(parse_success:google.firestore.v1.WriteRequest)
  7438. return true;
  7439. failure:
  7440. // @@protoc_insertion_point(parse_failure:google.firestore.v1.WriteRequest)
  7441. return false;
  7442. #undef DO_
  7443. }
  7444. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  7445. void WriteRequest::SerializeWithCachedSizes(
  7446. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  7447. // @@protoc_insertion_point(serialize_start:google.firestore.v1.WriteRequest)
  7448. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7449. (void) cached_has_bits;
  7450. // string database = 1;
  7451. if (this->database().size() > 0) {
  7452. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7453. this->database().data(), static_cast<int>(this->database().length()),
  7454. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7455. "google.firestore.v1.WriteRequest.database");
  7456. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  7457. 1, this->database(), output);
  7458. }
  7459. // string stream_id = 2;
  7460. if (this->stream_id().size() > 0) {
  7461. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7462. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7463. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7464. "google.firestore.v1.WriteRequest.stream_id");
  7465. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  7466. 2, this->stream_id(), output);
  7467. }
  7468. // repeated .google.firestore.v1.Write writes = 3;
  7469. for (unsigned int i = 0,
  7470. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  7471. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  7472. 3,
  7473. this->writes(static_cast<int>(i)),
  7474. output);
  7475. }
  7476. // bytes stream_token = 4;
  7477. if (this->stream_token().size() > 0) {
  7478. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  7479. 4, this->stream_token(), output);
  7480. }
  7481. // map<string, string> labels = 5;
  7482. if (!this->labels().empty()) {
  7483. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
  7484. ConstPtr;
  7485. typedef ConstPtr SortItem;
  7486. typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
  7487. struct Utf8Check {
  7488. static void Check(ConstPtr p) {
  7489. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7490. p->first.data(), static_cast<int>(p->first.length()),
  7491. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7492. "google.firestore.v1.WriteRequest.LabelsEntry.key");
  7493. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7494. p->second.data(), static_cast<int>(p->second.length()),
  7495. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7496. "google.firestore.v1.WriteRequest.LabelsEntry.value");
  7497. }
  7498. };
  7499. if (output->IsSerializationDeterministic() &&
  7500. this->labels().size() > 1) {
  7501. ::std::unique_ptr<SortItem[]> items(
  7502. new SortItem[this->labels().size()]);
  7503. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
  7504. size_type n = 0;
  7505. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  7506. it = this->labels().begin();
  7507. it != this->labels().end(); ++it, ++n) {
  7508. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7509. }
  7510. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7511. for (size_type i = 0; i < n; i++) {
  7512. WriteRequest_LabelsEntry_DoNotUse::Funcs::SerializeToCodedStream(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output);
  7513. Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
  7514. }
  7515. } else {
  7516. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  7517. it = this->labels().begin();
  7518. it != this->labels().end(); ++it) {
  7519. WriteRequest_LabelsEntry_DoNotUse::Funcs::SerializeToCodedStream(5, it->first, it->second, output);
  7520. Utf8Check::Check(&(*it));
  7521. }
  7522. }
  7523. }
  7524. if (_internal_metadata_.have_unknown_fields()) {
  7525. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  7526. _internal_metadata_.unknown_fields(), output);
  7527. }
  7528. // @@protoc_insertion_point(serialize_end:google.firestore.v1.WriteRequest)
  7529. }
  7530. ::PROTOBUF_NAMESPACE_ID::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray(
  7531. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  7532. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteRequest)
  7533. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7534. (void) cached_has_bits;
  7535. // string database = 1;
  7536. if (this->database().size() > 0) {
  7537. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7538. this->database().data(), static_cast<int>(this->database().length()),
  7539. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7540. "google.firestore.v1.WriteRequest.database");
  7541. target =
  7542. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  7543. 1, this->database(), target);
  7544. }
  7545. // string stream_id = 2;
  7546. if (this->stream_id().size() > 0) {
  7547. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7548. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7549. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7550. "google.firestore.v1.WriteRequest.stream_id");
  7551. target =
  7552. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  7553. 2, this->stream_id(), target);
  7554. }
  7555. // repeated .google.firestore.v1.Write writes = 3;
  7556. for (unsigned int i = 0,
  7557. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  7558. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  7559. InternalWriteMessageToArray(
  7560. 3, this->writes(static_cast<int>(i)), target);
  7561. }
  7562. // bytes stream_token = 4;
  7563. if (this->stream_token().size() > 0) {
  7564. target =
  7565. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  7566. 4, this->stream_token(), target);
  7567. }
  7568. // map<string, string> labels = 5;
  7569. if (!this->labels().empty()) {
  7570. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
  7571. ConstPtr;
  7572. typedef ConstPtr SortItem;
  7573. typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
  7574. struct Utf8Check {
  7575. static void Check(ConstPtr p) {
  7576. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7577. p->first.data(), static_cast<int>(p->first.length()),
  7578. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7579. "google.firestore.v1.WriteRequest.LabelsEntry.key");
  7580. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7581. p->second.data(), static_cast<int>(p->second.length()),
  7582. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7583. "google.firestore.v1.WriteRequest.LabelsEntry.value");
  7584. }
  7585. };
  7586. if (false &&
  7587. this->labels().size() > 1) {
  7588. ::std::unique_ptr<SortItem[]> items(
  7589. new SortItem[this->labels().size()]);
  7590. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
  7591. size_type n = 0;
  7592. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  7593. it = this->labels().begin();
  7594. it != this->labels().end(); ++it, ++n) {
  7595. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7596. }
  7597. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7598. for (size_type i = 0; i < n; i++) {
  7599. target = WriteRequest_LabelsEntry_DoNotUse::Funcs::SerializeToArray(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target);
  7600. Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
  7601. }
  7602. } else {
  7603. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  7604. it = this->labels().begin();
  7605. it != this->labels().end(); ++it) {
  7606. target = WriteRequest_LabelsEntry_DoNotUse::Funcs::SerializeToArray(5, it->first, it->second, target);
  7607. Utf8Check::Check(&(*it));
  7608. }
  7609. }
  7610. }
  7611. if (_internal_metadata_.have_unknown_fields()) {
  7612. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  7613. _internal_metadata_.unknown_fields(), target);
  7614. }
  7615. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteRequest)
  7616. return target;
  7617. }
  7618. size_t WriteRequest::ByteSizeLong() const {
  7619. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteRequest)
  7620. size_t total_size = 0;
  7621. if (_internal_metadata_.have_unknown_fields()) {
  7622. total_size +=
  7623. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  7624. _internal_metadata_.unknown_fields());
  7625. }
  7626. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7627. // Prevent compiler warnings about cached_has_bits being unused
  7628. (void) cached_has_bits;
  7629. // repeated .google.firestore.v1.Write writes = 3;
  7630. {
  7631. unsigned int count = static_cast<unsigned int>(this->writes_size());
  7632. total_size += 1UL * count;
  7633. for (unsigned int i = 0; i < count; i++) {
  7634. total_size +=
  7635. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  7636. this->writes(static_cast<int>(i)));
  7637. }
  7638. }
  7639. // map<string, string> labels = 5;
  7640. total_size += 1 *
  7641. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->labels_size());
  7642. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  7643. it = this->labels().begin();
  7644. it != this->labels().end(); ++it) {
  7645. total_size += WriteRequest_LabelsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  7646. }
  7647. // string database = 1;
  7648. if (this->database().size() > 0) {
  7649. total_size += 1 +
  7650. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  7651. this->database());
  7652. }
  7653. // string stream_id = 2;
  7654. if (this->stream_id().size() > 0) {
  7655. total_size += 1 +
  7656. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  7657. this->stream_id());
  7658. }
  7659. // bytes stream_token = 4;
  7660. if (this->stream_token().size() > 0) {
  7661. total_size += 1 +
  7662. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  7663. this->stream_token());
  7664. }
  7665. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  7666. SetCachedSize(cached_size);
  7667. return total_size;
  7668. }
  7669. void WriteRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  7670. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteRequest)
  7671. GOOGLE_DCHECK_NE(&from, this);
  7672. const WriteRequest* source =
  7673. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WriteRequest>(
  7674. &from);
  7675. if (source == nullptr) {
  7676. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteRequest)
  7677. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  7678. } else {
  7679. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteRequest)
  7680. MergeFrom(*source);
  7681. }
  7682. }
  7683. void WriteRequest::MergeFrom(const WriteRequest& from) {
  7684. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteRequest)
  7685. GOOGLE_DCHECK_NE(&from, this);
  7686. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7687. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7688. (void) cached_has_bits;
  7689. writes_.MergeFrom(from.writes_);
  7690. labels_.MergeFrom(from.labels_);
  7691. if (from.database().size() > 0) {
  7692. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  7693. }
  7694. if (from.stream_id().size() > 0) {
  7695. stream_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7696. }
  7697. if (from.stream_token().size() > 0) {
  7698. stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7699. }
  7700. }
  7701. void WriteRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  7702. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteRequest)
  7703. if (&from == this) return;
  7704. Clear();
  7705. MergeFrom(from);
  7706. }
  7707. void WriteRequest::CopyFrom(const WriteRequest& from) {
  7708. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteRequest)
  7709. if (&from == this) return;
  7710. Clear();
  7711. MergeFrom(from);
  7712. }
  7713. bool WriteRequest::IsInitialized() const {
  7714. return true;
  7715. }
  7716. void WriteRequest::InternalSwap(WriteRequest* other) {
  7717. using std::swap;
  7718. _internal_metadata_.Swap(&other->_internal_metadata_);
  7719. CastToBase(&writes_)->InternalSwap(CastToBase(&other->writes_));
  7720. labels_.Swap(&other->labels_);
  7721. database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  7722. GetArenaNoVirtual());
  7723. stream_id_.Swap(&other->stream_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  7724. GetArenaNoVirtual());
  7725. stream_token_.Swap(&other->stream_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  7726. GetArenaNoVirtual());
  7727. }
  7728. ::PROTOBUF_NAMESPACE_ID::Metadata WriteRequest::GetMetadata() const {
  7729. return GetMetadataStatic();
  7730. }
  7731. // ===================================================================
  7732. void WriteResponse::InitAsDefaultInstance() {
  7733. ::google::firestore::v1::_WriteResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  7734. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  7735. }
  7736. class WriteResponse::_Internal {
  7737. public:
  7738. static const PROTOBUF_NAMESPACE_ID::Timestamp& commit_time(const WriteResponse* msg);
  7739. };
  7740. const PROTOBUF_NAMESPACE_ID::Timestamp&
  7741. WriteResponse::_Internal::commit_time(const WriteResponse* msg) {
  7742. return *msg->commit_time_;
  7743. }
  7744. void WriteResponse::clear_write_results() {
  7745. write_results_.Clear();
  7746. }
  7747. void WriteResponse::clear_commit_time() {
  7748. if (GetArenaNoVirtual() == nullptr && commit_time_ != nullptr) {
  7749. delete commit_time_;
  7750. }
  7751. commit_time_ = nullptr;
  7752. }
  7753. WriteResponse::WriteResponse()
  7754. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  7755. SharedCtor();
  7756. // @@protoc_insertion_point(constructor:google.firestore.v1.WriteResponse)
  7757. }
  7758. WriteResponse::WriteResponse(const WriteResponse& from)
  7759. : ::PROTOBUF_NAMESPACE_ID::Message(),
  7760. _internal_metadata_(nullptr),
  7761. write_results_(from.write_results_) {
  7762. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7763. stream_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7764. if (!from.stream_id().empty()) {
  7765. stream_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7766. }
  7767. stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7768. if (!from.stream_token().empty()) {
  7769. stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7770. }
  7771. if (from.has_commit_time()) {
  7772. commit_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.commit_time_);
  7773. } else {
  7774. commit_time_ = nullptr;
  7775. }
  7776. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteResponse)
  7777. }
  7778. void WriteResponse::SharedCtor() {
  7779. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  7780. stream_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7781. stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7782. commit_time_ = nullptr;
  7783. }
  7784. WriteResponse::~WriteResponse() {
  7785. // @@protoc_insertion_point(destructor:google.firestore.v1.WriteResponse)
  7786. SharedDtor();
  7787. }
  7788. void WriteResponse::SharedDtor() {
  7789. stream_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7790. stream_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7791. if (this != internal_default_instance()) delete commit_time_;
  7792. }
  7793. void WriteResponse::SetCachedSize(int size) const {
  7794. _cached_size_.Set(size);
  7795. }
  7796. const WriteResponse& WriteResponse::default_instance() {
  7797. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  7798. return *internal_default_instance();
  7799. }
  7800. void WriteResponse::Clear() {
  7801. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteResponse)
  7802. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7803. // Prevent compiler warnings about cached_has_bits being unused
  7804. (void) cached_has_bits;
  7805. write_results_.Clear();
  7806. stream_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7807. stream_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  7808. if (GetArenaNoVirtual() == nullptr && commit_time_ != nullptr) {
  7809. delete commit_time_;
  7810. }
  7811. commit_time_ = nullptr;
  7812. _internal_metadata_.Clear();
  7813. }
  7814. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  7815. const char* WriteResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  7816. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  7817. while (!ctx->Done(&ptr)) {
  7818. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  7819. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  7820. CHK_(ptr);
  7821. switch (tag >> 3) {
  7822. // string stream_id = 1;
  7823. case 1:
  7824. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  7825. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_stream_id(), ptr, ctx, "google.firestore.v1.WriteResponse.stream_id");
  7826. CHK_(ptr);
  7827. } else goto handle_unusual;
  7828. continue;
  7829. // bytes stream_token = 2;
  7830. case 2:
  7831. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  7832. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_stream_token(), ptr, ctx);
  7833. CHK_(ptr);
  7834. } else goto handle_unusual;
  7835. continue;
  7836. // repeated .google.firestore.v1.WriteResult write_results = 3;
  7837. case 3:
  7838. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  7839. ptr -= 1;
  7840. do {
  7841. ptr += 1;
  7842. ptr = ctx->ParseMessage(add_write_results(), ptr);
  7843. CHK_(ptr);
  7844. if (!ctx->DataAvailable(ptr)) break;
  7845. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
  7846. } else goto handle_unusual;
  7847. continue;
  7848. // .google.protobuf.Timestamp commit_time = 4;
  7849. case 4:
  7850. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  7851. ptr = ctx->ParseMessage(mutable_commit_time(), ptr);
  7852. CHK_(ptr);
  7853. } else goto handle_unusual;
  7854. continue;
  7855. default: {
  7856. handle_unusual:
  7857. if ((tag & 7) == 4 || tag == 0) {
  7858. ctx->SetLastTag(tag);
  7859. goto success;
  7860. }
  7861. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  7862. CHK_(ptr != nullptr);
  7863. continue;
  7864. }
  7865. } // switch
  7866. } // while
  7867. success:
  7868. return ptr;
  7869. failure:
  7870. ptr = nullptr;
  7871. goto success;
  7872. #undef CHK_
  7873. }
  7874. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  7875. bool WriteResponse::MergePartialFromCodedStream(
  7876. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  7877. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  7878. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  7879. // @@protoc_insertion_point(parse_start:google.firestore.v1.WriteResponse)
  7880. for (;;) {
  7881. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7882. tag = p.first;
  7883. if (!p.second) goto handle_unusual;
  7884. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7885. // string stream_id = 1;
  7886. case 1: {
  7887. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  7888. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  7889. input, this->mutable_stream_id()));
  7890. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7891. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7892. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  7893. "google.firestore.v1.WriteResponse.stream_id"));
  7894. } else {
  7895. goto handle_unusual;
  7896. }
  7897. break;
  7898. }
  7899. // bytes stream_token = 2;
  7900. case 2: {
  7901. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  7902. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  7903. input, this->mutable_stream_token()));
  7904. } else {
  7905. goto handle_unusual;
  7906. }
  7907. break;
  7908. }
  7909. // repeated .google.firestore.v1.WriteResult write_results = 3;
  7910. case 3: {
  7911. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  7912. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  7913. input, add_write_results()));
  7914. } else {
  7915. goto handle_unusual;
  7916. }
  7917. break;
  7918. }
  7919. // .google.protobuf.Timestamp commit_time = 4;
  7920. case 4: {
  7921. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  7922. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  7923. input, mutable_commit_time()));
  7924. } else {
  7925. goto handle_unusual;
  7926. }
  7927. break;
  7928. }
  7929. default: {
  7930. handle_unusual:
  7931. if (tag == 0) {
  7932. goto success;
  7933. }
  7934. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  7935. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7936. break;
  7937. }
  7938. }
  7939. }
  7940. success:
  7941. // @@protoc_insertion_point(parse_success:google.firestore.v1.WriteResponse)
  7942. return true;
  7943. failure:
  7944. // @@protoc_insertion_point(parse_failure:google.firestore.v1.WriteResponse)
  7945. return false;
  7946. #undef DO_
  7947. }
  7948. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  7949. void WriteResponse::SerializeWithCachedSizes(
  7950. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  7951. // @@protoc_insertion_point(serialize_start:google.firestore.v1.WriteResponse)
  7952. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7953. (void) cached_has_bits;
  7954. // string stream_id = 1;
  7955. if (this->stream_id().size() > 0) {
  7956. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7957. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7958. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7959. "google.firestore.v1.WriteResponse.stream_id");
  7960. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  7961. 1, this->stream_id(), output);
  7962. }
  7963. // bytes stream_token = 2;
  7964. if (this->stream_token().size() > 0) {
  7965. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  7966. 2, this->stream_token(), output);
  7967. }
  7968. // repeated .google.firestore.v1.WriteResult write_results = 3;
  7969. for (unsigned int i = 0,
  7970. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  7971. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  7972. 3,
  7973. this->write_results(static_cast<int>(i)),
  7974. output);
  7975. }
  7976. // .google.protobuf.Timestamp commit_time = 4;
  7977. if (this->has_commit_time()) {
  7978. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  7979. 4, _Internal::commit_time(this), output);
  7980. }
  7981. if (_internal_metadata_.have_unknown_fields()) {
  7982. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  7983. _internal_metadata_.unknown_fields(), output);
  7984. }
  7985. // @@protoc_insertion_point(serialize_end:google.firestore.v1.WriteResponse)
  7986. }
  7987. ::PROTOBUF_NAMESPACE_ID::uint8* WriteResponse::InternalSerializeWithCachedSizesToArray(
  7988. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  7989. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteResponse)
  7990. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  7991. (void) cached_has_bits;
  7992. // string stream_id = 1;
  7993. if (this->stream_id().size() > 0) {
  7994. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  7995. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7996. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  7997. "google.firestore.v1.WriteResponse.stream_id");
  7998. target =
  7999. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  8000. 1, this->stream_id(), target);
  8001. }
  8002. // bytes stream_token = 2;
  8003. if (this->stream_token().size() > 0) {
  8004. target =
  8005. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  8006. 2, this->stream_token(), target);
  8007. }
  8008. // repeated .google.firestore.v1.WriteResult write_results = 3;
  8009. for (unsigned int i = 0,
  8010. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  8011. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  8012. InternalWriteMessageToArray(
  8013. 3, this->write_results(static_cast<int>(i)), target);
  8014. }
  8015. // .google.protobuf.Timestamp commit_time = 4;
  8016. if (this->has_commit_time()) {
  8017. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  8018. InternalWriteMessageToArray(
  8019. 4, _Internal::commit_time(this), target);
  8020. }
  8021. if (_internal_metadata_.have_unknown_fields()) {
  8022. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  8023. _internal_metadata_.unknown_fields(), target);
  8024. }
  8025. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteResponse)
  8026. return target;
  8027. }
  8028. size_t WriteResponse::ByteSizeLong() const {
  8029. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteResponse)
  8030. size_t total_size = 0;
  8031. if (_internal_metadata_.have_unknown_fields()) {
  8032. total_size +=
  8033. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  8034. _internal_metadata_.unknown_fields());
  8035. }
  8036. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  8037. // Prevent compiler warnings about cached_has_bits being unused
  8038. (void) cached_has_bits;
  8039. // repeated .google.firestore.v1.WriteResult write_results = 3;
  8040. {
  8041. unsigned int count = static_cast<unsigned int>(this->write_results_size());
  8042. total_size += 1UL * count;
  8043. for (unsigned int i = 0; i < count; i++) {
  8044. total_size +=
  8045. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  8046. this->write_results(static_cast<int>(i)));
  8047. }
  8048. }
  8049. // string stream_id = 1;
  8050. if (this->stream_id().size() > 0) {
  8051. total_size += 1 +
  8052. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  8053. this->stream_id());
  8054. }
  8055. // bytes stream_token = 2;
  8056. if (this->stream_token().size() > 0) {
  8057. total_size += 1 +
  8058. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  8059. this->stream_token());
  8060. }
  8061. // .google.protobuf.Timestamp commit_time = 4;
  8062. if (this->has_commit_time()) {
  8063. total_size += 1 +
  8064. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  8065. *commit_time_);
  8066. }
  8067. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  8068. SetCachedSize(cached_size);
  8069. return total_size;
  8070. }
  8071. void WriteResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  8072. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteResponse)
  8073. GOOGLE_DCHECK_NE(&from, this);
  8074. const WriteResponse* source =
  8075. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WriteResponse>(
  8076. &from);
  8077. if (source == nullptr) {
  8078. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteResponse)
  8079. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  8080. } else {
  8081. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteResponse)
  8082. MergeFrom(*source);
  8083. }
  8084. }
  8085. void WriteResponse::MergeFrom(const WriteResponse& from) {
  8086. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteResponse)
  8087. GOOGLE_DCHECK_NE(&from, this);
  8088. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8089. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  8090. (void) cached_has_bits;
  8091. write_results_.MergeFrom(from.write_results_);
  8092. if (from.stream_id().size() > 0) {
  8093. stream_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  8094. }
  8095. if (from.stream_token().size() > 0) {
  8096. stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  8097. }
  8098. if (from.has_commit_time()) {
  8099. mutable_commit_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.commit_time());
  8100. }
  8101. }
  8102. void WriteResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  8103. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteResponse)
  8104. if (&from == this) return;
  8105. Clear();
  8106. MergeFrom(from);
  8107. }
  8108. void WriteResponse::CopyFrom(const WriteResponse& from) {
  8109. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteResponse)
  8110. if (&from == this) return;
  8111. Clear();
  8112. MergeFrom(from);
  8113. }
  8114. bool WriteResponse::IsInitialized() const {
  8115. return true;
  8116. }
  8117. void WriteResponse::InternalSwap(WriteResponse* other) {
  8118. using std::swap;
  8119. _internal_metadata_.Swap(&other->_internal_metadata_);
  8120. CastToBase(&write_results_)->InternalSwap(CastToBase(&other->write_results_));
  8121. stream_id_.Swap(&other->stream_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  8122. GetArenaNoVirtual());
  8123. stream_token_.Swap(&other->stream_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  8124. GetArenaNoVirtual());
  8125. swap(commit_time_, other->commit_time_);
  8126. }
  8127. ::PROTOBUF_NAMESPACE_ID::Metadata WriteResponse::GetMetadata() const {
  8128. return GetMetadataStatic();
  8129. }
  8130. // ===================================================================
  8131. ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse() {}
  8132. ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  8133. : SuperType(arena) {}
  8134. void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(const ListenRequest_LabelsEntry_DoNotUse& other) {
  8135. MergeFromInternal(other);
  8136. }
  8137. ::PROTOBUF_NAMESPACE_ID::Metadata ListenRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  8138. return GetMetadataStatic();
  8139. }
  8140. void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(
  8141. const ::PROTOBUF_NAMESPACE_ID::Message& other) {
  8142. ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other);
  8143. }
  8144. // ===================================================================
  8145. void ListenRequest::InitAsDefaultInstance() {
  8146. ::google::firestore::v1::_ListenRequest_default_instance_.add_target_ = const_cast< ::google::firestore::v1::Target*>(
  8147. ::google::firestore::v1::Target::internal_default_instance());
  8148. ::google::firestore::v1::_ListenRequest_default_instance_.remove_target_ = 0;
  8149. }
  8150. class ListenRequest::_Internal {
  8151. public:
  8152. static const ::google::firestore::v1::Target& add_target(const ListenRequest* msg);
  8153. };
  8154. const ::google::firestore::v1::Target&
  8155. ListenRequest::_Internal::add_target(const ListenRequest* msg) {
  8156. return *msg->target_change_.add_target_;
  8157. }
  8158. void ListenRequest::set_allocated_add_target(::google::firestore::v1::Target* add_target) {
  8159. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  8160. clear_target_change();
  8161. if (add_target) {
  8162. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  8163. if (message_arena != submessage_arena) {
  8164. add_target = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  8165. message_arena, add_target, submessage_arena);
  8166. }
  8167. set_has_add_target();
  8168. target_change_.add_target_ = add_target;
  8169. }
  8170. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenRequest.add_target)
  8171. }
  8172. ListenRequest::ListenRequest()
  8173. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  8174. SharedCtor();
  8175. // @@protoc_insertion_point(constructor:google.firestore.v1.ListenRequest)
  8176. }
  8177. ListenRequest::ListenRequest(const ListenRequest& from)
  8178. : ::PROTOBUF_NAMESPACE_ID::Message(),
  8179. _internal_metadata_(nullptr) {
  8180. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8181. labels_.MergeFrom(from.labels_);
  8182. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  8183. if (!from.database().empty()) {
  8184. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  8185. }
  8186. clear_has_target_change();
  8187. switch (from.target_change_case()) {
  8188. case kAddTarget: {
  8189. mutable_add_target()->::google::firestore::v1::Target::MergeFrom(from.add_target());
  8190. break;
  8191. }
  8192. case kRemoveTarget: {
  8193. set_remove_target(from.remove_target());
  8194. break;
  8195. }
  8196. case TARGET_CHANGE_NOT_SET: {
  8197. break;
  8198. }
  8199. }
  8200. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListenRequest)
  8201. }
  8202. void ListenRequest::SharedCtor() {
  8203. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  8204. database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  8205. clear_has_target_change();
  8206. }
  8207. ListenRequest::~ListenRequest() {
  8208. // @@protoc_insertion_point(destructor:google.firestore.v1.ListenRequest)
  8209. SharedDtor();
  8210. }
  8211. void ListenRequest::SharedDtor() {
  8212. database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  8213. if (has_target_change()) {
  8214. clear_target_change();
  8215. }
  8216. }
  8217. void ListenRequest::SetCachedSize(int size) const {
  8218. _cached_size_.Set(size);
  8219. }
  8220. const ListenRequest& ListenRequest::default_instance() {
  8221. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  8222. return *internal_default_instance();
  8223. }
  8224. void ListenRequest::clear_target_change() {
  8225. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListenRequest)
  8226. switch (target_change_case()) {
  8227. case kAddTarget: {
  8228. delete target_change_.add_target_;
  8229. break;
  8230. }
  8231. case kRemoveTarget: {
  8232. // No need to clear
  8233. break;
  8234. }
  8235. case TARGET_CHANGE_NOT_SET: {
  8236. break;
  8237. }
  8238. }
  8239. _oneof_case_[0] = TARGET_CHANGE_NOT_SET;
  8240. }
  8241. void ListenRequest::Clear() {
  8242. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListenRequest)
  8243. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  8244. // Prevent compiler warnings about cached_has_bits being unused
  8245. (void) cached_has_bits;
  8246. labels_.Clear();
  8247. database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  8248. clear_target_change();
  8249. _internal_metadata_.Clear();
  8250. }
  8251. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  8252. const char* ListenRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  8253. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  8254. while (!ctx->Done(&ptr)) {
  8255. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  8256. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  8257. CHK_(ptr);
  8258. switch (tag >> 3) {
  8259. // string database = 1;
  8260. case 1:
  8261. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  8262. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_database(), ptr, ctx, "google.firestore.v1.ListenRequest.database");
  8263. CHK_(ptr);
  8264. } else goto handle_unusual;
  8265. continue;
  8266. // .google.firestore.v1.Target add_target = 2;
  8267. case 2:
  8268. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  8269. ptr = ctx->ParseMessage(mutable_add_target(), ptr);
  8270. CHK_(ptr);
  8271. } else goto handle_unusual;
  8272. continue;
  8273. // int32 remove_target = 3;
  8274. case 3:
  8275. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  8276. set_remove_target(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
  8277. CHK_(ptr);
  8278. } else goto handle_unusual;
  8279. continue;
  8280. // map<string, string> labels = 4;
  8281. case 4:
  8282. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  8283. ptr -= 1;
  8284. do {
  8285. ptr += 1;
  8286. ptr = ctx->ParseMessage(&labels_, ptr);
  8287. CHK_(ptr);
  8288. if (!ctx->DataAvailable(ptr)) break;
  8289. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34);
  8290. } else goto handle_unusual;
  8291. continue;
  8292. default: {
  8293. handle_unusual:
  8294. if ((tag & 7) == 4 || tag == 0) {
  8295. ctx->SetLastTag(tag);
  8296. goto success;
  8297. }
  8298. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  8299. CHK_(ptr != nullptr);
  8300. continue;
  8301. }
  8302. } // switch
  8303. } // while
  8304. success:
  8305. return ptr;
  8306. failure:
  8307. ptr = nullptr;
  8308. goto success;
  8309. #undef CHK_
  8310. }
  8311. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  8312. bool ListenRequest::MergePartialFromCodedStream(
  8313. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  8314. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  8315. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  8316. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListenRequest)
  8317. for (;;) {
  8318. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8319. tag = p.first;
  8320. if (!p.second) goto handle_unusual;
  8321. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8322. // string database = 1;
  8323. case 1: {
  8324. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  8325. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  8326. input, this->mutable_database()));
  8327. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8328. this->database().data(), static_cast<int>(this->database().length()),
  8329. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  8330. "google.firestore.v1.ListenRequest.database"));
  8331. } else {
  8332. goto handle_unusual;
  8333. }
  8334. break;
  8335. }
  8336. // .google.firestore.v1.Target add_target = 2;
  8337. case 2: {
  8338. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  8339. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  8340. input, mutable_add_target()));
  8341. } else {
  8342. goto handle_unusual;
  8343. }
  8344. break;
  8345. }
  8346. // int32 remove_target = 3;
  8347. case 3: {
  8348. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
  8349. clear_target_change();
  8350. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  8351. ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
  8352. input, &target_change_.remove_target_)));
  8353. set_has_remove_target();
  8354. } else {
  8355. goto handle_unusual;
  8356. }
  8357. break;
  8358. }
  8359. // map<string, string> labels = 4;
  8360. case 4: {
  8361. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  8362. ListenRequest_LabelsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField<
  8363. ListenRequest_LabelsEntry_DoNotUse,
  8364. std::string, std::string,
  8365. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
  8366. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
  8367. 0 >,
  8368. ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string > > parser(&labels_);
  8369. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual(
  8370. input, &parser));
  8371. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8372. parser.key().data(), static_cast<int>(parser.key().length()),
  8373. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  8374. "google.firestore.v1.ListenRequest.LabelsEntry.key"));
  8375. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8376. parser.value().data(), static_cast<int>(parser.value().length()),
  8377. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  8378. "google.firestore.v1.ListenRequest.LabelsEntry.value"));
  8379. } else {
  8380. goto handle_unusual;
  8381. }
  8382. break;
  8383. }
  8384. default: {
  8385. handle_unusual:
  8386. if (tag == 0) {
  8387. goto success;
  8388. }
  8389. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  8390. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8391. break;
  8392. }
  8393. }
  8394. }
  8395. success:
  8396. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListenRequest)
  8397. return true;
  8398. failure:
  8399. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListenRequest)
  8400. return false;
  8401. #undef DO_
  8402. }
  8403. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  8404. void ListenRequest::SerializeWithCachedSizes(
  8405. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  8406. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListenRequest)
  8407. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  8408. (void) cached_has_bits;
  8409. // string database = 1;
  8410. if (this->database().size() > 0) {
  8411. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8412. this->database().data(), static_cast<int>(this->database().length()),
  8413. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  8414. "google.firestore.v1.ListenRequest.database");
  8415. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  8416. 1, this->database(), output);
  8417. }
  8418. // .google.firestore.v1.Target add_target = 2;
  8419. if (has_add_target()) {
  8420. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  8421. 2, _Internal::add_target(this), output);
  8422. }
  8423. // int32 remove_target = 3;
  8424. if (has_remove_target()) {
  8425. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->remove_target(), output);
  8426. }
  8427. // map<string, string> labels = 4;
  8428. if (!this->labels().empty()) {
  8429. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
  8430. ConstPtr;
  8431. typedef ConstPtr SortItem;
  8432. typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
  8433. struct Utf8Check {
  8434. static void Check(ConstPtr p) {
  8435. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8436. p->first.data(), static_cast<int>(p->first.length()),
  8437. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  8438. "google.firestore.v1.ListenRequest.LabelsEntry.key");
  8439. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8440. p->second.data(), static_cast<int>(p->second.length()),
  8441. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  8442. "google.firestore.v1.ListenRequest.LabelsEntry.value");
  8443. }
  8444. };
  8445. if (output->IsSerializationDeterministic() &&
  8446. this->labels().size() > 1) {
  8447. ::std::unique_ptr<SortItem[]> items(
  8448. new SortItem[this->labels().size()]);
  8449. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
  8450. size_type n = 0;
  8451. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  8452. it = this->labels().begin();
  8453. it != this->labels().end(); ++it, ++n) {
  8454. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  8455. }
  8456. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  8457. for (size_type i = 0; i < n; i++) {
  8458. ListenRequest_LabelsEntry_DoNotUse::Funcs::SerializeToCodedStream(4, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output);
  8459. Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
  8460. }
  8461. } else {
  8462. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  8463. it = this->labels().begin();
  8464. it != this->labels().end(); ++it) {
  8465. ListenRequest_LabelsEntry_DoNotUse::Funcs::SerializeToCodedStream(4, it->first, it->second, output);
  8466. Utf8Check::Check(&(*it));
  8467. }
  8468. }
  8469. }
  8470. if (_internal_metadata_.have_unknown_fields()) {
  8471. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  8472. _internal_metadata_.unknown_fields(), output);
  8473. }
  8474. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListenRequest)
  8475. }
  8476. ::PROTOBUF_NAMESPACE_ID::uint8* ListenRequest::InternalSerializeWithCachedSizesToArray(
  8477. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  8478. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListenRequest)
  8479. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  8480. (void) cached_has_bits;
  8481. // string database = 1;
  8482. if (this->database().size() > 0) {
  8483. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8484. this->database().data(), static_cast<int>(this->database().length()),
  8485. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  8486. "google.firestore.v1.ListenRequest.database");
  8487. target =
  8488. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  8489. 1, this->database(), target);
  8490. }
  8491. // .google.firestore.v1.Target add_target = 2;
  8492. if (has_add_target()) {
  8493. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  8494. InternalWriteMessageToArray(
  8495. 2, _Internal::add_target(this), target);
  8496. }
  8497. // int32 remove_target = 3;
  8498. if (has_remove_target()) {
  8499. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->remove_target(), target);
  8500. }
  8501. // map<string, string> labels = 4;
  8502. if (!this->labels().empty()) {
  8503. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
  8504. ConstPtr;
  8505. typedef ConstPtr SortItem;
  8506. typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
  8507. struct Utf8Check {
  8508. static void Check(ConstPtr p) {
  8509. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8510. p->first.data(), static_cast<int>(p->first.length()),
  8511. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  8512. "google.firestore.v1.ListenRequest.LabelsEntry.key");
  8513. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  8514. p->second.data(), static_cast<int>(p->second.length()),
  8515. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  8516. "google.firestore.v1.ListenRequest.LabelsEntry.value");
  8517. }
  8518. };
  8519. if (false &&
  8520. this->labels().size() > 1) {
  8521. ::std::unique_ptr<SortItem[]> items(
  8522. new SortItem[this->labels().size()]);
  8523. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
  8524. size_type n = 0;
  8525. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  8526. it = this->labels().begin();
  8527. it != this->labels().end(); ++it, ++n) {
  8528. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  8529. }
  8530. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  8531. for (size_type i = 0; i < n; i++) {
  8532. target = ListenRequest_LabelsEntry_DoNotUse::Funcs::SerializeToArray(4, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target);
  8533. Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
  8534. }
  8535. } else {
  8536. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  8537. it = this->labels().begin();
  8538. it != this->labels().end(); ++it) {
  8539. target = ListenRequest_LabelsEntry_DoNotUse::Funcs::SerializeToArray(4, it->first, it->second, target);
  8540. Utf8Check::Check(&(*it));
  8541. }
  8542. }
  8543. }
  8544. if (_internal_metadata_.have_unknown_fields()) {
  8545. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  8546. _internal_metadata_.unknown_fields(), target);
  8547. }
  8548. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListenRequest)
  8549. return target;
  8550. }
  8551. size_t ListenRequest::ByteSizeLong() const {
  8552. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListenRequest)
  8553. size_t total_size = 0;
  8554. if (_internal_metadata_.have_unknown_fields()) {
  8555. total_size +=
  8556. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  8557. _internal_metadata_.unknown_fields());
  8558. }
  8559. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  8560. // Prevent compiler warnings about cached_has_bits being unused
  8561. (void) cached_has_bits;
  8562. // map<string, string> labels = 4;
  8563. total_size += 1 *
  8564. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->labels_size());
  8565. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
  8566. it = this->labels().begin();
  8567. it != this->labels().end(); ++it) {
  8568. total_size += ListenRequest_LabelsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  8569. }
  8570. // string database = 1;
  8571. if (this->database().size() > 0) {
  8572. total_size += 1 +
  8573. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  8574. this->database());
  8575. }
  8576. switch (target_change_case()) {
  8577. // .google.firestore.v1.Target add_target = 2;
  8578. case kAddTarget: {
  8579. total_size += 1 +
  8580. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  8581. *target_change_.add_target_);
  8582. break;
  8583. }
  8584. // int32 remove_target = 3;
  8585. case kRemoveTarget: {
  8586. total_size += 1 +
  8587. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  8588. this->remove_target());
  8589. break;
  8590. }
  8591. case TARGET_CHANGE_NOT_SET: {
  8592. break;
  8593. }
  8594. }
  8595. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  8596. SetCachedSize(cached_size);
  8597. return total_size;
  8598. }
  8599. void ListenRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  8600. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListenRequest)
  8601. GOOGLE_DCHECK_NE(&from, this);
  8602. const ListenRequest* source =
  8603. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListenRequest>(
  8604. &from);
  8605. if (source == nullptr) {
  8606. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListenRequest)
  8607. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  8608. } else {
  8609. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListenRequest)
  8610. MergeFrom(*source);
  8611. }
  8612. }
  8613. void ListenRequest::MergeFrom(const ListenRequest& from) {
  8614. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListenRequest)
  8615. GOOGLE_DCHECK_NE(&from, this);
  8616. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8617. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  8618. (void) cached_has_bits;
  8619. labels_.MergeFrom(from.labels_);
  8620. if (from.database().size() > 0) {
  8621. database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  8622. }
  8623. switch (from.target_change_case()) {
  8624. case kAddTarget: {
  8625. mutable_add_target()->::google::firestore::v1::Target::MergeFrom(from.add_target());
  8626. break;
  8627. }
  8628. case kRemoveTarget: {
  8629. set_remove_target(from.remove_target());
  8630. break;
  8631. }
  8632. case TARGET_CHANGE_NOT_SET: {
  8633. break;
  8634. }
  8635. }
  8636. }
  8637. void ListenRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  8638. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListenRequest)
  8639. if (&from == this) return;
  8640. Clear();
  8641. MergeFrom(from);
  8642. }
  8643. void ListenRequest::CopyFrom(const ListenRequest& from) {
  8644. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListenRequest)
  8645. if (&from == this) return;
  8646. Clear();
  8647. MergeFrom(from);
  8648. }
  8649. bool ListenRequest::IsInitialized() const {
  8650. return true;
  8651. }
  8652. void ListenRequest::InternalSwap(ListenRequest* other) {
  8653. using std::swap;
  8654. _internal_metadata_.Swap(&other->_internal_metadata_);
  8655. labels_.Swap(&other->labels_);
  8656. database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  8657. GetArenaNoVirtual());
  8658. swap(target_change_, other->target_change_);
  8659. swap(_oneof_case_[0], other->_oneof_case_[0]);
  8660. }
  8661. ::PROTOBUF_NAMESPACE_ID::Metadata ListenRequest::GetMetadata() const {
  8662. return GetMetadataStatic();
  8663. }
  8664. // ===================================================================
  8665. void ListenResponse::InitAsDefaultInstance() {
  8666. ::google::firestore::v1::_ListenResponse_default_instance_.target_change_ = const_cast< ::google::firestore::v1::TargetChange*>(
  8667. ::google::firestore::v1::TargetChange::internal_default_instance());
  8668. ::google::firestore::v1::_ListenResponse_default_instance_.document_change_ = const_cast< ::google::firestore::v1::DocumentChange*>(
  8669. ::google::firestore::v1::DocumentChange::internal_default_instance());
  8670. ::google::firestore::v1::_ListenResponse_default_instance_.document_delete_ = const_cast< ::google::firestore::v1::DocumentDelete*>(
  8671. ::google::firestore::v1::DocumentDelete::internal_default_instance());
  8672. ::google::firestore::v1::_ListenResponse_default_instance_.document_remove_ = const_cast< ::google::firestore::v1::DocumentRemove*>(
  8673. ::google::firestore::v1::DocumentRemove::internal_default_instance());
  8674. ::google::firestore::v1::_ListenResponse_default_instance_.filter_ = const_cast< ::google::firestore::v1::ExistenceFilter*>(
  8675. ::google::firestore::v1::ExistenceFilter::internal_default_instance());
  8676. }
  8677. class ListenResponse::_Internal {
  8678. public:
  8679. static const ::google::firestore::v1::TargetChange& target_change(const ListenResponse* msg);
  8680. static const ::google::firestore::v1::DocumentChange& document_change(const ListenResponse* msg);
  8681. static const ::google::firestore::v1::DocumentDelete& document_delete(const ListenResponse* msg);
  8682. static const ::google::firestore::v1::DocumentRemove& document_remove(const ListenResponse* msg);
  8683. static const ::google::firestore::v1::ExistenceFilter& filter(const ListenResponse* msg);
  8684. };
  8685. const ::google::firestore::v1::TargetChange&
  8686. ListenResponse::_Internal::target_change(const ListenResponse* msg) {
  8687. return *msg->response_type_.target_change_;
  8688. }
  8689. const ::google::firestore::v1::DocumentChange&
  8690. ListenResponse::_Internal::document_change(const ListenResponse* msg) {
  8691. return *msg->response_type_.document_change_;
  8692. }
  8693. const ::google::firestore::v1::DocumentDelete&
  8694. ListenResponse::_Internal::document_delete(const ListenResponse* msg) {
  8695. return *msg->response_type_.document_delete_;
  8696. }
  8697. const ::google::firestore::v1::DocumentRemove&
  8698. ListenResponse::_Internal::document_remove(const ListenResponse* msg) {
  8699. return *msg->response_type_.document_remove_;
  8700. }
  8701. const ::google::firestore::v1::ExistenceFilter&
  8702. ListenResponse::_Internal::filter(const ListenResponse* msg) {
  8703. return *msg->response_type_.filter_;
  8704. }
  8705. void ListenResponse::set_allocated_target_change(::google::firestore::v1::TargetChange* target_change) {
  8706. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  8707. clear_response_type();
  8708. if (target_change) {
  8709. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  8710. if (message_arena != submessage_arena) {
  8711. target_change = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  8712. message_arena, target_change, submessage_arena);
  8713. }
  8714. set_has_target_change();
  8715. response_type_.target_change_ = target_change;
  8716. }
  8717. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.target_change)
  8718. }
  8719. void ListenResponse::set_allocated_document_change(::google::firestore::v1::DocumentChange* document_change) {
  8720. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  8721. clear_response_type();
  8722. if (document_change) {
  8723. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  8724. if (message_arena != submessage_arena) {
  8725. document_change = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  8726. message_arena, document_change, submessage_arena);
  8727. }
  8728. set_has_document_change();
  8729. response_type_.document_change_ = document_change;
  8730. }
  8731. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_change)
  8732. }
  8733. void ListenResponse::clear_document_change() {
  8734. if (has_document_change()) {
  8735. delete response_type_.document_change_;
  8736. clear_has_response_type();
  8737. }
  8738. }
  8739. void ListenResponse::set_allocated_document_delete(::google::firestore::v1::DocumentDelete* document_delete) {
  8740. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  8741. clear_response_type();
  8742. if (document_delete) {
  8743. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  8744. if (message_arena != submessage_arena) {
  8745. document_delete = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  8746. message_arena, document_delete, submessage_arena);
  8747. }
  8748. set_has_document_delete();
  8749. response_type_.document_delete_ = document_delete;
  8750. }
  8751. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_delete)
  8752. }
  8753. void ListenResponse::clear_document_delete() {
  8754. if (has_document_delete()) {
  8755. delete response_type_.document_delete_;
  8756. clear_has_response_type();
  8757. }
  8758. }
  8759. void ListenResponse::set_allocated_document_remove(::google::firestore::v1::DocumentRemove* document_remove) {
  8760. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  8761. clear_response_type();
  8762. if (document_remove) {
  8763. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  8764. if (message_arena != submessage_arena) {
  8765. document_remove = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  8766. message_arena, document_remove, submessage_arena);
  8767. }
  8768. set_has_document_remove();
  8769. response_type_.document_remove_ = document_remove;
  8770. }
  8771. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_remove)
  8772. }
  8773. void ListenResponse::clear_document_remove() {
  8774. if (has_document_remove()) {
  8775. delete response_type_.document_remove_;
  8776. clear_has_response_type();
  8777. }
  8778. }
  8779. void ListenResponse::set_allocated_filter(::google::firestore::v1::ExistenceFilter* filter) {
  8780. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  8781. clear_response_type();
  8782. if (filter) {
  8783. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  8784. if (message_arena != submessage_arena) {
  8785. filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  8786. message_arena, filter, submessage_arena);
  8787. }
  8788. set_has_filter();
  8789. response_type_.filter_ = filter;
  8790. }
  8791. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.filter)
  8792. }
  8793. void ListenResponse::clear_filter() {
  8794. if (has_filter()) {
  8795. delete response_type_.filter_;
  8796. clear_has_response_type();
  8797. }
  8798. }
  8799. ListenResponse::ListenResponse()
  8800. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  8801. SharedCtor();
  8802. // @@protoc_insertion_point(constructor:google.firestore.v1.ListenResponse)
  8803. }
  8804. ListenResponse::ListenResponse(const ListenResponse& from)
  8805. : ::PROTOBUF_NAMESPACE_ID::Message(),
  8806. _internal_metadata_(nullptr) {
  8807. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8808. clear_has_response_type();
  8809. switch (from.response_type_case()) {
  8810. case kTargetChange: {
  8811. mutable_target_change()->::google::firestore::v1::TargetChange::MergeFrom(from.target_change());
  8812. break;
  8813. }
  8814. case kDocumentChange: {
  8815. mutable_document_change()->::google::firestore::v1::DocumentChange::MergeFrom(from.document_change());
  8816. break;
  8817. }
  8818. case kDocumentDelete: {
  8819. mutable_document_delete()->::google::firestore::v1::DocumentDelete::MergeFrom(from.document_delete());
  8820. break;
  8821. }
  8822. case kDocumentRemove: {
  8823. mutable_document_remove()->::google::firestore::v1::DocumentRemove::MergeFrom(from.document_remove());
  8824. break;
  8825. }
  8826. case kFilter: {
  8827. mutable_filter()->::google::firestore::v1::ExistenceFilter::MergeFrom(from.filter());
  8828. break;
  8829. }
  8830. case RESPONSE_TYPE_NOT_SET: {
  8831. break;
  8832. }
  8833. }
  8834. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListenResponse)
  8835. }
  8836. void ListenResponse::SharedCtor() {
  8837. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  8838. clear_has_response_type();
  8839. }
  8840. ListenResponse::~ListenResponse() {
  8841. // @@protoc_insertion_point(destructor:google.firestore.v1.ListenResponse)
  8842. SharedDtor();
  8843. }
  8844. void ListenResponse::SharedDtor() {
  8845. if (has_response_type()) {
  8846. clear_response_type();
  8847. }
  8848. }
  8849. void ListenResponse::SetCachedSize(int size) const {
  8850. _cached_size_.Set(size);
  8851. }
  8852. const ListenResponse& ListenResponse::default_instance() {
  8853. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  8854. return *internal_default_instance();
  8855. }
  8856. void ListenResponse::clear_response_type() {
  8857. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListenResponse)
  8858. switch (response_type_case()) {
  8859. case kTargetChange: {
  8860. delete response_type_.target_change_;
  8861. break;
  8862. }
  8863. case kDocumentChange: {
  8864. delete response_type_.document_change_;
  8865. break;
  8866. }
  8867. case kDocumentDelete: {
  8868. delete response_type_.document_delete_;
  8869. break;
  8870. }
  8871. case kDocumentRemove: {
  8872. delete response_type_.document_remove_;
  8873. break;
  8874. }
  8875. case kFilter: {
  8876. delete response_type_.filter_;
  8877. break;
  8878. }
  8879. case RESPONSE_TYPE_NOT_SET: {
  8880. break;
  8881. }
  8882. }
  8883. _oneof_case_[0] = RESPONSE_TYPE_NOT_SET;
  8884. }
  8885. void ListenResponse::Clear() {
  8886. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListenResponse)
  8887. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  8888. // Prevent compiler warnings about cached_has_bits being unused
  8889. (void) cached_has_bits;
  8890. clear_response_type();
  8891. _internal_metadata_.Clear();
  8892. }
  8893. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  8894. const char* ListenResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  8895. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  8896. while (!ctx->Done(&ptr)) {
  8897. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  8898. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  8899. CHK_(ptr);
  8900. switch (tag >> 3) {
  8901. // .google.firestore.v1.TargetChange target_change = 2;
  8902. case 2:
  8903. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  8904. ptr = ctx->ParseMessage(mutable_target_change(), ptr);
  8905. CHK_(ptr);
  8906. } else goto handle_unusual;
  8907. continue;
  8908. // .google.firestore.v1.DocumentChange document_change = 3;
  8909. case 3:
  8910. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  8911. ptr = ctx->ParseMessage(mutable_document_change(), ptr);
  8912. CHK_(ptr);
  8913. } else goto handle_unusual;
  8914. continue;
  8915. // .google.firestore.v1.DocumentDelete document_delete = 4;
  8916. case 4:
  8917. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  8918. ptr = ctx->ParseMessage(mutable_document_delete(), ptr);
  8919. CHK_(ptr);
  8920. } else goto handle_unusual;
  8921. continue;
  8922. // .google.firestore.v1.ExistenceFilter filter = 5;
  8923. case 5:
  8924. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
  8925. ptr = ctx->ParseMessage(mutable_filter(), ptr);
  8926. CHK_(ptr);
  8927. } else goto handle_unusual;
  8928. continue;
  8929. // .google.firestore.v1.DocumentRemove document_remove = 6;
  8930. case 6:
  8931. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
  8932. ptr = ctx->ParseMessage(mutable_document_remove(), ptr);
  8933. CHK_(ptr);
  8934. } else goto handle_unusual;
  8935. continue;
  8936. default: {
  8937. handle_unusual:
  8938. if ((tag & 7) == 4 || tag == 0) {
  8939. ctx->SetLastTag(tag);
  8940. goto success;
  8941. }
  8942. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  8943. CHK_(ptr != nullptr);
  8944. continue;
  8945. }
  8946. } // switch
  8947. } // while
  8948. success:
  8949. return ptr;
  8950. failure:
  8951. ptr = nullptr;
  8952. goto success;
  8953. #undef CHK_
  8954. }
  8955. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  8956. bool ListenResponse::MergePartialFromCodedStream(
  8957. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  8958. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  8959. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  8960. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListenResponse)
  8961. for (;;) {
  8962. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8963. tag = p.first;
  8964. if (!p.second) goto handle_unusual;
  8965. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8966. // .google.firestore.v1.TargetChange target_change = 2;
  8967. case 2: {
  8968. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  8969. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  8970. input, mutable_target_change()));
  8971. } else {
  8972. goto handle_unusual;
  8973. }
  8974. break;
  8975. }
  8976. // .google.firestore.v1.DocumentChange document_change = 3;
  8977. case 3: {
  8978. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  8979. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  8980. input, mutable_document_change()));
  8981. } else {
  8982. goto handle_unusual;
  8983. }
  8984. break;
  8985. }
  8986. // .google.firestore.v1.DocumentDelete document_delete = 4;
  8987. case 4: {
  8988. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  8989. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  8990. input, mutable_document_delete()));
  8991. } else {
  8992. goto handle_unusual;
  8993. }
  8994. break;
  8995. }
  8996. // .google.firestore.v1.ExistenceFilter filter = 5;
  8997. case 5: {
  8998. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
  8999. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  9000. input, mutable_filter()));
  9001. } else {
  9002. goto handle_unusual;
  9003. }
  9004. break;
  9005. }
  9006. // .google.firestore.v1.DocumentRemove document_remove = 6;
  9007. case 6: {
  9008. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
  9009. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  9010. input, mutable_document_remove()));
  9011. } else {
  9012. goto handle_unusual;
  9013. }
  9014. break;
  9015. }
  9016. default: {
  9017. handle_unusual:
  9018. if (tag == 0) {
  9019. goto success;
  9020. }
  9021. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  9022. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9023. break;
  9024. }
  9025. }
  9026. }
  9027. success:
  9028. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListenResponse)
  9029. return true;
  9030. failure:
  9031. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListenResponse)
  9032. return false;
  9033. #undef DO_
  9034. }
  9035. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  9036. void ListenResponse::SerializeWithCachedSizes(
  9037. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  9038. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListenResponse)
  9039. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9040. (void) cached_has_bits;
  9041. // .google.firestore.v1.TargetChange target_change = 2;
  9042. if (has_target_change()) {
  9043. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  9044. 2, _Internal::target_change(this), output);
  9045. }
  9046. // .google.firestore.v1.DocumentChange document_change = 3;
  9047. if (has_document_change()) {
  9048. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  9049. 3, _Internal::document_change(this), output);
  9050. }
  9051. // .google.firestore.v1.DocumentDelete document_delete = 4;
  9052. if (has_document_delete()) {
  9053. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  9054. 4, _Internal::document_delete(this), output);
  9055. }
  9056. // .google.firestore.v1.ExistenceFilter filter = 5;
  9057. if (has_filter()) {
  9058. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  9059. 5, _Internal::filter(this), output);
  9060. }
  9061. // .google.firestore.v1.DocumentRemove document_remove = 6;
  9062. if (has_document_remove()) {
  9063. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  9064. 6, _Internal::document_remove(this), output);
  9065. }
  9066. if (_internal_metadata_.have_unknown_fields()) {
  9067. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  9068. _internal_metadata_.unknown_fields(), output);
  9069. }
  9070. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListenResponse)
  9071. }
  9072. ::PROTOBUF_NAMESPACE_ID::uint8* ListenResponse::InternalSerializeWithCachedSizesToArray(
  9073. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  9074. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListenResponse)
  9075. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9076. (void) cached_has_bits;
  9077. // .google.firestore.v1.TargetChange target_change = 2;
  9078. if (has_target_change()) {
  9079. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  9080. InternalWriteMessageToArray(
  9081. 2, _Internal::target_change(this), target);
  9082. }
  9083. // .google.firestore.v1.DocumentChange document_change = 3;
  9084. if (has_document_change()) {
  9085. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  9086. InternalWriteMessageToArray(
  9087. 3, _Internal::document_change(this), target);
  9088. }
  9089. // .google.firestore.v1.DocumentDelete document_delete = 4;
  9090. if (has_document_delete()) {
  9091. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  9092. InternalWriteMessageToArray(
  9093. 4, _Internal::document_delete(this), target);
  9094. }
  9095. // .google.firestore.v1.ExistenceFilter filter = 5;
  9096. if (has_filter()) {
  9097. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  9098. InternalWriteMessageToArray(
  9099. 5, _Internal::filter(this), target);
  9100. }
  9101. // .google.firestore.v1.DocumentRemove document_remove = 6;
  9102. if (has_document_remove()) {
  9103. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  9104. InternalWriteMessageToArray(
  9105. 6, _Internal::document_remove(this), target);
  9106. }
  9107. if (_internal_metadata_.have_unknown_fields()) {
  9108. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  9109. _internal_metadata_.unknown_fields(), target);
  9110. }
  9111. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListenResponse)
  9112. return target;
  9113. }
  9114. size_t ListenResponse::ByteSizeLong() const {
  9115. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListenResponse)
  9116. size_t total_size = 0;
  9117. if (_internal_metadata_.have_unknown_fields()) {
  9118. total_size +=
  9119. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  9120. _internal_metadata_.unknown_fields());
  9121. }
  9122. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9123. // Prevent compiler warnings about cached_has_bits being unused
  9124. (void) cached_has_bits;
  9125. switch (response_type_case()) {
  9126. // .google.firestore.v1.TargetChange target_change = 2;
  9127. case kTargetChange: {
  9128. total_size += 1 +
  9129. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  9130. *response_type_.target_change_);
  9131. break;
  9132. }
  9133. // .google.firestore.v1.DocumentChange document_change = 3;
  9134. case kDocumentChange: {
  9135. total_size += 1 +
  9136. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  9137. *response_type_.document_change_);
  9138. break;
  9139. }
  9140. // .google.firestore.v1.DocumentDelete document_delete = 4;
  9141. case kDocumentDelete: {
  9142. total_size += 1 +
  9143. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  9144. *response_type_.document_delete_);
  9145. break;
  9146. }
  9147. // .google.firestore.v1.DocumentRemove document_remove = 6;
  9148. case kDocumentRemove: {
  9149. total_size += 1 +
  9150. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  9151. *response_type_.document_remove_);
  9152. break;
  9153. }
  9154. // .google.firestore.v1.ExistenceFilter filter = 5;
  9155. case kFilter: {
  9156. total_size += 1 +
  9157. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  9158. *response_type_.filter_);
  9159. break;
  9160. }
  9161. case RESPONSE_TYPE_NOT_SET: {
  9162. break;
  9163. }
  9164. }
  9165. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  9166. SetCachedSize(cached_size);
  9167. return total_size;
  9168. }
  9169. void ListenResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  9170. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListenResponse)
  9171. GOOGLE_DCHECK_NE(&from, this);
  9172. const ListenResponse* source =
  9173. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListenResponse>(
  9174. &from);
  9175. if (source == nullptr) {
  9176. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListenResponse)
  9177. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  9178. } else {
  9179. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListenResponse)
  9180. MergeFrom(*source);
  9181. }
  9182. }
  9183. void ListenResponse::MergeFrom(const ListenResponse& from) {
  9184. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListenResponse)
  9185. GOOGLE_DCHECK_NE(&from, this);
  9186. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9187. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9188. (void) cached_has_bits;
  9189. switch (from.response_type_case()) {
  9190. case kTargetChange: {
  9191. mutable_target_change()->::google::firestore::v1::TargetChange::MergeFrom(from.target_change());
  9192. break;
  9193. }
  9194. case kDocumentChange: {
  9195. mutable_document_change()->::google::firestore::v1::DocumentChange::MergeFrom(from.document_change());
  9196. break;
  9197. }
  9198. case kDocumentDelete: {
  9199. mutable_document_delete()->::google::firestore::v1::DocumentDelete::MergeFrom(from.document_delete());
  9200. break;
  9201. }
  9202. case kDocumentRemove: {
  9203. mutable_document_remove()->::google::firestore::v1::DocumentRemove::MergeFrom(from.document_remove());
  9204. break;
  9205. }
  9206. case kFilter: {
  9207. mutable_filter()->::google::firestore::v1::ExistenceFilter::MergeFrom(from.filter());
  9208. break;
  9209. }
  9210. case RESPONSE_TYPE_NOT_SET: {
  9211. break;
  9212. }
  9213. }
  9214. }
  9215. void ListenResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  9216. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListenResponse)
  9217. if (&from == this) return;
  9218. Clear();
  9219. MergeFrom(from);
  9220. }
  9221. void ListenResponse::CopyFrom(const ListenResponse& from) {
  9222. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListenResponse)
  9223. if (&from == this) return;
  9224. Clear();
  9225. MergeFrom(from);
  9226. }
  9227. bool ListenResponse::IsInitialized() const {
  9228. return true;
  9229. }
  9230. void ListenResponse::InternalSwap(ListenResponse* other) {
  9231. using std::swap;
  9232. _internal_metadata_.Swap(&other->_internal_metadata_);
  9233. swap(response_type_, other->response_type_);
  9234. swap(_oneof_case_[0], other->_oneof_case_[0]);
  9235. }
  9236. ::PROTOBUF_NAMESPACE_ID::Metadata ListenResponse::GetMetadata() const {
  9237. return GetMetadataStatic();
  9238. }
  9239. // ===================================================================
  9240. void Target_DocumentsTarget::InitAsDefaultInstance() {
  9241. }
  9242. class Target_DocumentsTarget::_Internal {
  9243. public:
  9244. };
  9245. Target_DocumentsTarget::Target_DocumentsTarget()
  9246. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  9247. SharedCtor();
  9248. // @@protoc_insertion_point(constructor:google.firestore.v1.Target.DocumentsTarget)
  9249. }
  9250. Target_DocumentsTarget::Target_DocumentsTarget(const Target_DocumentsTarget& from)
  9251. : ::PROTOBUF_NAMESPACE_ID::Message(),
  9252. _internal_metadata_(nullptr),
  9253. documents_(from.documents_) {
  9254. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9255. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target.DocumentsTarget)
  9256. }
  9257. void Target_DocumentsTarget::SharedCtor() {
  9258. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  9259. }
  9260. Target_DocumentsTarget::~Target_DocumentsTarget() {
  9261. // @@protoc_insertion_point(destructor:google.firestore.v1.Target.DocumentsTarget)
  9262. SharedDtor();
  9263. }
  9264. void Target_DocumentsTarget::SharedDtor() {
  9265. }
  9266. void Target_DocumentsTarget::SetCachedSize(int size) const {
  9267. _cached_size_.Set(size);
  9268. }
  9269. const Target_DocumentsTarget& Target_DocumentsTarget::default_instance() {
  9270. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  9271. return *internal_default_instance();
  9272. }
  9273. void Target_DocumentsTarget::Clear() {
  9274. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target.DocumentsTarget)
  9275. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9276. // Prevent compiler warnings about cached_has_bits being unused
  9277. (void) cached_has_bits;
  9278. documents_.Clear();
  9279. _internal_metadata_.Clear();
  9280. }
  9281. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  9282. const char* Target_DocumentsTarget::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  9283. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  9284. while (!ctx->Done(&ptr)) {
  9285. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  9286. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  9287. CHK_(ptr);
  9288. switch (tag >> 3) {
  9289. // repeated string documents = 2;
  9290. case 2:
  9291. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  9292. ptr -= 1;
  9293. do {
  9294. ptr += 1;
  9295. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_documents(), ptr, ctx, "google.firestore.v1.Target.DocumentsTarget.documents");
  9296. CHK_(ptr);
  9297. if (!ctx->DataAvailable(ptr)) break;
  9298. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
  9299. } else goto handle_unusual;
  9300. continue;
  9301. default: {
  9302. handle_unusual:
  9303. if ((tag & 7) == 4 || tag == 0) {
  9304. ctx->SetLastTag(tag);
  9305. goto success;
  9306. }
  9307. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  9308. CHK_(ptr != nullptr);
  9309. continue;
  9310. }
  9311. } // switch
  9312. } // while
  9313. success:
  9314. return ptr;
  9315. failure:
  9316. ptr = nullptr;
  9317. goto success;
  9318. #undef CHK_
  9319. }
  9320. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  9321. bool Target_DocumentsTarget::MergePartialFromCodedStream(
  9322. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  9323. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  9324. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  9325. // @@protoc_insertion_point(parse_start:google.firestore.v1.Target.DocumentsTarget)
  9326. for (;;) {
  9327. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9328. tag = p.first;
  9329. if (!p.second) goto handle_unusual;
  9330. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9331. // repeated string documents = 2;
  9332. case 2: {
  9333. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  9334. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  9335. input, this->add_documents()));
  9336. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  9337. this->documents(this->documents_size() - 1).data(),
  9338. static_cast<int>(this->documents(this->documents_size() - 1).length()),
  9339. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  9340. "google.firestore.v1.Target.DocumentsTarget.documents"));
  9341. } else {
  9342. goto handle_unusual;
  9343. }
  9344. break;
  9345. }
  9346. default: {
  9347. handle_unusual:
  9348. if (tag == 0) {
  9349. goto success;
  9350. }
  9351. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  9352. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9353. break;
  9354. }
  9355. }
  9356. }
  9357. success:
  9358. // @@protoc_insertion_point(parse_success:google.firestore.v1.Target.DocumentsTarget)
  9359. return true;
  9360. failure:
  9361. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target.DocumentsTarget)
  9362. return false;
  9363. #undef DO_
  9364. }
  9365. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  9366. void Target_DocumentsTarget::SerializeWithCachedSizes(
  9367. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  9368. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target.DocumentsTarget)
  9369. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9370. (void) cached_has_bits;
  9371. // repeated string documents = 2;
  9372. for (int i = 0, n = this->documents_size(); i < n; i++) {
  9373. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  9374. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  9375. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  9376. "google.firestore.v1.Target.DocumentsTarget.documents");
  9377. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
  9378. 2, this->documents(i), output);
  9379. }
  9380. if (_internal_metadata_.have_unknown_fields()) {
  9381. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  9382. _internal_metadata_.unknown_fields(), output);
  9383. }
  9384. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target.DocumentsTarget)
  9385. }
  9386. ::PROTOBUF_NAMESPACE_ID::uint8* Target_DocumentsTarget::InternalSerializeWithCachedSizesToArray(
  9387. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  9388. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target.DocumentsTarget)
  9389. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9390. (void) cached_has_bits;
  9391. // repeated string documents = 2;
  9392. for (int i = 0, n = this->documents_size(); i < n; i++) {
  9393. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  9394. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  9395. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  9396. "google.firestore.v1.Target.DocumentsTarget.documents");
  9397. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  9398. WriteStringToArray(2, this->documents(i), target);
  9399. }
  9400. if (_internal_metadata_.have_unknown_fields()) {
  9401. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  9402. _internal_metadata_.unknown_fields(), target);
  9403. }
  9404. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target.DocumentsTarget)
  9405. return target;
  9406. }
  9407. size_t Target_DocumentsTarget::ByteSizeLong() const {
  9408. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target.DocumentsTarget)
  9409. size_t total_size = 0;
  9410. if (_internal_metadata_.have_unknown_fields()) {
  9411. total_size +=
  9412. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  9413. _internal_metadata_.unknown_fields());
  9414. }
  9415. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9416. // Prevent compiler warnings about cached_has_bits being unused
  9417. (void) cached_has_bits;
  9418. // repeated string documents = 2;
  9419. total_size += 1 *
  9420. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->documents_size());
  9421. for (int i = 0, n = this->documents_size(); i < n; i++) {
  9422. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  9423. this->documents(i));
  9424. }
  9425. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  9426. SetCachedSize(cached_size);
  9427. return total_size;
  9428. }
  9429. void Target_DocumentsTarget::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  9430. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target.DocumentsTarget)
  9431. GOOGLE_DCHECK_NE(&from, this);
  9432. const Target_DocumentsTarget* source =
  9433. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Target_DocumentsTarget>(
  9434. &from);
  9435. if (source == nullptr) {
  9436. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target.DocumentsTarget)
  9437. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  9438. } else {
  9439. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target.DocumentsTarget)
  9440. MergeFrom(*source);
  9441. }
  9442. }
  9443. void Target_DocumentsTarget::MergeFrom(const Target_DocumentsTarget& from) {
  9444. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target.DocumentsTarget)
  9445. GOOGLE_DCHECK_NE(&from, this);
  9446. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9447. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9448. (void) cached_has_bits;
  9449. documents_.MergeFrom(from.documents_);
  9450. }
  9451. void Target_DocumentsTarget::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  9452. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target.DocumentsTarget)
  9453. if (&from == this) return;
  9454. Clear();
  9455. MergeFrom(from);
  9456. }
  9457. void Target_DocumentsTarget::CopyFrom(const Target_DocumentsTarget& from) {
  9458. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target.DocumentsTarget)
  9459. if (&from == this) return;
  9460. Clear();
  9461. MergeFrom(from);
  9462. }
  9463. bool Target_DocumentsTarget::IsInitialized() const {
  9464. return true;
  9465. }
  9466. void Target_DocumentsTarget::InternalSwap(Target_DocumentsTarget* other) {
  9467. using std::swap;
  9468. _internal_metadata_.Swap(&other->_internal_metadata_);
  9469. documents_.InternalSwap(CastToBase(&other->documents_));
  9470. }
  9471. ::PROTOBUF_NAMESPACE_ID::Metadata Target_DocumentsTarget::GetMetadata() const {
  9472. return GetMetadataStatic();
  9473. }
  9474. // ===================================================================
  9475. void Target_QueryTarget::InitAsDefaultInstance() {
  9476. ::google::firestore::v1::_Target_QueryTarget_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>(
  9477. ::google::firestore::v1::StructuredQuery::internal_default_instance());
  9478. }
  9479. class Target_QueryTarget::_Internal {
  9480. public:
  9481. static const ::google::firestore::v1::StructuredQuery& structured_query(const Target_QueryTarget* msg);
  9482. };
  9483. const ::google::firestore::v1::StructuredQuery&
  9484. Target_QueryTarget::_Internal::structured_query(const Target_QueryTarget* msg) {
  9485. return *msg->query_type_.structured_query_;
  9486. }
  9487. void Target_QueryTarget::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) {
  9488. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  9489. clear_query_type();
  9490. if (structured_query) {
  9491. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  9492. if (message_arena != submessage_arena) {
  9493. structured_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  9494. message_arena, structured_query, submessage_arena);
  9495. }
  9496. set_has_structured_query();
  9497. query_type_.structured_query_ = structured_query;
  9498. }
  9499. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.QueryTarget.structured_query)
  9500. }
  9501. void Target_QueryTarget::clear_structured_query() {
  9502. if (has_structured_query()) {
  9503. delete query_type_.structured_query_;
  9504. clear_has_query_type();
  9505. }
  9506. }
  9507. Target_QueryTarget::Target_QueryTarget()
  9508. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  9509. SharedCtor();
  9510. // @@protoc_insertion_point(constructor:google.firestore.v1.Target.QueryTarget)
  9511. }
  9512. Target_QueryTarget::Target_QueryTarget(const Target_QueryTarget& from)
  9513. : ::PROTOBUF_NAMESPACE_ID::Message(),
  9514. _internal_metadata_(nullptr) {
  9515. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9516. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  9517. if (!from.parent().empty()) {
  9518. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  9519. }
  9520. clear_has_query_type();
  9521. switch (from.query_type_case()) {
  9522. case kStructuredQuery: {
  9523. mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query());
  9524. break;
  9525. }
  9526. case QUERY_TYPE_NOT_SET: {
  9527. break;
  9528. }
  9529. }
  9530. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target.QueryTarget)
  9531. }
  9532. void Target_QueryTarget::SharedCtor() {
  9533. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  9534. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  9535. clear_has_query_type();
  9536. }
  9537. Target_QueryTarget::~Target_QueryTarget() {
  9538. // @@protoc_insertion_point(destructor:google.firestore.v1.Target.QueryTarget)
  9539. SharedDtor();
  9540. }
  9541. void Target_QueryTarget::SharedDtor() {
  9542. parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  9543. if (has_query_type()) {
  9544. clear_query_type();
  9545. }
  9546. }
  9547. void Target_QueryTarget::SetCachedSize(int size) const {
  9548. _cached_size_.Set(size);
  9549. }
  9550. const Target_QueryTarget& Target_QueryTarget::default_instance() {
  9551. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  9552. return *internal_default_instance();
  9553. }
  9554. void Target_QueryTarget::clear_query_type() {
  9555. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target.QueryTarget)
  9556. switch (query_type_case()) {
  9557. case kStructuredQuery: {
  9558. delete query_type_.structured_query_;
  9559. break;
  9560. }
  9561. case QUERY_TYPE_NOT_SET: {
  9562. break;
  9563. }
  9564. }
  9565. _oneof_case_[0] = QUERY_TYPE_NOT_SET;
  9566. }
  9567. void Target_QueryTarget::Clear() {
  9568. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target.QueryTarget)
  9569. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9570. // Prevent compiler warnings about cached_has_bits being unused
  9571. (void) cached_has_bits;
  9572. parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  9573. clear_query_type();
  9574. _internal_metadata_.Clear();
  9575. }
  9576. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  9577. const char* Target_QueryTarget::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  9578. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  9579. while (!ctx->Done(&ptr)) {
  9580. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  9581. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  9582. CHK_(ptr);
  9583. switch (tag >> 3) {
  9584. // string parent = 1;
  9585. case 1:
  9586. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  9587. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_parent(), ptr, ctx, "google.firestore.v1.Target.QueryTarget.parent");
  9588. CHK_(ptr);
  9589. } else goto handle_unusual;
  9590. continue;
  9591. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9592. case 2:
  9593. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  9594. ptr = ctx->ParseMessage(mutable_structured_query(), ptr);
  9595. CHK_(ptr);
  9596. } else goto handle_unusual;
  9597. continue;
  9598. default: {
  9599. handle_unusual:
  9600. if ((tag & 7) == 4 || tag == 0) {
  9601. ctx->SetLastTag(tag);
  9602. goto success;
  9603. }
  9604. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  9605. CHK_(ptr != nullptr);
  9606. continue;
  9607. }
  9608. } // switch
  9609. } // while
  9610. success:
  9611. return ptr;
  9612. failure:
  9613. ptr = nullptr;
  9614. goto success;
  9615. #undef CHK_
  9616. }
  9617. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  9618. bool Target_QueryTarget::MergePartialFromCodedStream(
  9619. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  9620. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  9621. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  9622. // @@protoc_insertion_point(parse_start:google.firestore.v1.Target.QueryTarget)
  9623. for (;;) {
  9624. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9625. tag = p.first;
  9626. if (!p.second) goto handle_unusual;
  9627. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9628. // string parent = 1;
  9629. case 1: {
  9630. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  9631. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  9632. input, this->mutable_parent()));
  9633. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  9634. this->parent().data(), static_cast<int>(this->parent().length()),
  9635. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  9636. "google.firestore.v1.Target.QueryTarget.parent"));
  9637. } else {
  9638. goto handle_unusual;
  9639. }
  9640. break;
  9641. }
  9642. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9643. case 2: {
  9644. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  9645. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  9646. input, mutable_structured_query()));
  9647. } else {
  9648. goto handle_unusual;
  9649. }
  9650. break;
  9651. }
  9652. default: {
  9653. handle_unusual:
  9654. if (tag == 0) {
  9655. goto success;
  9656. }
  9657. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  9658. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9659. break;
  9660. }
  9661. }
  9662. }
  9663. success:
  9664. // @@protoc_insertion_point(parse_success:google.firestore.v1.Target.QueryTarget)
  9665. return true;
  9666. failure:
  9667. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target.QueryTarget)
  9668. return false;
  9669. #undef DO_
  9670. }
  9671. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  9672. void Target_QueryTarget::SerializeWithCachedSizes(
  9673. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  9674. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target.QueryTarget)
  9675. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9676. (void) cached_has_bits;
  9677. // string parent = 1;
  9678. if (this->parent().size() > 0) {
  9679. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  9680. this->parent().data(), static_cast<int>(this->parent().length()),
  9681. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  9682. "google.firestore.v1.Target.QueryTarget.parent");
  9683. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  9684. 1, this->parent(), output);
  9685. }
  9686. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9687. if (has_structured_query()) {
  9688. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  9689. 2, _Internal::structured_query(this), output);
  9690. }
  9691. if (_internal_metadata_.have_unknown_fields()) {
  9692. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  9693. _internal_metadata_.unknown_fields(), output);
  9694. }
  9695. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target.QueryTarget)
  9696. }
  9697. ::PROTOBUF_NAMESPACE_ID::uint8* Target_QueryTarget::InternalSerializeWithCachedSizesToArray(
  9698. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  9699. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target.QueryTarget)
  9700. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9701. (void) cached_has_bits;
  9702. // string parent = 1;
  9703. if (this->parent().size() > 0) {
  9704. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  9705. this->parent().data(), static_cast<int>(this->parent().length()),
  9706. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  9707. "google.firestore.v1.Target.QueryTarget.parent");
  9708. target =
  9709. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  9710. 1, this->parent(), target);
  9711. }
  9712. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9713. if (has_structured_query()) {
  9714. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  9715. InternalWriteMessageToArray(
  9716. 2, _Internal::structured_query(this), target);
  9717. }
  9718. if (_internal_metadata_.have_unknown_fields()) {
  9719. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  9720. _internal_metadata_.unknown_fields(), target);
  9721. }
  9722. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target.QueryTarget)
  9723. return target;
  9724. }
  9725. size_t Target_QueryTarget::ByteSizeLong() const {
  9726. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target.QueryTarget)
  9727. size_t total_size = 0;
  9728. if (_internal_metadata_.have_unknown_fields()) {
  9729. total_size +=
  9730. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  9731. _internal_metadata_.unknown_fields());
  9732. }
  9733. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9734. // Prevent compiler warnings about cached_has_bits being unused
  9735. (void) cached_has_bits;
  9736. // string parent = 1;
  9737. if (this->parent().size() > 0) {
  9738. total_size += 1 +
  9739. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  9740. this->parent());
  9741. }
  9742. switch (query_type_case()) {
  9743. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9744. case kStructuredQuery: {
  9745. total_size += 1 +
  9746. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  9747. *query_type_.structured_query_);
  9748. break;
  9749. }
  9750. case QUERY_TYPE_NOT_SET: {
  9751. break;
  9752. }
  9753. }
  9754. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  9755. SetCachedSize(cached_size);
  9756. return total_size;
  9757. }
  9758. void Target_QueryTarget::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  9759. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target.QueryTarget)
  9760. GOOGLE_DCHECK_NE(&from, this);
  9761. const Target_QueryTarget* source =
  9762. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Target_QueryTarget>(
  9763. &from);
  9764. if (source == nullptr) {
  9765. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target.QueryTarget)
  9766. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  9767. } else {
  9768. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target.QueryTarget)
  9769. MergeFrom(*source);
  9770. }
  9771. }
  9772. void Target_QueryTarget::MergeFrom(const Target_QueryTarget& from) {
  9773. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target.QueryTarget)
  9774. GOOGLE_DCHECK_NE(&from, this);
  9775. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9776. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  9777. (void) cached_has_bits;
  9778. if (from.parent().size() > 0) {
  9779. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  9780. }
  9781. switch (from.query_type_case()) {
  9782. case kStructuredQuery: {
  9783. mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query());
  9784. break;
  9785. }
  9786. case QUERY_TYPE_NOT_SET: {
  9787. break;
  9788. }
  9789. }
  9790. }
  9791. void Target_QueryTarget::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  9792. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target.QueryTarget)
  9793. if (&from == this) return;
  9794. Clear();
  9795. MergeFrom(from);
  9796. }
  9797. void Target_QueryTarget::CopyFrom(const Target_QueryTarget& from) {
  9798. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target.QueryTarget)
  9799. if (&from == this) return;
  9800. Clear();
  9801. MergeFrom(from);
  9802. }
  9803. bool Target_QueryTarget::IsInitialized() const {
  9804. return true;
  9805. }
  9806. void Target_QueryTarget::InternalSwap(Target_QueryTarget* other) {
  9807. using std::swap;
  9808. _internal_metadata_.Swap(&other->_internal_metadata_);
  9809. parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  9810. GetArenaNoVirtual());
  9811. swap(query_type_, other->query_type_);
  9812. swap(_oneof_case_[0], other->_oneof_case_[0]);
  9813. }
  9814. ::PROTOBUF_NAMESPACE_ID::Metadata Target_QueryTarget::GetMetadata() const {
  9815. return GetMetadataStatic();
  9816. }
  9817. // ===================================================================
  9818. void Target::InitAsDefaultInstance() {
  9819. ::google::firestore::v1::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1::Target_QueryTarget*>(
  9820. ::google::firestore::v1::Target_QueryTarget::internal_default_instance());
  9821. ::google::firestore::v1::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1::Target_DocumentsTarget*>(
  9822. ::google::firestore::v1::Target_DocumentsTarget::internal_default_instance());
  9823. ::google::firestore::v1::_Target_default_instance_.resume_token_.UnsafeSetDefault(
  9824. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  9825. ::google::firestore::v1::_Target_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  9826. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  9827. }
  9828. class Target::_Internal {
  9829. public:
  9830. static const ::google::firestore::v1::Target_QueryTarget& query(const Target* msg);
  9831. static const ::google::firestore::v1::Target_DocumentsTarget& documents(const Target* msg);
  9832. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const Target* msg);
  9833. };
  9834. const ::google::firestore::v1::Target_QueryTarget&
  9835. Target::_Internal::query(const Target* msg) {
  9836. return *msg->target_type_.query_;
  9837. }
  9838. const ::google::firestore::v1::Target_DocumentsTarget&
  9839. Target::_Internal::documents(const Target* msg) {
  9840. return *msg->target_type_.documents_;
  9841. }
  9842. const PROTOBUF_NAMESPACE_ID::Timestamp&
  9843. Target::_Internal::read_time(const Target* msg) {
  9844. return *msg->resume_type_.read_time_;
  9845. }
  9846. void Target::set_allocated_query(::google::firestore::v1::Target_QueryTarget* query) {
  9847. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  9848. clear_target_type();
  9849. if (query) {
  9850. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  9851. if (message_arena != submessage_arena) {
  9852. query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  9853. message_arena, query, submessage_arena);
  9854. }
  9855. set_has_query();
  9856. target_type_.query_ = query;
  9857. }
  9858. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.query)
  9859. }
  9860. void Target::set_allocated_documents(::google::firestore::v1::Target_DocumentsTarget* documents) {
  9861. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  9862. clear_target_type();
  9863. if (documents) {
  9864. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  9865. if (message_arena != submessage_arena) {
  9866. documents = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  9867. message_arena, documents, submessage_arena);
  9868. }
  9869. set_has_documents();
  9870. target_type_.documents_ = documents;
  9871. }
  9872. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.documents)
  9873. }
  9874. void Target::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  9875. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  9876. clear_resume_type();
  9877. if (read_time) {
  9878. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  9879. reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
  9880. if (message_arena != submessage_arena) {
  9881. read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  9882. message_arena, read_time, submessage_arena);
  9883. }
  9884. set_has_read_time();
  9885. resume_type_.read_time_ = read_time;
  9886. }
  9887. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.read_time)
  9888. }
  9889. void Target::clear_read_time() {
  9890. if (has_read_time()) {
  9891. delete resume_type_.read_time_;
  9892. clear_has_resume_type();
  9893. }
  9894. }
  9895. Target::Target()
  9896. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  9897. SharedCtor();
  9898. // @@protoc_insertion_point(constructor:google.firestore.v1.Target)
  9899. }
  9900. Target::Target(const Target& from)
  9901. : ::PROTOBUF_NAMESPACE_ID::Message(),
  9902. _internal_metadata_(nullptr) {
  9903. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9904. ::memcpy(&target_id_, &from.target_id_,
  9905. static_cast<size_t>(reinterpret_cast<char*>(&once_) -
  9906. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  9907. clear_has_target_type();
  9908. switch (from.target_type_case()) {
  9909. case kQuery: {
  9910. mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query());
  9911. break;
  9912. }
  9913. case kDocuments: {
  9914. mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents());
  9915. break;
  9916. }
  9917. case TARGET_TYPE_NOT_SET: {
  9918. break;
  9919. }
  9920. }
  9921. clear_has_resume_type();
  9922. switch (from.resume_type_case()) {
  9923. case kResumeToken: {
  9924. set_resume_token(from.resume_token());
  9925. break;
  9926. }
  9927. case kReadTime: {
  9928. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  9929. break;
  9930. }
  9931. case RESUME_TYPE_NOT_SET: {
  9932. break;
  9933. }
  9934. }
  9935. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target)
  9936. }
  9937. void Target::SharedCtor() {
  9938. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  9939. ::memset(&target_id_, 0, static_cast<size_t>(
  9940. reinterpret_cast<char*>(&once_) -
  9941. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  9942. clear_has_target_type();
  9943. clear_has_resume_type();
  9944. }
  9945. Target::~Target() {
  9946. // @@protoc_insertion_point(destructor:google.firestore.v1.Target)
  9947. SharedDtor();
  9948. }
  9949. void Target::SharedDtor() {
  9950. if (has_target_type()) {
  9951. clear_target_type();
  9952. }
  9953. if (has_resume_type()) {
  9954. clear_resume_type();
  9955. }
  9956. }
  9957. void Target::SetCachedSize(int size) const {
  9958. _cached_size_.Set(size);
  9959. }
  9960. const Target& Target::default_instance() {
  9961. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  9962. return *internal_default_instance();
  9963. }
  9964. void Target::clear_target_type() {
  9965. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target)
  9966. switch (target_type_case()) {
  9967. case kQuery: {
  9968. delete target_type_.query_;
  9969. break;
  9970. }
  9971. case kDocuments: {
  9972. delete target_type_.documents_;
  9973. break;
  9974. }
  9975. case TARGET_TYPE_NOT_SET: {
  9976. break;
  9977. }
  9978. }
  9979. _oneof_case_[0] = TARGET_TYPE_NOT_SET;
  9980. }
  9981. void Target::clear_resume_type() {
  9982. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target)
  9983. switch (resume_type_case()) {
  9984. case kResumeToken: {
  9985. resume_type_.resume_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  9986. break;
  9987. }
  9988. case kReadTime: {
  9989. delete resume_type_.read_time_;
  9990. break;
  9991. }
  9992. case RESUME_TYPE_NOT_SET: {
  9993. break;
  9994. }
  9995. }
  9996. _oneof_case_[1] = RESUME_TYPE_NOT_SET;
  9997. }
  9998. void Target::Clear() {
  9999. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target)
  10000. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10001. // Prevent compiler warnings about cached_has_bits being unused
  10002. (void) cached_has_bits;
  10003. ::memset(&target_id_, 0, static_cast<size_t>(
  10004. reinterpret_cast<char*>(&once_) -
  10005. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  10006. clear_target_type();
  10007. clear_resume_type();
  10008. _internal_metadata_.Clear();
  10009. }
  10010. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  10011. const char* Target::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  10012. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  10013. while (!ctx->Done(&ptr)) {
  10014. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  10015. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  10016. CHK_(ptr);
  10017. switch (tag >> 3) {
  10018. // .google.firestore.v1.Target.QueryTarget query = 2;
  10019. case 2:
  10020. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  10021. ptr = ctx->ParseMessage(mutable_query(), ptr);
  10022. CHK_(ptr);
  10023. } else goto handle_unusual;
  10024. continue;
  10025. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  10026. case 3:
  10027. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  10028. ptr = ctx->ParseMessage(mutable_documents(), ptr);
  10029. CHK_(ptr);
  10030. } else goto handle_unusual;
  10031. continue;
  10032. // bytes resume_token = 4;
  10033. case 4:
  10034. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  10035. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_resume_token(), ptr, ctx);
  10036. CHK_(ptr);
  10037. } else goto handle_unusual;
  10038. continue;
  10039. // int32 target_id = 5;
  10040. case 5:
  10041. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
  10042. target_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  10043. CHK_(ptr);
  10044. } else goto handle_unusual;
  10045. continue;
  10046. // bool once = 6;
  10047. case 6:
  10048. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
  10049. once_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  10050. CHK_(ptr);
  10051. } else goto handle_unusual;
  10052. continue;
  10053. // .google.protobuf.Timestamp read_time = 11;
  10054. case 11:
  10055. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
  10056. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  10057. CHK_(ptr);
  10058. } else goto handle_unusual;
  10059. continue;
  10060. default: {
  10061. handle_unusual:
  10062. if ((tag & 7) == 4 || tag == 0) {
  10063. ctx->SetLastTag(tag);
  10064. goto success;
  10065. }
  10066. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  10067. CHK_(ptr != nullptr);
  10068. continue;
  10069. }
  10070. } // switch
  10071. } // while
  10072. success:
  10073. return ptr;
  10074. failure:
  10075. ptr = nullptr;
  10076. goto success;
  10077. #undef CHK_
  10078. }
  10079. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  10080. bool Target::MergePartialFromCodedStream(
  10081. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  10082. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  10083. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  10084. // @@protoc_insertion_point(parse_start:google.firestore.v1.Target)
  10085. for (;;) {
  10086. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10087. tag = p.first;
  10088. if (!p.second) goto handle_unusual;
  10089. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10090. // .google.firestore.v1.Target.QueryTarget query = 2;
  10091. case 2: {
  10092. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  10093. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  10094. input, mutable_query()));
  10095. } else {
  10096. goto handle_unusual;
  10097. }
  10098. break;
  10099. }
  10100. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  10101. case 3: {
  10102. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  10103. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  10104. input, mutable_documents()));
  10105. } else {
  10106. goto handle_unusual;
  10107. }
  10108. break;
  10109. }
  10110. // bytes resume_token = 4;
  10111. case 4: {
  10112. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  10113. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  10114. input, this->mutable_resume_token()));
  10115. } else {
  10116. goto handle_unusual;
  10117. }
  10118. break;
  10119. }
  10120. // int32 target_id = 5;
  10121. case 5: {
  10122. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
  10123. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  10124. ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
  10125. input, &target_id_)));
  10126. } else {
  10127. goto handle_unusual;
  10128. }
  10129. break;
  10130. }
  10131. // bool once = 6;
  10132. case 6: {
  10133. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) {
  10134. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  10135. bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
  10136. input, &once_)));
  10137. } else {
  10138. goto handle_unusual;
  10139. }
  10140. break;
  10141. }
  10142. // .google.protobuf.Timestamp read_time = 11;
  10143. case 11: {
  10144. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) {
  10145. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  10146. input, mutable_read_time()));
  10147. } else {
  10148. goto handle_unusual;
  10149. }
  10150. break;
  10151. }
  10152. default: {
  10153. handle_unusual:
  10154. if (tag == 0) {
  10155. goto success;
  10156. }
  10157. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  10158. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10159. break;
  10160. }
  10161. }
  10162. }
  10163. success:
  10164. // @@protoc_insertion_point(parse_success:google.firestore.v1.Target)
  10165. return true;
  10166. failure:
  10167. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target)
  10168. return false;
  10169. #undef DO_
  10170. }
  10171. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  10172. void Target::SerializeWithCachedSizes(
  10173. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  10174. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target)
  10175. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10176. (void) cached_has_bits;
  10177. // .google.firestore.v1.Target.QueryTarget query = 2;
  10178. if (has_query()) {
  10179. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  10180. 2, _Internal::query(this), output);
  10181. }
  10182. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  10183. if (has_documents()) {
  10184. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  10185. 3, _Internal::documents(this), output);
  10186. }
  10187. // bytes resume_token = 4;
  10188. if (has_resume_token()) {
  10189. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  10190. 4, this->resume_token(), output);
  10191. }
  10192. // int32 target_id = 5;
  10193. if (this->target_id() != 0) {
  10194. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(5, this->target_id(), output);
  10195. }
  10196. // bool once = 6;
  10197. if (this->once() != 0) {
  10198. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(6, this->once(), output);
  10199. }
  10200. // .google.protobuf.Timestamp read_time = 11;
  10201. if (has_read_time()) {
  10202. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  10203. 11, _Internal::read_time(this), output);
  10204. }
  10205. if (_internal_metadata_.have_unknown_fields()) {
  10206. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  10207. _internal_metadata_.unknown_fields(), output);
  10208. }
  10209. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target)
  10210. }
  10211. ::PROTOBUF_NAMESPACE_ID::uint8* Target::InternalSerializeWithCachedSizesToArray(
  10212. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  10213. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target)
  10214. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10215. (void) cached_has_bits;
  10216. // .google.firestore.v1.Target.QueryTarget query = 2;
  10217. if (has_query()) {
  10218. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  10219. InternalWriteMessageToArray(
  10220. 2, _Internal::query(this), target);
  10221. }
  10222. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  10223. if (has_documents()) {
  10224. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  10225. InternalWriteMessageToArray(
  10226. 3, _Internal::documents(this), target);
  10227. }
  10228. // bytes resume_token = 4;
  10229. if (has_resume_token()) {
  10230. target =
  10231. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  10232. 4, this->resume_token(), target);
  10233. }
  10234. // int32 target_id = 5;
  10235. if (this->target_id() != 0) {
  10236. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->target_id(), target);
  10237. }
  10238. // bool once = 6;
  10239. if (this->once() != 0) {
  10240. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->once(), target);
  10241. }
  10242. // .google.protobuf.Timestamp read_time = 11;
  10243. if (has_read_time()) {
  10244. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  10245. InternalWriteMessageToArray(
  10246. 11, _Internal::read_time(this), target);
  10247. }
  10248. if (_internal_metadata_.have_unknown_fields()) {
  10249. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  10250. _internal_metadata_.unknown_fields(), target);
  10251. }
  10252. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target)
  10253. return target;
  10254. }
  10255. size_t Target::ByteSizeLong() const {
  10256. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target)
  10257. size_t total_size = 0;
  10258. if (_internal_metadata_.have_unknown_fields()) {
  10259. total_size +=
  10260. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  10261. _internal_metadata_.unknown_fields());
  10262. }
  10263. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10264. // Prevent compiler warnings about cached_has_bits being unused
  10265. (void) cached_has_bits;
  10266. // int32 target_id = 5;
  10267. if (this->target_id() != 0) {
  10268. total_size += 1 +
  10269. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  10270. this->target_id());
  10271. }
  10272. // bool once = 6;
  10273. if (this->once() != 0) {
  10274. total_size += 1 + 1;
  10275. }
  10276. switch (target_type_case()) {
  10277. // .google.firestore.v1.Target.QueryTarget query = 2;
  10278. case kQuery: {
  10279. total_size += 1 +
  10280. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  10281. *target_type_.query_);
  10282. break;
  10283. }
  10284. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  10285. case kDocuments: {
  10286. total_size += 1 +
  10287. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  10288. *target_type_.documents_);
  10289. break;
  10290. }
  10291. case TARGET_TYPE_NOT_SET: {
  10292. break;
  10293. }
  10294. }
  10295. switch (resume_type_case()) {
  10296. // bytes resume_token = 4;
  10297. case kResumeToken: {
  10298. total_size += 1 +
  10299. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  10300. this->resume_token());
  10301. break;
  10302. }
  10303. // .google.protobuf.Timestamp read_time = 11;
  10304. case kReadTime: {
  10305. total_size += 1 +
  10306. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  10307. *resume_type_.read_time_);
  10308. break;
  10309. }
  10310. case RESUME_TYPE_NOT_SET: {
  10311. break;
  10312. }
  10313. }
  10314. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  10315. SetCachedSize(cached_size);
  10316. return total_size;
  10317. }
  10318. void Target::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  10319. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target)
  10320. GOOGLE_DCHECK_NE(&from, this);
  10321. const Target* source =
  10322. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Target>(
  10323. &from);
  10324. if (source == nullptr) {
  10325. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target)
  10326. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  10327. } else {
  10328. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target)
  10329. MergeFrom(*source);
  10330. }
  10331. }
  10332. void Target::MergeFrom(const Target& from) {
  10333. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target)
  10334. GOOGLE_DCHECK_NE(&from, this);
  10335. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10336. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10337. (void) cached_has_bits;
  10338. if (from.target_id() != 0) {
  10339. set_target_id(from.target_id());
  10340. }
  10341. if (from.once() != 0) {
  10342. set_once(from.once());
  10343. }
  10344. switch (from.target_type_case()) {
  10345. case kQuery: {
  10346. mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query());
  10347. break;
  10348. }
  10349. case kDocuments: {
  10350. mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents());
  10351. break;
  10352. }
  10353. case TARGET_TYPE_NOT_SET: {
  10354. break;
  10355. }
  10356. }
  10357. switch (from.resume_type_case()) {
  10358. case kResumeToken: {
  10359. set_resume_token(from.resume_token());
  10360. break;
  10361. }
  10362. case kReadTime: {
  10363. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  10364. break;
  10365. }
  10366. case RESUME_TYPE_NOT_SET: {
  10367. break;
  10368. }
  10369. }
  10370. }
  10371. void Target::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  10372. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target)
  10373. if (&from == this) return;
  10374. Clear();
  10375. MergeFrom(from);
  10376. }
  10377. void Target::CopyFrom(const Target& from) {
  10378. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target)
  10379. if (&from == this) return;
  10380. Clear();
  10381. MergeFrom(from);
  10382. }
  10383. bool Target::IsInitialized() const {
  10384. return true;
  10385. }
  10386. void Target::InternalSwap(Target* other) {
  10387. using std::swap;
  10388. _internal_metadata_.Swap(&other->_internal_metadata_);
  10389. swap(target_id_, other->target_id_);
  10390. swap(once_, other->once_);
  10391. swap(target_type_, other->target_type_);
  10392. swap(resume_type_, other->resume_type_);
  10393. swap(_oneof_case_[0], other->_oneof_case_[0]);
  10394. swap(_oneof_case_[1], other->_oneof_case_[1]);
  10395. }
  10396. ::PROTOBUF_NAMESPACE_ID::Metadata Target::GetMetadata() const {
  10397. return GetMetadataStatic();
  10398. }
  10399. // ===================================================================
  10400. void TargetChange::InitAsDefaultInstance() {
  10401. ::google::firestore::v1::_TargetChange_default_instance_._instance.get_mutable()->cause_ = const_cast< ::google::rpc::Status*>(
  10402. ::google::rpc::Status::internal_default_instance());
  10403. ::google::firestore::v1::_TargetChange_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  10404. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  10405. }
  10406. class TargetChange::_Internal {
  10407. public:
  10408. static const ::google::rpc::Status& cause(const TargetChange* msg);
  10409. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const TargetChange* msg);
  10410. };
  10411. const ::google::rpc::Status&
  10412. TargetChange::_Internal::cause(const TargetChange* msg) {
  10413. return *msg->cause_;
  10414. }
  10415. const PROTOBUF_NAMESPACE_ID::Timestamp&
  10416. TargetChange::_Internal::read_time(const TargetChange* msg) {
  10417. return *msg->read_time_;
  10418. }
  10419. void TargetChange::clear_cause() {
  10420. if (GetArenaNoVirtual() == nullptr && cause_ != nullptr) {
  10421. delete cause_;
  10422. }
  10423. cause_ = nullptr;
  10424. }
  10425. void TargetChange::clear_read_time() {
  10426. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  10427. delete read_time_;
  10428. }
  10429. read_time_ = nullptr;
  10430. }
  10431. TargetChange::TargetChange()
  10432. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  10433. SharedCtor();
  10434. // @@protoc_insertion_point(constructor:google.firestore.v1.TargetChange)
  10435. }
  10436. TargetChange::TargetChange(const TargetChange& from)
  10437. : ::PROTOBUF_NAMESPACE_ID::Message(),
  10438. _internal_metadata_(nullptr),
  10439. target_ids_(from.target_ids_) {
  10440. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10441. resume_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10442. if (!from.resume_token().empty()) {
  10443. resume_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  10444. }
  10445. if (from.has_cause()) {
  10446. cause_ = new ::google::rpc::Status(*from.cause_);
  10447. } else {
  10448. cause_ = nullptr;
  10449. }
  10450. if (from.has_read_time()) {
  10451. read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  10452. } else {
  10453. read_time_ = nullptr;
  10454. }
  10455. target_change_type_ = from.target_change_type_;
  10456. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TargetChange)
  10457. }
  10458. void TargetChange::SharedCtor() {
  10459. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  10460. resume_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10461. ::memset(&cause_, 0, static_cast<size_t>(
  10462. reinterpret_cast<char*>(&target_change_type_) -
  10463. reinterpret_cast<char*>(&cause_)) + sizeof(target_change_type_));
  10464. }
  10465. TargetChange::~TargetChange() {
  10466. // @@protoc_insertion_point(destructor:google.firestore.v1.TargetChange)
  10467. SharedDtor();
  10468. }
  10469. void TargetChange::SharedDtor() {
  10470. resume_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10471. if (this != internal_default_instance()) delete cause_;
  10472. if (this != internal_default_instance()) delete read_time_;
  10473. }
  10474. void TargetChange::SetCachedSize(int size) const {
  10475. _cached_size_.Set(size);
  10476. }
  10477. const TargetChange& TargetChange::default_instance() {
  10478. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  10479. return *internal_default_instance();
  10480. }
  10481. void TargetChange::Clear() {
  10482. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.TargetChange)
  10483. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10484. // Prevent compiler warnings about cached_has_bits being unused
  10485. (void) cached_has_bits;
  10486. target_ids_.Clear();
  10487. resume_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10488. if (GetArenaNoVirtual() == nullptr && cause_ != nullptr) {
  10489. delete cause_;
  10490. }
  10491. cause_ = nullptr;
  10492. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  10493. delete read_time_;
  10494. }
  10495. read_time_ = nullptr;
  10496. target_change_type_ = 0;
  10497. _internal_metadata_.Clear();
  10498. }
  10499. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  10500. const char* TargetChange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  10501. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  10502. while (!ctx->Done(&ptr)) {
  10503. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  10504. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  10505. CHK_(ptr);
  10506. switch (tag >> 3) {
  10507. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  10508. case 1:
  10509. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
  10510. ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  10511. CHK_(ptr);
  10512. set_target_change_type(static_cast<::google::firestore::v1::TargetChange_TargetChangeType>(val));
  10513. } else goto handle_unusual;
  10514. continue;
  10515. // repeated int32 target_ids = 2;
  10516. case 2:
  10517. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  10518. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_target_ids(), ptr, ctx);
  10519. CHK_(ptr);
  10520. } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
  10521. add_target_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
  10522. CHK_(ptr);
  10523. } else goto handle_unusual;
  10524. continue;
  10525. // .google.rpc.Status cause = 3;
  10526. case 3:
  10527. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  10528. ptr = ctx->ParseMessage(mutable_cause(), ptr);
  10529. CHK_(ptr);
  10530. } else goto handle_unusual;
  10531. continue;
  10532. // bytes resume_token = 4;
  10533. case 4:
  10534. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  10535. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_resume_token(), ptr, ctx);
  10536. CHK_(ptr);
  10537. } else goto handle_unusual;
  10538. continue;
  10539. // .google.protobuf.Timestamp read_time = 6;
  10540. case 6:
  10541. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
  10542. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  10543. CHK_(ptr);
  10544. } else goto handle_unusual;
  10545. continue;
  10546. default: {
  10547. handle_unusual:
  10548. if ((tag & 7) == 4 || tag == 0) {
  10549. ctx->SetLastTag(tag);
  10550. goto success;
  10551. }
  10552. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  10553. CHK_(ptr != nullptr);
  10554. continue;
  10555. }
  10556. } // switch
  10557. } // while
  10558. success:
  10559. return ptr;
  10560. failure:
  10561. ptr = nullptr;
  10562. goto success;
  10563. #undef CHK_
  10564. }
  10565. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  10566. bool TargetChange::MergePartialFromCodedStream(
  10567. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  10568. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  10569. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  10570. // @@protoc_insertion_point(parse_start:google.firestore.v1.TargetChange)
  10571. for (;;) {
  10572. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10573. tag = p.first;
  10574. if (!p.second) goto handle_unusual;
  10575. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10576. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  10577. case 1: {
  10578. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
  10579. int value = 0;
  10580. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  10581. int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
  10582. input, &value)));
  10583. set_target_change_type(static_cast< ::google::firestore::v1::TargetChange_TargetChangeType >(value));
  10584. } else {
  10585. goto handle_unusual;
  10586. }
  10587. break;
  10588. }
  10589. // repeated int32 target_ids = 2;
  10590. case 2: {
  10591. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  10592. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive<
  10593. ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
  10594. input, this->mutable_target_ids())));
  10595. } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
  10596. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  10597. ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
  10598. 1, 18u, input, this->mutable_target_ids())));
  10599. } else {
  10600. goto handle_unusual;
  10601. }
  10602. break;
  10603. }
  10604. // .google.rpc.Status cause = 3;
  10605. case 3: {
  10606. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  10607. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  10608. input, mutable_cause()));
  10609. } else {
  10610. goto handle_unusual;
  10611. }
  10612. break;
  10613. }
  10614. // bytes resume_token = 4;
  10615. case 4: {
  10616. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
  10617. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
  10618. input, this->mutable_resume_token()));
  10619. } else {
  10620. goto handle_unusual;
  10621. }
  10622. break;
  10623. }
  10624. // .google.protobuf.Timestamp read_time = 6;
  10625. case 6: {
  10626. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
  10627. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  10628. input, mutable_read_time()));
  10629. } else {
  10630. goto handle_unusual;
  10631. }
  10632. break;
  10633. }
  10634. default: {
  10635. handle_unusual:
  10636. if (tag == 0) {
  10637. goto success;
  10638. }
  10639. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  10640. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10641. break;
  10642. }
  10643. }
  10644. }
  10645. success:
  10646. // @@protoc_insertion_point(parse_success:google.firestore.v1.TargetChange)
  10647. return true;
  10648. failure:
  10649. // @@protoc_insertion_point(parse_failure:google.firestore.v1.TargetChange)
  10650. return false;
  10651. #undef DO_
  10652. }
  10653. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  10654. void TargetChange::SerializeWithCachedSizes(
  10655. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  10656. // @@protoc_insertion_point(serialize_start:google.firestore.v1.TargetChange)
  10657. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10658. (void) cached_has_bits;
  10659. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  10660. if (this->target_change_type() != 0) {
  10661. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
  10662. 1, this->target_change_type(), output);
  10663. }
  10664. // repeated int32 target_ids = 2;
  10665. if (this->target_ids_size() > 0) {
  10666. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  10667. output->WriteVarint32(_target_ids_cached_byte_size_.load(
  10668. std::memory_order_relaxed));
  10669. }
  10670. for (int i = 0, n = this->target_ids_size(); i < n; i++) {
  10671. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag(
  10672. this->target_ids(i), output);
  10673. }
  10674. // .google.rpc.Status cause = 3;
  10675. if (this->has_cause()) {
  10676. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  10677. 3, _Internal::cause(this), output);
  10678. }
  10679. // bytes resume_token = 4;
  10680. if (this->resume_token().size() > 0) {
  10681. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
  10682. 4, this->resume_token(), output);
  10683. }
  10684. // .google.protobuf.Timestamp read_time = 6;
  10685. if (this->has_read_time()) {
  10686. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  10687. 6, _Internal::read_time(this), output);
  10688. }
  10689. if (_internal_metadata_.have_unknown_fields()) {
  10690. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  10691. _internal_metadata_.unknown_fields(), output);
  10692. }
  10693. // @@protoc_insertion_point(serialize_end:google.firestore.v1.TargetChange)
  10694. }
  10695. ::PROTOBUF_NAMESPACE_ID::uint8* TargetChange::InternalSerializeWithCachedSizesToArray(
  10696. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  10697. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TargetChange)
  10698. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10699. (void) cached_has_bits;
  10700. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  10701. if (this->target_change_type() != 0) {
  10702. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
  10703. 1, this->target_change_type(), target);
  10704. }
  10705. // repeated int32 target_ids = 2;
  10706. if (this->target_ids_size() > 0) {
  10707. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray(
  10708. 2,
  10709. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  10710. target);
  10711. target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray(
  10712. _target_ids_cached_byte_size_.load(std::memory_order_relaxed),
  10713. target);
  10714. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  10715. WriteInt32NoTagToArray(this->target_ids_, target);
  10716. }
  10717. // .google.rpc.Status cause = 3;
  10718. if (this->has_cause()) {
  10719. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  10720. InternalWriteMessageToArray(
  10721. 3, _Internal::cause(this), target);
  10722. }
  10723. // bytes resume_token = 4;
  10724. if (this->resume_token().size() > 0) {
  10725. target =
  10726. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
  10727. 4, this->resume_token(), target);
  10728. }
  10729. // .google.protobuf.Timestamp read_time = 6;
  10730. if (this->has_read_time()) {
  10731. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  10732. InternalWriteMessageToArray(
  10733. 6, _Internal::read_time(this), target);
  10734. }
  10735. if (_internal_metadata_.have_unknown_fields()) {
  10736. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  10737. _internal_metadata_.unknown_fields(), target);
  10738. }
  10739. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TargetChange)
  10740. return target;
  10741. }
  10742. size_t TargetChange::ByteSizeLong() const {
  10743. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TargetChange)
  10744. size_t total_size = 0;
  10745. if (_internal_metadata_.have_unknown_fields()) {
  10746. total_size +=
  10747. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  10748. _internal_metadata_.unknown_fields());
  10749. }
  10750. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10751. // Prevent compiler warnings about cached_has_bits being unused
  10752. (void) cached_has_bits;
  10753. // repeated int32 target_ids = 2;
  10754. {
  10755. size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  10756. Int32Size(this->target_ids_);
  10757. if (data_size > 0) {
  10758. total_size += 1 +
  10759. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  10760. static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
  10761. }
  10762. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
  10763. _target_ids_cached_byte_size_.store(cached_size,
  10764. std::memory_order_relaxed);
  10765. total_size += data_size;
  10766. }
  10767. // bytes resume_token = 4;
  10768. if (this->resume_token().size() > 0) {
  10769. total_size += 1 +
  10770. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  10771. this->resume_token());
  10772. }
  10773. // .google.rpc.Status cause = 3;
  10774. if (this->has_cause()) {
  10775. total_size += 1 +
  10776. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  10777. *cause_);
  10778. }
  10779. // .google.protobuf.Timestamp read_time = 6;
  10780. if (this->has_read_time()) {
  10781. total_size += 1 +
  10782. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  10783. *read_time_);
  10784. }
  10785. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  10786. if (this->target_change_type() != 0) {
  10787. total_size += 1 +
  10788. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->target_change_type());
  10789. }
  10790. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  10791. SetCachedSize(cached_size);
  10792. return total_size;
  10793. }
  10794. void TargetChange::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  10795. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TargetChange)
  10796. GOOGLE_DCHECK_NE(&from, this);
  10797. const TargetChange* source =
  10798. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TargetChange>(
  10799. &from);
  10800. if (source == nullptr) {
  10801. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TargetChange)
  10802. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  10803. } else {
  10804. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TargetChange)
  10805. MergeFrom(*source);
  10806. }
  10807. }
  10808. void TargetChange::MergeFrom(const TargetChange& from) {
  10809. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TargetChange)
  10810. GOOGLE_DCHECK_NE(&from, this);
  10811. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10812. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10813. (void) cached_has_bits;
  10814. target_ids_.MergeFrom(from.target_ids_);
  10815. if (from.resume_token().size() > 0) {
  10816. resume_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  10817. }
  10818. if (from.has_cause()) {
  10819. mutable_cause()->::google::rpc::Status::MergeFrom(from.cause());
  10820. }
  10821. if (from.has_read_time()) {
  10822. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  10823. }
  10824. if (from.target_change_type() != 0) {
  10825. set_target_change_type(from.target_change_type());
  10826. }
  10827. }
  10828. void TargetChange::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  10829. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TargetChange)
  10830. if (&from == this) return;
  10831. Clear();
  10832. MergeFrom(from);
  10833. }
  10834. void TargetChange::CopyFrom(const TargetChange& from) {
  10835. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TargetChange)
  10836. if (&from == this) return;
  10837. Clear();
  10838. MergeFrom(from);
  10839. }
  10840. bool TargetChange::IsInitialized() const {
  10841. return true;
  10842. }
  10843. void TargetChange::InternalSwap(TargetChange* other) {
  10844. using std::swap;
  10845. _internal_metadata_.Swap(&other->_internal_metadata_);
  10846. target_ids_.InternalSwap(&other->target_ids_);
  10847. resume_token_.Swap(&other->resume_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  10848. GetArenaNoVirtual());
  10849. swap(cause_, other->cause_);
  10850. swap(read_time_, other->read_time_);
  10851. swap(target_change_type_, other->target_change_type_);
  10852. }
  10853. ::PROTOBUF_NAMESPACE_ID::Metadata TargetChange::GetMetadata() const {
  10854. return GetMetadataStatic();
  10855. }
  10856. // ===================================================================
  10857. void ListCollectionIdsRequest::InitAsDefaultInstance() {
  10858. }
  10859. class ListCollectionIdsRequest::_Internal {
  10860. public:
  10861. };
  10862. ListCollectionIdsRequest::ListCollectionIdsRequest()
  10863. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  10864. SharedCtor();
  10865. // @@protoc_insertion_point(constructor:google.firestore.v1.ListCollectionIdsRequest)
  10866. }
  10867. ListCollectionIdsRequest::ListCollectionIdsRequest(const ListCollectionIdsRequest& from)
  10868. : ::PROTOBUF_NAMESPACE_ID::Message(),
  10869. _internal_metadata_(nullptr) {
  10870. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10871. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10872. if (!from.parent().empty()) {
  10873. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  10874. }
  10875. page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10876. if (!from.page_token().empty()) {
  10877. page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  10878. }
  10879. page_size_ = from.page_size_;
  10880. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListCollectionIdsRequest)
  10881. }
  10882. void ListCollectionIdsRequest::SharedCtor() {
  10883. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  10884. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10885. page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10886. page_size_ = 0;
  10887. }
  10888. ListCollectionIdsRequest::~ListCollectionIdsRequest() {
  10889. // @@protoc_insertion_point(destructor:google.firestore.v1.ListCollectionIdsRequest)
  10890. SharedDtor();
  10891. }
  10892. void ListCollectionIdsRequest::SharedDtor() {
  10893. parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10894. page_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10895. }
  10896. void ListCollectionIdsRequest::SetCachedSize(int size) const {
  10897. _cached_size_.Set(size);
  10898. }
  10899. const ListCollectionIdsRequest& ListCollectionIdsRequest::default_instance() {
  10900. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  10901. return *internal_default_instance();
  10902. }
  10903. void ListCollectionIdsRequest::Clear() {
  10904. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListCollectionIdsRequest)
  10905. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  10906. // Prevent compiler warnings about cached_has_bits being unused
  10907. (void) cached_has_bits;
  10908. parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10909. page_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  10910. page_size_ = 0;
  10911. _internal_metadata_.Clear();
  10912. }
  10913. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  10914. const char* ListCollectionIdsRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  10915. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  10916. while (!ctx->Done(&ptr)) {
  10917. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  10918. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  10919. CHK_(ptr);
  10920. switch (tag >> 3) {
  10921. // string parent = 1;
  10922. case 1:
  10923. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  10924. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_parent(), ptr, ctx, "google.firestore.v1.ListCollectionIdsRequest.parent");
  10925. CHK_(ptr);
  10926. } else goto handle_unusual;
  10927. continue;
  10928. // int32 page_size = 2;
  10929. case 2:
  10930. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
  10931. page_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  10932. CHK_(ptr);
  10933. } else goto handle_unusual;
  10934. continue;
  10935. // string page_token = 3;
  10936. case 3:
  10937. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  10938. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_page_token(), ptr, ctx, "google.firestore.v1.ListCollectionIdsRequest.page_token");
  10939. CHK_(ptr);
  10940. } else goto handle_unusual;
  10941. continue;
  10942. default: {
  10943. handle_unusual:
  10944. if ((tag & 7) == 4 || tag == 0) {
  10945. ctx->SetLastTag(tag);
  10946. goto success;
  10947. }
  10948. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  10949. CHK_(ptr != nullptr);
  10950. continue;
  10951. }
  10952. } // switch
  10953. } // while
  10954. success:
  10955. return ptr;
  10956. failure:
  10957. ptr = nullptr;
  10958. goto success;
  10959. #undef CHK_
  10960. }
  10961. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  10962. bool ListCollectionIdsRequest::MergePartialFromCodedStream(
  10963. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  10964. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  10965. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  10966. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListCollectionIdsRequest)
  10967. for (;;) {
  10968. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10969. tag = p.first;
  10970. if (!p.second) goto handle_unusual;
  10971. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10972. // string parent = 1;
  10973. case 1: {
  10974. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  10975. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  10976. input, this->mutable_parent()));
  10977. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  10978. this->parent().data(), static_cast<int>(this->parent().length()),
  10979. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  10980. "google.firestore.v1.ListCollectionIdsRequest.parent"));
  10981. } else {
  10982. goto handle_unusual;
  10983. }
  10984. break;
  10985. }
  10986. // int32 page_size = 2;
  10987. case 2: {
  10988. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
  10989. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  10990. ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
  10991. input, &page_size_)));
  10992. } else {
  10993. goto handle_unusual;
  10994. }
  10995. break;
  10996. }
  10997. // string page_token = 3;
  10998. case 3: {
  10999. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  11000. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  11001. input, this->mutable_page_token()));
  11002. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11003. this->page_token().data(), static_cast<int>(this->page_token().length()),
  11004. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  11005. "google.firestore.v1.ListCollectionIdsRequest.page_token"));
  11006. } else {
  11007. goto handle_unusual;
  11008. }
  11009. break;
  11010. }
  11011. default: {
  11012. handle_unusual:
  11013. if (tag == 0) {
  11014. goto success;
  11015. }
  11016. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  11017. input, tag, _internal_metadata_.mutable_unknown_fields()));
  11018. break;
  11019. }
  11020. }
  11021. }
  11022. success:
  11023. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListCollectionIdsRequest)
  11024. return true;
  11025. failure:
  11026. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListCollectionIdsRequest)
  11027. return false;
  11028. #undef DO_
  11029. }
  11030. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  11031. void ListCollectionIdsRequest::SerializeWithCachedSizes(
  11032. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  11033. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListCollectionIdsRequest)
  11034. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11035. (void) cached_has_bits;
  11036. // string parent = 1;
  11037. if (this->parent().size() > 0) {
  11038. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11039. this->parent().data(), static_cast<int>(this->parent().length()),
  11040. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  11041. "google.firestore.v1.ListCollectionIdsRequest.parent");
  11042. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  11043. 1, this->parent(), output);
  11044. }
  11045. // int32 page_size = 2;
  11046. if (this->page_size() != 0) {
  11047. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->page_size(), output);
  11048. }
  11049. // string page_token = 3;
  11050. if (this->page_token().size() > 0) {
  11051. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11052. this->page_token().data(), static_cast<int>(this->page_token().length()),
  11053. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  11054. "google.firestore.v1.ListCollectionIdsRequest.page_token");
  11055. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  11056. 3, this->page_token(), output);
  11057. }
  11058. if (_internal_metadata_.have_unknown_fields()) {
  11059. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  11060. _internal_metadata_.unknown_fields(), output);
  11061. }
  11062. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListCollectionIdsRequest)
  11063. }
  11064. ::PROTOBUF_NAMESPACE_ID::uint8* ListCollectionIdsRequest::InternalSerializeWithCachedSizesToArray(
  11065. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  11066. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListCollectionIdsRequest)
  11067. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11068. (void) cached_has_bits;
  11069. // string parent = 1;
  11070. if (this->parent().size() > 0) {
  11071. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11072. this->parent().data(), static_cast<int>(this->parent().length()),
  11073. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  11074. "google.firestore.v1.ListCollectionIdsRequest.parent");
  11075. target =
  11076. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  11077. 1, this->parent(), target);
  11078. }
  11079. // int32 page_size = 2;
  11080. if (this->page_size() != 0) {
  11081. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->page_size(), target);
  11082. }
  11083. // string page_token = 3;
  11084. if (this->page_token().size() > 0) {
  11085. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11086. this->page_token().data(), static_cast<int>(this->page_token().length()),
  11087. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  11088. "google.firestore.v1.ListCollectionIdsRequest.page_token");
  11089. target =
  11090. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  11091. 3, this->page_token(), target);
  11092. }
  11093. if (_internal_metadata_.have_unknown_fields()) {
  11094. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  11095. _internal_metadata_.unknown_fields(), target);
  11096. }
  11097. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListCollectionIdsRequest)
  11098. return target;
  11099. }
  11100. size_t ListCollectionIdsRequest::ByteSizeLong() const {
  11101. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListCollectionIdsRequest)
  11102. size_t total_size = 0;
  11103. if (_internal_metadata_.have_unknown_fields()) {
  11104. total_size +=
  11105. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  11106. _internal_metadata_.unknown_fields());
  11107. }
  11108. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11109. // Prevent compiler warnings about cached_has_bits being unused
  11110. (void) cached_has_bits;
  11111. // string parent = 1;
  11112. if (this->parent().size() > 0) {
  11113. total_size += 1 +
  11114. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  11115. this->parent());
  11116. }
  11117. // string page_token = 3;
  11118. if (this->page_token().size() > 0) {
  11119. total_size += 1 +
  11120. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  11121. this->page_token());
  11122. }
  11123. // int32 page_size = 2;
  11124. if (this->page_size() != 0) {
  11125. total_size += 1 +
  11126. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  11127. this->page_size());
  11128. }
  11129. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  11130. SetCachedSize(cached_size);
  11131. return total_size;
  11132. }
  11133. void ListCollectionIdsRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  11134. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListCollectionIdsRequest)
  11135. GOOGLE_DCHECK_NE(&from, this);
  11136. const ListCollectionIdsRequest* source =
  11137. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListCollectionIdsRequest>(
  11138. &from);
  11139. if (source == nullptr) {
  11140. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListCollectionIdsRequest)
  11141. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  11142. } else {
  11143. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListCollectionIdsRequest)
  11144. MergeFrom(*source);
  11145. }
  11146. }
  11147. void ListCollectionIdsRequest::MergeFrom(const ListCollectionIdsRequest& from) {
  11148. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListCollectionIdsRequest)
  11149. GOOGLE_DCHECK_NE(&from, this);
  11150. _internal_metadata_.MergeFrom(from._internal_metadata_);
  11151. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11152. (void) cached_has_bits;
  11153. if (from.parent().size() > 0) {
  11154. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  11155. }
  11156. if (from.page_token().size() > 0) {
  11157. page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  11158. }
  11159. if (from.page_size() != 0) {
  11160. set_page_size(from.page_size());
  11161. }
  11162. }
  11163. void ListCollectionIdsRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  11164. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListCollectionIdsRequest)
  11165. if (&from == this) return;
  11166. Clear();
  11167. MergeFrom(from);
  11168. }
  11169. void ListCollectionIdsRequest::CopyFrom(const ListCollectionIdsRequest& from) {
  11170. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListCollectionIdsRequest)
  11171. if (&from == this) return;
  11172. Clear();
  11173. MergeFrom(from);
  11174. }
  11175. bool ListCollectionIdsRequest::IsInitialized() const {
  11176. return true;
  11177. }
  11178. void ListCollectionIdsRequest::InternalSwap(ListCollectionIdsRequest* other) {
  11179. using std::swap;
  11180. _internal_metadata_.Swap(&other->_internal_metadata_);
  11181. parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  11182. GetArenaNoVirtual());
  11183. page_token_.Swap(&other->page_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  11184. GetArenaNoVirtual());
  11185. swap(page_size_, other->page_size_);
  11186. }
  11187. ::PROTOBUF_NAMESPACE_ID::Metadata ListCollectionIdsRequest::GetMetadata() const {
  11188. return GetMetadataStatic();
  11189. }
  11190. // ===================================================================
  11191. void ListCollectionIdsResponse::InitAsDefaultInstance() {
  11192. }
  11193. class ListCollectionIdsResponse::_Internal {
  11194. public:
  11195. };
  11196. ListCollectionIdsResponse::ListCollectionIdsResponse()
  11197. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  11198. SharedCtor();
  11199. // @@protoc_insertion_point(constructor:google.firestore.v1.ListCollectionIdsResponse)
  11200. }
  11201. ListCollectionIdsResponse::ListCollectionIdsResponse(const ListCollectionIdsResponse& from)
  11202. : ::PROTOBUF_NAMESPACE_ID::Message(),
  11203. _internal_metadata_(nullptr),
  11204. collection_ids_(from.collection_ids_) {
  11205. _internal_metadata_.MergeFrom(from._internal_metadata_);
  11206. next_page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  11207. if (!from.next_page_token().empty()) {
  11208. next_page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  11209. }
  11210. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListCollectionIdsResponse)
  11211. }
  11212. void ListCollectionIdsResponse::SharedCtor() {
  11213. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  11214. next_page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  11215. }
  11216. ListCollectionIdsResponse::~ListCollectionIdsResponse() {
  11217. // @@protoc_insertion_point(destructor:google.firestore.v1.ListCollectionIdsResponse)
  11218. SharedDtor();
  11219. }
  11220. void ListCollectionIdsResponse::SharedDtor() {
  11221. next_page_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  11222. }
  11223. void ListCollectionIdsResponse::SetCachedSize(int size) const {
  11224. _cached_size_.Set(size);
  11225. }
  11226. const ListCollectionIdsResponse& ListCollectionIdsResponse::default_instance() {
  11227. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  11228. return *internal_default_instance();
  11229. }
  11230. void ListCollectionIdsResponse::Clear() {
  11231. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListCollectionIdsResponse)
  11232. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11233. // Prevent compiler warnings about cached_has_bits being unused
  11234. (void) cached_has_bits;
  11235. collection_ids_.Clear();
  11236. next_page_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  11237. _internal_metadata_.Clear();
  11238. }
  11239. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  11240. const char* ListCollectionIdsResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  11241. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  11242. while (!ctx->Done(&ptr)) {
  11243. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  11244. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  11245. CHK_(ptr);
  11246. switch (tag >> 3) {
  11247. // repeated string collection_ids = 1;
  11248. case 1:
  11249. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  11250. ptr -= 1;
  11251. do {
  11252. ptr += 1;
  11253. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_collection_ids(), ptr, ctx, "google.firestore.v1.ListCollectionIdsResponse.collection_ids");
  11254. CHK_(ptr);
  11255. if (!ctx->DataAvailable(ptr)) break;
  11256. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
  11257. } else goto handle_unusual;
  11258. continue;
  11259. // string next_page_token = 2;
  11260. case 2:
  11261. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  11262. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_next_page_token(), ptr, ctx, "google.firestore.v1.ListCollectionIdsResponse.next_page_token");
  11263. CHK_(ptr);
  11264. } else goto handle_unusual;
  11265. continue;
  11266. default: {
  11267. handle_unusual:
  11268. if ((tag & 7) == 4 || tag == 0) {
  11269. ctx->SetLastTag(tag);
  11270. goto success;
  11271. }
  11272. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  11273. CHK_(ptr != nullptr);
  11274. continue;
  11275. }
  11276. } // switch
  11277. } // while
  11278. success:
  11279. return ptr;
  11280. failure:
  11281. ptr = nullptr;
  11282. goto success;
  11283. #undef CHK_
  11284. }
  11285. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  11286. bool ListCollectionIdsResponse::MergePartialFromCodedStream(
  11287. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  11288. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  11289. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  11290. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListCollectionIdsResponse)
  11291. for (;;) {
  11292. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  11293. tag = p.first;
  11294. if (!p.second) goto handle_unusual;
  11295. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  11296. // repeated string collection_ids = 1;
  11297. case 1: {
  11298. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  11299. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  11300. input, this->add_collection_ids()));
  11301. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11302. this->collection_ids(this->collection_ids_size() - 1).data(),
  11303. static_cast<int>(this->collection_ids(this->collection_ids_size() - 1).length()),
  11304. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  11305. "google.firestore.v1.ListCollectionIdsResponse.collection_ids"));
  11306. } else {
  11307. goto handle_unusual;
  11308. }
  11309. break;
  11310. }
  11311. // string next_page_token = 2;
  11312. case 2: {
  11313. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  11314. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  11315. input, this->mutable_next_page_token()));
  11316. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11317. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  11318. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  11319. "google.firestore.v1.ListCollectionIdsResponse.next_page_token"));
  11320. } else {
  11321. goto handle_unusual;
  11322. }
  11323. break;
  11324. }
  11325. default: {
  11326. handle_unusual:
  11327. if (tag == 0) {
  11328. goto success;
  11329. }
  11330. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  11331. input, tag, _internal_metadata_.mutable_unknown_fields()));
  11332. break;
  11333. }
  11334. }
  11335. }
  11336. success:
  11337. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListCollectionIdsResponse)
  11338. return true;
  11339. failure:
  11340. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListCollectionIdsResponse)
  11341. return false;
  11342. #undef DO_
  11343. }
  11344. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  11345. void ListCollectionIdsResponse::SerializeWithCachedSizes(
  11346. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  11347. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListCollectionIdsResponse)
  11348. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11349. (void) cached_has_bits;
  11350. // repeated string collection_ids = 1;
  11351. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  11352. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11353. this->collection_ids(i).data(), static_cast<int>(this->collection_ids(i).length()),
  11354. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  11355. "google.firestore.v1.ListCollectionIdsResponse.collection_ids");
  11356. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
  11357. 1, this->collection_ids(i), output);
  11358. }
  11359. // string next_page_token = 2;
  11360. if (this->next_page_token().size() > 0) {
  11361. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11362. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  11363. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  11364. "google.firestore.v1.ListCollectionIdsResponse.next_page_token");
  11365. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  11366. 2, this->next_page_token(), output);
  11367. }
  11368. if (_internal_metadata_.have_unknown_fields()) {
  11369. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  11370. _internal_metadata_.unknown_fields(), output);
  11371. }
  11372. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListCollectionIdsResponse)
  11373. }
  11374. ::PROTOBUF_NAMESPACE_ID::uint8* ListCollectionIdsResponse::InternalSerializeWithCachedSizesToArray(
  11375. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  11376. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListCollectionIdsResponse)
  11377. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11378. (void) cached_has_bits;
  11379. // repeated string collection_ids = 1;
  11380. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  11381. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11382. this->collection_ids(i).data(), static_cast<int>(this->collection_ids(i).length()),
  11383. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  11384. "google.firestore.v1.ListCollectionIdsResponse.collection_ids");
  11385. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  11386. WriteStringToArray(1, this->collection_ids(i), target);
  11387. }
  11388. // string next_page_token = 2;
  11389. if (this->next_page_token().size() > 0) {
  11390. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  11391. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  11392. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  11393. "google.firestore.v1.ListCollectionIdsResponse.next_page_token");
  11394. target =
  11395. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  11396. 2, this->next_page_token(), target);
  11397. }
  11398. if (_internal_metadata_.have_unknown_fields()) {
  11399. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  11400. _internal_metadata_.unknown_fields(), target);
  11401. }
  11402. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListCollectionIdsResponse)
  11403. return target;
  11404. }
  11405. size_t ListCollectionIdsResponse::ByteSizeLong() const {
  11406. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListCollectionIdsResponse)
  11407. size_t total_size = 0;
  11408. if (_internal_metadata_.have_unknown_fields()) {
  11409. total_size +=
  11410. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  11411. _internal_metadata_.unknown_fields());
  11412. }
  11413. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11414. // Prevent compiler warnings about cached_has_bits being unused
  11415. (void) cached_has_bits;
  11416. // repeated string collection_ids = 1;
  11417. total_size += 1 *
  11418. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->collection_ids_size());
  11419. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  11420. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  11421. this->collection_ids(i));
  11422. }
  11423. // string next_page_token = 2;
  11424. if (this->next_page_token().size() > 0) {
  11425. total_size += 1 +
  11426. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  11427. this->next_page_token());
  11428. }
  11429. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  11430. SetCachedSize(cached_size);
  11431. return total_size;
  11432. }
  11433. void ListCollectionIdsResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  11434. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListCollectionIdsResponse)
  11435. GOOGLE_DCHECK_NE(&from, this);
  11436. const ListCollectionIdsResponse* source =
  11437. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListCollectionIdsResponse>(
  11438. &from);
  11439. if (source == nullptr) {
  11440. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListCollectionIdsResponse)
  11441. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  11442. } else {
  11443. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListCollectionIdsResponse)
  11444. MergeFrom(*source);
  11445. }
  11446. }
  11447. void ListCollectionIdsResponse::MergeFrom(const ListCollectionIdsResponse& from) {
  11448. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListCollectionIdsResponse)
  11449. GOOGLE_DCHECK_NE(&from, this);
  11450. _internal_metadata_.MergeFrom(from._internal_metadata_);
  11451. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  11452. (void) cached_has_bits;
  11453. collection_ids_.MergeFrom(from.collection_ids_);
  11454. if (from.next_page_token().size() > 0) {
  11455. next_page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  11456. }
  11457. }
  11458. void ListCollectionIdsResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  11459. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListCollectionIdsResponse)
  11460. if (&from == this) return;
  11461. Clear();
  11462. MergeFrom(from);
  11463. }
  11464. void ListCollectionIdsResponse::CopyFrom(const ListCollectionIdsResponse& from) {
  11465. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListCollectionIdsResponse)
  11466. if (&from == this) return;
  11467. Clear();
  11468. MergeFrom(from);
  11469. }
  11470. bool ListCollectionIdsResponse::IsInitialized() const {
  11471. return true;
  11472. }
  11473. void ListCollectionIdsResponse::InternalSwap(ListCollectionIdsResponse* other) {
  11474. using std::swap;
  11475. _internal_metadata_.Swap(&other->_internal_metadata_);
  11476. collection_ids_.InternalSwap(CastToBase(&other->collection_ids_));
  11477. next_page_token_.Swap(&other->next_page_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  11478. GetArenaNoVirtual());
  11479. }
  11480. ::PROTOBUF_NAMESPACE_ID::Metadata ListCollectionIdsResponse::GetMetadata() const {
  11481. return GetMetadataStatic();
  11482. }
  11483. // @@protoc_insertion_point(namespace_scope)
  11484. } // namespace v1
  11485. } // namespace firestore
  11486. } // namespace google
  11487. PROTOBUF_NAMESPACE_OPEN
  11488. template<> PROTOBUF_NOINLINE ::google::firestore::v1::GetDocumentRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::GetDocumentRequest >(Arena* arena) {
  11489. return Arena::CreateInternal< ::google::firestore::v1::GetDocumentRequest >(arena);
  11490. }
  11491. template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListDocumentsRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::ListDocumentsRequest >(Arena* arena) {
  11492. return Arena::CreateInternal< ::google::firestore::v1::ListDocumentsRequest >(arena);
  11493. }
  11494. template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListDocumentsResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::ListDocumentsResponse >(Arena* arena) {
  11495. return Arena::CreateInternal< ::google::firestore::v1::ListDocumentsResponse >(arena);
  11496. }
  11497. template<> PROTOBUF_NOINLINE ::google::firestore::v1::CreateDocumentRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::CreateDocumentRequest >(Arena* arena) {
  11498. return Arena::CreateInternal< ::google::firestore::v1::CreateDocumentRequest >(arena);
  11499. }
  11500. template<> PROTOBUF_NOINLINE ::google::firestore::v1::UpdateDocumentRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::UpdateDocumentRequest >(Arena* arena) {
  11501. return Arena::CreateInternal< ::google::firestore::v1::UpdateDocumentRequest >(arena);
  11502. }
  11503. template<> PROTOBUF_NOINLINE ::google::firestore::v1::DeleteDocumentRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::DeleteDocumentRequest >(Arena* arena) {
  11504. return Arena::CreateInternal< ::google::firestore::v1::DeleteDocumentRequest >(arena);
  11505. }
  11506. template<> PROTOBUF_NOINLINE ::google::firestore::v1::BatchGetDocumentsRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::BatchGetDocumentsRequest >(Arena* arena) {
  11507. return Arena::CreateInternal< ::google::firestore::v1::BatchGetDocumentsRequest >(arena);
  11508. }
  11509. template<> PROTOBUF_NOINLINE ::google::firestore::v1::BatchGetDocumentsResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::BatchGetDocumentsResponse >(Arena* arena) {
  11510. return Arena::CreateInternal< ::google::firestore::v1::BatchGetDocumentsResponse >(arena);
  11511. }
  11512. template<> PROTOBUF_NOINLINE ::google::firestore::v1::BeginTransactionRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::BeginTransactionRequest >(Arena* arena) {
  11513. return Arena::CreateInternal< ::google::firestore::v1::BeginTransactionRequest >(arena);
  11514. }
  11515. template<> PROTOBUF_NOINLINE ::google::firestore::v1::BeginTransactionResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::BeginTransactionResponse >(Arena* arena) {
  11516. return Arena::CreateInternal< ::google::firestore::v1::BeginTransactionResponse >(arena);
  11517. }
  11518. template<> PROTOBUF_NOINLINE ::google::firestore::v1::CommitRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::CommitRequest >(Arena* arena) {
  11519. return Arena::CreateInternal< ::google::firestore::v1::CommitRequest >(arena);
  11520. }
  11521. template<> PROTOBUF_NOINLINE ::google::firestore::v1::CommitResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::CommitResponse >(Arena* arena) {
  11522. return Arena::CreateInternal< ::google::firestore::v1::CommitResponse >(arena);
  11523. }
  11524. template<> PROTOBUF_NOINLINE ::google::firestore::v1::RollbackRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::RollbackRequest >(Arena* arena) {
  11525. return Arena::CreateInternal< ::google::firestore::v1::RollbackRequest >(arena);
  11526. }
  11527. template<> PROTOBUF_NOINLINE ::google::firestore::v1::RunQueryRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::RunQueryRequest >(Arena* arena) {
  11528. return Arena::CreateInternal< ::google::firestore::v1::RunQueryRequest >(arena);
  11529. }
  11530. template<> PROTOBUF_NOINLINE ::google::firestore::v1::RunQueryResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::RunQueryResponse >(Arena* arena) {
  11531. return Arena::CreateInternal< ::google::firestore::v1::RunQueryResponse >(arena);
  11532. }
  11533. template<> PROTOBUF_NOINLINE ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse >(Arena* arena) {
  11534. return Arena::CreateInternal< ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse >(arena);
  11535. }
  11536. template<> PROTOBUF_NOINLINE ::google::firestore::v1::WriteRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::WriteRequest >(Arena* arena) {
  11537. return Arena::CreateInternal< ::google::firestore::v1::WriteRequest >(arena);
  11538. }
  11539. template<> PROTOBUF_NOINLINE ::google::firestore::v1::WriteResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::WriteResponse >(Arena* arena) {
  11540. return Arena::CreateInternal< ::google::firestore::v1::WriteResponse >(arena);
  11541. }
  11542. template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse >(Arena* arena) {
  11543. return Arena::CreateInternal< ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse >(arena);
  11544. }
  11545. template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListenRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::ListenRequest >(Arena* arena) {
  11546. return Arena::CreateInternal< ::google::firestore::v1::ListenRequest >(arena);
  11547. }
  11548. template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListenResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::ListenResponse >(Arena* arena) {
  11549. return Arena::CreateInternal< ::google::firestore::v1::ListenResponse >(arena);
  11550. }
  11551. template<> PROTOBUF_NOINLINE ::google::firestore::v1::Target_DocumentsTarget* Arena::CreateMaybeMessage< ::google::firestore::v1::Target_DocumentsTarget >(Arena* arena) {
  11552. return Arena::CreateInternal< ::google::firestore::v1::Target_DocumentsTarget >(arena);
  11553. }
  11554. template<> PROTOBUF_NOINLINE ::google::firestore::v1::Target_QueryTarget* Arena::CreateMaybeMessage< ::google::firestore::v1::Target_QueryTarget >(Arena* arena) {
  11555. return Arena::CreateInternal< ::google::firestore::v1::Target_QueryTarget >(arena);
  11556. }
  11557. template<> PROTOBUF_NOINLINE ::google::firestore::v1::Target* Arena::CreateMaybeMessage< ::google::firestore::v1::Target >(Arena* arena) {
  11558. return Arena::CreateInternal< ::google::firestore::v1::Target >(arena);
  11559. }
  11560. template<> PROTOBUF_NOINLINE ::google::firestore::v1::TargetChange* Arena::CreateMaybeMessage< ::google::firestore::v1::TargetChange >(Arena* arena) {
  11561. return Arena::CreateInternal< ::google::firestore::v1::TargetChange >(arena);
  11562. }
  11563. template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListCollectionIdsRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::ListCollectionIdsRequest >(Arena* arena) {
  11564. return Arena::CreateInternal< ::google::firestore::v1::ListCollectionIdsRequest >(arena);
  11565. }
  11566. template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListCollectionIdsResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::ListCollectionIdsResponse >(Arena* arena) {
  11567. return Arena::CreateInternal< ::google::firestore::v1::ListCollectionIdsResponse >(arena);
  11568. }
  11569. PROTOBUF_NAMESPACE_CLOSE
  11570. // @@protoc_insertion_point(global_scope)
  11571. #include <google/protobuf/port_undef.inc>